mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Added the script option "UnlessCost$ CardManaCost".
- Added Pendrell Flux.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -7503,6 +7503,7 @@ res/cardsfolder/p/pemmins_aura.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/pendelhaven.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/pendelhaven_elder.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/pendrell_drake.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/pendrell_flux.txt -text
|
||||
res/cardsfolder/p/pendrell_mists.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/pennon_blade.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/pentad_prism.txt svneol=native#text/plain
|
||||
|
||||
14
res/cardsfolder/p/pendrell_flux.txt
Normal file
14
res/cardsfolder/p/pendrell_flux.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
Name:Pendrell Flux
|
||||
ManaCost:1 U
|
||||
Types:Enchantment Aura
|
||||
Text:no text
|
||||
K:Enchant creature
|
||||
A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | TgtPrompt$ Select target creature | AILogic$ Curse
|
||||
S:Mode$ Continuous | Affected$ Creature.AttachedBy | AddTrigger$ TrigPhase | AddSVar$ TrigPendrellFlux & DBCoralSacrifice & DBCoralCleanup | Description$ Enchanted creature has "At the beginning of your upkeep, sacrifice this creature unless you pay its mana cost."
|
||||
SVar:TrigPhase:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigPendrellFlux | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, sacrifice this creature unless you pay its mana cost.
|
||||
SVar:TrigPendrellFlux:DB$ Sacrifice | Defined$ Self | UnlessCost$ CardManaCost | UnlessPayer$ You
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/pendrell_flux.jpg
|
||||
SetInfo:USG|Common|http://magiccards.info/scans/en/us/87.jpg
|
||||
Oracle:Enchant creature\nEnchanted creature has "At the beginning of your upkeep, sacrifice this creature unless you pay its mana cost."
|
||||
End
|
||||
@@ -1389,18 +1389,18 @@ public class AbilityFactory {
|
||||
|
||||
// The cost
|
||||
String unlessCost = sa.getParam("UnlessCost").trim();
|
||||
|
||||
try {
|
||||
String unlessVar = Integer.toString(AbilityFactory.calculateAmount(source, sa.getParam("UnlessCost").replace(" ", ""), sa));
|
||||
unlessCost = unlessVar;
|
||||
} catch (final NumberFormatException n) {
|
||||
} //This try/catch method enables UnlessCost to parse any svar name
|
||||
//instead of just X for cards like Draco. If there's a better way
|
||||
//feel free to change it. Old code follows:
|
||||
|
||||
/*if (unlessCost.equals("X")) {
|
||||
unlessCost = Integer.toString(AbilityFactory.calculateAmount(source, params.get("UnlessCost"), sa));
|
||||
}*/
|
||||
|
||||
if (unlessCost.equals("CardManaCost")) {
|
||||
unlessCost = source.getManaCost().toString();
|
||||
} else {
|
||||
try {
|
||||
String unlessVar = Integer.toString(AbilityFactory.calculateAmount(source, sa.getParam("UnlessCost").replace(" ", ""), sa));
|
||||
unlessCost = unlessVar;
|
||||
} catch (final NumberFormatException n) {
|
||||
} //This try/catch method enables UnlessCost to parse any svar name
|
||||
//instead of just X for cards like Draco.
|
||||
}
|
||||
|
||||
final Cost cost = new Cost(source, unlessCost, true);
|
||||
|
||||
final Ability ability = new AbilityStatic(source, cost, null) {
|
||||
|
||||
Reference in New Issue
Block a user