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
This commit is contained in:
parent
43e7fe29c2
commit
dc6f75c3b4
27 changed files with 1062 additions and 935 deletions
|
|
@ -1,188 +1,117 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
namespace Server.Mobiles;
|
||||
|
||||
public class Betrayer : BaseCreature
|
||||
{
|
||||
public class Betrayer : BaseCreature
|
||||
[Constructible]
|
||||
public Betrayer() : base(AIType.AI_Mage)
|
||||
{
|
||||
private DateTime m_NextAbilityTime;
|
||||
private bool m_Stunning;
|
||||
Body = 767;
|
||||
|
||||
[Constructible]
|
||||
public Betrayer() : base(AIType.AI_Mage)
|
||||
SetStr(401, 500);
|
||||
SetDex(81, 100);
|
||||
SetInt(151, 200);
|
||||
|
||||
SetHits(241, 300);
|
||||
|
||||
SetDamage(16, 22);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 60, 70);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Cold, 60, 70);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 20, 30);
|
||||
|
||||
SetSkill(SkillName.Anatomy, 90.1, 100.0);
|
||||
SetSkill(SkillName.EvalInt, 90.1, 100.0);
|
||||
SetSkill(SkillName.Magery, 50.1, 100.0);
|
||||
SetSkill(SkillName.Meditation, 90.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 120.1, 130.0);
|
||||
SetSkill(SkillName.Tactics, 90.1, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 90.1, 100.0);
|
||||
|
||||
Fame = 15000;
|
||||
Karma = -15000;
|
||||
|
||||
VirtualArmor = 65;
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
PackItem(new PowerCrystal());
|
||||
|
||||
if (Utility.RandomDouble() < 0.02)
|
||||
{
|
||||
Body = 767;
|
||||
|
||||
SetStr(401, 500);
|
||||
SetDex(81, 100);
|
||||
SetInt(151, 200);
|
||||
|
||||
SetHits(241, 300);
|
||||
|
||||
SetDamage(16, 22);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 60, 70);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Cold, 60, 70);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 20, 30);
|
||||
|
||||
SetSkill(SkillName.Anatomy, 90.1, 100.0);
|
||||
SetSkill(SkillName.EvalInt, 90.1, 100.0);
|
||||
SetSkill(SkillName.Magery, 50.1, 100.0);
|
||||
SetSkill(SkillName.Meditation, 90.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 120.1, 130.0);
|
||||
SetSkill(SkillName.Tactics, 90.1, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 90.1, 100.0);
|
||||
|
||||
Fame = 15000;
|
||||
Karma = -15000;
|
||||
|
||||
VirtualArmor = 65;
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
PackItem(new PowerCrystal());
|
||||
|
||||
if (Utility.RandomDouble() < 0.02)
|
||||
{
|
||||
PackItem(new BlackthornWelcomeBook());
|
||||
}
|
||||
|
||||
m_NextAbilityTime = Core.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 30));
|
||||
PackItem(new BlackthornWelcomeBook());
|
||||
}
|
||||
}
|
||||
|
||||
public Betrayer(Serial serial)
|
||||
: base(serial)
|
||||
public Betrayer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a betrayer corpse";
|
||||
|
||||
public override string DefaultName => "a betrayer";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool BardImmune => !Core.AOS;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override int Meat => 1;
|
||||
public override int TreasureMapLevel => 5;
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a betrayer corpse";
|
||||
|
||||
public override string DefaultName => "a betrayer";
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool BardImmune => !Core.AOS;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override int Meat => 1;
|
||||
public override int TreasureMapLevel => 5;
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
if (!IsParagon)
|
||||
{
|
||||
if (!IsParagon)
|
||||
if (Utility.RandomDouble() < 0.75)
|
||||
{
|
||||
if (Utility.RandomDouble() < 0.75)
|
||||
{
|
||||
c.DropItem(DawnsMusicGear.RandomCommon);
|
||||
}
|
||||
else
|
||||
{
|
||||
c.DropItem(DawnsMusicGear.RandomUncommon);
|
||||
}
|
||||
c.DropItem(DawnsMusicGear.RandomCommon);
|
||||
}
|
||||
else
|
||||
{
|
||||
c.DropItem(DawnsMusicGear.RandomRare);
|
||||
c.DropItem(DawnsMusicGear.RandomUncommon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetDeathSound() => 0x423;
|
||||
|
||||
public override int GetAttackSound() => 0x23B;
|
||||
|
||||
public override int GetHurtSound() => 0x140;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.Gems, 1);
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender, int damage)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender, damage);
|
||||
|
||||
if (!m_Stunning && Utility.RandomDouble() < 0.3)
|
||||
else
|
||||
{
|
||||
m_Stunning = true;
|
||||
|
||||
defender.Animate(21, 6, 1, true, false, 0);
|
||||
PlaySound(0xEE);
|
||||
defender.LocalOverheadMessage(
|
||||
MessageType.Regular,
|
||||
0x3B2,
|
||||
false,
|
||||
"You have been stunned by a colossal blow!"
|
||||
);
|
||||
|
||||
if (Weapon is BaseWeapon weapon)
|
||||
{
|
||||
weapon.OnHit(this, defender);
|
||||
}
|
||||
|
||||
if (defender.Alive)
|
||||
{
|
||||
defender.Frozen = true;
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5.0), () => Recover_Callback(defender));
|
||||
}
|
||||
c.DropItem(DawnsMusicGear.RandomRare);
|
||||
}
|
||||
}
|
||||
|
||||
private void Recover_Callback(Mobile defender)
|
||||
{
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
|
||||
m_Stunning = false;
|
||||
}
|
||||
|
||||
public override void OnActionCombat()
|
||||
{
|
||||
var combatant = Combatant;
|
||||
|
||||
if (Core.Now < m_NextAbilityTime || combatant?.Deleted != false || combatant.Map != Map ||
|
||||
!InRange(combatant, 3) || !CanBeHarmful(combatant) || !InLOS(combatant))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_NextAbilityTime = Core.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 30));
|
||||
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
FixedParticles(0x376A, 9, 32, 0x2539, EffectLayer.LeftHand);
|
||||
PlaySound(0x1DE);
|
||||
|
||||
foreach (var m in GetMobilesInRange(2))
|
||||
{
|
||||
if (m != this && IsEnemy(m))
|
||||
{
|
||||
m.ApplyPoison(this, Poison.Deadly);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetDeathSound() => 0x423;
|
||||
|
||||
public override int GetAttackSound() => 0x23B;
|
||||
|
||||
public override int GetHurtSound() => 0x140;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.Gems, 1);
|
||||
}
|
||||
|
||||
private static MonsterAbility[] _abilities = { MonsterAbility.ColossalBlow, MonsterAbility.PoisonGasAreaAttack };
|
||||
public override MonsterAbility[] GetMonsterAbilities() => _abilities;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,106 +1,82 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
namespace Server.Mobiles;
|
||||
|
||||
public class GargoyleDestroyer : BaseCreature
|
||||
{
|
||||
public class GargoyleDestroyer : BaseCreature
|
||||
[Constructible]
|
||||
public GargoyleDestroyer() : base(AIType.AI_Mage)
|
||||
{
|
||||
[Constructible]
|
||||
public GargoyleDestroyer() : base(AIType.AI_Mage)
|
||||
Body = 0x2F3;
|
||||
BaseSoundID = 0x174;
|
||||
|
||||
SetStr(760, 850);
|
||||
SetDex(102, 150);
|
||||
SetInt(152, 200);
|
||||
|
||||
SetHits(482, 485);
|
||||
|
||||
SetDamage(7, 14);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 40, 60);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Cold, 15, 25);
|
||||
SetResistance(ResistanceType.Poison, 15, 25);
|
||||
SetResistance(ResistanceType.Energy, 15, 25);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 90.1, 100.0);
|
||||
SetSkill(SkillName.Tactics, 90.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 120.4, 160.0);
|
||||
SetSkill(SkillName.Anatomy, 50.5, 100.0);
|
||||
SetSkill(SkillName.Swords, 90.1, 100.0);
|
||||
SetSkill(SkillName.Macing, 90.1, 100.0);
|
||||
SetSkill(SkillName.Fencing, 90.1, 100.0);
|
||||
SetSkill(SkillName.Magery, 90.1, 100.0);
|
||||
SetSkill(SkillName.EvalInt, 90.1, 100.0);
|
||||
SetSkill(SkillName.Meditation, 90.1, 100.0);
|
||||
|
||||
Fame = 10000;
|
||||
Karma = -10000;
|
||||
|
||||
VirtualArmor = 50;
|
||||
|
||||
if (Utility.RandomDouble() < 0.2)
|
||||
{
|
||||
Body = 0x2F3;
|
||||
BaseSoundID = 0x174;
|
||||
|
||||
SetStr(760, 850);
|
||||
SetDex(102, 150);
|
||||
SetInt(152, 200);
|
||||
|
||||
SetHits(482, 485);
|
||||
|
||||
SetDamage(7, 14);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 40, 60);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Cold, 15, 25);
|
||||
SetResistance(ResistanceType.Poison, 15, 25);
|
||||
SetResistance(ResistanceType.Energy, 15, 25);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 90.1, 100.0);
|
||||
SetSkill(SkillName.Tactics, 90.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 120.4, 160.0);
|
||||
SetSkill(SkillName.Anatomy, 50.5, 100.0);
|
||||
SetSkill(SkillName.Swords, 90.1, 100.0);
|
||||
SetSkill(SkillName.Macing, 90.1, 100.0);
|
||||
SetSkill(SkillName.Fencing, 90.1, 100.0);
|
||||
SetSkill(SkillName.Magery, 90.1, 100.0);
|
||||
SetSkill(SkillName.EvalInt, 90.1, 100.0);
|
||||
SetSkill(SkillName.Meditation, 90.1, 100.0);
|
||||
|
||||
Fame = 10000;
|
||||
Karma = -10000;
|
||||
|
||||
VirtualArmor = 50;
|
||||
|
||||
if (Utility.RandomDouble() < 0.2)
|
||||
{
|
||||
PackItem(new GargoylesPickaxe());
|
||||
}
|
||||
}
|
||||
|
||||
public GargoyleDestroyer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a gargoyle corpse";
|
||||
public override string DefaultName => "a gargoyle destroyer";
|
||||
|
||||
public override bool BardImmune => !Core.AOS;
|
||||
public override int Meat => 1;
|
||||
public override bool CanFly => true;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.MedScrolls);
|
||||
AddLoot(LootPack.Gems, 2);
|
||||
}
|
||||
|
||||
public override void OnDamagedBySpell(Mobile from, int damage)
|
||||
{
|
||||
if (from?.Alive == true && Utility.RandomDouble() < 0.4)
|
||||
{
|
||||
ThrowHatchet(from);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack(Mobile attacker, int damage)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker, damage);
|
||||
|
||||
if (attacker?.Alive == true && attacker.Weapon is BaseRanged && Utility.RandomDouble() < 0.4)
|
||||
{
|
||||
ThrowHatchet(attacker);
|
||||
}
|
||||
}
|
||||
|
||||
public void ThrowHatchet(Mobile to)
|
||||
{
|
||||
var damage = 50;
|
||||
MovingEffect(to, 0xF43, 10, 0, false, false);
|
||||
DoHarmful(to);
|
||||
AOS.Damage(to, this, damage, 100, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
var version = reader.ReadInt();
|
||||
PackItem(new GargoylesPickaxe());
|
||||
}
|
||||
}
|
||||
|
||||
public GargoyleDestroyer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a gargoyle corpse";
|
||||
public override string DefaultName => "a gargoyle destroyer";
|
||||
|
||||
public override bool BardImmune => !Core.AOS;
|
||||
public override int Meat => 1;
|
||||
public override bool CanFly => true;
|
||||
|
||||
private static MonsterAbility[] _abilities = { MonsterAbility.ThrowHatchetCounter };
|
||||
public override MonsterAbility[] GetMonsterAbilities() => _abilities;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.MedScrolls);
|
||||
AddLoot(LootPack.Gems, 2);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue