[Feature] Add adjustability for AERampage Range. (#3548)

* [Feature] Add adjustability for AERampage Range.

This functionality is needed for fights like Ture to be accurate, where their ramp range was 101% of their melee safe range.

Example in lua of utilizing this scripting

```
e.self:SetSpecialAbilityParam(SpecialAbility.area_rampage,8,101;
```

* Updates to address comments
This commit is contained in:
Fryguy
2023-08-20 00:36:06 -04:00
committed by GitHub
parent 00e02b61ca
commit 5631a0711f
6 changed files with 31 additions and 15 deletions
+19 -10
View File
@@ -975,8 +975,7 @@ bool Mob::IsBeneficialAllowed(Mob *target)
return false;
}
bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage)
{
bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage, ExtraAttackOptions *opts) {
if (!other) {
return(false);
}
@@ -1071,18 +1070,28 @@ bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage)
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;
float aeramp_size = RuleR(Combat, AERampageMaxDistance);
if (opts) {
if (opts->range_percent > 0) {
aeramp_size = opts->range_percent;
}
}
if (aeramp_size <= 0) {
aeramp_size = 0.90;
} else {
aeramp_size /= 100;
}
float ramp_range = size_mod * aeramp_size;
return _DistNoRoot <= ramp_range;
}
if (_DistNoRoot <= size_mod)
{
if (_DistNoRoot <= size_mod) {
//A hack to kill an exploit till we get something better.
if (flymode != GravityBehavior::Flying && _zDist > 500 && !CheckLastLosState()) {
return false;