- Fixed Hidden Agenda conspiracy cards crashing the game and their reveal ability not working.

This commit is contained in:
Agetian
2017-08-17 11:50:21 +00:00
parent 51bfc37a27
commit b0584d4499
2 changed files with 6 additions and 1 deletions

View File

@@ -199,7 +199,7 @@ public class CardFactoryUtil {
} }
private static SpellAbility abilityRevealHiddenAgenda(final Card sourceCard) { private static SpellAbility abilityRevealHiddenAgenda(final Card sourceCard) {
String ab = "ST$ SetState" String ab = "ST$ SetState | Cost$ 0"
+ " | ConditionDefined$ Self | ConditionPresent$ Card.faceDown+inZoneCommand" + " | ConditionDefined$ Self | ConditionPresent$ Card.faceDown+inZoneCommand"
+ " | HiddenAgenda$ True" + " | HiddenAgenda$ True"
+ " | Mode$ TurnFace | SpellDescription$ Reveal this Hidden Agenda at any time."; + " | Mode$ TurnFace | SpellDescription$ Reveal this Hidden Agenda at any time.";

View File

@@ -220,6 +220,11 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
if (cardZone == null || this.getZone() == null || !cardZone.is(this.getZone())) { if (cardZone == null || this.getZone() == null || !cardZone.is(this.getZone())) {
// If Card is not in the default activating zone, do some additional checks // If Card is not in the default activating zone, do some additional checks
// A conspiracy with hidden agenda: reveal at any time
if (cardZone != null && cardZone.is(ZoneType.Command) && sa.hasParam("HiddenAgenda")) {
return true;
}
// Not a Spell, or on Battlefield, return false // Not a Spell, or on Battlefield, return false
if (!sa.isSpell() || (cardZone != null && ZoneType.Battlefield.equals(cardZone.getZoneType())) if (!sa.isSpell() || (cardZone != null && ZoneType.Battlefield.equals(cardZone.getZoneType()))
|| (this.getZone() != null && !this.getZone().equals(ZoneType.Hand))) { || (this.getZone() != null && !this.getZone().equals(ZoneType.Hand))) {