From 4daf02f6a6c945062d851f0f7f3c91dec6cda3c8 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 20 Jan 2024 15:39:10 -0500 Subject: [PATCH] MKC: kaust_eyes_of_the_glade.txt + support --- forge-game/src/main/java/forge/game/card/Card.java | 7 +++++++ .../src/main/java/forge/game/card/CardProperty.java | 2 ++ forge-gui/res/cardsfolder/q/qarsi_deceiver.txt | 3 ++- forge-gui/res/cardsfolder/q/qarsi_high_priest.txt | 3 ++- .../cardsfolder/upcoming/kaust_eyes_of_the_glade.txt | 10 ++++++++++ 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/kaust_eyes_of_the_glade.txt diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index b2a8ef12995..c532edc0c6d 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -238,6 +238,7 @@ public class Card extends GameEntity implements Comparable, IHasSVars { private boolean flipped = false; private boolean facedown = false; + private boolean turnedFaceUpThisTurn = false; // set for transform and meld, needed for clone effects private boolean backside = false; @@ -782,6 +783,7 @@ public boolean turnFaceUp(boolean manifestPaid, boolean runTriggers, SpellAbilit } c.facedown = false; + c.turnedFaceUpThisTurn = true; c.updateStateForView(); //fixes cards with backside viewable // need to run faceup commands, currently // it does cleanup the modified facedown state @@ -812,6 +814,10 @@ public boolean turnFaceUp(boolean manifestPaid, boolean runTriggers, SpellAbilit return false; } + public boolean wasTurnedFaceUpThisTurn() { + return turnedFaceUpThisTurn; + } + public boolean canTransform(SpellAbility cause) { if (isFaceDown()) { return false; @@ -6777,6 +6783,7 @@ public void onCleanupPhase(final Player turn) { resetShieldCount(); setBecameTargetThisTurn(false); setFoughtThisTurn(false); + turnedFaceUpThisTurn = false; clearMustBlockCards(); getDamageHistory().setCreatureAttackedLastTurnOf(turn, getDamageHistory().getCreatureAttacksThisTurn() > 0); getDamageHistory().newTurn(); diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index 613eecc3e3e..749b795a16e 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -1114,6 +1114,8 @@ public static boolean cardHasProperty(Card card, String property, Player sourceC if (card.isFaceDown()) { return false; } + } else if (property.startsWith("turnedFaceUpThisTurn")) { + if (!card.wasTurnedFaceUpThisTurn()) return false; } else if (property.startsWith("phasedOut")) { if (!card.isPhasedOut()) { return false; diff --git a/forge-gui/res/cardsfolder/q/qarsi_deceiver.txt b/forge-gui/res/cardsfolder/q/qarsi_deceiver.txt index 7a58f215414..f185916cfc0 100644 --- a/forge-gui/res/cardsfolder/q/qarsi_deceiver.txt +++ b/forge-gui/res/cardsfolder/q/qarsi_deceiver.txt @@ -2,6 +2,7 @@ Name:Qarsi Deceiver ManaCost:1 U Types:Creature Naga Wizard PT:0/4 -A:AB$ Mana | Cost$ T | Produced$ C | RestrictValid$ MorphOrManifest | SpellDescription$ Add {C}. Spend this mana only to cast a face-down creature spell, pay a mana cost to turn a manifested creature face up, or pay a morph cost. +A:AB$ Mana | Cost$ T | Produced$ C | RestrictValid$ MorphOrManifest | SpellDescription$ Add {C}. Spend this mana only to cast a face-down creature spell, pay a mana cost to turn a manifested creature face up, or pay a morph cost. (A megamorph cost is a morph cost.) +AI:RemoveDeck:Random DeckHints:Keyword$Morph|Megamorph Oracle:{T}: Add {C}. Spend this mana only to cast a face-down creature spell, pay a mana cost to turn a manifested creature face up, or pay a morph cost. (A megamorph cost is a morph cost.) diff --git a/forge-gui/res/cardsfolder/q/qarsi_high_priest.txt b/forge-gui/res/cardsfolder/q/qarsi_high_priest.txt index 82a87ac9a0b..c2c7c07f641 100644 --- a/forge-gui/res/cardsfolder/q/qarsi_high_priest.txt +++ b/forge-gui/res/cardsfolder/q/qarsi_high_priest.txt @@ -2,5 +2,6 @@ Name:Qarsi High Priest ManaCost:B Types:Creature Human Cleric PT:0/2 -A:AB$ Manifest | Cost$ 1 B T Sac<1/Creature.Other/another creature> | Amount$ 1 | Defined$ TopOfLibrary | SpellDescription$ Manifest the top card of your library. +A:AB$ Manifest | Cost$ 1 B T Sac<1/Creature.Other/another creature> | Amount$ 1 | Defined$ TopOfLibrary | SpellDescription$ Manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.) +DeckHas:Ability$Sacrifice Oracle:{1}{B}, {T}, Sacrifice another creature: Manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.) diff --git a/forge-gui/res/cardsfolder/upcoming/kaust_eyes_of_the_glade.txt b/forge-gui/res/cardsfolder/upcoming/kaust_eyes_of_the_glade.txt new file mode 100644 index 00000000000..87512c826a2 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/kaust_eyes_of_the_glade.txt @@ -0,0 +1,10 @@ +Name:Kaust, Eyes of the Glade +ManaCost:RW G +Types:Legendary Creature Dryad Detective +PT:2/2 +T:Mode$ DamageDone | ValidSource$ Creature.YouCtrl+turnedFaceUpThisTurn | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever a creature you control that was turned face up this turn deals combat damage to a player, draw a card. +SVar:TrigDraw:DB$ Draw +A:AB$ SetState | Cost$ T | ValidTgts$ Creature.faceDown+attacking+YouCtrl | TgtPrompt$ Select target face-down attacking creature you control | Mode$ TurnFaceUp | StackDescription$ Turn {c:Targeted} face up. | SpellDescription$ Turn target face-down attacking creature you control face up. +AI:RemoveDeck:Random +DeckHints:Keyword$Morph|Megamorph +Oracle:Whenever a creature you control that was turned face up this turn deals combat damage to a player, draw a card.\n{T}: Turn target face-down attacking creature you control face up.