From 2b004402708ff502e930c756c014334982b122c3 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 20 Jan 2024 15:18:19 -0500 Subject: [PATCH] MKM - Case stuff --- .../game/ability/effects/AlterAttributeEffect.java | 1 + .../forge/toolbox/imaging/FCardImageRenderer.java | 4 ++-- .../src/forge/card/CardImageRenderer.java | 9 +++++---- .../upcoming/case_of_the_filched_falcon.txt | 7 +++---- .../upcoming/case_of_the_gorgons_kiss.txt | 11 +++++++++++ .../upcoming/case_of_the_pilfered_proof.txt | 14 ++++++++++++++ .../upcoming/case_of_the_ransacked_lab.txt | 10 ++++++++++ 7 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/case_of_the_gorgons_kiss.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/case_of_the_pilfered_proof.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/case_of_the_ransacked_lab.txt diff --git a/forge-game/src/main/java/forge/game/ability/effects/AlterAttributeEffect.java b/forge-game/src/main/java/forge/game/ability/effects/AlterAttributeEffect.java index 02b0b640a45..43169b1fa7d 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/AlterAttributeEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/AlterAttributeEffect.java @@ -29,6 +29,7 @@ public void resolve(SpellAbility sa) { break; } } + c.updateAbilityTextForView(); } } } diff --git a/forge-gui-desktop/src/main/java/forge/toolbox/imaging/FCardImageRenderer.java b/forge-gui-desktop/src/main/java/forge/toolbox/imaging/FCardImageRenderer.java index dac6e24e0b1..f322aba61d4 100644 --- a/forge-gui-desktop/src/main/java/forge/toolbox/imaging/FCardImageRenderer.java +++ b/forge-gui-desktop/src/main/java/forge/toolbox/imaging/FCardImageRenderer.java @@ -308,9 +308,9 @@ private static void drawCardStateImage(Graphics2D g, CardStateView state, String int textY = typeY + typeBoxHeight; int ptY = textY + textBoxHeight; - // Adjust layout for Saga, Class and Dungeon cards + // Adjust layout for Saga, Class, Case and Dungeon cards boolean isSaga = state.getType().hasSubtype("Saga"); - boolean isClass = state.getType().hasSubtype("Class"); + boolean isClass = state.getType().hasSubtype("Class") || state.getType().hasSubtype("Case"); boolean isDungeon = state.getType().isDungeon(); if (isSaga || isClass || isDungeon) { // Move type line to the bottom diff --git a/forge-gui-mobile/src/forge/card/CardImageRenderer.java b/forge-gui-mobile/src/forge/card/CardImageRenderer.java index 6901593e5c7..bd4c2717f66 100644 --- a/forge-gui-mobile/src/forge/card/CardImageRenderer.java +++ b/forge-gui-mobile/src/forge/card/CardImageRenderer.java @@ -108,7 +108,7 @@ public static void drawCardImage(Graphics g, CardView card, boolean altState, fl if (isFaceDown && altState && card.isSplitCard()) state = card.getLeftSplitState(); boolean isSaga = state.getType().hasSubtype("Saga"); - boolean isClass = state.getType().hasSubtype("Class"); + boolean isClass = state.getType().hasSubtype("Class") || state.getType().hasSubtype("Case"); boolean isDungeon = state.getType().isDungeon(); boolean drawDungeon = isDungeon && CardRenderer.getCardArt(card) != null; @@ -325,12 +325,12 @@ protected void draw(Graphics g, float w, float h) { private static void drawArt(CardView cv, Graphics g, float x, float y, float w, float h, boolean altState, boolean isFaceDown) { boolean isSaga = cv.getCurrentState().getType().hasSubtype("Saga"); - boolean isClass = cv.getCurrentState().getType().hasSubtype("Class"); + boolean isClass = cv.getCurrentState().getType().hasSubtype("Class") || cv.getCurrentState().getType().hasSubtype("Case"); boolean isDungeon = cv.getCurrentState().getType().isDungeon(); ColorSet colorSet = cv.getCurrentState().getColors(); if (altState && cv.hasAlternateState()) { isSaga = cv.getAlternateState().getType().hasSubtype("Saga"); - isClass = cv.getAlternateState().getType().hasSubtype("Class"); + isClass = cv.getAlternateState().getType().hasSubtype("Class") || cv.getAlternateState().getType().hasSubtype("Case"); isDungeon = cv.getAlternateState().getType().isDungeon(); colorSet = cv.getAlternateState().getColors(); } @@ -376,7 +376,8 @@ private static void drawArt(CardView cv, Graphics g, float x, float y, float w, altArt = CardRenderer.getAlternateCardArt(cv.getAlternateState().getImageKey(), cv.getAlternateState().isPlaneswalker()); else { altArt = CardRenderer.getCardArt(cv.getAlternateState().getImageKey(), cv.isSplitCard(), cv.getAlternateState().isPlane() || cv.getAlternateState().isPhenomenon(), cv.getText().contains("Aftermath"), - cv.getAlternateState().getType().hasSubtype("Saga"), cv.getAlternateState().getType().hasSubtype("Class"), cv.getAlternateState().getType().isDungeon(), cv.isFlipCard(), cv.getAlternateState().isPlaneswalker(), CardRenderer.isModernFrame(cv), cv.getAlternateState().getType().isBattle()); + cv.getAlternateState().getType().hasSubtype("Saga"), cv.getAlternateState().getType().hasSubtype("Class") || cv.getAlternateState().getType().hasSubtype("Case"), cv.getAlternateState().getType().isDungeon(), + cv.isFlipCard(), cv.getAlternateState().isPlaneswalker(), CardRenderer.isModernFrame(cv), cv.getAlternateState().getType().isBattle()); } } } diff --git a/forge-gui/res/cardsfolder/upcoming/case_of_the_filched_falcon.txt b/forge-gui/res/cardsfolder/upcoming/case_of_the_filched_falcon.txt index 440c9a7c9f7..72c21afe436 100644 --- a/forge-gui/res/cardsfolder/upcoming/case_of_the_filched_falcon.txt +++ b/forge-gui/res/cardsfolder/upcoming/case_of_the_filched_falcon.txt @@ -3,10 +3,9 @@ ManaCost:U Types:Enchantment Case T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigInvestigate | TriggerDescription$ When this Case enters the battlefield, investigate. (Create a colorless Clue artifact token with "{2}, Sacrifice this artifact: Draw a card.") SVar:TrigInvestigate:DB$ Investigate -T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Artifact.YouCtrl | PresentZone$ Battlefield | PresentCompare$ GE3 | CheckSVar$ Solved | SVarCompare$ GE1 | Execute$ SolveFalcon | TriggerDescription$ To solve - You control three or more artifacts. +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Artifact.YouCtrl | PresentCompare$ GE3 | IsPresent2$ Card.Self+IsUnsolved | Execute$ SolveFalcon | TriggerDescription$ To solve — You control three or more artifacts. (If unsolved, solve at the beginning of your end step.) SVar:SolveFalcon:DB$ AlterAttribute | Defined$ Self | Attributes$ Solved -A:AB$ PutCounter | Cost$ 2 U Sac<1/CARDNAME> | ValidTgts$ Artifact.nonCreature | TgtPrompt$ Select target noncreature artifact | Activation$ Solved | CounterType$ P1P1 | CounterNum$ 4 | SubAbility$ DBAnimate | PrecostDesc$ Solved - | SpellDescription$ Put four +1/+1 counters on target noncreature artifact. It becomes a 0/0 Bird creature with flying in addition to its other types. +A:AB$ PutCounter | Cost$ 2 U Sac<1/CARDNAME/this Case> | ValidTgts$ Artifact.nonCreature | TgtPrompt$ Select target noncreature artifact | Activation$ Solved | CounterType$ P1P1 | CounterNum$ 4 | SubAbility$ DBAnimate | PrecostDesc$ Solved — | SpellDescription$ Put four +1/+1 counters on target noncreature artifact. It becomes a 0/0 Bird creature with flying in addition to its other types. SVar:DBAnimate:DB$ Animate | Defined$ ParentTarget | Power$ 0 | Toughness$ 0 | Types$ Creature,Bird | Keywords$ Flying | Duration$ Permanent -SVar:Solved:Count$Valid Card.Self+IsUnsolved DeckNeeds:Type$Artifact -Oracle:When this Case enters the battlefield, investigate. (Create a Clue token. It’s an artifact with “{2}, Sacrifice this artifact: Draw a card.”)\nTo solve — You control three or more artifacts. (If unsolved, solve at the beginning of your end step.)\nSolved — {2}{U}, Sacrifice this Case: Put four +1/+1 counters on target noncreature artifact. It becomes a 0/0 Bird creature with flying in addition to its other types. \ No newline at end of file +Oracle:When this Case enters the battlefield, investigate. (Create a Clue token. It's an artifact with "{2}, Sacrifice this artifact: Draw a card.")\nTo solve — You control three or more artifacts. (If unsolved, solve at the beginning of your end step.)\nSolved — {2}{U}, Sacrifice this Case: Put four +1/+1 counters on target noncreature artifact. It becomes a 0/0 Bird creature with flying in addition to its other types. diff --git a/forge-gui/res/cardsfolder/upcoming/case_of_the_gorgons_kiss.txt b/forge-gui/res/cardsfolder/upcoming/case_of_the_gorgons_kiss.txt new file mode 100644 index 00000000000..445bc155e0c --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/case_of_the_gorgons_kiss.txt @@ -0,0 +1,11 @@ +Name:Case of the Gorgon's Kiss +ManaCost:B +Types:Enchantment Case +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDestroy | TriggerDescription$ When this Case enters the battlefield, destroy up to one target creature that was dealt damage this turn. +SVar:TrigDestroy:DB$ Destroy | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Creature.wasDealtDamageThisTurn | TgtPrompt$ Select up to one target creature that was dealt damage this turn +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ Count$ThisTurnEntered_Graveyard_Creature | SVarCompare$ GE3 | IsPresent$ Card.Self+IsUnsolved | Execute$ Solved | TriggerDescription$ To solve – Three or more creature cards were put into graveyards from anywhere this turn. (If unsolved, solve at the beginning of your end step.) +SVar:Solved:DB$ AlterAttribute | Defined$ Self | Attributes$ Solved +S:Mode$ Continuous | Affected$ Card.Self+IsSolved | AddType$ Creature & Gorgon | SetPower$ 4 | SetToughness$ 4 | AddKeyword$ Deathtouch & Lifelink | Description$ Solved – This Case is a 4/4 Gorgon creature with deathtouch and lifelink in addition to its other types. +DeckHints:Ability$Sacrifice|Discard +DeckHas:Ability$LifeGain +Oracle:When this Case enters the battlefield, destroy up to one target creature that was dealt damage this turn.\nTo solve – Three or more creature cards were put into graveyards from anywhere this turn. (If unsolved, solve at the beginning of your end step.)\nSolved – This Case is a 4/4 Gorgon creature with deathtouch and lifelink in addition to its other types. diff --git a/forge-gui/res/cardsfolder/upcoming/case_of_the_pilfered_proof.txt b/forge-gui/res/cardsfolder/upcoming/case_of_the_pilfered_proof.txt new file mode 100644 index 00000000000..56c3fec4f8e --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/case_of_the_pilfered_proof.txt @@ -0,0 +1,14 @@ +Name:Case of the Pilfered Proof +ManaCost:1 W +Types:Enchantment Case +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Detective.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever a Detective enters the battlefield under your control and whenever a Detective you control is turned face up, put a +1/+1 counter on it. +T:Mode$ TurnFaceUp | ValidCard$ Detective.YouCtrl | Execute$ TrigPutCounter | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ Whenever a Detective enters the battlefield under your control and whenever a Detective you control is turned face up, put a +1/+1 counter on it. +SVar:TrigPutCounter:DB$ PutCounter | Defined$ TriggeredCardLKICopy | CounterType$ P1P1 | CounterNum$ 1 +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Detective.YouCtrl | PresentCompare$ GE3 | IsPresent2$ Card.Self+IsUnsolved | Execute$ Solved | TriggerDescription$ To solve – You control three or more Detectives. (If unsolved, solve at the beginning of your end step.) +SVar:Solved:DB$ AlterAttribute | Defined$ Self | Attributes$ Solved +R:Event$ CreateToken | IsPresent$ Card.Self+IsSolved | ActiveZones$ Battlefield | ValidToken$ Card.YouCtrl | ReplaceWith$ DBReplace | Description$ Solved – If one or more tokens would be created under your control, those tokens plus a Clue token are created instead. (It's an artifact with "{2}, Sacrifice this artifact: Draw a card.") +SVar:DBReplace:DB$ ReplaceToken | Type$ AddToken | Amount$ 1 | ValidCard$ Card.YouCtrl | TokenScript$ c_a_clue_draw +DeckNeeds:Type$Detective +DeckHas:Ability$Counters|Token|Sacrifice & Type$Artifact|Clue +DeckHints:Ability$Token +Oracle:Whenever a Detective enters the battlefield under your control and whenever a Detective you control is turned face up, put a +1/+1 counter on it.\nTo solve – You control three or more Detectives. (If unsolved, solve at the beginning of your end step.)\nSolved – If one or more tokens would be created under your control, those tokens plus a Clue token are created instead. (It's an artifact with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/upcoming/case_of_the_ransacked_lab.txt b/forge-gui/res/cardsfolder/upcoming/case_of_the_ransacked_lab.txt new file mode 100644 index 00000000000..d641b697dc3 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/case_of_the_ransacked_lab.txt @@ -0,0 +1,10 @@ +Name:Case of the Ransacked Lab +ManaCost:2 U +Types:Enchantment Case +S:Mode$ ReduceCost | ValidCard$ Instant,Sorcery | Type$ Spell | Activator$ You | Amount$ 1 | Description$ Instant and sorcery spells you cast cost {1} less to cast. +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ Count$ThisTurnCast_Instant.YouCtrl,Sorcery.YouCtrl | SVarCompare$ GE4 | IsPresent$ Card.Self+IsUnsolved | Execute$ Solved | TriggerDescription$ To solve – You've cast four or more instant and sorcery spells this turn. (If unsolved, solve at the beginning of your end step.) +SVar:Solved:DB$ AlterAttribute | Defined$ Self | Attributes$ Solved +T:Mode$ SpellCast | IsPresent$ Card.Self+IsSolved | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ Solved – Whenever you cast an instant or sorcery spell, draw a card. +SVar:TrigDraw:DB$ Draw +DeckNeed:Type$Instant|Sorcery +Oracle:Instant and sorcery spells you cast cost {1} less to cast.\nTo solve – You've cast four or more instant and sorcery spells this turn. (If unsolved, solve at the beginning of your end step.)\nSolved – Whenever you cast an instant or sorcery spell, draw a card.