mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Combat] AE Ramp now allows Max Melee Range
RuleR AERampageSafeZone - Reduce AE Ramp range by this amount to allow for a small safe zone on AE Ramp.
This commit is contained in:
+25
-6
@@ -800,7 +800,7 @@ bool Mob::IsBeneficialAllowed(Mob *target)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Mob::CombatRange(Mob* other)
|
||||
bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage)
|
||||
{
|
||||
if(!other)
|
||||
return(false);
|
||||
@@ -825,13 +825,25 @@ bool Mob::CombatRange(Mob* other)
|
||||
|
||||
// this could still use some work, but for now it's an improvement....
|
||||
|
||||
if (size_mod > 29)
|
||||
if (size_mod > 29) {
|
||||
size_mod *= size_mod;
|
||||
else if (size_mod > 19)
|
||||
} else if (size_mod > 19) {
|
||||
size_mod *= size_mod * 2;
|
||||
else
|
||||
} else {
|
||||
size_mod *= size_mod * 4;
|
||||
}
|
||||
|
||||
if (other->GetRace() == 184) // Lord Vyemm and other velious dragons
|
||||
{
|
||||
size_mod *= 1.75;
|
||||
}
|
||||
if (other->GetRace() == 122) // Dracoliche in Fear. Skeletal Dragon
|
||||
{
|
||||
size_mod *= 2.25;
|
||||
}
|
||||
|
||||
size_mod *= RuleR(Combat,HitBoxMod); // used for testing sizemods on different races.
|
||||
size_mod *= fixed_size_mod; // used to extend the size_mod
|
||||
|
||||
// prevention of ridiculously sized hit boxes
|
||||
if (size_mod > 10000)
|
||||
@@ -865,6 +877,15 @@ bool Mob::CombatRange(Mob* other)
|
||||
else
|
||||
SetPseudoRoot(false);
|
||||
}
|
||||
if(aeRampage) {
|
||||
float multiplyer = GetSize() * RuleR(Combat, AERampageSafeZone);
|
||||
float ramp_range = (size_mod * multiplyer);
|
||||
if (_DistNoRoot <= ramp_range) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (_DistNoRoot <= size_mod)
|
||||
{
|
||||
@@ -872,13 +893,11 @@ bool Mob::CombatRange(Mob* other)
|
||||
if (flymode != GravityBehavior::Flying && _zDist > 500 && !CheckLastLosState()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//Father Nitwit's LOS code
|
||||
bool Mob::CheckLosFN(Mob *other)
|
||||
{
|
||||
bool Result = false;
|
||||
|
||||
+4
-3
@@ -675,10 +675,12 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption
|
||||
std::vector<uint16> id_list;
|
||||
for (auto &h : list) {
|
||||
if (h->entity_on_hatelist && h->entity_on_hatelist != caster && h->entity_on_hatelist != target &&
|
||||
caster->CombatRange(h->entity_on_hatelist))
|
||||
caster->CombatRange(h->entity_on_hatelist, 1.0, true)) {
|
||||
id_list.push_back(h->entity_on_hatelist->GetID());
|
||||
if (count != -1 && id_list.size() > count)
|
||||
}
|
||||
if (count != -1 && id_list.size() > count) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto &id : id_list) {
|
||||
@@ -688,7 +690,6 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption
|
||||
caster->ProcessAttackRounds(mob, opts);
|
||||
}
|
||||
}
|
||||
|
||||
return hit_count;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -222,7 +222,7 @@ public:
|
||||
inline int GetMitigationAC() { return mitigation_ac; }
|
||||
void MeleeMitigation(Mob *attacker, DamageHitInfo &hit, ExtraAttackOptions *opts = nullptr);
|
||||
double RollD20(int offense, int mitigation); // CALL THIS FROM THE DEFENDER
|
||||
bool CombatRange(Mob* other);
|
||||
bool CombatRange(Mob* other, float fixed_size_mod = 1.0, bool aeRampage = false);
|
||||
virtual inline bool IsBerserk() { return false; } // only clients
|
||||
void RogueEvade(Mob *other);
|
||||
void CommonOutgoingHitSuccess(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *opts = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user