mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Added keyword handler for SVar.
This commit is contained in:
@@ -168,6 +168,23 @@ public class CardFactory implements NewConstants {
|
|||||||
});
|
});
|
||||||
}//if "Comes into play tapped."
|
}//if "Comes into play tapped."
|
||||||
|
|
||||||
|
// Support for using string variables to define Count$ for X or Y
|
||||||
|
// Or just about any other String that a card object needs at any given time
|
||||||
|
while (hasKeyword(card, "SVar") != -1)
|
||||||
|
{
|
||||||
|
int n = hasKeyword(card, "SVar");
|
||||||
|
if (n != -1)
|
||||||
|
{
|
||||||
|
String parse = card.getKeyword().get(n).toString();
|
||||||
|
card.removeIntrinsicKeyword(parse);
|
||||||
|
|
||||||
|
String k[] = parse.split(":");
|
||||||
|
|
||||||
|
if (k.length > 2)
|
||||||
|
card.SetSVar(k[1], k[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Creatures with simple, self-targeted mana-activated keyword adding abilities
|
//Creatures with simple, self-targeted mana-activated keyword adding abilities
|
||||||
//-1 means not found
|
//-1 means not found
|
||||||
while(hasKeyword(card, "KPump") != -1)
|
while(hasKeyword(card, "KPump") != -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user