forked from External/mage
[TLA] Implement Toph, the Blind Bandit
This commit is contained in:
parent
cb28ffb1ab
commit
93f1008170
2 changed files with 99 additions and 0 deletions
98
Mage.Sets/src/mage/cards/t/TophTheBlindBandit.java
Normal file
98
Mage.Sets/src/mage/cards/t/TophTheBlindBandit.java
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect;
|
||||
import mage.abilities.effects.keyword.EarthbendTargetEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
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.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetControlledLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TophTheBlindBandit extends CardImpl {
|
||||
|
||||
public TophTheBlindBandit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.subtype.add(SubType.ALLY);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Toph enters, earthbend 2.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new EarthbendTargetEffect(2));
|
||||
ability.addTarget(new TargetControlledLandPermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Toph's power is equal to the number of +1/+1 counters on lands you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SetBasePowerSourceEffect(TophTheBlindBanditValue.instance)
|
||||
).addHint(TophTheBlindBanditValue.getHint()));
|
||||
}
|
||||
|
||||
private TophTheBlindBandit(final TophTheBlindBandit card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TophTheBlindBandit copy() {
|
||||
return new TophTheBlindBandit(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum TophTheBlindBanditValue implements DynamicValue {
|
||||
instance;
|
||||
private static final Hint hint = new ValueHint("+1/+1 counters on lands you control", instance);
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return game
|
||||
.getBattlefield()
|
||||
.getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND,
|
||||
sourceAbility.getControllerId(), sourceAbility, game
|
||||
)
|
||||
.stream()
|
||||
.map(permanent -> permanent.getCounters(game))
|
||||
.mapToInt(counters -> counters.getCount(CounterType.P1P1))
|
||||
.sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TophTheBlindBanditValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "+1/+1 counters on lands you control";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
|
@ -105,6 +105,7 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Southern Air Temple", 36, Rarity.UNCOMMON, mage.cards.s.SouthernAirTemple.class));
|
||||
cards.add(new SetCardInfo("Suki, Kyoshi Warrior", 243, Rarity.UNCOMMON, mage.cards.s.SukiKyoshiWarrior.class));
|
||||
cards.add(new SetCardInfo("Swamp", 289, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Toph, the Blind Bandit", 198, Rarity.UNCOMMON, mage.cards.t.TophTheBlindBandit.class));
|
||||
cards.add(new SetCardInfo("Toph, the First Metalbender", 247, Rarity.RARE, mage.cards.t.TophTheFirstMetalbender.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Toph, the First Metalbender", 353, Rarity.RARE, mage.cards.t.TophTheFirstMetalbender.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Toph, the First Metalbender", 362, Rarity.RARE, mage.cards.t.TophTheFirstMetalbender.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue