mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Fixed NPE in getAttackersOf.
This commit is contained in:
@@ -97,6 +97,9 @@ public class Combat {
|
|||||||
|
|
||||||
public final List<Card> getAttackersOf(GameEntity defender) {
|
public final List<Card> getAttackersOf(GameEntity defender) {
|
||||||
List<Card> result = new ArrayList<Card>();
|
List<Card> result = new ArrayList<Card>();
|
||||||
|
if (!attackedEntities.containsKey(defender)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
for(AttackingBand v : attackedEntities.get(defender)) {
|
for(AttackingBand v : attackedEntities.get(defender)) {
|
||||||
result.addAll(v.getAttackers());
|
result.addAll(v.getAttackers());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user