Splits up mobile (#296)

This commit is contained in:
Kamron Batman 2020-10-31 23:30:51 -07:00 committed by GitHub
parent 1ca8655fc1
commit daf48ebdf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 407 additions and 616 deletions

View file

@ -1342,7 +1342,7 @@ namespace Server.Mobiles
return (double)chance / 1000;
}
public override void Damage(int amount, Mobile from)
public override void Damage(int amount, Mobile from = null, bool informMount = true)
{
var oldHits = Hits;
@ -1356,9 +1356,7 @@ namespace Server.Mobiles
amount = (int)(amount * 1.25);
}
var oath = BloodOathSpell.GetBloodOath(from);
if (oath == this)
if (from != null && BloodOathSpell.GetBloodOath(from) == this)
{
amount = (int)(amount * 1.1);
from.Damage(amount, from);

View file

@ -2874,20 +2874,18 @@ namespace Server.Mobiles
SendToStaffMessage(from, string.Format(format, args));
}
public override void Damage(int amount, Mobile from)
public override void Damage(int amount, Mobile from = null, bool informMount = true)
{
if (EvilOmenSpell.TryEndEffect(this))
{
amount = (int)(amount * 1.25);
}
var oath = BloodOathSpell.GetBloodOath(from);
/* Per EA's UO Herald Pub48 (ML):
* ((resist spellsx10)/20 + 10=percentage of damage resisted)
*/
if (oath == this)
if (from != null && BloodOathSpell.GetBloodOath(from) == this)
{
amount = (int)(amount * 1.1);
@ -2919,7 +2917,7 @@ namespace Server.Mobiles
}
}
base.Damage(amount, from);
base.Damage(amount, from, informMount);
}
public override bool IsHarmfulCriminal(Mobile target)