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
+3
View File
@@ -333,6 +333,8 @@ public:
int32 GetAccuracyRating() const { return (accuracy_rating); }
void SetAccuracyRating(int32 d) { accuracy_rating = d;}
int32 GetAvoidanceRating() const { return (avoidance_rating); }
void SetAvoidanceRating(int32 d) { avoidance_rating = d;}
int32 GetRawAC() const { return AC; }
void ModifyNPCStat(const char *identifier, const char *newValue);
@@ -441,6 +443,7 @@ protected:
uint32 max_dmg;
uint32 min_dmg;
int32 accuracy_rating;
int32 avoidance_rating;
int16 attack_count;
uint32 npc_mana;
float spellscale;