mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix and cleanup Hideaway. Plus a typo in Praetor's Grasp.
This commit is contained in:
@@ -52,6 +52,7 @@ public class EffectEffect extends SpellAbilityEffect {
|
|||||||
String effectRemembered = null;
|
String effectRemembered = null;
|
||||||
String effectImprinted = null;
|
String effectImprinted = null;
|
||||||
Player ownerEff = null;
|
Player ownerEff = null;
|
||||||
|
boolean imprintOnHost = false;
|
||||||
|
|
||||||
if (sa.hasParam("Abilities")) {
|
if (sa.hasParam("Abilities")) {
|
||||||
effectAbilities = sa.getParam("Abilities").split(",");
|
effectAbilities = sa.getParam("Abilities").split(",");
|
||||||
@@ -85,7 +86,6 @@ public class EffectEffect extends SpellAbilityEffect {
|
|||||||
effectImprinted = sa.getParam("ImprintCards");
|
effectImprinted = sa.getParam("ImprintCards");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Effect eff = new Effect();
|
|
||||||
String name = sa.getParam("Name");
|
String name = sa.getParam("Name");
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
name = sa.getHostCard().getName() + "'s Effect";
|
name = sa.getHostCard().getName() + "'s Effect";
|
||||||
@@ -97,10 +97,14 @@ public class EffectEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sa.hasParam("EffectOwner")) {
|
if (sa.hasParam("EffectOwner")) {
|
||||||
List<Player> effectOwner = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("EffectOwner"), sa);
|
final List<Player> effectOwner = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("EffectOwner"), sa);
|
||||||
ownerEff = effectOwner.get(0);
|
ownerEff = effectOwner.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sa.hasParam("ImprintOnHost")) {
|
||||||
|
imprintOnHost = true;
|
||||||
|
}
|
||||||
|
|
||||||
final Player controller = sa.hasParam("EffectOwner") ? ownerEff : sa.getActivatingPlayer();
|
final Player controller = sa.hasParam("EffectOwner") ? ownerEff : sa.getActivatingPlayer();
|
||||||
final Card eff = new Card(controller.getGame().nextCardId());
|
final Card eff = new Card(controller.getGame().nextCardId());
|
||||||
eff.setName(name);
|
eff.setName(name);
|
||||||
@@ -112,8 +116,6 @@ public class EffectEffect extends SpellAbilityEffect {
|
|||||||
eff.setImmutable(true);
|
eff.setImmutable(true);
|
||||||
eff.setEffectSource(hostCard);
|
eff.setEffectSource(hostCard);
|
||||||
|
|
||||||
final Card e = eff;
|
|
||||||
|
|
||||||
// Grant SVars first in order to give references to granted abilities
|
// Grant SVars first in order to give references to granted abilities
|
||||||
if (effectSVars != null) {
|
if (effectSVars != null) {
|
||||||
for (final String s : effectSVars) {
|
for (final String s : effectSVars) {
|
||||||
@@ -211,7 +213,7 @@ public class EffectEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
game.getAction().exile(e);
|
game.getAction().exile(eff);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -233,6 +235,10 @@ public class EffectEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (imprintOnHost) {
|
||||||
|
hostCard.addImprintedCard(eff);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Add targeting to the effect so it knows who it's dealing with
|
// TODO: Add targeting to the effect so it knows who it's dealing with
|
||||||
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
|
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
|
||||||
game.getAction().moveTo(ZoneType.Command, eff);
|
game.getAction().moveTo(ZoneType.Command, eff);
|
||||||
|
|||||||
@@ -2613,6 +2613,23 @@ public class CardFactoryUtil {
|
|||||||
card.addSpellAbility(bestow);
|
card.addSpellAbility(bestow);
|
||||||
card.getCurrentState().addUnparsedAbility(sbAttach.toString());
|
card.getCurrentState().addUnparsedAbility(sbAttach.toString());
|
||||||
}
|
}
|
||||||
|
else if (keyword.equals("Hideaway")) {
|
||||||
|
card.getCurrentState().addIntrinsicKeyword("CARDNAME enters the battlefield tapped.");
|
||||||
|
|
||||||
|
final Trigger hideawayTrigger = TriggerHandler.parseTrigger("Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigHideawayDig | TriggerDescription$ When CARDNAME enters the battlefield, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.", card, true);
|
||||||
|
card.addTrigger(hideawayTrigger);
|
||||||
|
card.setSVar("TrigHideawayDig", "DB$ Dig | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True | SubAbility$ DBHideawayEffect");
|
||||||
|
final Trigger gainControlTrigger = TriggerHandler.parseTrigger("Mode$ ChangesController | ValidCard$ Card.Self | Execute$ DBHideawayEffect | Static$ True", card, true);
|
||||||
|
card.addTrigger(gainControlTrigger);
|
||||||
|
card.setSVar("DBHideawayEffect", "DB$ Effect | StaticAbilities$ STHideawayEffectLookAtCard | Triggers$ THideawayEffectCleanup | SVars$ DBHideawayEffectExileSelf | ImprintOnHost$ True | SubAbility$ DBHideawayRemember");
|
||||||
|
card.setSVar("STHideawayEffectLookAtCard", "Mode$ Continuous | Affected$ Card.IsRemembered | MayLookAt$ True | EffectZone$ Command | AffectedZone$ Exile | Description$ You may look at the exiled card.");
|
||||||
|
card.setSVar("THideawayEffectCleanup", "Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | TriggerZone$ Command | Execute$ DBHideawayEffectExileSelf | Static$ True");
|
||||||
|
card.setSVar("DBHideawayEffectExileSelf", "DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile");
|
||||||
|
final Trigger changeZoneTrigger = TriggerHandler.parseTrigger("Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | TriggerZone$ Command | Execute$ DBHideawayCleanup | Static$ True", card, true);
|
||||||
|
card.addTrigger(changeZoneTrigger);
|
||||||
|
card.setSVar("DBHideawayRemember", "DB$ Animate | Defined$ Imprinted | RememberObjects$ Remembered | Permanent$ True");
|
||||||
|
card.setSVar("DBHideawayCleanup", "DB$ Cleanup | ClearRemembered$ True");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddCost
|
// AddCost
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import forge.game.trigger.ZCTrigger;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Forge
|
* @author Forge
|
||||||
|
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class PlayerZoneBattlefield extends PlayerZone {
|
public class PlayerZoneBattlefield extends PlayerZone {
|
||||||
@@ -53,20 +54,13 @@ public class PlayerZoneBattlefield extends PlayerZone {
|
|||||||
super.add(c, position);
|
super.add(c, position);
|
||||||
|
|
||||||
if (trigger) {
|
if (trigger) {
|
||||||
if (c.hasKeyword("Hideaway")) {
|
// ETBTapped static abilities
|
||||||
// it enters the battlefield this way, and should not fire
|
for (final Card ca : game.getCardsIn(ZoneType.listValueOf("Battlefield,Command"))) {
|
||||||
// triggers
|
for (final StaticAbility stAb : ca.getStaticAbilities()) {
|
||||||
c.setTapped(true);
|
if (stAb.applyAbility("ETBTapped", c)) {
|
||||||
}
|
// it enters the battlefield this way, and should
|
||||||
else {
|
// not fire triggers
|
||||||
// ETBTapped static abilities
|
c.setTapped(true);
|
||||||
for (final Card ca : game.getCardsIn(ZoneType.listValueOf("Battlefield,Command"))) {
|
|
||||||
for (final StaticAbility stAb : ca.getStaticAbilities()) {
|
|
||||||
if (stAb.applyAbility("ETBTapped", c)) {
|
|
||||||
// it enters the battlefield this way, and should
|
|
||||||
// not fire triggers
|
|
||||||
c.setTapped(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ Name:Howltooth Hollow
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
K:Hideaway
|
K:Hideaway
|
||||||
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.
|
|
||||||
SVar:TrigDig:AB$ Dig | Cost$ 0 | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True
|
|
||||||
A:AB$ Mana | Cost$ T | Produced$ B | SpellDescription$ Add {B} to your mana pool.
|
A:AB$ Mana | Cost$ T | Produced$ B | SpellDescription$ Add {B} to your mana pool.
|
||||||
A:AB$ Play | Cost$ B T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ Hands | ConditionSVarCompare$ EQ0 | ForgetRemembered$ True | References$ Hands | SpellDescription$ You may play the exiled card without paying its mana cost if each player has no cards in hand.
|
A:AB$ Play | Cost$ B T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ Hands | ConditionSVarCompare$ EQ0 | ForgetRemembered$ True | References$ Hands | SpellDescription$ You may play the exiled card without paying its mana cost if each player has no cards in hand.
|
||||||
SVar:Hands:Count$NumInAllHands
|
SVar:Hands:Count$NumInAllHands
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ Name:Mosswort Bridge
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
K:Hideaway
|
K:Hideaway
|
||||||
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.
|
|
||||||
SVar:TrigDig:AB$ Dig | Cost$ 0 | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True | ForgetOtherRemembered$ True
|
|
||||||
A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add {G} to your mana pool.
|
A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add {G} to your mana pool.
|
||||||
A:AB$ Play | Cost$ G T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | References$ X | ConditionCheckSVar$ X | ConditionSVarCompare$ GE10 | ForgetRemembered$ True | SpellDescription$ You may play the exiled card without paying its mana cost if creatures you control have total power 10 or greater.
|
A:AB$ Play | Cost$ G T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | References$ X | ConditionCheckSVar$ X | ConditionSVarCompare$ GE10 | ForgetRemembered$ True | SpellDescription$ You may play the exiled card without paying its mana cost if creatures you control have total power 10 or greater.
|
||||||
SVar:X:Count$SumPower_Creature.YouCtrl
|
SVar:X:Count$SumPower_Creature.YouCtrl
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Praetor's Grasp
|
|||||||
ManaCost:1 B B
|
ManaCost:1 B B
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ ChangeZone | Cost$ 1 B B | Origin$ Library | Destination$ Exile | ExileFaceDown$ True | ValidTgts$ Opponent | ChangeType$ Card | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Search target opponent's library for a card and exile it face down. Then that player shuffles his or her library. You may look at and play that card for as long as it remains exiled.
|
A:SP$ ChangeZone | Cost$ 1 B B | Origin$ Library | Destination$ Exile | ExileFaceDown$ True | ValidTgts$ Opponent | ChangeType$ Card | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Search target opponent's library for a card and exile it face down. Then that player shuffles his or her library. You may look at and play that card for as long as it remains exiled.
|
||||||
SVar:DBEffect:DB$ Effect | MayLookAt$ True | MayPlay$ True | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | Triggers$ TrigCleanup | SVars$ DBExileSelf | SubAbility$ DBCleanup
|
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | Triggers$ TrigCleanup | SVars$ DBExileSelf | SubAbility$ DBCleanup
|
||||||
SVar:STPlay:Mode$ Continuous | MayLookAt$ True | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may look at and play a card as long as it remains exiled.
|
SVar:STPlay:Mode$ Continuous | MayLookAt$ True | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may look at and play a card as long as it remains exiled.
|
||||||
SVar:TrigCleanup:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | TriggerZones$ Command | Execute$ DBExileSelf | Static$ True
|
SVar:TrigCleanup:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | TriggerZones$ Command | Execute$ DBExileSelf | Static$ True
|
||||||
SVar:DBExileSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
|
SVar:DBExileSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
Name:Shelldock Isle
|
Name:Shelldock Isle
|
||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
K:Hideaway
|
K:Hideaway
|
||||||
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.
|
A:AB$ Mana | Cost$ T | Produced$ U | SpellDescription$ Add {U} to your mana pool.
|
||||||
SVar:TrigDig:AB$ Dig | Cost$ 0 | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True
|
A:AB$ Play | Cost$ U T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ LE20 | ForgetRemembered$ True | References$ X | SpellDescription$ You may play the exiled card without paying its mana cost if a library has twenty or fewer cards in it.
|
||||||
A:AB$ Mana | Cost$ T | Produced$ U | SpellDescription$ Add {U} to your mana pool.
|
SVar:X:PlayerCountPlayers$LowestValidLibrary Card.YouOwn
|
||||||
A:AB$ Play | Cost$ U T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ LE20 | ForgetRemembered$ True | References$ X | SpellDescription$ You may play the exiled card without paying its mana cost if a library has twenty or fewer cards in it.
|
SVar:RemRandomDeck:True
|
||||||
SVar:X:PlayerCountPlayers$LowestValidLibrary Card.YouOwn
|
SVar:RemAIDeck:True
|
||||||
SVar:RemRandomDeck:True
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/shelldock_isle.jpg
|
||||||
SVar:RemAIDeck:True
|
Oracle:Hideaway (This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.)\n{T}: Add {U} to your mana pool.\n{U}, {T}: You may play the exiled card without paying its mana cost if a library has twenty or fewer cards in it.
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/shelldock_isle.jpg
|
|
||||||
Oracle:Hideaway (This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.)\n{T}: Add {U} to your mana pool.\n{U}, {T}: You may play the exiled card without paying its mana cost if a library has twenty or fewer cards in it.
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ Name:Spinerock Knoll
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
K:Hideaway
|
K:Hideaway
|
||||||
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.
|
|
||||||
SVar:TrigDig:AB$ Dig | Cost$ 0 | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True
|
|
||||||
A:AB$ Mana | Cost$ T | Produced$ R | SpellDescription$ Add {R} to your mana pool.
|
A:AB$ Mana | Cost$ T | Produced$ R | SpellDescription$ Add {R} to your mana pool.
|
||||||
A:AB$ Play | Cost$ R T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE7 | References$ X | ForgetRemembered$ True | SpellDescription$ You may play the exiled card without paying its mana cost if an opponent was dealt 7 or more damage this turn.
|
A:AB$ Play | Cost$ R T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE7 | References$ X | ForgetRemembered$ True | SpellDescription$ You may play the exiled card without paying its mana cost if an opponent was dealt 7 or more damage this turn.
|
||||||
SVar:X:Count$MaxOppDamageThisTurn
|
SVar:X:Count$MaxOppDamageThisTurn
|
||||||
|
|||||||
@@ -2,10 +2,8 @@ Name:Windbrisk Heights
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
K:Hideaway
|
K:Hideaway
|
||||||
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.
|
|
||||||
SVar:TrigDig:AB$ Dig | Cost$ 0 | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True
|
|
||||||
A:AB$ Mana | Cost$ T | Produced$ W | SpellDescription$ Add {W} to your mana pool.
|
A:AB$ Mana | Cost$ T | Produced$ W | SpellDescription$ Add {W} to your mana pool.
|
||||||
A:AB$ Play | Cost$ W T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE3 | ForgetRemembered$ True | PlayerTurn$ True | SpellDescription$ You may play the exiled card without paying its mana cost if you attacked with three or more creatures this turn.
|
A:AB$ Play | Cost$ W T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE3 | References$ X | ForgetRemembered$ True | PlayerTurn$ True | SpellDescription$ You may play the exiled card without paying its mana cost if you attacked with three or more creatures this turn.
|
||||||
SVar:X:Count$AttackersDeclared
|
SVar:X:Count$AttackersDeclared
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/windbrisk_heights.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/windbrisk_heights.jpg
|
||||||
|
|||||||
Reference in New Issue
Block a user