Add option to disable using the dodge resist table average in calculating mob damage

merge/2021-11-19
kaetemi 4 years ago
parent 9bd90c47c4
commit bc5d0fae17
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -307,6 +307,8 @@ CVariable<uint16> MaxCharacteristicValue("egs","MaxCharacteristicValue", "Max
// factor on creature and npc damage
CVariable<float> BotDamageFactor("egs","BotDamageFactor", "Factor applied on all Bots (creature and npcs) damage", 1.0f, 0, true );
CVariable<bool> ApplyAverageDodgeFactor("egs","ApplyAverageDodgeFactor", "Whether to use the average dodge factor in calculating mob damage ", true, 0, true );
CVariable<float> HitChestStaLossFactor("egs","HitChestStaLossFactor", "factor of damage also lost in sta when hit to chest", 0.5f, 0, true );
CVariable<float> HitHeadStunDuration("egs","HitHeadStunDuration", "duration (in seconds) of a stun when hit to head", 2.5f, 0, true );
CVariable<float> HitArmsSlowDuration("egs","HitArmsSlowDuration", "duration (in seconds) of a slow attack when hit to arms", 5.0f, 0, true );

@ -40,6 +40,7 @@ extern CCreatureManager CreatureManager;
// skill used when no weapon in hand (hand to hand combat)
extern SKILLS::ESkills BarehandCombatSkill;
extern CVariable<uint16> HandToHandReachValue;
extern CVariable<bool> ApplyAverageDodgeFactor;
//--------------------------------------------------------------
@ -294,7 +295,8 @@ void CCombatAttackerAI::initFromRowId( const TDataSetRow &rowId )
_SkillValue = form->getAttackLevel();
_RightHandWeapon.Quality = (uint16)_SkillValue;
_RightHandWeapon.Damage = (float)form->getCreatureDamagePerHit() * BotDamageFactor;
uint32 creatureDph = ApplyAverageDodgeFactor ? form->getCreatureDamagePerHit() : form->getCreatureDamagePerHitWithoutAverageDodge();
_RightHandWeapon.Damage = (float)creatureDph * BotDamageFactor;
_RightHandWeapon.DmgType = DMGTYPE::SLASHING;
_RightHandWeapon.LatencyInTicks = (double)form->getAttackLatency();
@ -439,7 +441,8 @@ void CCombatAttackerNpc::initFromRowId( const TDataSetRow &rowId )
_RightHandWeapon.LatencyInTicks = HandToHandLatency;
_RightHandWeapon.Quality = (uint16)_SkillValue;
_RightHandWeapon.Damage = (float)form->getCreatureDamagePerHit() * BotDamageFactor;
uint32 creatureDph = ApplyAverageDodgeFactor ? form->getCreatureDamagePerHit() : form->getCreatureDamagePerHitWithoutAverageDodge();
_RightHandWeapon.Damage = (float)creatureDph * BotDamageFactor;
_RightHandWeapon.SabrinaCost = (uint16)_SkillValue;
_RightHandWeapon.ReachValue = form->getMeleeReachValue();

Loading…
Cancel
Save