mirror of
https://github.com/correl/mage.git
synced 2025-04-10 09:11:04 -09:00
Fixed NPE errors
This commit is contained in:
parent
be6a588a7f
commit
2549634443
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,9 @@ public class SpellAbility extends ActivatedAbilityImpl {
|
||||||
*/
|
*/
|
||||||
public boolean spellCanBeActivatedRegularlyNow(UUID playerId, Game game) {
|
public boolean spellCanBeActivatedRegularlyNow(UUID playerId, Game game) {
|
||||||
MageObject object = game.getObject(sourceId);
|
MageObject object = game.getObject(sourceId);
|
||||||
|
if (object == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (game.getState().getValue("CastFromExileEnabled" + object.getId()) != null) {
|
if (game.getState().getValue("CastFromExileEnabled" + object.getId()) != null) {
|
||||||
return (Boolean) game.getState().getValue("CastFromExileEnabled" + object.getId()); // card like Chandra, Torch of Defiance +1 loyal ability)
|
return (Boolean) game.getState().getValue("CastFromExileEnabled" + object.getId()); // card like Chandra, Torch of Defiance +1 loyal ability)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue