diff --git a/src/engine/devcmd/cmds/PrintStatsCmd.java b/src/engine/devcmd/cmds/PrintStatsCmd.java index 1b6b30ca..816d918d 100644 --- a/src/engine/devcmd/cmds/PrintStatsCmd.java +++ b/src/engine/devcmd/cmds/PrintStatsCmd.java @@ -103,15 +103,19 @@ public class PrintStatsCmd extends AbstractDevCmd { main = getWeaponBase(1, equip); ItemBase off = null; - if (equip != null) - getWeaponBase(2, equip); - if (main == null && off == null) { - out += "Main Hand: atr: " + tar.getAtrHandOne() + ", damage: " + tar.getMinDamageHandOne() + " to " + tar.getMaxDamageHandOne() + ", speed: " + tar.getSpeedHandOne() + ", range: 6" + newline; - } else { - if (main != null) - out += "Main Hand: atr: " + tar.getAtrHandOne() + ", damage: " + tar.getMinDamageHandOne() + " to " + tar.getMaxDamageHandOne() + ", speed: " + tar.getSpeedHandOne() + ", range: " + main.getRange() + newline; - if (off != null) - out += "Main Hand: atr: " + tar.getAtrHandTwo() + ", damage: " + tar.getMinDamageHandTwo() + " to " + tar.getMaxDamageHandTwo() + ", speed: " + tar.getSpeedHandTwo() + ", range: " + off.getRange() + newline; + if(equip != null){ + if(equip.get(2) != null && !equip.get(2).getItemBase().isShield()){ + //off hand weapon + out += "Attack Rating: " + tar.atrHandTwo + newline; + out += "Damage: " + tar.minDamageHandTwo + " - " + tar.maxDamageHandTwo + newline; + out += "Range: " + tar.rangeHandTwo + newline; + out += "Attack Speed: " + tar.speedHandTwo + newline; + } else{ + out += "Attack Rating: " + tar.atrHandOne + newline; + out += "Damage: " + tar.minDamageHandOne + " - " + tar.maxDamageHandOne + newline; + out += "Range: " + tar.rangeHandOne + newline; + out += "Attack Speed: " + tar.speedHandOne + newline; + } } out += "isAlive: " + tar.isAlive() + ", Combat: " + tar.isCombat() + newline; diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 020837c3..bd5a4ce4 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -261,6 +261,8 @@ public enum NPCManager { //apply rogue bonuses attackRatingModifier += 0.5f; defenseModifier += 0.5f; + damageModifier += 0.5f; + attackSpeedModifier -= 0.36f; }else { Integer contractID; if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) { @@ -292,29 +294,39 @@ public enum NPCManager { public static void setDamageAndSpeedForGuard(Mob guard){ - + float rankModifier = 1 + (guard.getRank() * 0.1f); + int primaryStat = 0; if(guard.equip == null) { - guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin()); - guard.maxDamageHandOne = (int)(guard.mobBase.getDamageMax()); + guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin()) * rankModifier); + guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax()) * rankModifier); guard.speedHandOne = 30.0f; }else{ if(guard.equip.containsKey(1)){ //has main hand weapon ItemBase weapon = guard.equip.get(1).getItemBase(); - guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin() + weapon.getMinDamage()); - guard.maxDamageHandOne = (int)(guard.mobBase.getDamageMax() + weapon.getMaxDamage()); + if(weapon.isStrBased()) + primaryStat = guard.getStatStrCurrent(); + else + primaryStat = guard.getStatDexCurrent(); + guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin() + weapon.getMinDamage()) * rankModifier) + primaryStat; + guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax() + weapon.getMaxDamage()) * rankModifier) + primaryStat; 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()); + if(weapon.isStrBased()) + primaryStat = guard.getStatStrCurrent(); + else + primaryStat = guard.getStatDexCurrent(); + guard.minDamageHandTwo = (int)((guard.mobBase.getDamageMin() + weapon.getMinDamage()) * rankModifier) + primaryStat; + guard.maxDamageHandTwo = (int)((guard.mobBase.getDamageMax() + weapon.getMaxDamage()) * rankModifier) + primaryStat; guard.speedHandTwo = weapon.getSpeed(); guard.rangeHandTwo = weapon.getRange(); } else { - guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin()); - guard.maxDamageHandOne = (int)(guard.mobBase.getDamageMax()); + primaryStat = guard.getStatStrCurrent(); + guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin()) * rankModifier) + primaryStat; + guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax()) * rankModifier) + primaryStat; guard.speedHandOne = 30.0f; guard.rangeHandOne = 3; } diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 18d1ba8b..479b5fb8 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1745,7 +1745,8 @@ public class Mob extends AbstractIntelligenceAgent { DbManager.MobQueries.SET_PROPERTY(this, "mob_level", newRank); this.level = (short) newRank; - + this.recalculateStats(); + this.setHealth(this.healthMax); } public boolean isRanking() {