mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Convert keyword "maxLevel" to SVar
This commit is contained in:
@@ -2055,23 +2055,19 @@ public class CardFactoryUtil {
|
||||
} // unearth
|
||||
|
||||
final int iLvlUp = hasKeyword(card, "Level up");
|
||||
final int iLvlMax = hasKeyword(card, "maxLevel");
|
||||
|
||||
if (iLvlUp != -1 && iLvlMax != -1) {
|
||||
if (iLvlUp != -1) {
|
||||
final String strLevelCost = card.getKeyword().get(iLvlUp);
|
||||
final String strMaxLevel = card.getKeyword().get(iLvlMax);
|
||||
final String strMaxLevel = card.getSVar("maxLevel");
|
||||
card.removeIntrinsicKeyword(strLevelCost);
|
||||
card.removeIntrinsicKeyword(strMaxLevel);
|
||||
|
||||
final String[] k = strLevelCost.split(":");
|
||||
final String manacost = k[1];
|
||||
|
||||
final String[] l = strMaxLevel.split(":");
|
||||
final int maxLevel = Integer.parseInt(l[1]);
|
||||
|
||||
String effect = "AB$ PutCounter | Cost$ " + manacost + " | " +
|
||||
"SorcerySpeed$ True | LevelUp$ True | CounterNum$ 1" +
|
||||
" | CounterType$ LEVEL | PrecostDesc$ Level Up | MaxLevel$ " +
|
||||
maxLevel + " | SpellDescription$ (Put a level counter on" +
|
||||
strMaxLevel + " | SpellDescription$ (Put a level counter on" +
|
||||
" this permanent. Activate this ability only any time you" +
|
||||
" could cast a sorcery.)";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user