Update to how bonuses are calculated in chance to hit code to be

consistent across all relevant effects (treating avoidance
and hit chance bonuses equally).
Rule ArcheryHitPenalty will now calc correctly (Was doing basically nothing)
New field npc_types 'Avoidance' (add avoidance bonus to npc)
Rules for setting min / max chance to hit
This commit is contained in:
KayenEQ
2014-07-23 21:24:21 -04:00
parent 152a7410b6
commit 4f07be2343
11 changed files with 80 additions and 48 deletions
+7
View File
@@ -194,6 +194,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
}
accuracy_rating = d->accuracy_rating;
avoidance_rating = d->avoidance_rating;
ATK = d->ATK;
CalcMaxMana();
@@ -1927,6 +1928,12 @@ void NPC::ModifyNPCStat(const char *identifier, const char *newValue)
return;
}
if(id == "avoidance")
{
avoidance_rating = atoi(val.c_str());
return;
}
if(id == "trackable")
{
trackable = atoi(val.c_str());