mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
implement [CLU] Lonis, Genetics Expert
This commit is contained in:
parent
643f168658
commit
804dd0ae2b
3 changed files with 93 additions and 1 deletions
91
Mage.Sets/src/mage/cards/l/LonisGeneticsExpert.java
Normal file
91
Mage.Sets/src/mage/cards/l/LonisGeneticsExpert.java
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
package mage.cards.l;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.OneOrMoreCountersAddedTriggeredAbility;
|
||||||
|
import mage.abilities.common.SacrificePermanentTriggeredAbility;
|
||||||
|
import mage.abilities.dynamicvalue.common.SavedDamageValue;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
|
import mage.abilities.effects.keyword.InvestigateEffect;
|
||||||
|
import mage.abilities.keyword.EvolveAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xenohedron
|
||||||
|
*/
|
||||||
|
public final class LonisGeneticsExpert extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Clue");
|
||||||
|
static {
|
||||||
|
filter.add(SubType.CLUE.getPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public LonisGeneticsExpert(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G/U}{G/U}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.SNAKE);
|
||||||
|
this.subtype.add(SubType.ELF);
|
||||||
|
this.subtype.add(SubType.DETECTIVE);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Evolve
|
||||||
|
this.addAbility(new EvolveAbility());
|
||||||
|
|
||||||
|
// Whenever one or more +1/+1 counters are put on Lonis, investigate that many times.
|
||||||
|
this.addAbility(new LonisGeneticsExpertTriggeredAbility());
|
||||||
|
|
||||||
|
// Whenever you sacrifice a Clue, put a +1/+1 counter on another target creature you control.
|
||||||
|
Ability ability = new SacrificePermanentTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), filter);
|
||||||
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LonisGeneticsExpert(final LonisGeneticsExpert card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LonisGeneticsExpert copy() {
|
||||||
|
return new LonisGeneticsExpert(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LonisGeneticsExpertTriggeredAbility extends OneOrMoreCountersAddedTriggeredAbility {
|
||||||
|
|
||||||
|
LonisGeneticsExpertTriggeredAbility() {
|
||||||
|
super(new InvestigateEffect(SavedDamageValue.MANY).setText("investigate that many times"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private LonisGeneticsExpertTriggeredAbility(final LonisGeneticsExpertTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LonisGeneticsExpertTriggeredAbility copy() {
|
||||||
|
return new LonisGeneticsExpertTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
if (super.checkTrigger(event, game)) {
|
||||||
|
this.getEffects().setValue("damage", event.getAmount());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -142,6 +142,7 @@ public final class RavnicaClueEdition extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Light Up the Stage", 140, Rarity.UNCOMMON, mage.cards.l.LightUpTheStage.class));
|
cards.add(new SetCardInfo("Light Up the Stage", 140, Rarity.UNCOMMON, mage.cards.l.LightUpTheStage.class));
|
||||||
cards.add(new SetCardInfo("Lightning Bolt", 141, Rarity.UNCOMMON, mage.cards.l.LightningBolt.class));
|
cards.add(new SetCardInfo("Lightning Bolt", 141, Rarity.UNCOMMON, mage.cards.l.LightningBolt.class));
|
||||||
cards.add(new SetCardInfo("Living Lightning", 142, Rarity.UNCOMMON, mage.cards.l.LivingLightning.class));
|
cards.add(new SetCardInfo("Living Lightning", 142, Rarity.UNCOMMON, mage.cards.l.LivingLightning.class));
|
||||||
|
cards.add(new SetCardInfo("Lonis, Genetics Expert", 37, Rarity.RARE, mage.cards.l.LonisGeneticsExpert.class));
|
||||||
cards.add(new SetCardInfo("Lounge", 19, Rarity.UNCOMMON, mage.cards.l.Lounge.class));
|
cards.add(new SetCardInfo("Lounge", 19, Rarity.UNCOMMON, mage.cards.l.Lounge.class));
|
||||||
cards.add(new SetCardInfo("Martial Impetus", 65, Rarity.UNCOMMON, mage.cards.m.MartialImpetus.class));
|
cards.add(new SetCardInfo("Martial Impetus", 65, Rarity.UNCOMMON, mage.cards.m.MartialImpetus.class));
|
||||||
cards.add(new SetCardInfo("Masked Blackguard", 115, Rarity.COMMON, mage.cards.m.MaskedBlackguard.class));
|
cards.add(new SetCardInfo("Masked Blackguard", 115, Rarity.COMMON, mage.cards.m.MaskedBlackguard.class));
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ public class OneOrMoreCountersAddedTriggeredAbility extends TriggeredAbilityImpl
|
||||||
setTriggerPhrase("Whenever one or more " + counterType.getName() + " counters are put on {this}, ");
|
setTriggerPhrase("Whenever one or more " + counterType.getName() + " counters are put on {this}, ");
|
||||||
}
|
}
|
||||||
|
|
||||||
private OneOrMoreCountersAddedTriggeredAbility(final OneOrMoreCountersAddedTriggeredAbility ability) {
|
protected OneOrMoreCountersAddedTriggeredAbility(final OneOrMoreCountersAddedTriggeredAbility ability) {
|
||||||
super(ability);
|
super(ability);
|
||||||
this.counterType = ability.counterType;
|
this.counterType = ability.counterType;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue