mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
retire keywords: "Whenever CARDNAME blocks a creature, destroy that creature at end of combat" and
"Whenever CARDNAME becomes blocked by a creature, destroy that creature at end of combat"
This commit is contained in:
@@ -4,7 +4,7 @@ Types:Creature Eye
|
||||
Text:no text
|
||||
PT:6/3
|
||||
K:stPumpAll:Creature.nonEye+YouCtrl:0/0/HIDDEN CARDNAME can't attack.:No condition:Non-Eye creatures you control can't attack.
|
||||
T:Mode$ AttackerBlocked | ValidCard$ Card.Self | ValidBlocker$ Creature.nonWall | DelayedTrigger$ DelTrigBlocker | Secondary$ True | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a non-Wall creature, destroy that creature at end of combat.
|
||||
T:Mode$ AttackerBlocked | ValidCard$ Card.Self | ValidBlocker$ Creature | DelayedTrigger$ DelTrigBlocker | Secondary$ True | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by creature, destroy that creature at end of combat.
|
||||
SVar:DelTrigBlocker:Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Each | Execute$ TrigDestroyBlocker | TriggerDescription$ Destroy blocking creature at end of combat.
|
||||
SVar:TrigDestroyBlocker:AB$Destroy | Cost$ 0 | Defined$ TriggeredBlocker
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
@@ -940,10 +940,6 @@ public class Card extends MyObservable {
|
||||
|
||||
for (int i = 0; i < keyword.size(); i++) {
|
||||
if (!keyword.get(i).toString().contains("CostChange")
|
||||
&&
|
||||
!keyword.get(i).toString().contains("Whenever CARDNAME blocks a creature, destroy that creature at end of combat")
|
||||
&&
|
||||
!keyword.get(i).toString().contains("Whenever CARDNAME becomes blocked by a creature, destroy that creature at end of combat")
|
||||
&&
|
||||
!keyword.get(i).toString().contains("Permanents don't untap during their controllers' untap steps")
|
||||
&&
|
||||
|
||||
@@ -977,15 +977,6 @@ public class CombatUtil {
|
||||
//can the blocker destroy the attacker?
|
||||
public static boolean canDestroyAttacker(Card attacker, Card defender) {
|
||||
|
||||
if(defender.hasStartOfKeyword("Whenever CARDNAME blocks a creature, destroy that creature at end of combat")) {
|
||||
int KeywordPosition = defender.getKeywordPosition("Whenever CARDNAME blocks a creature, destroy that creature at end of combat");
|
||||
String parse = defender.getKeyword().get(KeywordPosition).toString();
|
||||
String k[] = parse.split(":");
|
||||
final String restrictions[] = k[1].split(",");
|
||||
if(attacker.isValidCard(restrictions, defender.getController(), defender) && !attacker.getKeyword().contains("Indestructible"))
|
||||
return true;
|
||||
}
|
||||
|
||||
if(attacker.getName().equals("Sylvan Basilisk") && !defender.getKeyword().contains("Indestructible")) return false;
|
||||
|
||||
int flankingMagnitude = 0;
|
||||
@@ -1002,6 +993,9 @@ public class CombatUtil {
|
||||
if(attacker.getKeyword().contains("Indestructible") &&
|
||||
!(defender.getKeyword().contains("Wither") || defender.getKeyword().contains("Infect"))) return false;
|
||||
|
||||
//unused
|
||||
//int attBushidoMagnitude = attacker.getKeywordMagnitude("Bushido");
|
||||
|
||||
int defenderDamage = defender.getNetAttack() + predictPowerBonusOfBlocker(attacker, defender);
|
||||
int attackerDamage = attacker.getNetAttack() + predictPowerBonusOfAttacker(attacker, defender);
|
||||
if (AllZoneUtil.isCardInPlay("Doran, the Siege Tower")) {
|
||||
@@ -1079,19 +1073,6 @@ public class CombatUtil {
|
||||
|
||||
if(attacker.getName().equals("Sylvan Basilisk") && !defender.getKeyword().contains("Indestructible")) return true;
|
||||
|
||||
if(attacker.hasStartOfKeyword("Whenever CARDNAME becomes blocked by a creature, destroy that creature at end of combat")) {
|
||||
int KeywordPosition = attacker.getKeywordPosition(
|
||||
"Whenever CARDNAME becomes blocked by a creature, destroy that creature at end of combat");
|
||||
String parse = attacker.getKeyword().get(KeywordPosition).toString();
|
||||
String k[] = parse.split(":");
|
||||
final String restrictions[] = k[1].split(",");
|
||||
if(defender.isValidCard(restrictions,attacker.getController(),attacker) && !defender.getKeyword().contains("Indestructible"))
|
||||
return true;
|
||||
}
|
||||
|
||||
//unused
|
||||
//int attBushidoMagnitude = attacker.getKeywordMagnitude("Bushido");
|
||||
|
||||
int defenderDamage = defender.getNetAttack() + predictPowerBonusOfBlocker(attacker, defender);
|
||||
int attackerDamage = attacker.getNetAttack() + predictPowerBonusOfAttacker(attacker, defender);
|
||||
if (AllZoneUtil.isCardInPlay("Doran, the Siege Tower")) {
|
||||
@@ -1709,12 +1690,10 @@ public class CombatUtil {
|
||||
|
||||
if(!a.getCreatureGotBlockedThisCombat()) {
|
||||
final int blockers = AllZone.Combat.getBlockers(a).size();
|
||||
|
||||
runParams.put("NumBlockers", blockers);
|
||||
AllZone.TriggerHandler.runTrigger("AttackerBlocked", runParams);
|
||||
|
||||
//AllZone.GameAction.checkWheneverKeyword(a,"BecomesBlocked",null); No longer needed
|
||||
|
||||
//Bushido
|
||||
for(Ability ab:CardFactoryUtil.getBushidoEffects(a))
|
||||
AllZone.Stack.add(ab);
|
||||
|
||||
@@ -1732,7 +1711,7 @@ public class CombatUtil {
|
||||
executeRampageAbility(a, magnitude, numBlockers);
|
||||
}
|
||||
} //find
|
||||
}//Rampage
|
||||
}//end Rampage
|
||||
}
|
||||
|
||||
if(a.getKeyword().contains("Flanking") && !b.getKeyword().contains("Flanking")) {
|
||||
@@ -1780,79 +1759,10 @@ public class CombatUtil {
|
||||
|
||||
AllZone.Stack.add(ability2);
|
||||
Log.debug("Adding Flanking!");
|
||||
//AllZone.GameAction.checkStateEffects();
|
||||
|
||||
}//flanking
|
||||
|
||||
|
||||
if(b.hasStartOfKeyword("Whenever CARDNAME blocks a creature, destroy that creature at end of combat")) {
|
||||
int KeywordPosition = b.getKeywordPosition("Whenever CARDNAME blocks a creature, destroy that creature at end of combat");
|
||||
String parse = b.getKeyword().get(KeywordPosition).toString();
|
||||
String k[] = parse.split(":");
|
||||
final String restrictions[] = k[1].split(",");
|
||||
if(a.isValidCard(restrictions,b.getController(),b)) {
|
||||
final Card attacker = a;
|
||||
final Ability ability = new Ability(b, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
//this isCardInPlay is probably not necessary since
|
||||
//if is checked in the atEOC before being put on stack
|
||||
if(AllZone.GameAction.isCardInPlay(attacker)) {
|
||||
AllZone.GameAction.destroy(attacker);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(b).append(" - destroy blocked creature.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
final Command atEOC = new Command() {
|
||||
private static final long serialVersionUID = 5854485314766349980L;
|
||||
|
||||
public void execute() {
|
||||
if(AllZone.GameAction.isCardInPlay(attacker)) {
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
AllZone.EndOfCombat.addAt(atEOC);
|
||||
}
|
||||
}// Whenever CARDNAME blocks a creature, destroy that creature at end of combat
|
||||
|
||||
if(a.hasStartOfKeyword("Whenever CARDNAME becomes blocked by a creature, destroy that creature at end of combat")) {
|
||||
int KeywordPosition = a.getKeywordPosition("Whenever CARDNAME becomes blocked by a creature, destroy that creature at end of combat");
|
||||
String parse = a.getKeyword().get(KeywordPosition).toString();
|
||||
String k[] = parse.split(":");
|
||||
final String restrictions[] = k[1].split(",");
|
||||
if(b.isValidCard(restrictions,a.getController(),a)) {
|
||||
final Card blocker = b;
|
||||
final Ability ability = new Ability(a, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
AllZone.GameAction.destroy(blocker);
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(a).append(" - destroy blocking creature.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
final Command atEOC = new Command() {
|
||||
|
||||
private static final long serialVersionUID = -9077416427198135373L;
|
||||
|
||||
public void execute() {
|
||||
if(AllZone.GameAction.isCardInPlay(blocker)) AllZone.Stack.add(ability);
|
||||
}
|
||||
};
|
||||
|
||||
AllZone.EndOfCombat.addAt(atEOC);
|
||||
}
|
||||
}//Whenever CARDNAME becomes blocked by a creature, destroy that creature at end of combat
|
||||
|
||||
|
||||
if (a.getName().equals("Robber Fly") && !a.getCreatureGotBlockedThisCombat()) {
|
||||
Player opp = b.getController();
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, opp);
|
||||
|
||||
@@ -329,8 +329,6 @@ public class CardFactoryUtil {
|
||||
value += c.getKeywordMagnitude("Rampage");
|
||||
value += c.getKeywordMagnitude("Annihilator") * 50;
|
||||
if (c.hasKeyword("Changeling")) value += 5;
|
||||
if (c.hasKeyword("Whenever CARDNAME becomes blocked by a creature, destroy that creature at end of combat")
|
||||
&& power > 0) value += power * 5;
|
||||
if (c.hasKeyword("Whenever a creature dealt damage by CARDNAME this turn is put into a graveyard, put a +1/+1 counter on CARDNAME.")
|
||||
&& power > 0) value += 2;
|
||||
if (c.hasKeyword("Whenever a creature dealt damage by CARDNAME this turn is put into a graveyard, put a +2/+2 counter on CARDNAME.")
|
||||
@@ -340,7 +338,6 @@ public class CardFactoryUtil {
|
||||
//Defensive Keywords
|
||||
if (c.hasKeyword("Reach")) value += 5;
|
||||
if (c.hasKeyword("CARDNAME can block creatures with shadow as though they didn't have shadow.")) value += 3;
|
||||
if (c.hasKeyword("Whenever CARDNAME blocks a creature, destroy that creature at end of combat")) value += 15;
|
||||
|
||||
//Protection
|
||||
if (c.hasKeyword("Indestructible")) value += 70;
|
||||
|
||||
Reference in New Issue
Block a user