mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
Merge pull request #2908 from Northmoc/i+e
MOM: inga_and_esika.txt + support
This commit is contained in:
@@ -254,18 +254,26 @@ public class ForgeScript {
|
||||
int y = AbilityUtils.calculateAmount(source, k[1].substring(2), spellAbility);
|
||||
return Expressions.compare(sa.getTotalManaSpent(), comparator, y);
|
||||
} else if (property.startsWith("ManaFrom")) {
|
||||
final String fromWhat = property.substring(8);
|
||||
boolean found = false;
|
||||
String fromWhat = property.substring(8);
|
||||
String[] parts = null;
|
||||
if (fromWhat.contains("_")) {
|
||||
parts = fromWhat.split("_");
|
||||
fromWhat = parts[0];
|
||||
}
|
||||
int toFind = parts != null ? AbilityUtils.calculateAmount(source, parts[1], spellAbility) : 1;
|
||||
int found = 0;
|
||||
for (Mana m : sa.getPayingMana()) {
|
||||
final Card manaSource = m.getSourceCard();
|
||||
if (manaSource != null) {
|
||||
if (manaSource.isValid(fromWhat, sourceController, source, spellAbility)) {
|
||||
found = true;
|
||||
break;
|
||||
found++;
|
||||
if (found == toFind) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return found;
|
||||
return (found == toFind);
|
||||
} else if (property.equals("MayPlaySource")) {
|
||||
StaticAbility m = sa.getMayPlay();
|
||||
if (m == null) {
|
||||
|
||||
9
forge-gui/res/cardsfolder/upcoming/inga_and_esika.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/inga_and_esika.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Inga and Esika
|
||||
ManaCost:2 G U
|
||||
Types:Legendary Creature Human God
|
||||
PT:4/4
|
||||
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddAbility$ Mana | AddKeyword$ Vigilance | Description$ Creatures you control have vigilance and "{T}: Add one mana of any color. Spend this mana only to cast a creature spell."
|
||||
SVar:Mana:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 1 | RestrictValid$ Spell.Creature | SpellDescription$ Add one mana of any color. Spend this mana only to cast a creature spell.
|
||||
T:Mode$ SpellCast | ValidCard$ Creature | ValidSA$ Spell.ManaFromCreature_3 | ValidActivatingPlayer$ You | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a creature spell, if three or more mana from creatures was spent to cast it, draw a card.
|
||||
SVar:TrigDraw:DB$ Draw
|
||||
Oracle:Creatures you control have vigilance and "{T}: Add one mana of any color. Spend this mana only to cast a creature spell."\nWhenever you cast a creature spell, if three or more mana from creatures was spent to cast it, draw a card.
|
||||
Reference in New Issue
Block a user