From c42f0037551c5d475c1247441dc304fbb230c948 Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 16 Sep 2019 16:12:00 +0800 Subject: [PATCH 1/7] Add Folio of Fancies --- .../res/cardsfolder/upcoming/folio_of_fancies.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/folio_of_fancies.txt diff --git a/forge-gui/res/cardsfolder/upcoming/folio_of_fancies.txt b/forge-gui/res/cardsfolder/upcoming/folio_of_fancies.txt new file mode 100644 index 00000000000..f9dd3d0a9e0 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/folio_of_fancies.txt @@ -0,0 +1,12 @@ +Name:Folio of Fancies +ManaCost:1 U +Types:Artifact +S:Mode$ Continuous | Affected$ Player | SetMaxHandSize$ Unlimited | Description$ Players have no maximum hand size. +SVar:NonStackingEffect:True +A:AB$ Draw | Cost$ X X T | NumCards$ X | References$ X | Defined$ Player | SpellDescription$ Each player draws X cards. +SVar:X:Count$xPaid +A:AB$ RepeatEach | Cost$ 2 U T | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBMill | SpellDescription$ Each opponent puts a number of cards equal to the number of cards in their hand from the top of their library into their graveyard. +SVar:DBMill:DB$ Mill | Defined$ Remembered | NumCards$ Y | References$ Y +SVar:Y:Count$ValidHand Card.RememberedPlayerCtrl +AI:RemoveDeck:All +Oracle:Players have no maximum hand size.\n{X}{X}, {T}: Each player draws X cards.\n{2}{U}, {T}: Each opponent puts a number of cards equal to the number of cards in their hand from the top of their library into their graveyard. From 0e5884d7573fab7e084d77a7d16bf13da34e1a8d Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 16 Sep 2019 16:35:06 +0800 Subject: [PATCH 2/7] Add Henge Walker --- .../src/main/java/forge/game/CardTraitBase.java | 14 +++++++++++++- .../res/cardsfolder/upcoming/henge_walker.txt | 6 ++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/henge_walker.txt diff --git a/forge-game/src/main/java/forge/game/CardTraitBase.java b/forge-game/src/main/java/forge/game/CardTraitBase.java index a56db98f6f9..e51ab5202c0 100644 --- a/forge-game/src/main/java/forge/game/CardTraitBase.java +++ b/forge-game/src/main/java/forge/game/CardTraitBase.java @@ -259,7 +259,19 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView { return false; } final String payingMana = StringUtils.join(hostCard.getCastSA().getPayingMana()); - if (StringUtils.countMatches(payingMana, MagicColor.toShortString(params.get("Adamant"))) < 3) { + final String color = params.get("Adamant"); + if ("Any".equals(color)) { + boolean bFlag = false; + for (byte c : MagicColor.WUBRG) { + if (StringUtils.countMatches(payingMana, MagicColor.toShortString(c)) >= 3) { + bFlag = true; + break; + } + } + if (!bFlag) { + return false; + } + } else if (StringUtils.countMatches(payingMana, MagicColor.toShortString(color)) < 3) { return false; } } diff --git a/forge-gui/res/cardsfolder/upcoming/henge_walker.txt b/forge-gui/res/cardsfolder/upcoming/henge_walker.txt new file mode 100644 index 00000000000..e85b1bdfef4 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/henge_walker.txt @@ -0,0 +1,6 @@ +Name:Henge Walker +ManaCost:3 +Types:Artifact Creature Golem +PT:2/2 +K:etbCounter:P1P1:1:Adamant$ Any:Adamant — If at least three mana of the same color was spent to cast this spell, CARDNAME enters the battlefield with a +1/+1 counter on it. +Oracle:Adamant — If at least three mana of the same color was spent to cast this spell, Henge Walker enters the battlefield with a +1/+1 counter on it. From 12b05147e70de9b89439d7859721daf10fb198f2 Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 16 Sep 2019 18:27:10 +0800 Subject: [PATCH 3/7] Update two Adamant cards --- forge-game/src/main/java/forge/game/card/CardUtil.java | 3 ++- forge-gui/res/cardsfolder/upcoming/embereth_paladin.txt | 4 +--- forge-gui/res/cardsfolder/upcoming/garenbrig_paladin.txt | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/CardUtil.java b/forge-game/src/main/java/forge/game/card/CardUtil.java index 7bf0cfe1390..1bb94cdcdb4 100644 --- a/forge-game/src/main/java/forge/game/card/CardUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardUtil.java @@ -56,7 +56,8 @@ public final class CardUtil { "Transmute", "Replicate", "Recover", "Suspend", "Aura swap", "Fortify", "Transfigure", "Champion", "Evoke", "Prowl", "IfReach", "Reinforce", "Unearth", "Level up", "Miracle", "Overload", - "Scavenge", "Bestow", "Outlast", "Dash", "Surge", "Emerge", "Hexproof:").build(); + "Scavenge", "Bestow", "Outlast", "Dash", "Surge", "Emerge", "Hexproof:", + "etbCounter").build(); /** List of keyword endings of keywords that could be modified by text changes. */ public static final ImmutableList modifiableKeywordEndings = ImmutableList.builder().add( "walk", "cycling", "offering").build(); diff --git a/forge-gui/res/cardsfolder/upcoming/embereth_paladin.txt b/forge-gui/res/cardsfolder/upcoming/embereth_paladin.txt index b76ada65fcd..456f35744c0 100644 --- a/forge-gui/res/cardsfolder/upcoming/embereth_paladin.txt +++ b/forge-gui/res/cardsfolder/upcoming/embereth_paladin.txt @@ -3,7 +3,5 @@ ManaCost:3 R Types:Creature Human Knight PT:4/1 K:Haste -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Adamant$ Red | ReplaceWith$ ETBAddCounter | Description$ Adamant — If at least three red mana was spent to cast this spell, CARDNAME enters the battlefield with a +1/+1 counter on it. -SVar:ETBAddCounter:DB$ PutCounter | ETB$ True | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToPlay -SVar:MoveToPlay:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:etbCounter:P1P1:1:Adamant$ Red:Adamant — If at least three red mana was spent to cast this spell, CARDNAME enters the battlefield with a +1/+1 counter on it. Oracle:Haste\nAdamant — If at least three red mana was spent to cast this spell, Embereth Paladin enters the battlefield with a +1/+1 counter on it. diff --git a/forge-gui/res/cardsfolder/upcoming/garenbrig_paladin.txt b/forge-gui/res/cardsfolder/upcoming/garenbrig_paladin.txt index cdb510b7e22..8c81772b74d 100644 --- a/forge-gui/res/cardsfolder/upcoming/garenbrig_paladin.txt +++ b/forge-gui/res/cardsfolder/upcoming/garenbrig_paladin.txt @@ -2,8 +2,6 @@ Name:Garenbrig Paladin ManaCost:4 G Types:Creature Giant Knight PT:4/4 -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Adamant$ Green | ReplaceWith$ ETBAddCounter | Description$ Adamant — If at least three green mana was spent to cast this spell, CARDNAME enters the battlefield with a +1/+1 counter on it. -SVar:ETBAddCounter:DB$ PutCounter | ETB$ True | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToPlay -SVar:MoveToPlay:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:etbCounter:P1P1:1:Adamant$ Green:Adamant — If at least three green mana was spent to cast this spell, CARDNAME enters the battlefield with a +1/+1 counter on it. K:CantBeBlockedBy Creature.powerLE2 Oracle:Adamant — If at least three green mana was spent to cast this spell, Garenbrig Paladin enters the battlefield with a +1/+1 counter on it.\nGarenbrig Paladin can't be blocked by creatures with power 2 or less. From 716faf4706f23d8814a8544c86c96c6a03f44f45 Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 16 Sep 2019 18:35:31 +0800 Subject: [PATCH 4/7] Add Clockwork Servant --- forge-gui/res/cardsfolder/upcoming/clockwork_servant.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/clockwork_servant.txt diff --git a/forge-gui/res/cardsfolder/upcoming/clockwork_servant.txt b/forge-gui/res/cardsfolder/upcoming/clockwork_servant.txt new file mode 100644 index 00000000000..fff1fe161a5 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/clockwork_servant.txt @@ -0,0 +1,7 @@ +Name:Clockwork Servant +ManaCost:3 +Types:Artifact Creature Gnome +PT:2/3 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Adamant$ Any | Execute$ TrigDraw | TriggerDescription$ Adamant — When CARDNAME enters the battlefield, if at least three mana of the same color was spent to cast it, draw a card. +SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 1 +Oracle:Adamant — When Clockwork Servant enters the battlefield, if at least three mana of the same color was spent to cast it, draw a card. From e0f2802eda44767626d638fd26091629d538a4d2 Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 16 Sep 2019 18:49:46 +0800 Subject: [PATCH 5/7] Add Sundering Stroke --- .../src/main/java/forge/game/ability/AbilityUtils.java | 3 ++- forge-gui/res/cardsfolder/upcoming/sundering_stroke.txt | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/sundering_stroke.txt diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index fa03796fa5a..f8abf7b00b0 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -1620,7 +1620,8 @@ public class AbilityUtils { // Count$Adamant... if (sq[0].startsWith("Adamant")) { final String payingMana = StringUtils.join(sa.getRootAbility().getPayingMana()); - final boolean adamant = StringUtils.countMatches(payingMana, MagicColor.toShortString(sq[1])) >= 3; + final int num = sq[0].length() > 7 ? Integer.parseInt(sq[0].split("_")[1]) : 3; + final boolean adamant = StringUtils.countMatches(payingMana, MagicColor.toShortString(sq[1])) >= num; return CardFactoryUtil.doXMath(Integer.parseInt(sq[adamant ? 2 : 3]), expr, c); } diff --git a/forge-gui/res/cardsfolder/upcoming/sundering_stroke.txt b/forge-gui/res/cardsfolder/upcoming/sundering_stroke.txt new file mode 100644 index 00000000000..e34f7f05e6a --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/sundering_stroke.txt @@ -0,0 +1,7 @@ +Name:Sundering Stroke +ManaCost:6 R +Types:Sorcery +A:SP$ DealDamage | Cost$ 6 R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target to distribute damage to | NumDmg$ 7 | TargetMin$ 1 | TargetMax$ 3 | DividedAsYouChoose$ 7 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | References$ X | SubAbility$ DBDmgAll | StackDescription$ SpellDescription | SpellDescription$ CARDNAME deals 7 damage divided as you choose among one, two, or three targets. If at least seven red mana was spent to cast this spell, instead CARDNAME deals 7 damage to each of those permanents and/or players. +SVar:DBDmgAll:DB$ DealDamage | Defined$ Targeted | NumDmg$ 7 | ConditionCheckSVar$ X | References$ X | StackDescription$ None +SVar:X:Count$Adamant_7.Red.1.0 +Oracle:Sundering Stroke deals 7 damage divided as you choose among one, two, or three targets. If at least seven red mana was spent to cast this spell, instead Sundering Stroke deals 7 damage to each of those permanents and/or players. From 70f640b41424723d1d755b476d8abce368ecc318 Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 16 Sep 2019 20:10:08 +0800 Subject: [PATCH 6/7] Add two cards --- forge-gui/res/cardsfolder/p/psychic_intrusion.txt | 4 +--- .../res/cardsfolder/upcoming/blow_your_house_down.txt | 6 ++++++ forge-gui/res/cardsfolder/upcoming/covetous_urge.txt | 9 +++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/blow_your_house_down.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/covetous_urge.txt diff --git a/forge-gui/res/cardsfolder/p/psychic_intrusion.txt b/forge-gui/res/cardsfolder/p/psychic_intrusion.txt index fd16b080671..1d0a7051b39 100644 --- a/forge-gui/res/cardsfolder/p/psychic_intrusion.txt +++ b/forge-gui/res/cardsfolder/p/psychic_intrusion.txt @@ -2,10 +2,8 @@ Name:Psychic Intrusion ManaCost:3 U B Types:Sorcery A:SP$ ChangeZone | Cost$ 3 U B | Origin$ Hand,Graveyard | Destination$ Exile | ValidTgts$ Opponent | DefinedPlayer$ Targeted | Chooser$ You | TgtPrompt$ Select target opponent | ChangeType$ Card.nonLand | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Target opponent reveals their hand. You choose a nonland card from that player's graveyard or hand and exile it. You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell. -SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | Triggers$ TriggerCastPI | SVars$ TrigRemoveSelf | RememberObjects$ Remembered | Duration$ Permanent | SubAbility$ DBCleanup +SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | Duration$ Permanent | ExileOnMoved$ Exile | SubAbility$ DBCleanup SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreColor$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may cast that card and you may spend mana as though it were mana of any color to cast it. -SVar:TriggerCastPI:Mode$ SpellCast | ValidCard$ Card.IsRemembered | TriggerZones$ Command | Execute$ TrigRemoveSelf | Static$ True -SVar:TrigRemoveSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True AI:RemoveDeck:All SVar:Picture:http://www.wizards.com/global/images/magic/general/psychic_intrusion.jpg diff --git a/forge-gui/res/cardsfolder/upcoming/blow_your_house_down.txt b/forge-gui/res/cardsfolder/upcoming/blow_your_house_down.txt new file mode 100644 index 00000000000..94decc095c2 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/blow_your_house_down.txt @@ -0,0 +1,6 @@ +Name:Blow Your House Down +ManaCost:2 R +Types:Sorcery +A:SP$ Pump | Cost$ 2 R | ValidTgts$ Creature | TargetMin$ 0 | TargetMax$ 3 | KW$ HIDDEN CARDNAME can't block. | IsCurse$ True | TgtPrompt$ Select target creature | SubAbility$ DBDestroy | SpellDescription$ Up to three target creatures can't block this turn. Destroy any of them that are Walls. +SVar:DBDestroy:DB$ DestroyAll | ValidCards$ Targeted.Wall +Oracle:Up to three target creatures can't block this turn. Destroy any of them that are Walls. diff --git a/forge-gui/res/cardsfolder/upcoming/covetous_urge.txt b/forge-gui/res/cardsfolder/upcoming/covetous_urge.txt new file mode 100644 index 00000000000..97b9ce91901 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/covetous_urge.txt @@ -0,0 +1,9 @@ +Name:Covetous Urge +ManaCost:U/B U/B U/B U/B +Types:Sorcery +A:SP$ ChangeZone | Cost$ U/B U/B U/B U/B | Origin$ Hand,Graveyard | Destination$ Exile | ValidTgts$ Opponent | DefinedPlayer$ Targeted | Chooser$ You | TgtPrompt$ Select target opponent | ChangeType$ Card.nonLand | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Target opponent reveals their hand. You choose a nonland card from that player's graveyard or hand and exile it. You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell. +SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | Duration$ Permanent | ExileOnMoved$ Exile | SubAbility$ DBCleanup +SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreColor$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may cast that card and you may spend mana as though it were mana of any color to cast it. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +AI:RemoveDeck:All +Oracle:Target opponent reveals their hand. You choose a nonland card from that player's graveyard or hand and exile it. You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell. From c8cb56c416a79dcef7ba4e4b6aa5bf0a568445bf Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 16 Sep 2019 20:20:07 +0800 Subject: [PATCH 7/7] Update a script --- forge-gui/res/cardsfolder/p/prahv.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/forge-gui/res/cardsfolder/p/prahv.txt b/forge-gui/res/cardsfolder/p/prahv.txt index eec7a7065c7..be2396dbeac 100644 --- a/forge-gui/res/cardsfolder/p/prahv.txt +++ b/forge-gui/res/cardsfolder/p/prahv.txt @@ -4,12 +4,7 @@ Types:Plane Ravnica S:Mode$ CantAttack | EffectZone$ Command | ValidCard$ Creature.YouCtrl | CheckSVar$ CheckThisTurnCast | Description$ If you cast a spell this turn, you can't attack with creatures. SVar:CheckThisTurnCast:Count$ThisTurnCast_Card.YouCtrl S:Mode$ CantBeCast | EffectZone$ Command | ValidCard$ Card | Caster$ You | CheckSVar$ CheckThisTurnAttacked | Description$ If you attacked with creatures this turn, you can't cast spells. -SVar:CheckThisTurnAttacked:Number$0 -T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | Execute$ DBStoreSVar | Static$ True -SVar:DBStoreSVar:DB$ StoreSVar | SVar$ CheckThisTurnAttacked | Type$ Number | Expression$ 1 -T:Mode$ PlaneswalkedFrom | ValidCard$ Plane.Self | Execute$ DBReset | Static$ True -T:Mode$ Phase | Phase$ Cleanup | Execute$ DBReset | Static$ True -SVar:DBReset:DB$ StoreSVar | SVar$ CheckThisTurnAttacked | Type$ Number | Expression$ 0 +SVar:CheckThisTurnAttacked:Count$AttackersDeclared T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever you roll {CHAOS}, you gain life equal to the number of cards in your hand. SVar:RolledChaos:DB$ GainLife | LifeAmount$ PrahvX | References$ PrahvX | Defined$ You SVar:PrahvX:Count$InYourHand