mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix NPE from PlayEffect
This commit is contained in:
@@ -212,7 +212,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
public SpellAbility getAbilityToPlay(final Card hostCard, final List<SpellAbility> abilities,
|
public SpellAbility getAbilityToPlay(final Card hostCard, final List<SpellAbility> abilities,
|
||||||
final ITriggerEvent triggerEvent) {
|
final ITriggerEvent triggerEvent) {
|
||||||
// make sure another human player can't choose opponents cards just because he might see them
|
// make sure another human player can't choose opponents cards just because he might see them
|
||||||
if (!hostCard.isInZone(ZoneType.Battlefield) && !hostCard.getOwner().equals(player) && !hostCard.getController().equals(player) && hostCard.mayPlay(player).size() == 0) {
|
if (triggerEvent != null && !hostCard.isInZone(ZoneType.Battlefield) && !hostCard.getOwner().equals(player) && !hostCard.getController().equals(player) && hostCard.mayPlay(player).size() == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
spellViewCache = SpellAbilityView.getMap(abilities);
|
spellViewCache = SpellAbilityView.getMap(abilities);
|
||||||
|
|||||||
Reference in New Issue
Block a user