mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
fix StackOverflow caused in checkStateEffects
This commit is contained in:
@@ -545,12 +545,12 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
}//if isAura
|
}//if isAura
|
||||||
|
|
||||||
if(c.getNetDefense() <= c.getDamage() && !c.getKeyword().contains("Indestructible")) {
|
if(c.isCreature() && c.getNetDefense() <= c.getDamage() && !c.getKeyword().contains("Indestructible")) {
|
||||||
destroy(c);
|
destroy(c);
|
||||||
AllZone.Combat.removeFromCombat(c); //this is untested with instants and abilities but required for First Strike combat phase
|
AllZone.Combat.removeFromCombat(c); //this is untested with instants and abilities but required for First Strike combat phase
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(c.getNetDefense() <= 0) {
|
else if(c.isCreature() && c.getNetDefense() <= 0) {
|
||||||
destroy(c);
|
destroy(c);
|
||||||
AllZone.Combat.removeFromCombat(c);
|
AllZone.Combat.removeFromCombat(c);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user