Merge branch 'amphin' into 'master'

CMR: Encore Mechanic(!)

Closes #1619

See merge request core-developers/forge!3313
This commit is contained in:
Michael Kamensky
2020-11-01 04:36:52 +00:00
5 changed files with 65 additions and 2 deletions

View File

@@ -1823,7 +1823,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|| keyword.startsWith("Reinforce") || keyword.startsWith("Champion") || keyword.startsWith("Prowl")
|| keyword.startsWith("Amplify") || keyword.startsWith("Ninjutsu") || keyword.startsWith("Adapt")
|| keyword.startsWith("Transfigure") || keyword.startsWith("Aura swap")
|| keyword.startsWith("Cycling") || keyword.startsWith("TypeCycling")) {
|| keyword.startsWith("Cycling") || keyword.startsWith("TypeCycling")
|| keyword.startsWith("Encore")) {
// keyword parsing takes care of adding a proper description
} else if (keyword.startsWith("CantBeBlockedByAmount")) {
sbLong.append(getName()).append(" can't be blocked ");

View File

@@ -2909,7 +2909,7 @@ public class CardFactoryUtil {
final String repeatStr = "DB$ RepeatEach | RepeatPlayers$ OpponentsOtherThanDefendingPlayer | ChangeZoneTable$ True";
final String copyStr = "DB$ CopyPermanent | Defined$ Self | TokenTapped$ True | Optional$ True | TokenAttacking$ Remembered"
+ " | ChoosePlayerOrPlaneswalker$ True | ImprintTokens$ True";
+ " | ChoosePlayerOrPlaneswalker$ True | ImprintTokens$ True";
final String delTrigStr = "DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | RememberObjects$ Imprinted"
+ " | TriggerDescription$ Exile the tokens at end of combat.";
@@ -4347,6 +4347,52 @@ public class CardFactoryUtil {
sa.setIntrinsic(intrinsic);
inst.addSpellAbility(sa);
} else if (keyword.startsWith("Encore")) {
final String[] k = keyword.split(":");
final String manacost = k[1];
String effect = "AB$ RepeatEach | Cost$ " + manacost + " ExileFromGrave<1/CARDNAME> " +
"| ActivationZone$ Graveyard | RepeatPlayers$ Opponent" +
"| PrecostDesc$ Encore | CostDesc$ " + ManaCostParser.parse(manacost) +
"| SpellDescription$ (" + inst.getReminderText() + ")";
final String copyStr = "DB$ CopyPermanent | Defined$ Self | ImprintTokens$ True " +
"| AddKeywords$ Haste | RememberTokens$ True | TokenRemembered$ Player.IsRemembered";
final String pumpStr = "DB$ PumpAll | ValidCards$ Creature.IsRemembered " +
"| KW$ HIDDEN CARDNAME attacks specific player each combat if able:Remembered";
final String pumpcleanStr = "DB$ Cleanup | ForgetDefined$ RememberedCard";
final String delTrigStr = "DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | RememberObjects$ Imprinted " +
"| StackDescription$ None | TriggerDescription$ Sacrifice them at the beginning of the next end step.";
final String sacStr = "DB$ SacrificeAll | Defined$ DelayTriggerRemembered";
final String cleanupStr = "DB$ Cleanup | ClearImprinted$ True";
final SpellAbility sa = AbilityFactory.getAbility(effect, card);
sa.setIntrinsic(intrinsic);
inst.addSpellAbility(sa);
AbilitySub copySA = (AbilitySub) AbilityFactory.getAbility(copyStr, card);
sa.setAdditionalAbility("RepeatSubAbility", copySA);
AbilitySub pumpSA = (AbilitySub) AbilityFactory.getAbility(pumpStr, card);
copySA.setSubAbility(pumpSA);
AbilitySub pumpcleanSA = (AbilitySub) AbilityFactory.getAbility(pumpcleanStr, card);
pumpSA.setSubAbility(pumpcleanSA);
AbilitySub delTrigSA = (AbilitySub) AbilityFactory.getAbility(delTrigStr, card);
sa.setSubAbility(delTrigSA);
AbilitySub sacSA = (AbilitySub) AbilityFactory.getAbility(sacStr, card);
delTrigSA.setAdditionalAbility("Execute", sacSA);
AbilitySub cleanupSA = (AbilitySub) AbilityFactory.getAbility(cleanupStr, card);
delTrigSA.setSubAbility(cleanupSA);
} else if (keyword.startsWith("Spectacle")) {
final String[] k = keyword.split(":");
final Cost cost = new Cost(k[1], false);

View File

@@ -49,6 +49,7 @@ public enum Keyword {
EMBALM("Embalm", KeywordWithCost.class, false, "%s, Exile this card from your graveyard: Create a token that's a copy of this card, except it's white, it has no mana cost, and it's a Zombie in addition to its other types. Embalm only as a sorcery."),
EMERGE("Emerge", KeywordWithCost.class, false, "You may cast this spell by sacrificing a creature and paying the emerge cost reduced by that creature's converted mana cost."),
ENCHANT("Enchant", KeywordWithType.class, false, "Target a %s as you cast this. This card enters the battlefield attached to that %s."),
ENCORE("Encore", KeywordWithCost.class, false, "%s, Exile this card from your graveyard: For each opponent, create a token copy that attacks that opponent this turn if able. They gain haste. Sacrifice them at the beginning of the next end step. Activate only as a sorcery."),
ENTWINE("Entwine", KeywordWithCost.class, true, "You may choose all modes of this spell instead of just one. If you do, you pay an additional %s."),
EPIC("Epic", SimpleKeyword.class, true, "For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps for the rest of the game, copy this spell except for its epic ability. If the spell has any targets, you may choose new targets for the copy."),
EQUIP("Equip", Equip.class, false, "%s: Attach to target %s you control. Equip only as a sorcery."),

View File

@@ -0,0 +1,9 @@
Name:Amphin Mutineer
ManaCost:3 U
Types:Creature Salamander Pirate
PT:3/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile up to one target non-Salamander creature. That creature's controller creates a 4/3 blue Salamander Warrior creature token.
SVar:TrigExile:DB$ ChangeZone | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Creature.nonSalamander | TgtPrompt$ Select up to one target non-Salamander creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ u_4_3_salamander_warrior | TokenOwner$ TargetedController
K:Encore:4 U U
Oracle:When Amphin Mutineer enters the battlefield, exile up to one target non-Salamander creature. That creature's controller creates a 4/3 blue Salamander Warrior creature token.\nEncore {4}{U}{U} ({4}{U}{U}, Exile this card from your graveyard: For each opponent, create a token copy that attacks that opponent this turn if able. They gain haste. Sacrifice them at the beginning of the next end step. Activate only as a sorcery.)

View File

@@ -0,0 +1,6 @@
Name:Salamander Warrior
ManaCost:no cost
Types:Creature Salamander Warrior
Colors:blue
PT:4/3
Oracle: