From c7abb4c9207d1123b19a21593e78ce0d2ee9aa5f Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 9 Sep 2023 19:41:32 -0500 Subject: [PATCH] stance modifiers for guards --- src/engine/gameManager/NPCManager.java | 38 ++++++++++++++++------- src/engine/objects/AbstractCharacter.java | 6 ++-- src/engine/objects/Mob.java | 1 + 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index fd6d4bcb..d05add65 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -276,14 +276,17 @@ public enum NPCManager { } } } - - public static void setDamageAndSpeedForGuard(Mob guard){ - - //handle stance for guard mob - String stancePowerName = ""; + public static void applyGuardStanceModifiers(Mob guard){ + float damageModifier = 1; + float attackRatingModifier = 1; + float defenseModifier = 1; + float attackSpeedModifier = 1; + float powerDamageModifier = 1; + //handle stance modifiers for guard mob if(guard.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)){ - //apply rogue offensive stance - stancePowerName = "STC-R-O"; + //apply rogue bonuses + attackRatingModifier += 0.5f; + defenseModifier += 0.5f; }else { Integer contractID; if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) { @@ -293,16 +296,27 @@ public enum NPCManager { } if (Enum.MinionType.ContractToMinionMap.get(contractID) != null && Enum.MinionType.ContractToMinionMap.get(contractID).isMage()){ //apply mage offensive Stance - stancePowerName = "STC-M-O"; + powerDamageModifier += 0.5f; } else{ //apply fighter offensive stance - stancePowerName = "STC-F-O"; + damageModifier += 0.5f; + attackSpeedModifier -= 0.36f; } } + guard.minDamageHandOne *= damageModifier; + guard.minDamageHandTwo *= damageModifier; + guard.maxDamageHandOne *= damageModifier; + guard.maxDamageHandTwo *= damageModifier; + guard.atrHandOne *= attackRatingModifier; + guard.atrHandTwo *= attackRatingModifier; + guard.defenseRating *= defenseModifier; + guard.speedHandOne *= attackSpeedModifier; + guard.speedHandTwo *= attackSpeedModifier; + + //TODO figure out how to apply +50% powerdamage to mage guards + } + public static void setDamageAndSpeedForGuard(Mob guard){ - int stancePowerRank = MobAI.getGuardPowerRank(guard); - PowersBase stancePower = PowersManager.getPowerByIDString(stancePowerName); - PowersManager.useMobPower(guard,guard,stancePower,stancePowerRank); if(guard.equip == null) { guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin()); diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index f75ecac0..fbcc6a1c 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -92,8 +92,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject { public Resists resists = new Resists("Genric"); protected ConcurrentHashMap timers; protected ConcurrentHashMap timestamps; - protected int atrHandOne; - protected int atrHandTwo; + public int atrHandOne; + public int atrHandTwo; public int minDamageHandOne; public int maxDamageHandOne; public int minDamageHandTwo; @@ -102,7 +102,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { protected float rangeHandTwo; public float speedHandOne; public float speedHandTwo; - protected int defenseRating; + public int defenseRating; protected boolean isActive; // <-Do not use this for deleting character! protected float altitude = 0; // 0=on terrain, 1=tier 1, 2=tier 2, etc. protected ConcurrentHashMap recycleTimers; diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 7134b7f8..18d1ba8b 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1035,6 +1035,7 @@ public class Mob extends AbstractIntelligenceAgent { NPCManager.setAttackRatingForGuard(this); NPCManager.setDefenseForGuard(this); NPCManager.setDamageAndSpeedForGuard(this); + NPCManager.applyGuardStanceModifiers(this); }else { try {