From 8c287154c8d1e9f8dce2071305c4df95cde8e25a Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 12 Aug 2023 19:07:50 -0500 Subject: [PATCH] players to use marksmanship again --- src/engine/gameManager/CombatManager.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 843d7824..dc20465c 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -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 { 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);