|
|
|
@ -11,6 +11,7 @@ package engine.wpak;
@@ -11,6 +11,7 @@ package engine.wpak;
|
|
|
|
|
import engine.gameManager.ConfigManager; |
|
|
|
|
import engine.wpak.data.EffectDescription; |
|
|
|
|
import engine.wpak.data.PowerActionEntry; |
|
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.nio.file.Files; |
|
|
|
@ -88,6 +89,52 @@ public class PowerActionParser {
@@ -88,6 +89,52 @@ public class PowerActionParser {
|
|
|
|
|
|
|
|
|
|
// Process key value pairs after header
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (entryIterator.hasNext()) { |
|
|
|
|
String lineValue = entryIterator.next(); |
|
|
|
|
String[] lineValues = lineValue.split("="); |
|
|
|
|
String key = lineValues[0].trim(); |
|
|
|
|
String[] arguments; |
|
|
|
|
|
|
|
|
|
switch (key) { |
|
|
|
|
case "BODYPARTS": |
|
|
|
|
arguments = lineValues[1].trim().split("\\s+"); |
|
|
|
|
|
|
|
|
|
for (String bodyPart : arguments) |
|
|
|
|
powerActionEntry.bodyparts.add(Integer.parseInt(bodyPart)); |
|
|
|
|
break; |
|
|
|
|
case "ISRESISTABLE": |
|
|
|
|
powerActionEntry.isResistable = Boolean.parseBoolean(lineValues[1].trim()); |
|
|
|
|
break; |
|
|
|
|
case "ISAGGRESSIVE": |
|
|
|
|
powerActionEntry.isAggressive = Boolean.parseBoolean(lineValues[1].trim()); |
|
|
|
|
break; |
|
|
|
|
case "BLADETRAILS": |
|
|
|
|
powerActionEntry.bladeTrails = Boolean.parseBoolean(lineValues[1].trim()); |
|
|
|
|
break; |
|
|
|
|
case "SHOULDSHOWWEAPONS": |
|
|
|
|
powerActionEntry.shouldShowWeapons = Boolean.parseBoolean(lineValues[1].trim()); |
|
|
|
|
break; |
|
|
|
|
case "SHOULDSHOWARMOR": |
|
|
|
|
powerActionEntry.shouldShowArmor = Boolean.parseBoolean(lineValues[1].trim()); |
|
|
|
|
break; |
|
|
|
|
case "APPLYEFFECTBLANK": |
|
|
|
|
powerActionEntry.applyEffectBlank = Boolean.parseBoolean(lineValues[1].trim()); |
|
|
|
|
break; |
|
|
|
|
case "WEAROFFEFFECTBLANK": |
|
|
|
|
powerActionEntry.wearOffEffectBlank = Boolean.parseBoolean(lineValues[1].trim()); |
|
|
|
|
break; |
|
|
|
|
case "ATTACKANIMS": |
|
|
|
|
arguments = lineValues[1].trim().split("\\s+"); |
|
|
|
|
|
|
|
|
|
for (String bodyPart : arguments) |
|
|
|
|
powerActionEntry.attackAnimations.add(Integer.parseInt(bodyPart)); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
Logger.error("Unhandled variable type:" + key + " for powerAction: " + powerActionEntry.action_id); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return powerActionEntry; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|