[DSK] Implement Attack in the Box

This commit is contained in:
theelk801 2024-09-05 10:40:38 -04:00
parent f56dbadf18
commit c6a3ddbbb9
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,48 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AttackInTheBox extends CardImpl {
public AttackInTheBox(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
this.subtype.add(SubType.TOY);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// Whenever Attack-in-the-Box attacks, you may have it get +4/+0 until end of turn. If you do, sacrifice it at the beginning of the next end step.
Ability ability = new AttacksTriggeredAbility(new BoostSourceEffect(
4, 0, Duration.EndOfTurn
).setText("have it get +4/+0 until end of turn"));
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect())
).setText("If you do, sacrifice it at the beginning of the next end step"));
this.addAbility(ability);
}
private AttackInTheBox(final AttackInTheBox card) {
super(card);
}
@Override
public AttackInTheBox copy() {
return new AttackInTheBox(this);
}
}

View file

@ -22,6 +22,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
this.hasBoosters = false; // temporary
cards.add(new SetCardInfo("Abandoned Campground", 255, Rarity.COMMON, mage.cards.a.AbandonedCampground.class));
cards.add(new SetCardInfo("Attack-in-the-Box", 242, Rarity.UNCOMMON, mage.cards.a.AttackInTheBox.class));
cards.add(new SetCardInfo("Blazemire Verge", 256, Rarity.RARE, mage.cards.b.BlazemireVerge.class));
cards.add(new SetCardInfo("Bleeding Woods", 257, Rarity.COMMON, mage.cards.b.BleedingWoods.class));
cards.add(new SetCardInfo("Chainsaw", 128, Rarity.RARE, mage.cards.c.Chainsaw.class));