Browse Source

players can use weapon powers again

combat-2
FatBoy-DOTC 8 months ago
parent
commit
46170e3ab7
  1. 12
      src/engine/gameManager/CombatManager.java

12
src/engine/gameManager/CombatManager.java

@ -297,7 +297,19 @@ public enum CombatManager {
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim); TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim);
DispatchMessage.sendToAllInRange(target, cmm); DispatchMessage.sendToAllInRange(target, cmm);
} }
DeferredPowerJob dpj = null;
if (attacker.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) {
dpj = ((PlayerCharacter) attacker).getWeaponPower();
if (dpj != null) {
dpj.attack(target, attackRange);
if (dpj.getPower() != null && (dpj.getPowerToken() == -1851459567 || dpj.getPowerToken() == -1851489518))
((PlayerCharacter) attacker).setWeaponPower(dpj);
}
}
//calculate next allowed attack and update the timestamp //calculate next allowed attack and update the timestamp
long delay = 20 * 100; long delay = 20 * 100;

Loading…
Cancel
Save