mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Fixed a possible NPE in getPumpCreatures (AF Pump).
This commit is contained in:
@@ -236,10 +236,11 @@ public class AbilityFactory_Pump {
|
|||||||
&& AllZone.getCombat().isUnblocked(c) && attack > 0)
|
&& AllZone.getCombat().isUnblocked(c) && attack > 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
//is the creature in blocked and the blocker would survive
|
//is the creature blocked and the blocker would survive
|
||||||
if (AllZone.getPhase().isAfter(Constant.Phase.Combat_Declare_Blockers) && AllZone.getCombat().isAttacking(c)
|
if (AllZone.getPhase().isAfter(Constant.Phase.Combat_Declare_Blockers) && AllZone.getCombat().isAttacking(c)
|
||||||
&& AllZone.getCombat().isBlocked(c)
|
&& AllZone.getCombat().isBlocked(c)
|
||||||
&& CombatUtil.blockerWouldBeDestroyed(AllZone.getCombat().getBlockers(c).get(0)))
|
&& AllZone.getCombat().getBlockers(c) != null
|
||||||
|
&& !CombatUtil.blockerWouldBeDestroyed(AllZone.getCombat().getBlockers(c).get(0)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
//if the life of the computer is in danger, try to pump potential blockers before declaring blocks
|
//if the life of the computer is in danger, try to pump potential blockers before declaring blocks
|
||||||
|
|||||||
Reference in New Issue
Block a user