From 669ee7215b52306f7f0165a4a5f038f917b3ea9f Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 9 Sep 2023 20:11:00 -0500 Subject: [PATCH] added range modification for guards --- src/engine/gameManager/NPCManager.java | 3 +++ src/engine/objects/AbstractCharacter.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 69cf15c5..020837c3 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -304,16 +304,19 @@ public enum NPCManager { guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin() + weapon.getMinDamage()); guard.maxDamageHandOne = (int)(guard.mobBase.getDamageMax() + weapon.getMaxDamage()); guard.speedHandOne = weapon.getSpeed(); + guard.rangeHandOne = weapon.getRange(); } else if(guard.equip.containsKey(2) && !guard.equip.get(2).getItemBase().isShield()){ //has off hand weapon ItemBase weapon = guard.equip.get(2).getItemBase(); guard.minDamageHandTwo = (int)(guard.mobBase.getDamageMin() + weapon.getMinDamage()); guard.maxDamageHandTwo = (int)(guard.mobBase.getDamageMax() + weapon.getMaxDamage()); guard.speedHandTwo = weapon.getSpeed(); + guard.rangeHandTwo = weapon.getRange(); } else { guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin()); guard.maxDamageHandOne = (int)(guard.mobBase.getDamageMax()); guard.speedHandOne = 30.0f; + guard.rangeHandOne = 3; } } } diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index fbcc6a1c..2ad1ab69 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -98,8 +98,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject { public int maxDamageHandOne; public int minDamageHandTwo; public int maxDamageHandTwo; - protected float rangeHandOne; - protected float rangeHandTwo; + public float rangeHandOne; + public float rangeHandTwo; public float speedHandOne; public float speedHandTwo; public int defenseRating;