Fix NPC rampage to be more in-line with live

New rules:
RuleI: Combat, DefaultRampageTargets
	Set to 1
	If the specatk db entry has no extra param it will use this
RuleB: Combat, RampageHitsTargets
	Defaults to false
	If true, if number hit is still less than RampageTargets, try tank

If you want the old behavior still set DefaultRampageTargets to 3 and
RampageHitsTargets to true
This commit is contained in:
Michael Cook (mackal) 2014-02-18 18:22:19 -05:00
parent 6e474f22a2
commit ab4c9581ad
2 changed files with 7 additions and 2 deletions

View File

@ -333,6 +333,8 @@ RULE_REAL ( Combat, ArcheryBaseDamageBonus, 1) // % Modifier to Base Archery Dam
RULE_REAL ( Combat, ArcheryNPCMultiplier, 1.0) // this is multiplied by the regular dmg to get the archery dmg
RULE_BOOL ( Combat, AssistNoTargetSelf, true) //when assisting a target that does not have a target: true = target self, false = leave target as was before assist (false = live like)
RULE_INT ( Combat, MaxRampageTargets, 3) //max number of people hit with rampage
RULE_INT ( Combat, DefaultRampageTargets, 1) // default number of people to hit with rampage
RULE_BOOL ( Combat, RampageHitsTarget, false) // rampage will hit the target if it still has targets left
RULE_INT ( Combat, MaxFlurryHits, 2) //max number of extra hits from flurry
RULE_INT ( Combat, MonkDamageTableBonus, 5) //% bonus monks get to their damage table calcs
RULE_INT ( Combat, FlyingKickBonus, 25) //% Modifier that this skill gets to str and skill bonuses

View File

@ -2015,7 +2015,10 @@ bool Mob::Rampage(ExtraAttackOptions *opts)
entity_list.MessageClose_StringID(this, true, 200, MT_PetFlurry, NPC_RAMPAGE, GetCleanName());
int rampage_targets = GetSpecialAbilityParam(SPECATK_RAMPAGE, 1);
rampage_targets = rampage_targets > 0 ? rampage_targets : RuleI(Combat, MaxRampageTargets);
if (rampage_targets == 0) // if set to 0 or not set in the DB
rampage_targets = RuleI(Combat, DefaultRampageTargets);
if (rampage_targets > RuleI(Combat, MaxRampageTargets))
rampage_targets = RuleI(Combat, MaxRampageTargets);
for (int i = 0; i < RampageArray.size(); i++) {
if (index_hit >= rampage_targets)
break;
@ -2031,7 +2034,7 @@ bool Mob::Rampage(ExtraAttackOptions *opts)
}
}
if (index_hit < rampage_targets)
if (RuleB(Combat, RampageHitsTarget) && index_hit < rampage_targets)
Attack(GetTarget(), 13, false, false, false, opts);
return true;