ModernUO/Projects/UOContent/Mobiles/Abilities/MonsterAbilityAttack.cs
Kamron Batman dc6f75c3b4
feat: Adds stun, death explosion, poison gas, throw hatchet abilities (#1180)
* Adds Colossal Blow
* Adds Death Explosion
* Adds Poison Gas
* Adds AOE Poison Gas (Counter)
* Adds Stun
* Adds Throw Hatchet
2022-10-02 10:16:37 -07:00

22 lines
582 B
C#

namespace Server.Mobiles;
public abstract class MonsterAbilityAttack : MonsterAbility
{
public override void Trigger(BaseCreature source, Mobile target)
{
if (CanEffectTarget(source, target))
{
OnAttack(source, target);
}
base.Trigger(source, target);
}
protected virtual void OnAttack(BaseCreature source, Mobile defender)
{
source.DoHarmful(defender);
}
protected virtual bool CanEffectTarget(BaseCreature source, Mobile defender) =>
defender.Alive && source.CanBeHarmful(defender);
}