Browse Source

pet stats added again

master
FatBoy-DOTC 1 year ago
parent
commit
9db568206d
  1. 3
      src/engine/ai/utilities/CombatUtilities.java
  2. 15
      src/engine/objects/Mob.java

3
src/engine/ai/utilities/CombatUtilities.java

@ -363,11 +363,10 @@ public class CombatUtilities {
float damage; float damage;
float min = 40; float min = 40;
float max = 60; float max = 60;
AbstractWorldObject target = agent.getCombatTarget();
float dmgMultiplier = 1 + agent.getBonuses().getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None); float dmgMultiplier = 1 + agent.getBonuses().getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
double minDmg = getMinDmg(min, agent, null); double minDmg = getMinDmg(min, agent, null);
double maxDmg = getMaxDmg(max, agent, null); double maxDmg = getMaxDmg(max, agent, null);
dmgMultiplier += agent.getLevel() / 10; dmgMultiplier += agent.getLevel() * 0.1f;
range = (float) (maxDmg - minDmg); range = (float) (maxDmg - minDmg);
damage = min + ((ThreadLocalRandom.current().nextFloat() * range) + (ThreadLocalRandom.current().nextFloat() * range)) / 2; damage = min + ((ThreadLocalRandom.current().nextFloat() * range) + (ThreadLocalRandom.current().nextFloat() * range)) / 2;
return (int) (damage * dmgMultiplier); return (int) (damage * dmgMultiplier);

15
src/engine/objects/Mob.java

@ -591,6 +591,9 @@ public class Mob extends AbstractIntelligenceAgent {
createLock.writeLock().unlock(); createLock.writeLock().unlock();
} }
parent.zoneMobSet.add(mob); parent.zoneMobSet.add(mob);
mob.level = level;
mob.healthMax = mob.getMobBase().getHealthMax() * (mob.level * 0.5f);
mob.health.set(mob.healthMax);
return mob; return mob;
} }
@ -1952,12 +1955,14 @@ public class Mob extends AbstractIntelligenceAgent {
this.equip = new HashMap<>(0); this.equip = new HashMap<>(0);
} }
// Combine mobbase and mob aggro arrays into one bitvector // Combine mobbase and mob aggro arrays into one bitvector
if (this.getMobBase().notEnemy.size() > 0) //skip for pets
this.notEnemy.addAll(this.getMobBase().notEnemy); if(this.isPet() == false && this.isSummonedPet() == false && this.isNecroPet() == false) {
if (this.getMobBase().notEnemy.size() > 0)
if (this.getMobBase().enemy.size() > 0) this.notEnemy.addAll(this.getMobBase().notEnemy);
this.enemy.addAll(this.getMobBase().enemy);
if (this.getMobBase().enemy.size() > 0)
this.enemy.addAll(this.getMobBase().enemy);
}
try { try {
NPCManager.applyRuneSetEffects(this); NPCManager.applyRuneSetEffects(this);
recalculateStats(); recalculateStats();

Loading…
Cancel
Save