mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Fixed possible NPE's caused by Haunt.
This commit is contained in:
@@ -2958,6 +2958,7 @@ public class CardFactoryUtil {
|
||||
final Ability haunterDiesSetup = new Ability(card, ManaCost.ZERO) {
|
||||
@Override
|
||||
public void resolve() {
|
||||
this.setActivatingPlayer(card.getController());
|
||||
final List<Card> creats = CardLists.filter(Singletons.getModel().getGame().getCardsIn(ZoneType.Battlefield), Presets.CREATURES);
|
||||
for (int i = 0; i < creats.size(); i++) {
|
||||
if (!creats.get(i).canBeTargetedBy(this)) {
|
||||
|
||||
@@ -633,6 +633,7 @@ public class MagicStack extends MyObservable {
|
||||
}
|
||||
};
|
||||
for (int i = 0; i < creats.size(); i++) {
|
||||
haunterDiesWork.setActivatingPlayer(sa.getActivatingPlayer());
|
||||
if (!creats.get(i).canBeTargetedBy(haunterDiesWork)) {
|
||||
creats.remove(i);
|
||||
i--;
|
||||
|
||||
Reference in New Issue
Block a user