feat: Adds reflect damage ability. Fixes magical barrier (#1184)
This commit is contained in:
parent
3c5e9eaec9
commit
2806e5d4b7
5 changed files with 86 additions and 64 deletions
|
|
@ -14,5 +14,6 @@ public enum MonsterAbilityType
|
|||
DeathExplosion,
|
||||
MassDrainLife,
|
||||
MagicalBarrier,
|
||||
EnergyBoltCounter
|
||||
EnergyBoltCounter,
|
||||
ReflectPhysicalDamage
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
namespace Server.Mobiles;
|
||||
|
||||
public class ReflectPhysicalDamage : MonsterAbility
|
||||
{
|
||||
// This is handled manually in AOS.Damage()
|
||||
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.CombatAction;
|
||||
|
||||
public override MonsterAbilityType AbilityType => MonsterAbilityType.ReflectPhysicalDamage;
|
||||
|
||||
public virtual int PercentReflected => 10;
|
||||
}
|
||||
|
|
@ -64,6 +64,9 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool Uncalmable => true;
|
||||
|
||||
private static MonsterAbility[] _abilities = { new ReflectPhysicalDamage() };
|
||||
public override MonsterAbility[] GetMonsterAbilities() => _abilities;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
|
|
@ -71,12 +74,6 @@ namespace Server.Mobiles
|
|||
AddLoot(LootPack.Gems, 2);
|
||||
}
|
||||
|
||||
/* TODO: Repel Magic
|
||||
* 10% chance of repelling a melee attack (why did they call it repel magic anyway?)
|
||||
* Cliloc: 1070844
|
||||
* Effect: damage is dealt to the attacker, no damage is taken by the fan dancer
|
||||
*/
|
||||
|
||||
private void ThrowFan(Mobile to)
|
||||
{
|
||||
if (!(Utility.RandomDouble() < 0.8) || to.InRange(this, 1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue