mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
anti-NPE measure: http://www.slightlymagic.net/forum/viewtopic.php?p=115101#p115101
This commit is contained in:
@@ -336,6 +336,8 @@ public class ComputerUtilCost {
|
|||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public static boolean canPayCost(final SpellAbility sa, final Player player) {
|
public static boolean canPayCost(final SpellAbility sa, final Player player) {
|
||||||
|
sa.setActivatingPlayer(player); // complaints on NPE had came before this line was added.
|
||||||
|
|
||||||
// Check for stuff like Nether Void
|
// Check for stuff like Nether Void
|
||||||
int extraManaNeeded = 0;
|
int extraManaNeeded = 0;
|
||||||
if (sa instanceof Spell) {
|
if (sa instanceof Spell) {
|
||||||
|
|||||||
Reference in New Issue
Block a user