From 8749dcc2d41b16820ffd26c5fda73441bad5c2c7 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Mon, 29 Sep 2025 09:33:57 -0400 Subject: [PATCH] [SLD] Implement Kratos, God of War --- .../src/mage/cards/k/KratosGodOfWar.java | 95 +++++++++++++++++++ Mage.Sets/src/mage/sets/SecretLairDrop.java | 1 + 2 files changed, 96 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KratosGodOfWar.java diff --git a/Mage.Sets/src/mage/cards/k/KratosGodOfWar.java b/Mage.Sets/src/mage/cards/k/KratosGodOfWar.java new file mode 100644 index 00000000000..bb8044ebe62 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KratosGodOfWar.java @@ -0,0 +1,95 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.AttackedThisTurnPredicate; +import mage.game.Game; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KratosGodOfWar extends CardImpl { + + public KratosGodOfWar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{R}{R}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.GOD); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Double strike + this.addAbility(DoubleStrikeAbility.getInstance()); + + // All creatures have haste. + this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( + HasteAbility.getInstance(), Duration.WhileControlled, + StaticFilters.FILTER_PERMANENT_CREATURE + ).setText("all creatures have haste"))); + + // At the beginning of each player's end step, Kratos deals damage to that player equal to the number of creatures that player controls that didn't attack this turn. + this.addAbility(new BeginningOfEndStepTriggeredAbility( + TargetController.EACH_PLAYER, new KratosGodOfWarEffect(), false + )); + } + + private KratosGodOfWar(final KratosGodOfWar card) { + super(card); + } + + @Override + public KratosGodOfWar copy() { + return new KratosGodOfWar(this); + } +} + +class KratosGodOfWarEffect extends OneShotEffect { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent(); + + static { + filter.add(Predicates.not(AttackedThisTurnPredicate.instance)); + } + + KratosGodOfWarEffect() { + super(Outcome.Benefit); + staticText = "{this} deals damage to that player equal to the number of creatures " + + "that player controls that didn't attack this turn."; + } + + private KratosGodOfWarEffect(final KratosGodOfWarEffect effect) { + super(effect); + } + + @Override + public KratosGodOfWarEffect copy() { + return new KratosGodOfWarEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(game.getActivePlayerId()); + if (player == null) { + return false; + } + int count = game.getBattlefield().count(filter, source.getControllerId(), source, game); + return count > 0 && player.damage(count, source, game) > 0; + } +} diff --git a/Mage.Sets/src/mage/sets/SecretLairDrop.java b/Mage.Sets/src/mage/sets/SecretLairDrop.java index 121a87113cf..119bdde09fb 100644 --- a/Mage.Sets/src/mage/sets/SecretLairDrop.java +++ b/Mage.Sets/src/mage/sets/SecretLairDrop.java @@ -2067,6 +2067,7 @@ public class SecretLairDrop extends ExpansionSet { cards.add(new SetCardInfo("Wurmcoil Engine", 2196, Rarity.MYTHIC, mage.cards.w.WurmcoilEngine.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Joel, Resolute Survivor", 2198, Rarity.MYTHIC, mage.cards.j.JoelResoluteSurvivor.class)); cards.add(new SetCardInfo("Ellie, Vengeful Hunter", 2203, Rarity.MYTHIC, mage.cards.e.EllieVengefulHunter.class)); + cards.add(new SetCardInfo("Kratos, God of War", 2207, Rarity.MYTHIC, mage.cards.k.KratosGodOfWar.class)); cards.add(new SetCardInfo("Atreus, Impulsive Son", 2212, Rarity.MYTHIC, mage.cards.a.AtreusImpulsiveSon.class)); cards.add(new SetCardInfo("Feed the Swarm", 7001, Rarity.RARE, mage.cards.f.FeedTheSwarm.class)); cards.add(new SetCardInfo("Forge Anew", 7002, Rarity.RARE, mage.cards.f.ForgeAnew.class));