mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[KHM] Implemented Deathknell Berserker (#7390)
* [KHM] Implemented Deathknell Berserker * [KHM] Deathknell Berserker - Fixup Condition
This commit is contained in:
parent
a23bc781f1
commit
a668b99264
2 changed files with 60 additions and 0 deletions
59
Mage.Sets/src/mage/cards/d/DeathknellBerserker.java
Normal file
59
Mage.Sets/src/mage/cards/d/DeathknellBerserker.java
Normal file
|
@ -0,0 +1,59 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.ZombieBerserkerToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class DeathknellBerserker extends CardImpl {
|
||||
|
||||
public DeathknellBerserker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.BERSERKER);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Deathknell Berserker dies, if its power was 3 or greater, create a 2/2 black Zombie Berserker creature token.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new DiesSourceTriggeredAbility(new CreateTokenEffect(new ZombieBerserkerToken())),
|
||||
DeathknellBerserkerCondtion.instance,
|
||||
"When {this} dies, if its power was 3 or greater, create a 2/2 black Zombie Berserker creature token."
|
||||
));
|
||||
}
|
||||
|
||||
private DeathknellBerserker(final DeathknellBerserker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeathknellBerserker copy() {
|
||||
return new DeathknellBerserker(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum DeathknellBerserkerCondtion implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = (Permanent) source.getEffects().get(0).getValue("permanentLeftBattlefield");
|
||||
return permanent != null && permanent.getPower().getValue() >= 3;
|
||||
}
|
||||
}
|
|
@ -81,6 +81,7 @@ public final class Kaldheim extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Clarion Spirit", 6, Rarity.UNCOMMON, mage.cards.c.ClarionSpirit.class));
|
||||
cards.add(new SetCardInfo("Cleaving Reaper", 376, Rarity.RARE, mage.cards.c.CleavingReaper.class));
|
||||
cards.add(new SetCardInfo("Darkbore Pathway", 254, Rarity.RARE, mage.cards.d.DarkborePathway.class));
|
||||
cards.add(new SetCardInfo("Deathknell Berserker", 83, Rarity.COMMON, mage.cards.d.DeathknellBerserker.class));
|
||||
cards.add(new SetCardInfo("Divine Gambit", 8, Rarity.UNCOMMON, mage.cards.d.DivineGambit.class));
|
||||
cards.add(new SetCardInfo("Dogged Pursuit", 85, Rarity.COMMON, mage.cards.d.DoggedPursuit.class));
|
||||
cards.add(new SetCardInfo("Doomskar Oracle", 10, Rarity.COMMON, mage.cards.d.DoomskarOracle.class));
|
||||
|
|
Loading…
Reference in a new issue