forked from External/mage
[SLD] Implement Kratos, God of War
This commit is contained in:
parent
8bdf3378dc
commit
8749dcc2d4
2 changed files with 96 additions and 0 deletions
95
Mage.Sets/src/mage/cards/k/KratosGodOfWar.java
Normal file
95
Mage.Sets/src/mage/cards/k/KratosGodOfWar.java
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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("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("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("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("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("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));
|
cards.add(new SetCardInfo("Forge Anew", 7002, Rarity.RARE, mage.cards.f.ForgeAnew.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue