mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- NPE prevention for RememberMap in Card.
This commit is contained in:
@@ -5408,11 +5408,13 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
for (SpellAbility sa : source.getSpellAbilities()) {
|
||||
if (sa.getActivatingPlayer() == null) continue;
|
||||
for (Player p : AbilityUtils.getDefinedPlayers(source, property.split("RememberMap_")[1], sa)) {
|
||||
if (source.getRememberMap() != null && source.getRememberMap().get(p) != null) {
|
||||
if (source.getRememberMap().get(p).contains(this)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} else if (property.equals("IsRemembered")) {
|
||||
if (!source.isRemembered(this)) {
|
||||
|
||||
Reference in New Issue
Block a user