mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Somewhat better handling of player type check in the new routines.
This commit is contained in:
@@ -1946,7 +1946,11 @@ public class ComputerUtil {
|
|||||||
// This is currently used by ComputerUtilCost.willPayUnlessCost to determine if there's a viable target for a spell
|
// This is currently used by ComputerUtilCost.willPayUnlessCost to determine if there's a viable target for a spell
|
||||||
// that can be paid for with an untapped shockland.
|
// that can be paid for with an untapped shockland.
|
||||||
|
|
||||||
if (ai == null || aura == null || !(ai.getController() instanceof PlayerControllerAi)) {
|
if (ai == null || aura == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(ai.getController() instanceof PlayerControllerAi)) {
|
||||||
|
System.err.println("Unexpected behavior: ComputerUtil::hasGoodTargetforAura called with the non-AI player as a parameter.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1987,7 +1991,11 @@ public class ComputerUtil {
|
|||||||
// This is currently used by ComputerUtilCost.willPayUnlessCost to determine if there's a viable reason to cast a spell
|
// This is currently used by ComputerUtilCost.willPayUnlessCost to determine if there's a viable reason to cast a spell
|
||||||
// that can be paid for with an untapped shockland.
|
// that can be paid for with an untapped shockland.
|
||||||
|
|
||||||
if (ai == null || sa == null || !(ai.getController() instanceof PlayerControllerAi)) {
|
if (ai == null || sa == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(ai.getController() instanceof PlayerControllerAi)) {
|
||||||
|
System.err.println("Unexpected behavior: ComputerUtil::hasReasonToPlaySaThisTurn called with the non-AI player as a parameter.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user