Browse Source

mob AI testing

master
FatBoy-DOTC 2 years ago
parent
commit
b8be399df7
  1. 2
      src/engine/ai/MobileFSM.java
  2. 12
      src/engine/ai/utilities/CombatUtilities.java

2
src/engine/ai/MobileFSM.java

@ -1680,7 +1680,7 @@ public class MobileFSM {
return false; return false;
} }
public static void MobCallForHelp(Mob mob) { public static void MobCallForHelp(Mob mob) {
if(mob.nextCallForHelp > System.currentTimeMillis()){ if(mob.nextCallForHelp < System.currentTimeMillis()){
return; return;
} }
Zone mobCamp = mob.getParentZone(); Zone mobCamp = mob.getParentZone();

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

@ -334,6 +334,10 @@ public class CombatUtilities {
//set default values //set default values
float min = 40; float min = 40;
float max = 60; float max = 60;
if(agent.getLevel() == 85){
min = agent.getMinDamageHandOne();
max = agent.getMaxDamageHandOne();
}
float range; float range;
float damage; float damage;
float dmgMultiplier = 1 + agent.getBonuses().getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None); float dmgMultiplier = 1 + agent.getBonuses().getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
@ -376,10 +380,12 @@ public class CombatUtilities {
if (AbstractWorldObject.IsAbstractCharacter(target)) if (AbstractWorldObject.IsAbstractCharacter(target))
return ((AbstractCharacter) target).getResists().getResistedDamage(agent, (AbstractCharacter) target, dt, damage, 0) * dmgMultiplier; return ((AbstractCharacter) target).getResists().getResistedDamage(agent, (AbstractCharacter) target, dt, damage, 0) * dmgMultiplier;
} }
else { else{
//damage calc for regular mob //damage calc for regular mob
min = agent.getMobBase().getDamageMin(); if(agent.getLevel() > 85) {
max = agent.getMobBase().getMaxDmg(); min = agent.getMobBase().getDamageMin();
max = agent.getMobBase().getMaxDmg();
}
DamageType dt = DamageType.Crush; DamageType dt = DamageType.Crush;
if(agent.getEquip().get(1) != null && agent.getEquip().get(2) == null){ if(agent.getEquip().get(1) != null && agent.getEquip().get(2) == null){

Loading…
Cancel
Save