[TLA] Implement Katara, the Fearless

This commit is contained in:
theelk801 2025-08-12 17:14:30 -04:00
parent 6a59b703a9
commit 4b22e9755c
2 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,79 @@
package mage.cards.k;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KataraTheFearless extends CardImpl {
public KataraTheFearless(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}{U}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
this.subtype.add(SubType.ALLY);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// If a triggered ability of an Ally you control triggers, that ability triggers an additional time.
this.addAbility(new SimpleStaticAbility(new KataraTheFearlessEffect()));
}
private KataraTheFearless(final KataraTheFearless card) {
super(card);
}
@Override
public KataraTheFearless copy() {
return new KataraTheFearless(this);
}
}
class KataraTheFearlessEffect extends ReplacementEffectImpl {
KataraTheFearlessEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "if a triggered ability of an Ally you control triggers, that ability triggers an additional time";
}
private KataraTheFearlessEffect(final KataraTheFearlessEffect effect) {
super(effect);
}
@Override
public KataraTheFearlessEffect copy() {
return new KataraTheFearlessEffect(this);
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.NUMBER_OF_TRIGGERS;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
return permanent != null
&& permanent.isControlledBy(source.getControllerId())
&& permanent.hasSubtype(SubType.ALLY, game);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(event.getAmount() + 1);
return false;
}
}

View file

@ -1,6 +1,7 @@
package mage.sets;
import mage.cards.ExpansionSet;
import mage.constants.Rarity;
import mage.constants.SetType;
/**
@ -19,5 +20,7 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
this.blockName = "Avatar: The Last Airbender"; // for sorting in GUI
this.rotationSet = true;
this.hasBasicLands = false; // temporary
cards.add(new SetCardInfo("Katara, the Fearless", 230, Rarity.RARE, mage.cards.k.KataraTheFearless.class));
}
}