mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[TLE] Implement Animal Attendant (#14262)
This commit is contained in:
parent
7a280a5851
commit
4a9ccabc5f
2 changed files with 69 additions and 0 deletions
68
Mage.Sets/src/mage/cards/a/AnimalAttendant.java
Normal file
68
Mage.Sets/src/mage/cards/a/AnimalAttendant.java
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.counter.AddCounterEnteringCreatureEffect;
|
||||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.watchers.Watcher;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author muz
|
||||
*/
|
||||
public final class AnimalAttendant extends CardImpl {
|
||||
|
||||
public AnimalAttendant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.CITIZEN);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {T}: Add one mana of any color. If that mana is spent to cast a non-Human creature spell, that creature enters with an additional +1/+1 counter on it.
|
||||
Ability ability = new AnyColorManaAbility(new TapSourceCost(), true);
|
||||
ability.getEffects().get(0).setText("Add one mana of any color. If that mana is spent to cast a non-Human creature spell, that creature enters with an additional +1/+1 counter on it");
|
||||
this.addAbility(ability, new AnimalAttendantWatcher());
|
||||
}
|
||||
|
||||
private AnimalAttendant(final AnimalAttendant card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnimalAttendant copy() {
|
||||
return new AnimalAttendant(this);
|
||||
}
|
||||
}
|
||||
class AnimalAttendantWatcher extends Watcher {
|
||||
|
||||
AnimalAttendantWatcher() {
|
||||
super(WatcherScope.CARD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.MANA_PAID) {
|
||||
Spell target = game.getSpell(event.getTargetId());
|
||||
if (event.getSourceId() != null
|
||||
&& event.getSourceId().equals(this.getSourceId())
|
||||
&& target != null && target.isCreature(game) && !target.hasSubtype(SubType.HUMAN, game)
|
||||
&& event.getFlag()) {
|
||||
game.getState().addEffect(new AddCounterEnteringCreatureEffect(new MageObjectReference(target.getCard(), game)),
|
||||
target.getSpellAbility());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -35,6 +35,7 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Agent of Treachery", 9, Rarity.MYTHIC, mage.cards.a.AgentOfTreachery.class));
|
||||
cards.add(new SetCardInfo("Air Nomad Student", 75, Rarity.UNCOMMON, mage.cards.a.AirNomadStudent.class));
|
||||
cards.add(new SetCardInfo("Allied Teamwork", 213, Rarity.RARE, mage.cards.a.AlliedTeamwork.class));
|
||||
cards.add(new SetCardInfo("Animal Attendant", 128, Rarity.UNCOMMON, mage.cards.a.AnimalAttendant.class));
|
||||
cards.add(new SetCardInfo("Appa, Aang's Companion", 214, Rarity.UNCOMMON, mage.cards.a.AppaAangsCompanion.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Appa, Aang's Companion", 268, Rarity.UNCOMMON, mage.cards.a.AppaAangsCompanion.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Appa, the Vigilant", 62, Rarity.RARE, mage.cards.a.AppaTheVigilant.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue