fix: Adds summon pixies. Fixes other abilities (#1274)
This commit is contained in:
parent
b75a8f72ec
commit
46afffd7d0
8 changed files with 326 additions and 398 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
public class FanThrowCounter : MonsterAbilitySingleTarget
|
public class FanThrowCounter : MonsterAbilitySingleTarget
|
||||||
{
|
{
|
||||||
public override MonsterAbilityType AbilityType => MonsterAbilityType.EnergyBoltCounter;
|
public override MonsterAbilityType AbilityType => MonsterAbilityType.FanThrow;
|
||||||
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.TakeDamage;
|
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.TakeDamage;
|
||||||
public override double ChanceToTrigger => 0.2;
|
public override double ChanceToTrigger => 0.2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
namespace Server.Mobiles;
|
using System;
|
||||||
|
|
||||||
|
namespace Server.Mobiles;
|
||||||
|
|
||||||
public static class MonsterAbilities
|
public static class MonsterAbilities
|
||||||
{
|
{
|
||||||
|
public static MonsterAbility[] Empty => Array.Empty<MonsterAbility>();
|
||||||
|
|
||||||
// Fire Breath
|
// Fire Breath
|
||||||
public static FireBreath FireBreath => new();
|
public static FireBreath FireBreath => new();
|
||||||
public static ChaosBreath ChaosBreath => new();
|
public static ChaosBreath ChaosBreath => new();
|
||||||
|
|
@ -16,6 +20,9 @@ public static class MonsterAbilities
|
||||||
public static SummonSkeletonsCounter SummonSkeletonsCounter => new();
|
public static SummonSkeletonsCounter SummonSkeletonsCounter => new();
|
||||||
public static SummonLesserUndeadCounter SummonLesserUndeadCounter => new();
|
public static SummonLesserUndeadCounter SummonLesserUndeadCounter => new();
|
||||||
|
|
||||||
|
// Summon Pixies
|
||||||
|
public static SummonPixiesCounter SummonPixiesCounter => new();
|
||||||
|
|
||||||
// Stun
|
// Stun
|
||||||
public static ColossalBlow ColossalBlow => new();
|
public static ColossalBlow ColossalBlow => new();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ public enum MonsterAbilityType
|
||||||
Generic,
|
Generic,
|
||||||
FireBreath,
|
FireBreath,
|
||||||
GraspingClaw,
|
GraspingClaw,
|
||||||
SummonUndead,
|
SummonCounter,
|
||||||
Stun,
|
Stun,
|
||||||
Poison,
|
Poison,
|
||||||
MassPoison,
|
MassPoison,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ namespace Server.Mobiles;
|
||||||
|
|
||||||
public abstract class SummonUndeadCounter : MonsterAbility
|
public abstract class SummonUndeadCounter : MonsterAbility
|
||||||
{
|
{
|
||||||
public override MonsterAbilityType AbilityType => MonsterAbilityType.SummonUndead;
|
public override MonsterAbilityType AbilityType => MonsterAbilityType.SummonCounter;
|
||||||
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.TakeDamage;
|
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.TakeDamage;
|
||||||
|
|
||||||
public override double ChanceToTrigger => 0.05;
|
public override double ChanceToTrigger => 0.05;
|
||||||
|
|
@ -19,7 +19,8 @@ public abstract class SummonUndeadCounter : MonsterAbility
|
||||||
|
|
||||||
public abstract BaseCreature CreateSummon(BaseCreature source);
|
public abstract BaseCreature CreateSummon(BaseCreature source);
|
||||||
|
|
||||||
public virtual bool CanTrigger(BaseCreature source) => source.Followers < AmountToSummon && CanTrigger(source);
|
public override bool CanTrigger(BaseCreature source, MonsterAbilityTrigger trigger) =>
|
||||||
|
source.Followers < AmountToSummon && CanTrigger(source, trigger);
|
||||||
|
|
||||||
public override void Trigger(MonsterAbilityTrigger trigger, BaseCreature source, Mobile target)
|
public override void Trigger(MonsterAbilityTrigger trigger, BaseCreature source, Mobile target)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
21
Projects/UOContent/Mobiles/Abilities/SummonPixiesCounter.cs
Normal file
21
Projects/UOContent/Mobiles/Abilities/SummonPixiesCounter.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
namespace Server.Mobiles;
|
||||||
|
|
||||||
|
public class SummonPixiesCounter : MonsterAbility
|
||||||
|
{
|
||||||
|
public override MonsterAbilityType AbilityType => MonsterAbilityType.SummonCounter;
|
||||||
|
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.TakeDamage;
|
||||||
|
public override double ChanceToTrigger => 0.1;
|
||||||
|
|
||||||
|
public override void Trigger(MonsterAbilityTrigger trigger, BaseCreature source, Mobile target)
|
||||||
|
{
|
||||||
|
var amount = Utility.RandomMinMax(3, 6);
|
||||||
|
for (var i = 0; i < amount; i++)
|
||||||
|
{
|
||||||
|
var pixie = new Pixie { Team = source.Team, FightMode = FightMode.Closest };
|
||||||
|
pixie.MoveToWorld(source.Map.GetRandomNearbyLocation(source.Location), source.Map);
|
||||||
|
pixie.Combatant = target;
|
||||||
|
}
|
||||||
|
|
||||||
|
base.Trigger(trigger, source, target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,143 +2,107 @@ using System;
|
||||||
using Server.Engines.CannedEvil;
|
using Server.Engines.CannedEvil;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
|
||||||
namespace Server.Mobiles
|
namespace Server.Mobiles;
|
||||||
|
|
||||||
|
public class Twaulo : BaseChampion
|
||||||
{
|
{
|
||||||
public class Twaulo : BaseChampion
|
[Constructible]
|
||||||
|
public Twaulo()
|
||||||
|
: base(AIType.AI_Melee)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Title = "of the Glade";
|
||||||
public Twaulo()
|
Body = 101;
|
||||||
: base(AIType.AI_Melee)
|
BaseSoundID = 679;
|
||||||
{
|
Hue = 0x455;
|
||||||
Title = "of the Glade";
|
|
||||||
Body = 101;
|
|
||||||
BaseSoundID = 679;
|
|
||||||
Hue = 0x455;
|
|
||||||
|
|
||||||
SetStr(1751, 1950);
|
SetStr(1751, 1950);
|
||||||
SetDex(251, 450);
|
SetDex(251, 450);
|
||||||
SetInt(801, 1000);
|
SetInt(801, 1000);
|
||||||
|
|
||||||
SetHits(7500);
|
SetHits(7500);
|
||||||
|
|
||||||
SetDamage(19, 24);
|
SetDamage(19, 24);
|
||||||
|
|
||||||
SetDamageType(ResistanceType.Physical, 100);
|
SetDamageType(ResistanceType.Physical, 100);
|
||||||
|
|
||||||
SetResistance(ResistanceType.Physical, 65, 75);
|
SetResistance(ResistanceType.Physical, 65, 75);
|
||||||
SetResistance(ResistanceType.Fire, 45, 55);
|
SetResistance(ResistanceType.Fire, 45, 55);
|
||||||
SetResistance(ResistanceType.Cold, 50, 60);
|
SetResistance(ResistanceType.Cold, 50, 60);
|
||||||
SetResistance(ResistanceType.Poison, 50, 60);
|
SetResistance(ResistanceType.Poison, 50, 60);
|
||||||
SetResistance(ResistanceType.Energy, 50, 60);
|
SetResistance(ResistanceType.Energy, 50, 60);
|
||||||
|
|
||||||
SetSkill(SkillName.EvalInt, 0); // Per Stratics?!?
|
SetSkill(SkillName.EvalInt, 0); // Per Stratics?!?
|
||||||
SetSkill(SkillName.Magery, 0); // Per Stratics?!?
|
SetSkill(SkillName.Magery, 0); // Per Stratics?!?
|
||||||
SetSkill(SkillName.Meditation, 0); // Per Stratics?!?
|
SetSkill(SkillName.Meditation, 0); // Per Stratics?!?
|
||||||
SetSkill(SkillName.Anatomy, 95.1, 115.0);
|
SetSkill(SkillName.Anatomy, 95.1, 115.0);
|
||||||
SetSkill(SkillName.Archery, 95.1, 100.0);
|
SetSkill(SkillName.Archery, 95.1, 100.0);
|
||||||
SetSkill(SkillName.MagicResist, 50.3, 80.0);
|
SetSkill(SkillName.MagicResist, 50.3, 80.0);
|
||||||
SetSkill(SkillName.Tactics, 90.1, 100.0);
|
SetSkill(SkillName.Tactics, 90.1, 100.0);
|
||||||
SetSkill(SkillName.Wrestling, 95.1, 100.0);
|
SetSkill(SkillName.Wrestling, 95.1, 100.0);
|
||||||
|
|
||||||
Fame = 50000;
|
Fame = 50000;
|
||||||
Karma = 50000;
|
Karma = 50000;
|
||||||
|
|
||||||
VirtualArmor = 50;
|
VirtualArmor = 50;
|
||||||
|
|
||||||
AddItem(new Bow());
|
AddItem(new Bow());
|
||||||
PackItem(new Arrow(Utility.RandomMinMax(500, 700)));
|
PackItem(new Arrow(Utility.RandomMinMax(500, 700)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Twaulo(Serial serial)
|
public Twaulo(Serial serial)
|
||||||
: base(serial)
|
: base(serial)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string CorpseName => "a corpse of Twaulo";
|
public override string CorpseName => "a corpse of Twaulo";
|
||||||
public override ChampionSkullType SkullType => ChampionSkullType.Pain;
|
public override ChampionSkullType SkullType => ChampionSkullType.Pain;
|
||||||
|
|
||||||
public override Type[] UniqueList => new[] { typeof(Quell) };
|
public override Type[] UniqueList => new[] { typeof(Quell) };
|
||||||
public override Type[] SharedList => new[] { typeof(TheMostKnowledgePerson), typeof(OblivionsNeedle) };
|
public override Type[] SharedList => new[] { typeof(TheMostKnowledgePerson), typeof(OblivionsNeedle) };
|
||||||
public override Type[] DecorativeList => new[] { typeof(Pier), typeof(MonsterStatuette) };
|
public override Type[] DecorativeList => new[] { typeof(Pier), typeof(MonsterStatuette) };
|
||||||
|
|
||||||
public override MonsterStatuetteType[] StatueTypes => new[] { MonsterStatuetteType.DreadHorn };
|
public override MonsterStatuetteType[] StatueTypes => new[] { MonsterStatuetteType.DreadHorn };
|
||||||
|
|
||||||
public override string DefaultName => "Twaulo";
|
public override string DefaultName => "Twaulo";
|
||||||
|
|
||||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||||
|
|
||||||
public override bool Unprovokable => true;
|
public override bool Unprovokable => true;
|
||||||
public override Poison PoisonImmune => Poison.Regular;
|
public override Poison PoisonImmune => Poison.Regular;
|
||||||
public override int TreasureMapLevel => 5;
|
public override int TreasureMapLevel => 5;
|
||||||
public override int Meat => 1;
|
public override int Meat => 1;
|
||||||
public override int Hides => 8;
|
public override int Hides => 8;
|
||||||
public override HideType HideType => HideType.Spined;
|
public override HideType HideType => HideType.Spined;
|
||||||
|
|
||||||
public override void GenerateLoot()
|
private static MonsterAbility[] _abilities = { MonsterAbilities.SummonPixiesCounter };
|
||||||
{
|
public override MonsterAbility[] GetMonsterAbilities() => _abilities;
|
||||||
AddLoot(LootPack.UltraRich, 2);
|
|
||||||
AddLoot(LootPack.Average);
|
|
||||||
AddLoot(LootPack.Gems);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SpawnPixies(Mobile target)
|
public override void GenerateLoot()
|
||||||
{
|
{
|
||||||
var map = Map;
|
AddLoot(LootPack.UltraRich, 2);
|
||||||
|
AddLoot(LootPack.Average);
|
||||||
|
AddLoot(LootPack.Gems);
|
||||||
|
}
|
||||||
|
|
||||||
if (map == null)
|
public override void OnGaveMeleeAttack(Mobile defender, int damage)
|
||||||
{
|
{
|
||||||
return;
|
base.OnGaveMeleeAttack(defender, damage);
|
||||||
}
|
|
||||||
|
|
||||||
var newPixies = Utility.RandomMinMax(3, 6);
|
defender.Damage(Utility.Random(20, 10), this);
|
||||||
|
defender.Stam -= Utility.Random(20, 10);
|
||||||
|
defender.Mana -= Utility.Random(20, 10);
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < newPixies; ++i)
|
public override void Serialize(IGenericWriter writer)
|
||||||
{
|
{
|
||||||
var pixie = new Pixie { Team = Team, FightMode = FightMode.Closest };
|
base.Serialize(writer);
|
||||||
|
writer.Write(0);
|
||||||
|
}
|
||||||
|
|
||||||
pixie.MoveToWorld(map.GetRandomNearbyLocation(Location), map);
|
public override void Deserialize(IGenericReader reader)
|
||||||
pixie.Combatant = target;
|
{
|
||||||
}
|
base.Deserialize(reader);
|
||||||
}
|
|
||||||
|
|
||||||
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
var version = reader.ReadInt();
|
||||||
{
|
|
||||||
if (Utility.RandomDouble() < 0.1)
|
|
||||||
{
|
|
||||||
SpawnPixies(caster);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnGaveMeleeAttack(Mobile defender, int damage)
|
|
||||||
{
|
|
||||||
base.OnGaveMeleeAttack(defender, damage);
|
|
||||||
|
|
||||||
defender.Damage(Utility.Random(20, 10), this);
|
|
||||||
defender.Stam -= Utility.Random(20, 10);
|
|
||||||
defender.Mana -= Utility.Random(20, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnGotMeleeAttack(Mobile attacker, int damage)
|
|
||||||
{
|
|
||||||
base.OnGotMeleeAttack(attacker, damage);
|
|
||||||
|
|
||||||
if (Utility.RandomDouble() < 0.1)
|
|
||||||
{
|
|
||||||
SpawnPixies(attacker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,213 +2,184 @@ using System;
|
||||||
using Server.Engines.CannedEvil;
|
using Server.Engines.CannedEvil;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
|
||||||
namespace Server.Mobiles
|
namespace Server.Mobiles;
|
||||||
|
|
||||||
|
public class LordOaks : BaseChampion
|
||||||
{
|
{
|
||||||
public class LordOaks : BaseChampion
|
private BaseCreature m_Queen;
|
||||||
|
private bool m_SpawnedQueen;
|
||||||
|
|
||||||
|
[Constructible]
|
||||||
|
public LordOaks() : base(AIType.AI_Mage, FightMode.Evil)
|
||||||
{
|
{
|
||||||
private BaseCreature m_Queen;
|
Body = 175;
|
||||||
private bool m_SpawnedQueen;
|
SetStr(403, 850);
|
||||||
|
SetDex(101, 150);
|
||||||
|
SetInt(503, 800);
|
||||||
|
|
||||||
[Constructible]
|
SetHits(3000);
|
||||||
public LordOaks() : base(AIType.AI_Mage, FightMode.Evil)
|
SetStam(202, 400);
|
||||||
|
|
||||||
|
SetDamage(21, 33);
|
||||||
|
|
||||||
|
SetDamageType(ResistanceType.Physical, 75);
|
||||||
|
SetDamageType(ResistanceType.Fire, 25);
|
||||||
|
|
||||||
|
SetResistance(ResistanceType.Physical, 85, 90);
|
||||||
|
SetResistance(ResistanceType.Fire, 60, 70);
|
||||||
|
SetResistance(ResistanceType.Cold, 60, 70);
|
||||||
|
SetResistance(ResistanceType.Poison, 80, 90);
|
||||||
|
SetResistance(ResistanceType.Energy, 80, 90);
|
||||||
|
|
||||||
|
SetSkill(SkillName.Anatomy, 75.1, 100.0);
|
||||||
|
SetSkill(SkillName.EvalInt, 120.1, 130.0);
|
||||||
|
SetSkill(SkillName.Magery, 120.0);
|
||||||
|
SetSkill(SkillName.Meditation, 120.1, 130.0);
|
||||||
|
SetSkill(SkillName.MagicResist, 100.5, 150.0);
|
||||||
|
SetSkill(SkillName.Tactics, 100.0);
|
||||||
|
SetSkill(SkillName.Wrestling, 100.0);
|
||||||
|
|
||||||
|
Fame = 22500;
|
||||||
|
Karma = 22500;
|
||||||
|
|
||||||
|
VirtualArmor = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LordOaks(Serial serial) : base(serial)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override ChampionSkullType SkullType => ChampionSkullType.Enlightenment;
|
||||||
|
|
||||||
|
public override Type[] UniqueList => new[] { typeof(OrcChieftainHelm) };
|
||||||
|
|
||||||
|
public override Type[] SharedList => new[]
|
||||||
|
{
|
||||||
|
typeof(RoyalGuardSurvivalKnife),
|
||||||
|
typeof(DjinnisRing),
|
||||||
|
typeof(LieutenantOfTheBritannianRoyalGuard),
|
||||||
|
typeof(SamaritanRobe),
|
||||||
|
typeof(DetectiveBoots),
|
||||||
|
typeof(TheMostKnowledgePerson)
|
||||||
|
};
|
||||||
|
|
||||||
|
public override Type[] DecorativeList => new[]
|
||||||
|
{
|
||||||
|
typeof(WaterTile),
|
||||||
|
typeof(WindSpirit),
|
||||||
|
typeof(Pier),
|
||||||
|
typeof(DirtPatch)
|
||||||
|
};
|
||||||
|
|
||||||
|
public override MonsterStatuetteType[] StatueTypes => Array.Empty<MonsterStatuetteType>();
|
||||||
|
|
||||||
|
public override string DefaultName => "Lord Oaks";
|
||||||
|
|
||||||
|
public override bool AutoDispel => true;
|
||||||
|
public override bool CanFly => true;
|
||||||
|
public override bool BardImmune => !Core.SE;
|
||||||
|
public override bool Unprovokable => Core.SE;
|
||||||
|
public override bool Uncalmable => Core.SE;
|
||||||
|
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||||
|
|
||||||
|
public override Poison PoisonImmune => Poison.Deadly;
|
||||||
|
|
||||||
|
private static MonsterAbility[] _abilities = { MonsterAbilities.SummonPixiesCounter };
|
||||||
|
public override MonsterAbility[] GetMonsterAbilities() => CheckQueen() ? _abilities : MonsterAbilities.Empty;
|
||||||
|
|
||||||
|
public override void GenerateLoot()
|
||||||
|
{
|
||||||
|
AddLoot(LootPack.UltraRich, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetAngerSound() => 0x2F8;
|
||||||
|
|
||||||
|
public override int GetIdleSound() => 0x2F8;
|
||||||
|
|
||||||
|
public override int GetAttackSound() => Utility.Random(0x2F5, 2);
|
||||||
|
|
||||||
|
public override int GetHurtSound() => 0x2F9;
|
||||||
|
|
||||||
|
public override int GetDeathSound() => 0x2F7;
|
||||||
|
|
||||||
|
public bool CheckQueen()
|
||||||
|
{
|
||||||
|
if (Map == null)
|
||||||
{
|
{
|
||||||
Body = 175;
|
return false;
|
||||||
SetStr(403, 850);
|
|
||||||
SetDex(101, 150);
|
|
||||||
SetInt(503, 800);
|
|
||||||
|
|
||||||
SetHits(3000);
|
|
||||||
SetStam(202, 400);
|
|
||||||
|
|
||||||
SetDamage(21, 33);
|
|
||||||
|
|
||||||
SetDamageType(ResistanceType.Physical, 75);
|
|
||||||
SetDamageType(ResistanceType.Fire, 25);
|
|
||||||
|
|
||||||
SetResistance(ResistanceType.Physical, 85, 90);
|
|
||||||
SetResistance(ResistanceType.Fire, 60, 70);
|
|
||||||
SetResistance(ResistanceType.Cold, 60, 70);
|
|
||||||
SetResistance(ResistanceType.Poison, 80, 90);
|
|
||||||
SetResistance(ResistanceType.Energy, 80, 90);
|
|
||||||
|
|
||||||
SetSkill(SkillName.Anatomy, 75.1, 100.0);
|
|
||||||
SetSkill(SkillName.EvalInt, 120.1, 130.0);
|
|
||||||
SetSkill(SkillName.Magery, 120.0);
|
|
||||||
SetSkill(SkillName.Meditation, 120.1, 130.0);
|
|
||||||
SetSkill(SkillName.MagicResist, 100.5, 150.0);
|
|
||||||
SetSkill(SkillName.Tactics, 100.0);
|
|
||||||
SetSkill(SkillName.Wrestling, 100.0);
|
|
||||||
|
|
||||||
Fame = 22500;
|
|
||||||
Karma = 22500;
|
|
||||||
|
|
||||||
VirtualArmor = 100;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LordOaks(Serial serial) : base(serial)
|
if (!m_SpawnedQueen)
|
||||||
{
|
{
|
||||||
|
Say(1042153); // Come forth my queen!
|
||||||
|
|
||||||
|
m_Queen = new Silvani { Team = Team };
|
||||||
|
m_Queen.MoveToWorld(Location, Map);
|
||||||
|
|
||||||
|
m_SpawnedQueen = true;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ChampionSkullType SkullType => ChampionSkullType.Enlightenment;
|
if (m_Queen?.Deleted != false)
|
||||||
|
|
||||||
public override Type[] UniqueList => new[] { typeof(OrcChieftainHelm) };
|
|
||||||
|
|
||||||
public override Type[] SharedList => new[]
|
|
||||||
{
|
{
|
||||||
typeof(RoyalGuardSurvivalKnife),
|
m_Queen = null;
|
||||||
typeof(DjinnisRing),
|
return false;
|
||||||
typeof(LieutenantOfTheBritannianRoyalGuard),
|
|
||||||
typeof(SamaritanRobe),
|
|
||||||
typeof(DetectiveBoots),
|
|
||||||
typeof(TheMostKnowledgePerson)
|
|
||||||
};
|
|
||||||
|
|
||||||
public override Type[] DecorativeList => new[]
|
|
||||||
{
|
|
||||||
typeof(WaterTile),
|
|
||||||
typeof(WindSpirit),
|
|
||||||
typeof(Pier),
|
|
||||||
typeof(DirtPatch)
|
|
||||||
};
|
|
||||||
|
|
||||||
public override MonsterStatuetteType[] StatueTypes => Array.Empty<MonsterStatuetteType>();
|
|
||||||
|
|
||||||
public override string DefaultName => "Lord Oaks";
|
|
||||||
|
|
||||||
public override bool AutoDispel => true;
|
|
||||||
public override bool CanFly => true;
|
|
||||||
public override bool BardImmune => !Core.SE;
|
|
||||||
public override bool Unprovokable => Core.SE;
|
|
||||||
public override bool Uncalmable => Core.SE;
|
|
||||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
|
||||||
|
|
||||||
public override Poison PoisonImmune => Poison.Deadly;
|
|
||||||
|
|
||||||
public override void GenerateLoot()
|
|
||||||
{
|
|
||||||
AddLoot(LootPack.UltraRich, 5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SpawnPixies(Mobile target)
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
||||||
|
{
|
||||||
|
if (CheckQueen())
|
||||||
{
|
{
|
||||||
var map = Map;
|
scalar *= 0.1;
|
||||||
|
|
||||||
if (map == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Say(1042154); // You shall never defeat me as long as I have my queen!
|
|
||||||
|
|
||||||
var newPixies = Utility.RandomMinMax(3, 6);
|
|
||||||
|
|
||||||
for (var i = 0; i < newPixies; ++i)
|
|
||||||
{
|
|
||||||
var pixie = new Pixie { Team = Team, FightMode = FightMode.Closest };
|
|
||||||
|
|
||||||
pixie.MoveToWorld(map.GetRandomNearbyLocation(Location), map);
|
|
||||||
pixie.Combatant = target;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override int GetAngerSound() => 0x2F8;
|
public override void OnGaveMeleeAttack(Mobile defender, int damage)
|
||||||
|
{
|
||||||
|
base.OnGaveMeleeAttack(defender, damage);
|
||||||
|
|
||||||
public override int GetIdleSound() => 0x2F8;
|
defender.Damage(Utility.Random(20, 10), this);
|
||||||
|
defender.Stam -= Utility.Random(20, 10);
|
||||||
|
defender.Mana -= Utility.Random(20, 10);
|
||||||
|
}
|
||||||
|
|
||||||
public override int GetAttackSound() => Utility.Random(0x2F5, 2);
|
public override void OnGotMeleeAttack(Mobile attacker, int damage)
|
||||||
|
{
|
||||||
|
base.OnGotMeleeAttack(attacker, damage);
|
||||||
|
|
||||||
public override int GetHurtSound() => 0x2F9;
|
attacker.Damage(Utility.Random(20, 10), this);
|
||||||
|
attacker.Stam -= Utility.Random(20, 10);
|
||||||
|
attacker.Mana -= Utility.Random(20, 10);
|
||||||
|
}
|
||||||
|
|
||||||
public override int GetDeathSound() => 0x2F7;
|
public override void Serialize(IGenericWriter writer)
|
||||||
|
{
|
||||||
|
base.Serialize(writer);
|
||||||
|
|
||||||
public void CheckQueen()
|
writer.Write(0); // version
|
||||||
|
|
||||||
|
writer.Write(m_Queen);
|
||||||
|
writer.Write(m_SpawnedQueen);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Deserialize(IGenericReader reader)
|
||||||
|
{
|
||||||
|
base.Deserialize(reader);
|
||||||
|
|
||||||
|
var version = reader.ReadInt();
|
||||||
|
|
||||||
|
switch (version)
|
||||||
{
|
{
|
||||||
if (Map == null)
|
case 0:
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!m_SpawnedQueen)
|
|
||||||
{
|
|
||||||
Say(1042153); // Come forth my queen!
|
|
||||||
|
|
||||||
m_Queen = new Silvani { Team = Team };
|
|
||||||
m_Queen.MoveToWorld(Location, Map);
|
|
||||||
|
|
||||||
m_SpawnedQueen = true;
|
|
||||||
}
|
|
||||||
else if (m_Queen?.Deleted != false)
|
|
||||||
{
|
|
||||||
m_Queen = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
|
||||||
{
|
|
||||||
CheckQueen();
|
|
||||||
|
|
||||||
if (m_Queen != null)
|
|
||||||
{
|
|
||||||
scalar *= 0.1;
|
|
||||||
|
|
||||||
if (Utility.RandomDouble() < 0.1)
|
|
||||||
{
|
{
|
||||||
SpawnPixies(caster);
|
m_Queen = reader.ReadEntity<BaseCreature>();
|
||||||
|
m_SpawnedQueen = reader.ReadBool();
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnGaveMeleeAttack(Mobile defender, int damage)
|
|
||||||
{
|
|
||||||
base.OnGaveMeleeAttack(defender, damage);
|
|
||||||
|
|
||||||
defender.Damage(Utility.Random(20, 10), this);
|
|
||||||
defender.Stam -= Utility.Random(20, 10);
|
|
||||||
defender.Mana -= Utility.Random(20, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnGotMeleeAttack(Mobile attacker, int damage)
|
|
||||||
{
|
|
||||||
base.OnGotMeleeAttack(attacker, damage);
|
|
||||||
|
|
||||||
CheckQueen();
|
|
||||||
|
|
||||||
if (m_Queen != null && Utility.RandomDouble() < 0.1)
|
|
||||||
{
|
|
||||||
SpawnPixies(attacker);
|
|
||||||
}
|
|
||||||
|
|
||||||
attacker.Damage(Utility.Random(20, 10), this);
|
|
||||||
attacker.Stam -= Utility.Random(20, 10);
|
|
||||||
attacker.Mana -= Utility.Random(20, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
|
|
||||||
writer.Write(m_Queen);
|
|
||||||
writer.Write(m_SpawnedQueen);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
switch (version)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
m_Queen = reader.ReadEntity<BaseCreature>();
|
|
||||||
m_SpawnedQueen = reader.ReadBool();
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,120 +1,84 @@
|
||||||
namespace Server.Mobiles
|
namespace Server.Mobiles;
|
||||||
|
|
||||||
|
public class Silvani : BaseCreature
|
||||||
{
|
{
|
||||||
public class Silvani : BaseCreature
|
[Constructible]
|
||||||
|
public Silvani() : base(AIType.AI_Mage, FightMode.Evil, 18)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Body = 176;
|
||||||
public Silvani() : base(AIType.AI_Mage, FightMode.Evil, 18)
|
BaseSoundID = 0x467;
|
||||||
{
|
|
||||||
Body = 176;
|
|
||||||
BaseSoundID = 0x467;
|
|
||||||
|
|
||||||
SetStr(253, 400);
|
SetStr(253, 400);
|
||||||
SetDex(157, 850);
|
SetDex(157, 850);
|
||||||
SetInt(503, 800);
|
SetInt(503, 800);
|
||||||
|
|
||||||
SetHits(600);
|
SetHits(600);
|
||||||
|
|
||||||
SetDamage(27, 38);
|
SetDamage(27, 38);
|
||||||
|
|
||||||
SetDamageType(ResistanceType.Physical, 75);
|
SetDamageType(ResistanceType.Physical, 75);
|
||||||
SetDamageType(ResistanceType.Cold, 25);
|
SetDamageType(ResistanceType.Cold, 25);
|
||||||
|
|
||||||
SetResistance(ResistanceType.Physical, 45, 55);
|
SetResistance(ResistanceType.Physical, 45, 55);
|
||||||
SetResistance(ResistanceType.Fire, 30, 40);
|
SetResistance(ResistanceType.Fire, 30, 40);
|
||||||
SetResistance(ResistanceType.Cold, 30, 40);
|
SetResistance(ResistanceType.Cold, 30, 40);
|
||||||
SetResistance(ResistanceType.Poison, 40, 50);
|
SetResistance(ResistanceType.Poison, 40, 50);
|
||||||
SetResistance(ResistanceType.Energy, 40, 50);
|
SetResistance(ResistanceType.Energy, 40, 50);
|
||||||
|
|
||||||
SetSkill(SkillName.EvalInt, 100.0);
|
SetSkill(SkillName.EvalInt, 100.0);
|
||||||
SetSkill(SkillName.Magery, 97.6, 107.5);
|
SetSkill(SkillName.Magery, 97.6, 107.5);
|
||||||
SetSkill(SkillName.Meditation, 100.0);
|
SetSkill(SkillName.Meditation, 100.0);
|
||||||
SetSkill(SkillName.MagicResist, 100.5, 150.0);
|
SetSkill(SkillName.MagicResist, 100.5, 150.0);
|
||||||
SetSkill(SkillName.Tactics, 97.6, 100.0);
|
SetSkill(SkillName.Tactics, 97.6, 100.0);
|
||||||
SetSkill(SkillName.Wrestling, 97.6, 100.0);
|
SetSkill(SkillName.Wrestling, 97.6, 100.0);
|
||||||
|
|
||||||
Fame = 20000;
|
Fame = 20000;
|
||||||
Karma = 20000;
|
Karma = 20000;
|
||||||
|
|
||||||
VirtualArmor = 50;
|
VirtualArmor = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Silvani(Serial serial) : base(serial)
|
public Silvani(Serial serial) : base(serial)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string DefaultName => "Silvani";
|
public override string DefaultName => "Silvani";
|
||||||
|
|
||||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||||
|
|
||||||
public override bool CanFly => true;
|
public override bool CanFly => true;
|
||||||
public override bool Unprovokable => true;
|
public override bool Unprovokable => true;
|
||||||
public override Poison PoisonImmune => Poison.Regular;
|
public override Poison PoisonImmune => Poison.Regular;
|
||||||
public override int TreasureMapLevel => 5;
|
public override int TreasureMapLevel => 5;
|
||||||
|
|
||||||
public override void GenerateLoot()
|
private static MonsterAbility[] _abilities = { MonsterAbilities.SummonPixiesCounter };
|
||||||
{
|
public override MonsterAbility[] GetMonsterAbilities() => _abilities;
|
||||||
AddLoot(LootPack.UltraRich, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SpawnPixies(Mobile target)
|
public override void GenerateLoot()
|
||||||
{
|
{
|
||||||
var map = Map;
|
AddLoot(LootPack.UltraRich, 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (map == null)
|
public override void OnGaveMeleeAttack(Mobile defender, int damage)
|
||||||
{
|
{
|
||||||
return;
|
base.OnGaveMeleeAttack(defender, damage);
|
||||||
}
|
|
||||||
|
|
||||||
var newPixies = Utility.RandomMinMax(3, 6);
|
defender.Damage(Utility.Random(20, 10), this);
|
||||||
|
defender.Stam -= Utility.Random(20, 10);
|
||||||
|
defender.Mana -= Utility.Random(20, 10);
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < newPixies; ++i)
|
public override void Serialize(IGenericWriter writer)
|
||||||
{
|
{
|
||||||
var pixie = new Pixie { Team = Team, FightMode = FightMode.Closest };
|
base.Serialize(writer);
|
||||||
|
|
||||||
pixie.MoveToWorld(map.GetRandomNearbyLocation(Location), map);
|
writer.Write(0); // version
|
||||||
pixie.Combatant = target;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
public override void Deserialize(IGenericReader reader)
|
||||||
{
|
{
|
||||||
if (Utility.RandomDouble() < 0.1)
|
base.Deserialize(reader);
|
||||||
{
|
|
||||||
SpawnPixies(caster);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnGaveMeleeAttack(Mobile defender, int damage)
|
var version = reader.ReadInt();
|
||||||
{
|
|
||||||
base.OnGaveMeleeAttack(defender, damage);
|
|
||||||
|
|
||||||
defender.Damage(Utility.Random(20, 10), this);
|
|
||||||
defender.Stam -= Utility.Random(20, 10);
|
|
||||||
defender.Mana -= Utility.Random(20, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnGotMeleeAttack(Mobile attacker, int damage)
|
|
||||||
{
|
|
||||||
base.OnGotMeleeAttack(attacker, damage);
|
|
||||||
|
|
||||||
if (Utility.RandomDouble() < 0.1)
|
|
||||||
{
|
|
||||||
SpawnPixies(attacker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue