Browse Source

final guard stat revisions

feature-workorder
FatBoy-DOTC 1 year ago
parent
commit
7e20db33f2
  1. 22
      src/engine/devcmd/cmds/PrintStatsCmd.java
  2. 30
      src/engine/gameManager/NPCManager.java
  3. 3
      src/engine/objects/Mob.java

22
src/engine/devcmd/cmds/PrintStatsCmd.java

@ -103,15 +103,19 @@ public class PrintStatsCmd extends AbstractDevCmd {
main = getWeaponBase(1, equip); main = getWeaponBase(1, equip);
ItemBase off = null; ItemBase off = null;
if (equip != null) if(equip != null){
getWeaponBase(2, equip); if(equip.get(2) != null && !equip.get(2).getItemBase().isShield()){
if (main == null && off == null) { //off hand weapon
out += "Main Hand: atr: " + tar.getAtrHandOne() + ", damage: " + tar.getMinDamageHandOne() + " to " + tar.getMaxDamageHandOne() + ", speed: " + tar.getSpeedHandOne() + ", range: 6" + newline; out += "Attack Rating: " + tar.atrHandTwo + newline;
} else { out += "Damage: " + tar.minDamageHandTwo + " - " + tar.maxDamageHandTwo + newline;
if (main != null) out += "Range: " + tar.rangeHandTwo + newline;
out += "Main Hand: atr: " + tar.getAtrHandOne() + ", damage: " + tar.getMinDamageHandOne() + " to " + tar.getMaxDamageHandOne() + ", speed: " + tar.getSpeedHandOne() + ", range: " + main.getRange() + newline; out += "Attack Speed: " + tar.speedHandTwo + newline;
if (off != null) } else{
out += "Main Hand: atr: " + tar.getAtrHandTwo() + ", damage: " + tar.getMinDamageHandTwo() + " to " + tar.getMaxDamageHandTwo() + ", speed: " + tar.getSpeedHandTwo() + ", range: " + off.getRange() + newline; 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; out += "isAlive: " + tar.isAlive() + ", Combat: " + tar.isCombat() + newline;

30
src/engine/gameManager/NPCManager.java

@ -261,6 +261,8 @@ public enum NPCManager {
//apply rogue bonuses //apply rogue bonuses
attackRatingModifier += 0.5f; attackRatingModifier += 0.5f;
defenseModifier += 0.5f; defenseModifier += 0.5f;
damageModifier += 0.5f;
attackSpeedModifier -= 0.36f;
}else { }else {
Integer contractID; Integer contractID;
if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) { if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) {
@ -292,29 +294,39 @@ public enum NPCManager {
public static void setDamageAndSpeedForGuard(Mob guard){ public static void setDamageAndSpeedForGuard(Mob guard){
float rankModifier = 1 + (guard.getRank() * 0.1f);
int primaryStat = 0;
if(guard.equip == null) { if(guard.equip == null) {
guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin()); guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin()) * rankModifier);
guard.maxDamageHandOne = (int)(guard.mobBase.getDamageMax()); guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax()) * rankModifier);
guard.speedHandOne = 30.0f; guard.speedHandOne = 30.0f;
}else{ }else{
if(guard.equip.containsKey(1)){ if(guard.equip.containsKey(1)){
//has main hand weapon //has main hand weapon
ItemBase weapon = guard.equip.get(1).getItemBase(); ItemBase weapon = guard.equip.get(1).getItemBase();
guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin() + weapon.getMinDamage()); if(weapon.isStrBased())
guard.maxDamageHandOne = (int)(guard.mobBase.getDamageMax() + weapon.getMaxDamage()); 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.speedHandOne = weapon.getSpeed();
guard.rangeHandOne = weapon.getRange(); guard.rangeHandOne = weapon.getRange();
} else if(guard.equip.containsKey(2) && !guard.equip.get(2).getItemBase().isShield()){ } else if(guard.equip.containsKey(2) && !guard.equip.get(2).getItemBase().isShield()){
//has off hand weapon //has off hand weapon
ItemBase weapon = guard.equip.get(2).getItemBase(); ItemBase weapon = guard.equip.get(2).getItemBase();
guard.minDamageHandTwo = (int)(guard.mobBase.getDamageMin() + weapon.getMinDamage()); if(weapon.isStrBased())
guard.maxDamageHandTwo = (int)(guard.mobBase.getDamageMax() + weapon.getMaxDamage()); 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.speedHandTwo = weapon.getSpeed();
guard.rangeHandTwo = weapon.getRange(); guard.rangeHandTwo = weapon.getRange();
} else { } else {
guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin()); primaryStat = guard.getStatStrCurrent();
guard.maxDamageHandOne = (int)(guard.mobBase.getDamageMax()); guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin()) * rankModifier) + primaryStat;
guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax()) * rankModifier) + primaryStat;
guard.speedHandOne = 30.0f; guard.speedHandOne = 30.0f;
guard.rangeHandOne = 3; guard.rangeHandOne = 3;
} }

3
src/engine/objects/Mob.java

@ -1745,7 +1745,8 @@ public class Mob extends AbstractIntelligenceAgent {
DbManager.MobQueries.SET_PROPERTY(this, "mob_level", newRank); DbManager.MobQueries.SET_PROPERTY(this, "mob_level", newRank);
this.level = (short) newRank; this.level = (short) newRank;
this.recalculateStats();
this.setHealth(this.healthMax);
} }
public boolean isRanking() { public boolean isRanking() {

Loading…
Cancel
Save