mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
add WithCountersType and WithCountersAmount
This commit is contained in:
@@ -553,6 +553,11 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
String[] parse = sa.getParam("WithCounters").split("_");
|
String[] parse = sa.getParam("WithCounters").split("_");
|
||||||
gameCard.addEtbCounter(CounterType.getType(parse[0]), Integer.parseInt(parse[1]), player);
|
gameCard.addEtbCounter(CounterType.getType(parse[0]), Integer.parseInt(parse[1]), player);
|
||||||
}
|
}
|
||||||
|
if (sa.hasParam("WithCountersType")) {
|
||||||
|
CounterType cType = CounterType.getType(sa.getParam("WithCountersType"));
|
||||||
|
int cAmount = AbilityUtils.calculateAmount(hostCard, sa.getParamOrDefault("WithCountersAmount", "1"), sa);
|
||||||
|
gameCard.addEtbCounter(cType, cAmount, player);
|
||||||
|
}
|
||||||
if (sa.hasParam("GainControl")) {
|
if (sa.hasParam("GainControl")) {
|
||||||
if (sa.hasParam("NewController")) {
|
if (sa.hasParam("NewController")) {
|
||||||
final Player p = Iterables.getFirst(AbilityUtils.getDefinedPlayers(hostCard, sa.getParam("NewController"), sa), null);
|
final Player p = Iterables.getFirst(AbilityUtils.getDefinedPlayers(hostCard, sa.getParam("NewController"), sa), null);
|
||||||
@@ -1122,6 +1127,12 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
String[] parse = sa.getParam("WithCounters").split("_");
|
String[] parse = sa.getParam("WithCounters").split("_");
|
||||||
c.addEtbCounter(CounterType.getType(parse[0]), Integer.parseInt(parse[1]), player);
|
c.addEtbCounter(CounterType.getType(parse[0]), Integer.parseInt(parse[1]), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sa.hasParam("WithCountersType")) {
|
||||||
|
CounterType cType = CounterType.getType(sa.getParam("WithCountersType"));
|
||||||
|
int cAmount = AbilityUtils.calculateAmount(source, sa.getParamOrDefault("WithCountersAmount", "1"), sa);
|
||||||
|
c.addEtbCounter(cType, cAmount, player);
|
||||||
|
}
|
||||||
if (sa.hasParam("Transformed")) {
|
if (sa.hasParam("Transformed")) {
|
||||||
if (c.isDoubleFaced()) {
|
if (c.isDoubleFaced()) {
|
||||||
c.changeCardState("Transform", null, sa);
|
c.changeCardState("Transform", null, sa);
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ public abstract class TokenEffectBase extends SpellAbilityEffect {
|
|||||||
tok.addEtbCounter(CounterType.getType(parse[0]), Integer.parseInt(parse[1]), creator);
|
tok.addEtbCounter(CounterType.getType(parse[0]), Integer.parseInt(parse[1]), creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sa.hasParam("WithCountersType")) {
|
||||||
|
CounterType cType = CounterType.getType(sa.getParam("WithCountersType"));
|
||||||
|
int cAmount = AbilityUtils.calculateAmount(host, sa.getParamOrDefault("WithCountersAmount", "1"), sa);
|
||||||
|
tok.addEtbCounter(cType, cAmount, creator);
|
||||||
|
}
|
||||||
|
|
||||||
if (clone) {
|
if (clone) {
|
||||||
tok.setCopiedPermanent(prototype);
|
tok.setCopiedPermanent(prototype);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user