Revert "fix resistibility factor for higher tiers"
This reverts commit e1a02a3ef73106484c3063910bcc2d9e21645315.
This commit is contained in:
parent
ff7753528d
commit
cd64a84d40
@ -31,8 +31,6 @@
|
||||
#include "Rules/Rules.h"
|
||||
#include "SpellProcess.h"
|
||||
#include "World.h"
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
|
||||
extern Classes classes;
|
||||
@ -806,18 +804,8 @@ int8 Entity::DetermineHit(Spawn* victim, int8 type, int8 damage_type, float ToHi
|
||||
bonus += (skill->current_val+skillAddedByWeapon) / 25;
|
||||
|
||||
if(is_caster_spell && lua_spell) {
|
||||
if(lua_spell->spell->GetSpellData()->resistibility > 0) {
|
||||
float pivot = 0.7f; // Central resistibility point (we seem to have .65 - .75 for our resistability usually)
|
||||
float scale_factor = 2.0f; // steepness control
|
||||
|
||||
// Clamps to avoid extreme values
|
||||
float resistibility = std::clamp(resistibility, 0.0f, 1.0f);
|
||||
// Calculate marginalized resistibility
|
||||
float marginalized_resistibility = 1.0f - exp(-scale_factor * (lua_spell->spell->GetSpellData()->resistibility - pivot));
|
||||
|
||||
// Adjust bonus based on marginalized resistibility
|
||||
bonus -= marginalized_resistibility * 100.0f;
|
||||
}
|
||||
if(lua_spell->spell->GetSpellData()->resistibility > 0)
|
||||
bonus -= (1.0f - lua_spell->spell->GetSpellData()->resistibility)*100.0f;
|
||||
|
||||
LogWrite(COMBAT__DEBUG, 9, "Combat", "SpellResist: resistibility %f, bonus %f", lua_spell->spell->GetSpellData()->resistibility, bonus);
|
||||
// Here we take into account Subjugation, Disruption and Ordination (debuffs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user