Merge branch 'dargo' into 'master'

CMR: Dargo and support

See merge request core-developers/forge!3323
This commit is contained in:
Michael Kamensky
2020-11-09 14:49:02 +00:00
2 changed files with 20 additions and 3 deletions

View File

@@ -871,10 +871,12 @@ public class CardFactoryUtil {
if (l[0].startsWith("SacrificedThisTurn")) { if (l[0].startsWith("SacrificedThisTurn")) {
CardCollectionView list = cc.getSacrificedThisTurn(); CardCollectionView list = cc.getSacrificedThisTurn();
if (l[0].contains(" ")) { if (l[0].contains(" ")) {
final String[] components = l[0].split(" ", 2); String[] lparts = l[0].split(" ", 2);
list = CardLists.getValidCards(list, components[1], cc, c); 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; final String[] sq;

View File

@@ -0,0 +1,15 @@
Name:Dargo, the Shipwrecker
ManaCost:6 R
Types:Legendary Creature Giant Pirate
PT:7/5
A:SP$ PermanentCreature | Announce$ X | Cost$ 6 R Sac<X/Artifact;Creature/artifacts or creatures> | 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
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
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.)