Browse Source

More powerAction work

feature-config-parsing2
MagicBot 3 months ago
parent
commit
67dc95e496
  1. 30
      src/engine/wpak/PowerActionParser.java

30
src/engine/wpak/PowerActionParser.java

@ -119,7 +119,12 @@ public class PowerActionParser {
while (headerIterator.hasNext()) { while (headerIterator.hasNext()) {
effectDescription = new EffectDescription(); effectDescription = new EffectDescription();
effectDescription.effect_id = headerIterator.next(); effectDescription.effect_id = headerIterator.next();
effectDescription.level = Integer.parseInt(headerIterator.next());
// Some applyEffect entries are naked withot a level
if (headerData.size() > 3)
effectDescription.level = Integer.parseInt(headerIterator.next());
powerActionEntry.effects.add(effectDescription); powerActionEntry.effects.add(effectDescription);
} }
break; break;
@ -178,29 +183,6 @@ public class PowerActionParser {
trackEntry.max = Integer.parseInt(headerIterator.next()); trackEntry.max = Integer.parseInt(headerIterator.next());
powerActionEntry.trackEntry = trackEntry; powerActionEntry.trackEntry = trackEntry;
break; break;
case "NOTRANSFORM":
effectDescription = new EffectDescription();
effectDescription.type = headerIterator.next();
effectDescription.effect_id = headerIterator.next();
powerActionEntry.effects.add(effectDescription);
break;
case "NOROOT":
case "NOSNARE":
case "NOSTANCE-A":
case "NOSTANCE-B":
case "NOSTUN":
case "NOSTUN1":
case "NOSTUN2":
case "NOSTUN3":
case "NOSTUN4":
case "NOSTUN5":
case "NOSTUN6":
effectDescription = new EffectDescription();
effectDescription.type = headerIterator.next();
effectDescription.effect_id = headerIterator.next();
effectDescription.level = Integer.parseInt(headerIterator.next());
powerActionEntry.effects.add(effectDescription);
break;
case "Recall": // No arguments for these tags or not parsed case "Recall": // No arguments for these tags or not parsed
case "Teleport": case "Teleport":
case "TreeChoke": case "TreeChoke":

Loading…
Cancel
Save