mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[TLA] Implement Wan Shi Tong, Librarian
This commit is contained in:
parent
31b682644a
commit
9cfbcf6f84
2 changed files with 102 additions and 0 deletions
100
Mage.Sets/src/mage/cards/w/WanShiTongLibrarian.java
Normal file
100
Mage.Sets/src/mage/cards/w/WanShiTongLibrarian.java
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
package mage.cards.w;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.HalfValue;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
|
import mage.abilities.keyword.FlashAbility;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
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.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class WanShiTongLibrarian extends CardImpl {
|
||||||
|
|
||||||
|
private static final DynamicValue xValue = new HalfValue(GetXValue.instance, false);
|
||||||
|
|
||||||
|
public WanShiTongLibrarian(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{U}{U}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.BIRD);
|
||||||
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// Flash
|
||||||
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Vigilance
|
||||||
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
|
// When Wan Shi Tong enters, put X +1/+1 counters on him. Then draw half X cards, rounded down.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||||
|
new AddCountersSourceEffect(CounterType.P1P1.createInstance(), GetXValue.instance)
|
||||||
|
.setText("put X +1/+1 counters on him")
|
||||||
|
);
|
||||||
|
ability.addEffect(new DrawCardSourceControllerEffect(xValue).setText("Then draw half X cards, rounded down"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Whenever an opponent searches their library, put a +1/+1 counter on Wan Shi Tong and draw a card.
|
||||||
|
this.addAbility(new WanShiTongLibrarianTriggeredAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
private WanShiTongLibrarian(final WanShiTongLibrarian card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WanShiTongLibrarian copy() {
|
||||||
|
return new WanShiTongLibrarian(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WanShiTongLibrarianTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
WanShiTongLibrarianTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
||||||
|
this.setTriggerPhrase("Whenever an opponent searches their library, ");
|
||||||
|
this.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private WanShiTongLibrarianTriggeredAbility(final WanShiTongLibrarianTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WanShiTongLibrarianTriggeredAbility copy() {
|
||||||
|
return new WanShiTongLibrarianTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.LIBRARY_SEARCHED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
return game.getOpponents(getControllerId()).contains(event.getPlayerId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -377,6 +377,8 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Vengeful Villagers", 40, Rarity.UNCOMMON, mage.cards.v.VengefulVillagers.class));
|
cards.add(new SetCardInfo("Vengeful Villagers", 40, Rarity.UNCOMMON, mage.cards.v.VengefulVillagers.class));
|
||||||
cards.add(new SetCardInfo("Vindictive Warden", 249, Rarity.COMMON, mage.cards.v.VindictiveWarden.class));
|
cards.add(new SetCardInfo("Vindictive Warden", 249, Rarity.COMMON, mage.cards.v.VindictiveWarden.class));
|
||||||
cards.add(new SetCardInfo("Walltop Sentries", 202, Rarity.COMMON, mage.cards.w.WalltopSentries.class));
|
cards.add(new SetCardInfo("Walltop Sentries", 202, Rarity.COMMON, mage.cards.w.WalltopSentries.class));
|
||||||
|
cards.add(new SetCardInfo("Wan Shi Tong, Librarian", 320, Rarity.MYTHIC, mage.cards.w.WanShiTongLibrarian.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Wan Shi Tong, Librarian", 78, Rarity.MYTHIC, mage.cards.w.WanShiTongLibrarian.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Wandering Musicians", 250, Rarity.COMMON, mage.cards.w.WanderingMusicians.class));
|
cards.add(new SetCardInfo("Wandering Musicians", 250, Rarity.COMMON, mage.cards.w.WanderingMusicians.class));
|
||||||
cards.add(new SetCardInfo("War Balloon", 159, Rarity.UNCOMMON, mage.cards.w.WarBalloon.class));
|
cards.add(new SetCardInfo("War Balloon", 159, Rarity.UNCOMMON, mage.cards.w.WarBalloon.class));
|
||||||
cards.add(new SetCardInfo("Water Tribe Captain", 41, Rarity.COMMON, mage.cards.w.WaterTribeCaptain.class));
|
cards.add(new SetCardInfo("Water Tribe Captain", 41, Rarity.COMMON, mage.cards.w.WaterTribeCaptain.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue