- Add some NPE checks in Combat View

This commit is contained in:
Sol
2016-02-11 14:46:58 +00:00
parent e3e299d5c0
commit 448dbeaa46
2 changed files with 3 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ public class CombatView extends TrackableObject {
}
final FCollection<CardView> views = new FCollection<CardView>();
for (final Entry<CardView, GameEntityView> entry : attackersWithDefenders) {
if (entry.getValue().equals(defender)) {
if (defender != null && defender.equals(entry.getValue())) {
views.add(entry.getKey());
}
}
@@ -153,7 +153,7 @@ public class CombatView extends TrackableObject {
}
final List<FCollection<CardView>> views = new ArrayList<FCollection<CardView>>();
for (final Entry<FCollection<CardView>, GameEntityView> entry : bandsWithDefenders) {
if (entry.getValue().equals(defender)) {
if (defender != null && defender.equals(entry.getValue())) {
views.add(entry.getKey());
}
}

View File

@@ -8,4 +8,4 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
SVar:TrigPumpAll:AB$ PumpAll | Cost$ 0 | ValidCards$ Creature.YouCtrl+Other | NumAtt$ 1 | KW$ Haste
SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/reckless_bushwhacker.jpg
Oracle:Surge 1R (You may cast this spell for its surge cost if you or a teammate has cast another spell this turn.)\nHaste\nWhen Reckless Bushwhacker enters the battlefield, if its surge cost was paid, other creatures you control get +1/+0 and gain haste until end of turn.
Oracle:Surge {1}{R} (You may cast this spell for its surge cost if you or a teammate has cast another spell this turn.)\nHaste\nWhen Reckless Bushwhacker enters the battlefield, if its surge cost was paid, other creatures you control get +1/+0 and gain haste until end of turn.