Thread: Some stuff
View Single Post
  #15  
Old 10-25-2006, 07:13 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Some more stuff. Mostly aggro changes and one change to corpses.

Adds Rules:
RULE_INT (Spells, SpellAggroModifier, 100)
% Aggro spells generate 100% default
RULE_INT (Spells, BardSpellAggroMod, 3)
Bard Aggro From Spells / BardSpellAggroMod
RULE_INT (Spells, PetSpellAggroMod, 10)
Pet Aggro From Spells / PetSpellAggroMod

Today was the first time I dual-boxed since I did corpses which is why I didn't really see this earlier. Was testing my AC mitigation and heal aggro and thought this was fixed.

There's this is Client:: Death()
Code:
			entity_list.AddCorpse(new_corpse, GetID());
			
			//send the become corpse packet to everybody else in the zone.
			entity_list.QueueClients(this, &app2, true);
Which should be
Code:
			entity_list.AddCorpse(new_corpse, GetID());
			SetID(0);
			//send the become corpse packet to everybody else in the zone.
			entity_list.QueueClients(this, &app2, true);
I'm not 100% on the logic behind it but I can't argue with results, without that meager line if someone is around when you die and sees you fall your corpse will immediatly disappear on their client but will be there server side and they'll have to zone in and out to see it. Should be included in the diff.

http://hmproject.org/files/Aggro.patch

I surely hope some of my previous changes make it in, I notice some haven't yet. Really think haste affecting combat timers, change to how haste is calculated, recourse and glow messages are nice changes.

Also have been working on Mitigation recently as we don't really have any real mitigation to speak of. Here's the formula I'm working with atm:
Code:
RULE_CATEGORY ( Combat )
RULE_INT( Combat, AttackCalcModifier, 15 )
RULE_INT( Combat, ACBase, 100 )
RULE_INT( Combat, RollDiffACMod, 12 ) 
RULE_INT( Combat, RollDiffLevelMod, 4 ) 
RULE_INT( Combat, MaxClientDamageMultiplier, 100 )
RULE_INT( Combat, ACRollSecondaryChance, 50 )
RULE_INT( Combat, PrimaryReductionBase, 25 )
RULE_INT( Combat, SecondaryReduction, 25 )
RULE_CATEGORY_END()

	if(damage > 0){
		int Mit_AC; 
		int Power_ATK;
		
		Mit_AC = RuleI(Combat, ACBase) + (defender->GetAC());
		Power_ATK = (attacker->GetSkill(OFFENSE) + attacker->GetSTR())*RuleI(Combat,AttackCalcModifier)/10;
		Power_ATK += attacker->GetATK();

		int Roll1, Roll2;
		int RollDiff = 0;
		Roll1 = MakeRandomInt(0, Power_ATK);
		Roll2 = MakeRandomInt(0, Mit_AC);

		if(Roll1 < Roll2){//this is success roll for mitigation
			RollDiff = Roll2 - Roll1;
			int32 PotentialReduction = RuleI(Combat, PrimaryReductionBase) + (100*((RollDiff/RuleI(Combat, RollDiffACMod))))/((20+RuleI(Combat, RollDiffLevelMod)*GetLevel()));
			int32 MinReduction = PotentialReduction/20;
			if(PotentialReduction > 100)
				PotentialReduction = 100;

			if(MinReduction > 100)
				MinReduction = 100;

			int32 DamageReduced = (damage * MakeRandomInt(MinReduction, PotentialReduction)) / 100;
			if(DamageReduced < 1)
				DamageReduced = 1;
			mlog(COMBAT__DAMAGE, "PowerATK: %d, MitAC: %d, PowerATKRoll: %d, MitACRoll: %d, Potential Red: %d, Min Red: %d, Dmg Reduced: %d", 
				Power_ATK, Mit_AC, Roll1, Roll2, PotentialReduction, MinReduction, DamageReduced);
			damage -= DamageReduced;
		}
		else if(MakeRandomInt(0, 100) <= RuleI(Combat, ACRollSecondaryChance)){
			//we fail the initial roll but get lucky and reduce damage by up to a fixed percent
			int32 DamageReduced = (damage * MakeRandomInt(0, RuleI(Combat, SecondaryReduction))) / 100;
			if(DamageReduced < 1)
				DamageReduced = 1;
			
			damage -= DamageReduced;
		}
		else{
			//we completely fail the roll /cry
		}

		if (damage < 1)
			damage = 1;
	}
It puts out some decent results, it's a pain to balance at the high level versus the low level though and I'm still working on it.

But for anyone who's interested a parse as of last night:
http://hmproject.org/files/parserogue.txt
Moderatly High AC Mob with a rogue with just under 300str and not much +atk.

OH before I forget:
Both the GetAC() and GetATK() are unsigned int values but can attempt to return signed values. Ex with an AC debuff on you can get -100 AC and it will try to return -100 AC but the return type is unsigned = bad stuff.
Reply With Quote