mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Bots are dumb
This commit is contained in:
parent
2db6464d14
commit
5d61cf5bcf
39
zone/bot.cpp
39
zone/bot.cpp
@ -82,7 +82,6 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm
|
||||
// Do this once and only in this constructor
|
||||
GenerateAppearance();
|
||||
GenerateBaseStats();
|
||||
GenerateArmorClass();
|
||||
// Calculate HitPoints Last As It Uses Base Stats
|
||||
cur_hp = GenerateBaseHitPoints();
|
||||
cur_mana = GenerateBaseManaPoints();
|
||||
@ -1140,42 +1139,6 @@ int32 Bot::acmod() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Bot::GenerateArmorClass() {
|
||||
/// new formula
|
||||
int avoidance = 0;
|
||||
avoidance = (acmod() + ((GetSkill(EQEmu::skills::SkillDefense) * 16) / 9));
|
||||
if(avoidance < 0)
|
||||
avoidance = 0;
|
||||
|
||||
int mitigation = 0;
|
||||
if(GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == NECROMANCER || GetClass() == ENCHANTER) {
|
||||
mitigation = (GetSkill(EQEmu::skills::SkillDefense) / 4 + (itembonuses.AC + 1));
|
||||
mitigation -= 4;
|
||||
} else {
|
||||
mitigation = (GetSkill(EQEmu::skills::SkillDefense) / 3 + ((itembonuses.AC * 4) / 3));
|
||||
if(GetClass() == MONK)
|
||||
mitigation += (GetLevel() * 13 / 10); //the 13/10 might be wrong, but it is close...
|
||||
}
|
||||
int displayed = 0;
|
||||
displayed += (((avoidance + mitigation) * 1000) / 847); //natural AC
|
||||
|
||||
//Iksar AC, untested
|
||||
if(GetRace() == IKSAR) {
|
||||
displayed += 12;
|
||||
int iksarlevel = GetLevel();
|
||||
iksarlevel -= 10;
|
||||
if(iksarlevel > 25)
|
||||
iksarlevel = 25;
|
||||
|
||||
if(iksarlevel > 0)
|
||||
displayed += (iksarlevel * 12 / 10);
|
||||
}
|
||||
|
||||
//spell AC bonuses are added directly to natural total
|
||||
displayed += spellbonuses.AC;
|
||||
this->AC = displayed;
|
||||
}
|
||||
|
||||
uint16 Bot::GetPrimarySkillValue() {
|
||||
EQEmu::skills::SkillType skill = EQEmu::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
|
||||
bool equiped = m_inv.GetItem(EQEmu::inventory::slotPrimary);
|
||||
@ -6157,7 +6120,7 @@ void Bot::CalcBonuses() {
|
||||
CalcPR();
|
||||
CalcCR();
|
||||
CalcCorrup();
|
||||
GenerateArmorClass();
|
||||
CalcAC();
|
||||
CalcMaxHP();
|
||||
CalcMaxMana();
|
||||
CalcMaxEndurance();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user