Browse Source

players to use marksmanship again

master
FatBoy-DOTC 1 year ago
parent
commit
8c287154c8
  1. 15
      src/engine/gameManager/CombatManager.java

15
src/engine/gameManager/CombatManager.java

@ -730,6 +730,13 @@ public enum CombatManager { @@ -730,6 +730,13 @@ public enum CombatManager {
dpj = ((PlayerCharacter) ac).getWeaponPower();
if (dpj != null) {
float attackRange = getWeaponRange(wb);
PlayerBonuses bonus = ac.getBonuses();
if (bonus != null) {
float buffRange = 1;
buffRange += bonus.getFloat(ModType.WeaponRange, SourceType.None) * .01f;
attackRange *= buffRange;
}
dpj.attack(target, attackRange);
@ -931,6 +938,14 @@ public enum CombatManager { @@ -931,6 +938,14 @@ public enum CombatManager {
PowersBase wp = dpj.getPower();
if (wp.requiresHitRoll() == false) {
float attackRange = getWeaponRange(wb);
PlayerBonuses bonus = ac.getBonuses();
if (bonus != null) {
float buffRange = 1;
buffRange += bonus.getFloat(ModType.WeaponRange, SourceType.None) * .01f;
attackRange *= buffRange;
}
dpj.attack(target, attackRange);
} else {
((PlayerCharacter) ac).setWeaponPower(null);

Loading…
Cancel
Save