Browse Source

More poweraction parsing work.

feature-config-parsing2
MagicBot 3 months ago
parent
commit
b5cc45aafd
  1. 7
      src/engine/wpak/PowerActionParser.java

7
src/engine/wpak/PowerActionParser.java

@ -123,6 +123,7 @@ public class PowerActionParser {
statTransfer.toCurve = mbEnums.CompoundCurveType.valueOf(headerIterator.next()); statTransfer.toCurve = mbEnums.CompoundCurveType.valueOf(headerIterator.next());
statTransfer.fromStatBool = Boolean.parseBoolean(headerIterator.next()); statTransfer.fromStatBool = Boolean.parseBoolean(headerIterator.next());
statTransfer.toStatBool = Boolean.parseBoolean(headerIterator.next()); statTransfer.toStatBool = Boolean.parseBoolean(headerIterator.next());
powerActionEntry.statTransfer = statTransfer;
break; break;
case "TransferStatOT": case "TransferStatOT":
statTransfer = new StatTransfer(); statTransfer = new StatTransfer();
@ -136,6 +137,7 @@ public class PowerActionParser {
statTransfer.toStatBool = Boolean.parseBoolean(headerIterator.next()); statTransfer.toStatBool = Boolean.parseBoolean(headerIterator.next());
statTransfer.transfer_action = headerIterator.next(); statTransfer.transfer_action = headerIterator.next();
statTransfer.tranfer_ticks = Integer.parseInt(headerIterator.next()); statTransfer.tranfer_ticks = Integer.parseInt(headerIterator.next());
powerActionEntry.statTransfer = statTransfer;
break; break;
case "Teleport":// No arguments for these tags case "Teleport":// No arguments for these tags
case "TreeChoke": case "TreeChoke":
@ -202,6 +204,11 @@ public class PowerActionParser {
case "REMOVEALL": case "REMOVEALL":
powerActionEntry.removeAll = Boolean.parseBoolean(lineValues[1].trim()); powerActionEntry.removeAll = Boolean.parseBoolean(lineValues[1].trim());
break; break;
case "EFFECTID":
effectDescription = new EffectDescription();
effectDescription.effect_id = lineValues[1].trim();
powerActionEntry.effects.add(effectDescription);
break;
case "WEAROFFEFFECTOTHER": // Keys not parsed go here. case "WEAROFFEFFECTOTHER": // Keys not parsed go here.
case "WEAROFFEFFECTSELF": case "WEAROFFEFFECTSELF":
break; break;

Loading…
Cancel
Save