diff --git a/src/engine/jobs/UsePowerJob.java b/src/engine/jobs/UsePowerJob.java index b6abc829..a42fc825 100644 --- a/src/engine/jobs/UsePowerJob.java +++ b/src/engine/jobs/UsePowerJob.java @@ -35,16 +35,6 @@ public class UsePowerJob extends AbstractScheduleJob { this.targetLiveCounter = targetLiveCounter; } - public UsePowerJob(PlayerCharacter pc, PerformActionMsg msg, int token, Power pb, int casterLiveCounter, int targetLiveCounter) { - super(); - this.pc = pc; - this.msg = msg; - this.token = token; - this.pb = pb; - this.casterLiveCounter = casterLiveCounter; - this.targetLiveCounter = targetLiveCounter; - } - @Override protected void doJob() { PowersManager.finishUsePower(this.msg, this.pc, casterLiveCounter, targetLiveCounter); diff --git a/src/engine/wpak/WpakPowerManager.java b/src/engine/wpak/WpakPowerManager.java index 550f3391..8ce5c89d 100644 --- a/src/engine/wpak/WpakPowerManager.java +++ b/src/engine/wpak/WpakPowerManager.java @@ -262,7 +262,7 @@ public class WpakPowerManager { copyMsg.setNumTrains(tr); // make person casting stand up if spell (unless they're casting a chant which does not make them stand up) - if (pb.isSpell() && !pb.isChant() && playerCharacter.isSit()) { + if (powerCast.isSpell() && !powerCast.isChant() && playerCharacter.isSit()) { playerCharacter.update(); playerCharacter.setSit(false); UpdateStateMsg updateStateMsg = new UpdateStateMsg(playerCharacter); @@ -274,11 +274,11 @@ public class WpakPowerManager { playerCharacter.cancelOnCast(); // update castSpell (use spell) fail condition if spell - if (pb.isSpell()) + if (powerCast.isSpell()) playerCharacter.cancelOnSpell(); // get cast time in ms. - time = pb.getCastTime(trains); + time = powerCast.getCastTime(trains); // set player is casting for regens diff --git a/src/engine/wpak/data/Power.java b/src/engine/wpak/data/Power.java index a5c9790d..d4df9b3e 100644 --- a/src/engine/wpak/data/Power.java +++ b/src/engine/wpak/data/Power.java @@ -106,4 +106,15 @@ public class Power { return this.cost * (1 + (float)(this.curves.get("COSTAMT").getValue() * trains)); } + + public boolean isSpell(){ + return true; + } + public boolean isSkill(){ + return true; + } + + public boolean isChant(){ + return true; + } }