Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKM - Case stuff #4566

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public void resolve(SpellAbility sa) {
break;
}
}
c.updateAbilityTextForView();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions forge-gui-mobile/src/forge/card/CardImageRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. Its 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.
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.
11 changes: 11 additions & 0 deletions forge-gui/res/cardsfolder/upcoming/case_of_the_gorgons_kiss.txt
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 14 additions & 0 deletions forge-gui/res/cardsfolder/upcoming/case_of_the_pilfered_proof.txt
Original file line number Diff line number Diff line change
@@ -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.")
10 changes: 10 additions & 0 deletions forge-gui/res/cardsfolder/upcoming/case_of_the_ransacked_lab.txt
Original file line number Diff line number Diff line change
@@ -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.