Merge pull request #1207 from Northmoc/showdown

CLB: Spectacular Showdown and support
This commit is contained in:
Anthony Calosa
2022-07-28 08:14:34 +08:00
committed by GitHub
6 changed files with 29 additions and 5 deletions

View File

@@ -157,8 +157,13 @@ public class GameEntityCounterTable extends ForwardingTable<Optional<Player>, Ga
// Apply counter after replacement effect
for (Map.Entry<Optional<Player>, Map<CounterType, Integer>> e : values.entrySet()) {
boolean remember = cause != null && cause.hasParam("RememberPut");
for (Map.Entry<CounterType, Integer> ec : e.getValue().entrySet()) {
gm.getKey().addCounterInternal(ec.getKey(), ec.getValue(), e.getKey().orNull(), true, result);
if (remember && ec.getValue() >= 1) {
cause.getHostCard().addRemembered(gm.getKey());
}
}
}
}

View File

@@ -94,6 +94,13 @@ public class CountersPutAllEffect extends SpellAbilityEffect {
}
table.replaceCounterEffect(game, sa, true);
//for cards like Agitator Ant/Spectacular Showdown that care if counters were actually put on,
// instead use "RememberPut" this checks after replacement
if (sa.hasParam("RememberCards")) { // remembers whether counters actually placed or not
host.addRemembered(table.columnKeySet());
}
}
}

View File

@@ -631,7 +631,9 @@ public class CountersPutEffect extends SpellAbilityEffect {
}
}
}
if (sa.hasParam("RememberCards")) {
//for cards like Agitator Ant/Spectacular Showdown that care if counters were actually put on,
// instead use "RememberPut" this checks after replacement
if (sa.hasParam("RememberCards")) { // remembers whether counters actually placed or not
card.addRemembered(table.columnKeySet());
}
}

View File

@@ -16,12 +16,13 @@ public class GoadEffect extends SpellAbilityEffect {
@Override
protected String getStackDescription(SpellAbility sa) {
final Player player = sa.getActivatingPlayer();
List<Card> tgt = getTargetCards(sa);
if (tgt.size() <= 0) {
List<Card> tgt = getDefinedCardsOrTargeted(sa, "Defined");
String tgtString = sa.getParamOrDefault("DefinedDesc", Lang.joinHomogenous(tgt));
if (tgtString.isEmpty()) {
return "";
} else {
final StringBuilder sb = new StringBuilder();
sb.append(player).append(" goads ").append(Lang.joinHomogenous(tgt)).append(".");
sb.append(player).append(" goads ").append(tgtString).append(".");
return sb.toString();
}
}

View File

@@ -4,7 +4,7 @@ Types:Creature Insect
PT:2/2
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigRepeat | TriggerDescription$ At the beginning of your end step, each player may put two +1/+1 counters on a creature they control. Goad each creature that had counters put on it this way. (Until your next turn, those creatures attack each combat if able and attack a player other than you if able.)
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBPutCounter | SubAbility$ DBGoad
SVar:DBPutCounter:DB$ PutCounter | Chooser$ Remembered | Choices$ Creature.RememberedPlayerCtrl | ChoiceTitle$ You may choose a creature you control | ChoiceOptional$ True | CounterType$ P1P1 | CounterNum$ 2 | RememberCards$ True
SVar:DBPutCounter:DB$ PutCounter | Chooser$ Remembered | Choices$ Creature.RememberedPlayerCtrl | ChoiceTitle$ You may choose a creature you control | ChoiceOptional$ True | CounterType$ P1P1 | CounterNum$ 2 | RememberPut$ True
SVar:DBGoad:DB$ Goad | Defined$ Remembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
DeckHas:Ability$Counters

View File

@@ -0,0 +1,9 @@
Name:Spectacular Showdown
ManaCost:1 R
Types:Sorcery
A:SP$ PutCounter | ValidTgts$ Creature | CounterType$ Double Strike | RememberPut$ True | SubAbility$ DBGoad | SpellDescription$ Put a double strike counter on target creature, then goad each creature that had a double strike counter put on it this way. (Until your next turn, those creatures attack each combat if able and attack a player other than you if able.)
SVar:DBGoad:DB$ Goad | Defined$ Remembered | DefinedDesc$ each creature that had a double strike counter put on it this way | SubAbility$ DBCleanup
A:SP$ PutCounterAll | PrecostDesc$ Overload | Cost$ 4 R R R | ValidCards$ Creature | CounterType$ Double Strike | RememberPut$ True | SubAbility$ DBGoad | CostDesc$ {4}{R}{R}{R} | NonBasicSpell$ True | SpellDescription$ (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") | StackDescription$ Put a double strike counter on each creature.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
DeckHas:Ability$Counters
Oracle:Put a double strike counter on target creature, then goad each creature that had a double strike counter put on it this way. (Until your next turn, those creatures attack each combat if able and attack a player other than you if able.)\nOverload {4}{R}{R}{R} (You may cast this spell for its overload cost. If you do, change "target" in its text to "each.")