From 689a4516fd66e962f63cf658072b75ffc249e06d Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sun, 1 Nov 2020 07:17:52 -0500 Subject: [PATCH 1/3] dargo v1 --- .../cardsfolder/upcoming/dargo_the_shipwrecker.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt diff --git a/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt b/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt new file mode 100755 index 00000000000..80bf2a89665 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt @@ -0,0 +1,14 @@ +Name:Dargo, the Shipwrecker +ManaCost:6 R +Types:Legendary Creature Giant Pirate +PT:7/5 +A:SP$ PermanentCreature | Cost$ 6 R Sac | References$ X | CostDesc$ As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. +S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ Z | EffectZone$ All | References$ Z | Description$ This spell costs {2} less to cast for each permanent sacrificed this way and {2} less to cast for each other artifact or creature you've sacrificed this turn. +SVar:X:XChoice +#SVar:A:Sacrificed$Amount/Twice +SVar:Z:Count$SacrificedThisTurn Artifact,Creature/Twice +SVar:AIPreference:SacCost$Creature.token,Creature.cmcLE2 +DeckHas:Ability$Sacrifice +K:Trample +K:Partner +Oracle:As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. This spell costs {2} less to cast for each permanent sacrificed this way and {2} less to cast for each other artifact or creature you've sacrificed this turn.\nTrample\nPartner (You can have two commanders if both have partner.) From 94e3b5ac91610ce73ce69d71712448e79412773d Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sun, 1 Nov 2020 14:00:45 -0500 Subject: [PATCH 2/3] dargo_the_shipwrecker.txt and support --- .../src/main/java/forge/game/card/CardFactoryUtil.java | 8 +++++--- .../res/cardsfolder/upcoming/dargo_the_shipwrecker.txt | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index 771c96514d1..8923d54a8a3 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -871,10 +871,12 @@ public class CardFactoryUtil { if (l[0].startsWith("SacrificedThisTurn")) { CardCollectionView list = cc.getSacrificedThisTurn(); if (l[0].contains(" ")) { - final String[] components = l[0].split(" ", 2); - list = CardLists.getValidCards(list, components[1], cc, c); + String[] lparts = l[0].split(" ", 2); + String restrictions = TextUtil.fastReplace(l[0], TextUtil.addSuffix(lparts[0]," "), ""); + final String[] rest = restrictions.split(","); + list = CardLists.getValidCards(list, rest, cc, c, null); } - return list.size(); + return doXMath(list.size(), m, c); } final String[] sq; diff --git a/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt b/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt index 80bf2a89665..231dc01eaaa 100755 --- a/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt +++ b/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt @@ -2,11 +2,12 @@ Name:Dargo, the Shipwrecker ManaCost:6 R Types:Legendary Creature Giant Pirate PT:7/5 -A:SP$ PermanentCreature | Cost$ 6 R Sac | References$ X | CostDesc$ As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. -S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ Z | EffectZone$ All | References$ Z | Description$ This spell costs {2} less to cast for each permanent sacrificed this way and {2} less to cast for each other artifact or creature you've sacrificed this turn. +A:SP$ PermanentCreature | Announce$ X | Cost$ 6 R Sac | AILogic$ SacToReduceCost | References$ X,Y | CostDesc$ As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. | SpellDescription$ As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. +S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ Y | EffectZone$ All | References$ Y | Description$ This spell costs {2} less to cast for each permanent sacrificed this way and {2} less to cast for each other artifact or creature you've sacrificed this turn. +S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ Z | EffectZone$ All | References$ Z | Secondary$ True | Description$ This spell costs {2} less to cast for each permanent sacrificed this way and {2} less to cast for each other artifact or creature you've sacrificed this turn. SVar:X:XChoice -#SVar:A:Sacrificed$Amount/Twice -SVar:Z:Count$SacrificedThisTurn Artifact,Creature/Twice +SVar:Y:SVar$X/Times.2 +SVar:Z:Count$SacrificedThisTurn Artifact,Creature/Times.2 SVar:AIPreference:SacCost$Creature.token,Creature.cmcLE2 DeckHas:Ability$Sacrifice K:Trample From cd46705791335c73f73dd68a19f78f306bb8c219 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sun, 8 Nov 2020 08:31:56 -0500 Subject: [PATCH 3/3] Dargo better detail pane --- forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt b/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt index 231dc01eaaa..60013e89d72 100755 --- a/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt +++ b/forge-gui/res/cardsfolder/upcoming/dargo_the_shipwrecker.txt @@ -2,7 +2,7 @@ Name:Dargo, the Shipwrecker ManaCost:6 R Types:Legendary Creature Giant Pirate PT:7/5 -A:SP$ PermanentCreature | Announce$ X | Cost$ 6 R Sac | AILogic$ SacToReduceCost | References$ X,Y | CostDesc$ As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. | SpellDescription$ As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. +A:SP$ PermanentCreature | Announce$ X | Cost$ 6 R Sac | AILogic$ SacToReduceCost | References$ X,Y | CostDesc$ As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. | SpellDescription$ S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ Y | EffectZone$ All | References$ Y | Description$ This spell costs {2} less to cast for each permanent sacrificed this way and {2} less to cast for each other artifact or creature you've sacrificed this turn. S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ Z | EffectZone$ All | References$ Z | Secondary$ True | Description$ This spell costs {2} less to cast for each permanent sacrificed this way and {2} less to cast for each other artifact or creature you've sacrificed this turn. SVar:X:XChoice