diff --git a/src/engine/wpak/PowerData.java b/src/engine/wpak/PowerData.java new file mode 100644 index 00000000..e325485c --- /dev/null +++ b/src/engine/wpak/PowerData.java @@ -0,0 +1,15 @@ +// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . +// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· +// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ +// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ +// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ +// Magicbane Emulator Project © 2013 - 2024 +// www.magicbane.com + +package engine.wpak; + +public class PowerData { + public String power; + public String power_type; + public int icon; +} diff --git a/src/engine/wpak/PowerEntry.java b/src/engine/wpak/PowerEntry.java index bddef277..4e83d03c 100644 --- a/src/engine/wpak/PowerEntry.java +++ b/src/engine/wpak/PowerEntry.java @@ -8,11 +8,11 @@ package engine.wpak; -public class PowerEntry { +import java.util.ArrayList; +public class PowerEntry { public String power_id; - public String power; - public String power_type; + public ArrayList powers = new ArrayList<>(); public int icon; public String powerbase; public String target_type; diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index 0c5bc193..0bd3c1a3 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -67,9 +67,13 @@ public class PowersParser { if (powerHeader.size() != 22) Logger.error(powerEntry.power_id); - powerEntry.power = powerHeader.get(1).replaceAll("\"", ""); - powerEntry.power_type = powerHeader.get(2); - powerEntry.icon = Integer.parseInt(powerHeader.get(3)); + PowerData power = new PowerData(); + + power.power = powerHeader.get(1).replaceAll("\"", ""); + power.power_type = powerHeader.get(2); + power.icon = Integer.parseInt(powerHeader.get(3)); + powerEntry.powers.add(power); + powerEntry.powerbase = powerHeader.get(4).replaceAll("\"", ""); powerEntry.target_type = powerHeader.get(5); powerEntry.range = Integer.parseInt(powerHeader.get(6));