mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
SVars are set by ReadCard - SVar is not a keyword. - TODO: Remove SVar keyword handler from CardFactory.
This commit is contained in:
@@ -627,6 +627,7 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
// 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
|
||||
// TODO: To Be Removed
|
||||
while(hasKeyword(card, "SVar") != -1) {
|
||||
int n = hasKeyword(card, "SVar");
|
||||
if(n != -1) {
|
||||
@@ -10473,6 +10474,7 @@ public class CardFactory implements NewConstants {
|
||||
c.setType(sim.getType());
|
||||
c.setText(sim.getSpellText());
|
||||
c.setManaCost(sim.getManaCost());
|
||||
c.setSVars(sim.getSVars());
|
||||
|
||||
return c;
|
||||
}// copyStats()
|
||||
|
||||
@@ -139,6 +139,13 @@ public class ReadCard implements Runnable, NewConstants {
|
||||
c.addIntrinsicKeyword(t);
|
||||
}
|
||||
|
||||
else if (s.startsWith("SVar:"))
|
||||
{
|
||||
String t[] = s.split(":");
|
||||
c.setSVar(t[1], t[2]);
|
||||
}
|
||||
|
||||
|
||||
s = readLine();
|
||||
} // while !End
|
||||
|
||||
|
||||
Reference in New Issue
Block a user