mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Converted "At the beginning of the end step, sacrifice CARDNAME.", can be targeted by Stifle
This commit is contained in:
@@ -2,7 +2,8 @@ Name:Sneak Attack
|
||||
ManaCost:3 R
|
||||
Types:Enchantment
|
||||
A:AB$ ChangeZone | Cost$ R | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature.YouCtrl | SubAbility$ DBPump | RememberChanged$ True | ForgetOtherRemembered$ True | SpellDescription$ You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice the creature at the beginning of the next end step.
|
||||
SVar:DBPump:DB$ Pump | KW$ Haste & HIDDEN At the beginning of the end step, sacrifice CARDNAME. | Defined$ Remembered | SubAbility$ DBCleanup
|
||||
SVar:DBPump:DB$ Pump | KW$ Haste | Defined$ Remembered | Permanent$ True | SubAbility$ DBPump2
|
||||
SVar:DBPump2:DB$ Pump | Defined$ Remembered | KW$ HIDDEN At the beginning of the end step, sacrifice CARDNAME. | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:NonStackingEffect:True
|
||||
SVar:RemAIDeck:True
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package forge.game.phase;
|
||||
|
||||
import forge.Card;
|
||||
import forge.card.ability.AbilityFactory;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.spellability.Ability;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
@@ -58,21 +59,18 @@ public class EndOfTurn extends Phase {
|
||||
for (final Card c : game.getCardsIn(ZoneType.Battlefield)) {
|
||||
if (!c.isFaceDown() && c.hasKeyword("At the beginning of the end step, sacrifice CARDNAME.")) {
|
||||
final Card card = c;
|
||||
final SpellAbility sac = new Ability(card, ManaCost.ZERO) {
|
||||
@Override
|
||||
public void resolve() {
|
||||
final Card current = game.getCardState(card);
|
||||
if (current.isInPlay()) {
|
||||
game.getAction().sacrifice(current, null);
|
||||
}
|
||||
}
|
||||
};
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("Sacrifice ").append(card);
|
||||
sac.setStackDescription(sb.toString());
|
||||
sac.setDescription(sb.toString());
|
||||
String sb = "At the beginning of the end step, sacrifice CARDNAME.";
|
||||
String effect = "AB$ Sacrifice | Cost$ 0 | SacValid$ Self";
|
||||
|
||||
game.getStack().addSimultaneousStackEntry(sac);
|
||||
SpellAbility ability = AbilityFactory.getAbility(effect, card);
|
||||
ability.setActivatingPlayer(card.getController());
|
||||
ability.setDescription(sb);
|
||||
ability.setStackDescription(sb);
|
||||
ability.setTrigger(true);
|
||||
final int amount = card.getKeywordAmount("At the beginning of the end step, sacrifice CARDNAME.");
|
||||
for (int i = 0; i < amount; i++) {
|
||||
game.getStack().addSimultaneousStackEntry(ability);
|
||||
}
|
||||
|
||||
}
|
||||
if (!c.isFaceDown() && c.hasKeyword("At the beginning of the end step, exile CARDNAME.")) {
|
||||
|
||||
Reference in New Issue
Block a user