starting of new power manager
This commit is contained in:
@@ -35,16 +35,6 @@ public class UsePowerJob extends AbstractScheduleJob {
|
|||||||
this.targetLiveCounter = targetLiveCounter;
|
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
|
@Override
|
||||||
protected void doJob() {
|
protected void doJob() {
|
||||||
PowersManager.finishUsePower(this.msg, this.pc, casterLiveCounter, targetLiveCounter);
|
PowersManager.finishUsePower(this.msg, this.pc, casterLiveCounter, targetLiveCounter);
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ public class WpakPowerManager {
|
|||||||
copyMsg.setNumTrains(tr);
|
copyMsg.setNumTrains(tr);
|
||||||
|
|
||||||
// make person casting stand up if spell (unless they're casting a chant which does not make them stand up)
|
// 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.update();
|
||||||
playerCharacter.setSit(false);
|
playerCharacter.setSit(false);
|
||||||
UpdateStateMsg updateStateMsg = new UpdateStateMsg(playerCharacter);
|
UpdateStateMsg updateStateMsg = new UpdateStateMsg(playerCharacter);
|
||||||
@@ -274,11 +274,11 @@ public class WpakPowerManager {
|
|||||||
playerCharacter.cancelOnCast();
|
playerCharacter.cancelOnCast();
|
||||||
|
|
||||||
// update castSpell (use spell) fail condition if spell
|
// update castSpell (use spell) fail condition if spell
|
||||||
if (pb.isSpell())
|
if (powerCast.isSpell())
|
||||||
playerCharacter.cancelOnSpell();
|
playerCharacter.cancelOnSpell();
|
||||||
|
|
||||||
// get cast time in ms.
|
// get cast time in ms.
|
||||||
time = pb.getCastTime(trains);
|
time = powerCast.getCastTime(trains);
|
||||||
|
|
||||||
// set player is casting for regens
|
// set player is casting for regens
|
||||||
|
|
||||||
|
|||||||
@@ -106,4 +106,15 @@ public class Power {
|
|||||||
return this.cost * (1 + (float)(this.curves.get("COSTAMT").getValue() * trains));
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user