Commit af3c6455 authored by swordshine's avatar swordshine

Merge branch 'adaptReduceCost' into 'master'

Adapt: add ReduceCost for Pteramander

See merge request core-developers/forge!1267
parents e5093c6d 17cff99c
......@@ -3703,12 +3703,24 @@ public class CardFactoryUtil {
final String[] k = keyword.split(":");
final String magnitude = k[1];
final String manacost = k[2];
final String reduceCost = k.length > 3 ? k[3] : null;
Set<String> references = Sets.newHashSet();
String desc = "Adapt " + magnitude;
String effect = "AB$ PutCounter | Cost$ " + manacost + " | Adapt$ True | CounterNum$ " + magnitude
+ " | CounterType$ P1P1 | StackDescription$ SpellDescription";
if (reduceCost != null) {
effect += "| ReduceCost$ " + reduceCost;
references.add(reduceCost);
desc += ". This ability costs {1} less to activate for each instant and sorcery card in your graveyard.";
}
if (!references.isEmpty()) {
effect += "| References$ " + TextUtil.join(references, ",");
}
effect += "| SpellDescription$ " + desc + " (" + inst.getReminderText() + ")";
final SpellAbility sa = AbilityFactory.getAbility(effect, card);
......
Name:Pteramander
ManaCost:U
Types:Creature Salamander Drake
PT:1/1
K:Flying
K:Adapt:4:7 U:X
SVar:X:Count$ValidGraveyard Instant.YouOwn,Sorcery.YouOwn
DeckHas:Ability$Counters
Oracle:Flying\n{7}{U}: Adapt 4. This ability costs {1} less to activate for each instant and sorcery card in your graveyard. (If this creature has no +1/+1 counters on it, put four +1/+1 counters on it.)
......@@ -33,7 +33,7 @@ public class InputSelectEntitiesFromList<T extends GameEntity> extends InputSele
if (min > validChoices.size()) {
System.out.println(String.format("Trying to choose at least %d things from a list with only %d things!", min, validChoices.size()));
}
PlayerZoneUpdates zonesToUpdate = new PlayerZoneUpdates();
final PlayerZoneUpdates zonesToUpdate = new PlayerZoneUpdates();
for (final GameEntity c : validChoices) {
final Zone cz = (c instanceof Card) ? ((Card) c).getZone() : null ;
zonesToUpdate.add(new PlayerZoneUpdate(cz.getPlayer().getView(),cz.getZoneType()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment