mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Merge branch 'adaptReduceCost' into 'master'
Adapt: add ReduceCost for Pteramander See merge request core-developers/forge!1267
This commit is contained in:
@@ -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);
|
||||
|
||||
9
forge-gui/res/cardsfolder/upcoming/pteramander.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/pteramander.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
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()));
|
||||
|
||||
Reference in New Issue
Block a user