Directional Damage
Got bored and figured I'd try something out. So I made a very basic addition of Directional Damage. Basically, if your opponent is facing away from you, you do 2x the damage, if he's facing away and to the side, you do 1.5x the damage. If you flank him (from the side), you do 1.25x damage. If you come at him from the front-side, you do normal damage. If you come at him from the front, you do .75 damage.
Again, this is very basic, and if anyone has any ideas or suggestions for me along these lines, please say so and I'll see what I can do.
Simple addition to the BaseWeapon.cs.
My file is commented with
if you already have a modified BaseWeapon.cs. The changes are in the AbsorbDamageAos method, around line 967. Here is the changes I made.
Change the 'return damage;' to this
Enjoy!
Got bored and figured I'd try something out. So I made a very basic addition of Directional Damage. Basically, if your opponent is facing away from you, you do 2x the damage, if he's facing away and to the side, you do 1.5x the damage. If you flank him (from the side), you do 1.25x damage. If you come at him from the front-side, you do normal damage. If you come at him from the front, you do .75 damage.
Again, this is very basic, and if anyone has any ideas or suggestions for me along these lines, please say so and I'll see what I can do.
Simple addition to the BaseWeapon.cs.
My file is commented with
Code:
/*Directional Damage*/
Change the 'return damage;' to this
Code:
/*Directional Damage*/
Direction DefDirection = defender.Direction;
Direction DefToAtt = defender.GetDirectionTo( attacker.Location.X, attacker.Location.Y );
double mult = 1;
switch( Math.Abs( (int)DefDirection - (int)DefToAtt ) )
{
case 0: mult = .75; break; //Front
case 1: mult = 1; break; //Front-Side
case 2: //Side
{
mult = 1.25;
attacker.SendMessage( "You flank your opponent, dealing {0} damage!", mult );
break;
}
case 3: mult = 1.5; break; //Back-Side
case 4: //Back
{
mult = 2;
attacker.SendMessage( "You struck your opponent in the back, dealing {0} damage!", mult );
break;
}
}
return (int)(damage * mult);
/*Directional Damage*/
Enjoy!