*Cleaned up and condensed Torpor Orb check.

This commit is contained in:
Hellfish
2011-09-13 21:44:32 +00:00
parent b053322a22
commit 698ed8b019

View File

@@ -380,16 +380,23 @@ public class TriggerHandler {
//Torpor Orb check //Torpor Orb check
CardList torporOrbs = AllZoneUtil.getCardsInPlay("Torpor Orb"); CardList torporOrbs = AllZoneUtil.getCardsInPlay("Torpor Orb");
if (torporOrbs.size() != 0 && mode.equals("ChangesZone") && ((regtrig.getMapParams().get("ValidCard").contains("Creature")) || (regtrig.getMapParams().get("ValidCard").contains("Self") && regtrig.getHostCard().isCreature() ))) if(torporOrbs.size() != 0)
{ {
return false; if(regtrig.getMapParams().containsKey("Destination"))
}
if (torporOrbs.size() != 0 && regtrig.getMapParams().containsKey("Destination"))
{
if (!regtrig.getMapParams().get("Destination").equals("Battlefield"))
{ {
return false; if ((regtrig.getMapParams().get("Destination").equals("Battlefield") || regtrig.getMapParams().get("Destination").equals("Any")) && mode.equals("ChangesZone") && ((regtrig.getMapParams().get("ValidCard").contains("Creature")) || (regtrig.getMapParams().get("ValidCard").contains("Self") && regtrig.getHostCard().isCreature() )))
{
return false;
}
} }
else
{
if (mode.equals("ChangesZone") && ((regtrig.getMapParams().get("ValidCard").contains("Creature")) || (regtrig.getMapParams().get("ValidCard").contains("Self") && regtrig.getHostCard().isCreature() )))
{
return false;
}
}
} }
HashMap<String, String> trigParams = regtrig.getMapParams(); HashMap<String, String> trigParams = regtrig.getMapParams();