mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge remote-tracking branch 'upstream/master' into CMM2
This commit is contained in:
@@ -1015,7 +1015,7 @@ public class CountersPutAi extends CountersAi {
|
||||
if (mine.isEmpty()) {
|
||||
// Try to Benefit Ally if possible
|
||||
final CardCollection ally = CardLists.filterControlledBy(options, ai.getAllies());
|
||||
if (ally.isEmpty()) {
|
||||
if (!ally.isEmpty()) {
|
||||
return ComputerUtilCard.getBestAI(ally);
|
||||
}
|
||||
return isOptional ? null : ComputerUtilCard.getWorstAI(options);
|
||||
|
||||
@@ -166,8 +166,6 @@ public class CountersMoveEffect extends SpellAbilityEffect {
|
||||
}
|
||||
|
||||
game.updateLastStateForCard(dest);
|
||||
table.replaceCounterEffect(game, sa, true);
|
||||
return;
|
||||
} else if (sa.hasParam("ValidDefined")) {
|
||||
// one Source to many Targets
|
||||
// need given CounterType
|
||||
@@ -231,9 +229,7 @@ public class CountersMoveEffect extends SpellAbilityEffect {
|
||||
if (updateSource) {
|
||||
// update source
|
||||
game.updateLastStateForCard(source);
|
||||
table.replaceCounterEffect(game, sa, true);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
Card source = null;
|
||||
List<Card> tgtCards = getDefinedCardsOrTargeted(sa);
|
||||
@@ -276,7 +272,14 @@ public class CountersMoveEffect extends SpellAbilityEffect {
|
||||
for (Map.Entry<CounterType, Integer> e : tgtCounters.entrySet()) {
|
||||
removeCounter(sa, source, cur, e.getKey(), counterNum, countersToAdd);
|
||||
}
|
||||
|
||||
} else if ("EachNotOn".equals(counterName)) {
|
||||
final Map<CounterType, Integer> tgtCounters = Maps.newHashMap(source.getCounters());
|
||||
for (Map.Entry<CounterType, Integer> e : tgtCounters.entrySet()) {
|
||||
if (cur.getCounters(e.getKey()) > 0) {
|
||||
continue;
|
||||
}
|
||||
removeCounter(sa, source, cur, e.getKey(), counterNum, countersToAdd);
|
||||
}
|
||||
} else if ("Any".equals(counterName)) {
|
||||
// any counterType currently only Leech Bonder
|
||||
final Map<CounterType, Integer> tgtCounters = source.getCounters();
|
||||
@@ -292,18 +295,20 @@ public class CountersMoveEffect extends SpellAbilityEffect {
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Object> params = Maps.newHashMap();
|
||||
params.put("Source", source);
|
||||
params.put("Target", dest);
|
||||
String title = Localizer.getInstance().getMessage("lblSelectRemoveCounterType");
|
||||
CounterType chosenType = pc.chooseCounterType(typeChoices, sa, title, params);
|
||||
while (!typeChoices.isEmpty()) {
|
||||
Map<String, Object> params = Maps.newHashMap();
|
||||
params.put("Source", source);
|
||||
params.put("Target", dest);
|
||||
String title = Localizer.getInstance().getMessage("lblSelectRemoveCounterType");
|
||||
CounterType chosenType = pc.chooseCounterType(typeChoices, sa, title, params);
|
||||
|
||||
removeCounter(sa, source, cur, chosenType, counterNum, countersToAdd);
|
||||
} else {
|
||||
if (!cur.canReceiveCounters(cType)) {
|
||||
continue;
|
||||
removeCounter(sa, source, cur, chosenType, counterNum, countersToAdd);
|
||||
if (!counterNum.equals("Any")) {
|
||||
break;
|
||||
}
|
||||
typeChoices.remove(chosenType);
|
||||
}
|
||||
|
||||
} else {
|
||||
removeCounter(sa, source, cur, cType, counterNum, countersToAdd);
|
||||
}
|
||||
|
||||
@@ -346,10 +351,11 @@ public class CountersMoveEffect extends SpellAbilityEffect {
|
||||
params.put("CounterType", cType);
|
||||
params.put("Source", src);
|
||||
params.put("Target", dest);
|
||||
int min = sa.hasParam("NonZero") && countersToAdd.isEmpty() ? 1 : 0;
|
||||
cnum = pc.chooseNumber(
|
||||
sa, Localizer.getInstance().getMessage("lblTakeHowManyTargetCounterFromCard",
|
||||
cType.getName(), CardTranslation.getTranslatedName(src.getName())),
|
||||
0, cmax, params);
|
||||
min, cmax, params);
|
||||
} else {
|
||||
cnum = Math.min(cmax, AbilityUtils.calculateAmount(host, counterNum, sa));
|
||||
}
|
||||
|
||||
@@ -140,10 +140,13 @@ public class CountersRemoveEffect extends SpellAbilityEffect {
|
||||
CardCollection choices = CardLists.getValidCards(game.getCardsIn(choiceZone), sa.getParam("Choices"),
|
||||
player, card, sa);
|
||||
|
||||
//currently only used by one card, so for now
|
||||
//amount is locked at 1 and choice is mandatory
|
||||
srcCards = pc.chooseCardsForEffect(choices, sa, title, 1, 1,
|
||||
false, null);
|
||||
int min = 1;
|
||||
int max = 1;
|
||||
if (sa.hasParam("ChoiceOptional")) {
|
||||
min = 0;
|
||||
max = choices.size();
|
||||
}
|
||||
srcCards = pc.chooseCardsForEffect(choices, sa, title, min, max, min == 0, null);
|
||||
} else {
|
||||
srcCards = getTargetCards(sa);
|
||||
}
|
||||
|
||||
@@ -230,8 +230,7 @@ public abstract class PlayerController {
|
||||
public abstract ICardFace chooseSingleCardFace(SpellAbility sa, String message, Predicate<ICardFace> cpp, String name);
|
||||
public abstract List<String> chooseColors(String message, SpellAbility sa, int min, int max, List<String> options);
|
||||
|
||||
public abstract CounterType chooseCounterType(List<CounterType> options, SpellAbility sa, String prompt,
|
||||
Map<String, Object> params);
|
||||
public abstract CounterType chooseCounterType(List<CounterType> options, SpellAbility sa, String prompt, Map<String, Object> params);
|
||||
|
||||
public abstract String chooseKeywordForPump(List<String> options, SpellAbility sa, String prompt, Card tgtCard);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:X B R G
|
||||
Types:Legendary Creature Hydra
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:Y:no Condition:CARDNAME enters the battlefield with a number of +1/+1 counters on it equal to the amount of mana spent to cast it.
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigExile | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME attacks, you may exile target creature card with lesser power from your graveyard. If you do, create a token that's a copy of that card and that's tapped and attacking. Exile the token at the end of combat.
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigExile | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever NICKNAME attacks, you may exile target creature card with lesser power from your graveyard. If you do, create a token that's a copy of that card and that's tapped and attacking. Exile the token at the end of combat.
|
||||
SVar:TrigExile:DB$ ChangeZone | ValidTgts$ Creature.YouCtrl+powerLTZ | Origin$ Graveyard | Destination$ Exile | TgtPrompt$ Select target creature card with lesser power in your graveyard | RememberChanged$ True | Optional$ True | SubAbility$ DBCopy
|
||||
SVar:DBCopy:DB$ CopyPermanent | Defined$ Remembered | TokenTapped$ True | TokenAttacking$ True | AtEOT$ ExileCombat | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
|
||||
@@ -4,10 +4,10 @@ Types:Legendary Creature Elemental Beast
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:Y:no Condition:CARDNAME enters the battlefield with a number of +1/+1 counters on it equal to the amount of mana spent to cast it.
|
||||
SVar:Y:Count$CastTotalManaSpent
|
||||
A:AB$ Charm | Cost$ XCantBe0 X SubCounter<X/P1P1> | Choices$ MarathCounters,MarathDmg,MarathToken | Defined$ You
|
||||
SVar:MarathCounters:DB$ PutCounter | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SpellDescription$ Put X +1/+1 counters on target creature. X can't be 0.
|
||||
SVar:MarathDmg:DB$ DealDamage | ValidTgts$ Any | NumDmg$ X | SpellDescription$ CARDNAME deals X damage to any target. X can't be 0.
|
||||
SVar:MarathToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_x_x_elemental | TokenOwner$ You | TokenPower$ X | TokenToughness$ X | SpellDescription$ Create an X/X green Elemental creature token. X can't be 0.
|
||||
A:AB$ Charm | Cost$ XCantBe0 X SubCounter<X/P1P1/NICKNAME> | Choices$ MarathCounters,MarathDmg,MarathToken | Defined$ You | MinCharmNum$ 1 | AdditionalDescription$ . X can't be 0.
|
||||
SVar:MarathCounters:DB$ PutCounter | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ X | SpellDescription$ Put X +1/+1 counters on target creature.
|
||||
SVar:MarathDmg:DB$ DealDamage | ValidTgts$ Any | NumDmg$ X | SpellDescription$ NICKNAME deals X damage to any target.
|
||||
SVar:MarathToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_x_x_elemental | TokenOwner$ You | TokenPower$ X | TokenToughness$ X | SpellDescription$ Create an X/X green Elemental creature token.
|
||||
SVar:X:Count$xPaid
|
||||
AI:RemoveDeck:All
|
||||
Oracle:Marath, Will of the Wild enters the battlefield with a number of +1/+1 counters on it equal to the amount of mana spent to cast it.\n{X}, Remove X +1/+1 counters from Marath: Choose one —\n• Put X +1/+1 counters on target creature. X can't be 0.\n• Marath deals X damage to any target. X can't be 0.\n• Create an X/X green Elemental creature token. X can't be 0.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Name:Goldberry, River-Daughter
|
||||
ManaCost:1 U
|
||||
Types:Legendary Creature Nymph
|
||||
PT:1/3
|
||||
A:AB$ MoveCounter | Cost$ T | Defined$ Self | ValidTgts$ Permanent.YouCtrl+Other | TgtPrompt$ Select another target permanent you control | CounterNum$ 1 | CounterType$ EachNotOn | SpellDescription$ Move a counter of each kind not on CARDNAME from another target permanent you control onto NICKNAME.
|
||||
A:AB$ MoveCounter | Cost$ U T | Source$ Self | ValidTgts$ Permanent.YouCtrl+Other | RememberPut$ True | TgtPrompt$ Select another target permanent you control | CounterNum$ Any | CounterType$ Any | NonZero$ True | SubAbility$ DBDraw | SpellDescription$ Move one or more counters from NICKNAME onto another target permanent you control. If you do, draw a card.
|
||||
SVar:DBDraw:DB$ Draw | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:X:Remembered$Amount
|
||||
DeckHints:Ability$Counters
|
||||
Oracle:{T}: Move a counter of each kind not on Goldberry, River-Daughter from another target permanent you control onto Goldberry.\n{U}, {T}: Move one or more counters from Goldberry onto another target permanent you control. If you do, draw a card.
|
||||
Reference in New Issue
Block a user