mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
retire keyword "Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it."
This commit is contained in:
@@ -907,8 +907,8 @@ public class CombatUtil {
|
|||||||
if(attacker.getKeyword().contains("Indestructible") &&
|
if(attacker.getKeyword().contains("Indestructible") &&
|
||||||
!(defender.getKeyword().contains("Wither") || defender.getKeyword().contains("Infect"))) return false;
|
!(defender.getKeyword().contains("Wither") || defender.getKeyword().contains("Infect"))) return false;
|
||||||
|
|
||||||
int attBushidoMagnitude = attacker.getKeywordMagnitude("Bushido");
|
//unused
|
||||||
attBushidoMagnitude += attacker.getAmountOfKeyword("Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it.");
|
//int attBushidoMagnitude = attacker.getKeywordMagnitude("Bushido");
|
||||||
|
|
||||||
int defenderDamage = defender.getNetAttack() + predictPowerBonusOfBlocker(attacker, defender);
|
int defenderDamage = defender.getNetAttack() + predictPowerBonusOfBlocker(attacker, defender);
|
||||||
int attackerDamage = attacker.getNetAttack() + predictPowerBonusOfAttacker(attacker, defender);
|
int attackerDamage = attacker.getNetAttack() + predictPowerBonusOfAttacker(attacker, defender);
|
||||||
@@ -997,9 +997,8 @@ public class CombatUtil {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int attBushidoMagnitude = attacker.getKeywordMagnitude("Bushido");
|
//unused
|
||||||
attBushidoMagnitude += attacker.getAmountOfKeyword(
|
//int attBushidoMagnitude = attacker.getKeywordMagnitude("Bushido");
|
||||||
"Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it.");
|
|
||||||
|
|
||||||
int defenderDamage = defender.getNetAttack() + predictPowerBonusOfBlocker(attacker, defender);
|
int defenderDamage = defender.getNetAttack() + predictPowerBonusOfBlocker(attacker, defender);
|
||||||
int attackerDamage = attacker.getNetAttack() + predictPowerBonusOfAttacker(attacker, defender);
|
int attackerDamage = attacker.getNetAttack() + predictPowerBonusOfAttacker(attacker, defender);
|
||||||
@@ -1974,42 +1973,6 @@ public class CombatUtil {
|
|||||||
for(Ability ab:CardFactoryUtil.getBushidoEffects(a))
|
for(Ability ab:CardFactoryUtil.getBushidoEffects(a))
|
||||||
AllZone.Stack.add(ab);
|
AllZone.Stack.add(ab);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(a.getKeyword().contains(
|
|
||||||
"Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it.")) {
|
|
||||||
Ability ability = new Ability(a, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
final Command untilEOT = new Command() {
|
|
||||||
private static final long serialVersionUID = -5476584542164560128L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
if(AllZone.GameAction.isCardInPlay(a)) {
|
|
||||||
a.addTempAttackBoost(-blockers);
|
|
||||||
a.addTempDefenseBoost(-blockers);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};//Command
|
|
||||||
|
|
||||||
if(AllZone.GameAction.isCardInPlay(a)) {
|
|
||||||
a.addTempAttackBoost(blockers);
|
|
||||||
a.addTempDefenseBoost(blockers);
|
|
||||||
|
|
||||||
AllZone.EndOfTurn.addUntil(untilEOT);
|
|
||||||
}
|
|
||||||
}//resolve
|
|
||||||
};
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(a.getName()+" - gains +1/+1 for each blocker");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
int amount = a.getAmountOfKeyword("Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it.");
|
|
||||||
|
|
||||||
for(int i=0 ; i < amount ; i++)
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rampage
|
//Rampage
|
||||||
ArrayList<String> keywords = a.getKeyword();
|
ArrayList<String> keywords = a.getKeyword();
|
||||||
Pattern p = Pattern.compile("Rampage [0-9]+");
|
Pattern p = Pattern.compile("Rampage [0-9]+");
|
||||||
|
|||||||
@@ -259,8 +259,8 @@ public class ComputerUtil_Block2
|
|||||||
if (CombatUtil.lifeInDanger(combat)) {
|
if (CombatUtil.lifeInDanger(combat)) {
|
||||||
tramplingAttackers = attackers.getKeyword("Trample");
|
tramplingAttackers = attackers.getKeyword("Trample");
|
||||||
tramplingAttackers = tramplingAttackers.getKeywordsDontContain("Rampage"); //Don't make it worse
|
tramplingAttackers = tramplingAttackers.getKeywordsDontContain("Rampage"); //Don't make it worse
|
||||||
tramplingAttackers = tramplingAttackers.
|
//TODO - should check here for a "rampage-like" trigger that replaced the keyword:
|
||||||
getKeywordsDontContain("Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it.");
|
// "Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it."
|
||||||
|
|
||||||
for(Card attacker : tramplingAttackers) {
|
for(Card attacker : tramplingAttackers) {
|
||||||
chumpBlockers = getPossibleBlockers(attacker, blockersLeft, combat);
|
chumpBlockers = getPossibleBlockers(attacker, blockersLeft, combat);
|
||||||
@@ -279,8 +279,8 @@ public class ComputerUtil_Block2
|
|||||||
//Support blockers not destroying the attacker with more blockers to try to kill the attacker
|
//Support blockers not destroying the attacker with more blockers to try to kill the attacker
|
||||||
if (blockedButUnkilled.size() > 0) {
|
if (blockedButUnkilled.size() > 0) {
|
||||||
CardList targetAttackers = blockedButUnkilled.getKeywordsDontContain("Rampage"); //Don't make it worse
|
CardList targetAttackers = blockedButUnkilled.getKeywordsDontContain("Rampage"); //Don't make it worse
|
||||||
targetAttackers = targetAttackers.
|
//TODO - should check here for a "rampage-like" trigger that replaced the keyword:
|
||||||
getKeywordsDontContain("Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it.");
|
// "Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it."
|
||||||
|
|
||||||
for(Card attacker : targetAttackers) {
|
for(Card attacker : targetAttackers) {
|
||||||
blockers = getPossibleBlockers(attacker, blockersLeft, combat);
|
blockers = getPossibleBlockers(attacker, blockersLeft, combat);
|
||||||
|
|||||||
Reference in New Issue
Block a user