(Card fighter, Card opponent, int pumpAttack)
| 311 | } |
| 312 | |
| 313 | public static boolean canKill(Card fighter, Card opponent, int pumpAttack) { |
| 314 | if (opponent.getSVar("Targeting").equals("Dies")) { |
| 315 | return true; |
| 316 | } |
| 317 | // the damage prediction is later |
| 318 | int damage = fighter.getNetPower() + pumpAttack; |
| 319 | if (damage <= 0 || opponent.getShieldCount() > 0 || ComputerUtil.canRegenerate(opponent.getController(), opponent)) { |
| 320 | return false; |
| 321 | } |
| 322 | // try to predict the damage that fighter would deal to opponent |
| 323 | // this should also handle if the opponents creature can be destroyed or not |
| 324 | if (ComputerUtilCombat.getEnoughDamageToKill(opponent, damage, fighter, false) <= damage) { |
| 325 | return true; |
| 326 | } |
| 327 | return false; |
| 328 | } |
| 329 | } |
no test coverage detected