mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Fixed Hidden Agenda conspiracy cards crashing the game and their reveal ability not working.
This commit is contained in:
@@ -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.";
|
||||||
|
|||||||
@@ -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))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user