[LTC] Implement Forth Eorlingas! (#10467)

Also added the 2/2 Human Knight token used by a few LTC cards.
This commit is contained in:
Susucre 2023-06-19 04:39:11 +02:00 committed by GitHub
parent 27a8a00917
commit fb80bc06c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,85 @@
package mage.cards.f;
import java.util.UUID;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.BecomesMonarchSourceEffect;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.game.Game;
import mage.game.events.DamagedEvent;
import mage.game.events.DamagedPlayerBatchEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.HumanKnightToken;
/**
*
* @author Susucr
*/
public final class ForthEorlingas extends CardImpl {
public ForthEorlingas(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{W}");
// Create X 2/2 red Human Knight creature tokens with trample and haste.
this.getSpellAbility().addEffect(new CreateTokenEffect(
new HumanKnightToken(), ManacostVariableValue.REGULAR, false, false
));
// Whenever one or more creatures you control deal combat damage to one or more players this turn, you become the monarch.
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new ForthEorlingasTriggeredAbility()));
}
private ForthEorlingas(final ForthEorlingas card) {
super(card);
}
@Override
public ForthEorlingas copy() {
return new ForthEorlingas(this);
}
}
class ForthEorlingasTriggeredAbility extends DelayedTriggeredAbility {
public ForthEorlingasTriggeredAbility() {
super(new BecomesMonarchSourceEffect(), Duration.EndOfTurn, false);
this.setTriggerPhrase("Whenever one or more creatures you control deal combat damage to one or more players this turn, ");
}
public ForthEorlingasTriggeredAbility(ForthEorlingasTriggeredAbility ability) {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER_BATCH;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
DamagedPlayerBatchEvent dEvent = (DamagedPlayerBatchEvent) event;
for (DamagedEvent damagedEvent : dEvent.getEvents()) {
if (!damagedEvent.isCombatDamage()) {
continue;
}
Permanent permanent = game.getPermanent(damagedEvent.getSourceId());
if (permanent != null && permanent.isControlledBy(getControllerId())) {
return true;
}
}
return false;
}
@Override
public ForthEorlingasTriggeredAbility copy() {
return new ForthEorlingasTriggeredAbility(this);
}
}

View file

@ -92,6 +92,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
cards.add(new SetCardInfo("Flooded Grove", 309, Rarity.RARE, mage.cards.f.FloodedGrove.class));
cards.add(new SetCardInfo("Forbidden Alchemy", 191, Rarity.COMMON, mage.cards.f.ForbiddenAlchemy.class));
cards.add(new SetCardInfo("Foreboding Ruins", 310, Rarity.RARE, mage.cards.f.ForebodingRuins.class));
cards.add(new SetCardInfo("Forth Eorlingas!", 56, Rarity.RARE, mage.cards.f.ForthEorlingas.class));
cards.add(new SetCardInfo("Fortified Village", 311, Rarity.RARE, mage.cards.f.FortifiedVillage.class));
cards.add(new SetCardInfo("Frontier Warmonger", 217, Rarity.RARE, mage.cards.f.FrontierWarmonger.class));
cards.add(new SetCardInfo("Frontline Medic", 169, Rarity.RARE, mage.cards.f.FrontlineMedic.class));