mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
*If, for some reason, a ChangeZone ability is passed zero targets (if, say, a Faceless Devourer enters play without targeting anything) there will no longer be an NPE. Fixes the Faceless creatures, Oblivion Ring,Journey to Nowhere etc.
This commit is contained in:
@@ -827,8 +827,11 @@ public class AbilityFactory_ChangeZone {
|
|||||||
tgtCards.add(c);
|
tgtCards.add(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Card targetCard = null;
|
||||||
|
if(tgtCards.size() != 0)
|
||||||
|
{
|
||||||
|
|
||||||
Card targetCard = tgtCards.get(0);
|
targetCard = tgtCards.get(0);
|
||||||
|
|
||||||
for(Card tgtC : tgtCards){
|
for(Card tgtC : tgtCards){
|
||||||
PlayerZone originZone = AllZone.getZone(tgtC);
|
PlayerZone originZone = AllZone.getZone(tgtC);
|
||||||
@@ -870,7 +873,7 @@ public class AbilityFactory_ChangeZone {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (af.hasSubAbility()){
|
if (af.hasSubAbility()){
|
||||||
Ability_Sub abSub = sa.getSubAbility();
|
Ability_Sub abSub = sa.getSubAbility();
|
||||||
|
|||||||
Reference in New Issue
Block a user