mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[TLE] Implement Lo and Li, Royal Advisors
This commit is contained in:
parent
79afaa0fbb
commit
4e2c4ec1f0
2 changed files with 88 additions and 0 deletions
86
Mage.Sets/src/mage/cards/l/LoAndLiRoyalAdvisors.java
Normal file
86
Mage.Sets/src/mage/cards/l/LoAndLiRoyalAdvisors.java
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
package mage.cards.l;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.MillCardsTargetEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class LoAndLiRoyalAdvisors extends CardImpl {
|
||||||
|
|
||||||
|
public LoAndLiRoyalAdvisors(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.ADVISOR);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Whenever an opponent discards a card or mills one or more cards, put a +1/+1 counter on each Advisor you control.
|
||||||
|
this.addAbility(new LoAndLiRoyalAdvisorsTriggeredAbility());
|
||||||
|
|
||||||
|
// {2}{U/B}: Target player mills four cards.
|
||||||
|
Ability ability = new SimpleActivatedAbility(new MillCardsTargetEffect(4), new ManaCostsImpl<>("{2}{U/B}"));
|
||||||
|
ability.addTarget(new TargetPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LoAndLiRoyalAdvisors(final LoAndLiRoyalAdvisors card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LoAndLiRoyalAdvisors copy() {
|
||||||
|
return new LoAndLiRoyalAdvisors(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LoAndLiRoyalAdvisorsTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.ADVISOR);
|
||||||
|
|
||||||
|
LoAndLiRoyalAdvisorsTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter));
|
||||||
|
setTriggerPhrase("Whenever an opponent discards a card or mills one or more cards, ");
|
||||||
|
}
|
||||||
|
|
||||||
|
private LoAndLiRoyalAdvisorsTriggeredAbility(final LoAndLiRoyalAdvisorsTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LoAndLiRoyalAdvisorsTriggeredAbility copy() {
|
||||||
|
return new LoAndLiRoyalAdvisorsTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.DISCARDED_CARD
|
||||||
|
|| event.getType() == GameEvent.EventType.MILLED_CARDS_BATCH_FOR_ONE_PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
return game.getOpponents(getControllerId()).contains(event.getPlayerId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -170,6 +170,8 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Lightning Bolt", 32, Rarity.MYTHIC, mage.cards.l.LightningBolt.class));
|
cards.add(new SetCardInfo("Lightning Bolt", 32, Rarity.MYTHIC, mage.cards.l.LightningBolt.class));
|
||||||
cards.add(new SetCardInfo("Lion Vulture", 232, Rarity.RARE, mage.cards.l.LionVulture.class));
|
cards.add(new SetCardInfo("Lion Vulture", 232, Rarity.RARE, mage.cards.l.LionVulture.class));
|
||||||
cards.add(new SetCardInfo("Lita, Mechanical Engineer", 4, Rarity.MYTHIC, mage.cards.l.LitaMechanicalEngineer.class));
|
cards.add(new SetCardInfo("Lita, Mechanical Engineer", 4, Rarity.MYTHIC, mage.cards.l.LitaMechanicalEngineer.class));
|
||||||
|
cards.add(new SetCardInfo("Lo and Li, Royal Advisors", 108, Rarity.RARE, mage.cards.l.LoAndLiRoyalAdvisors.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Lo and Li, Royal Advisors", 189, Rarity.RARE, mage.cards.l.LoAndLiRoyalAdvisors.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Longshot, Rebel Bowman", 120, Rarity.UNCOMMON, mage.cards.l.LongshotRebelBowman.class));
|
cards.add(new SetCardInfo("Longshot, Rebel Bowman", 120, Rarity.UNCOMMON, mage.cards.l.LongshotRebelBowman.class));
|
||||||
cards.add(new SetCardInfo("Lost in the Spirit World", 224, Rarity.UNCOMMON, mage.cards.l.LostInTheSpiritWorld.class));
|
cards.add(new SetCardInfo("Lost in the Spirit World", 224, Rarity.UNCOMMON, mage.cards.l.LostInTheSpiritWorld.class));
|
||||||
cards.add(new SetCardInfo("Loyal Fire Sage", 242, Rarity.UNCOMMON, mage.cards.l.LoyalFireSage.class));
|
cards.add(new SetCardInfo("Loyal Fire Sage", 242, Rarity.UNCOMMON, mage.cards.l.LoyalFireSage.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue