* Movie ignore mobiles to Mobile class * Allow necromancer familiars to ignore mobiles * ChampionSpawn should not quietly fail when creating new spawn * Fix client party crash bug: 2 people partied, the leader logs out, other client is hung * Fix spellbooks creating with magery/meditation only and creating magery multiple times * Fix BaseRunicTool.GetRandomSlayer() creating more undead slayers than intended * Do not allow players to dismount each other whilst mounted * Fix AOS onwards damage increase tooltip and wrong formula in AOS * Fix monsters killing other monster revenants + animate dead should not attack player pets + other animates * Fix fire steed having loot pack added twice * Fix oaks spawn not able to create Unicorns + Kirins via Activator.CreateInstace() due to constructor having name as parametr * Fix ignoreMobiles flag not propagated to client for non-players. * Fix harrower tents not leeching from players * Fix boats speedhacking around the map * Fix bless, agility etc. not renewing duration * Fix reveal always worked * Fix empty constructor for steeds so they don't throw now.
163 lines
4.9 KiB
C#
163 lines
4.9 KiB
C#
using System;
|
|
using Server.Engines.Plants;
|
|
using Server.Items;
|
|
|
|
namespace Server.Mobiles;
|
|
|
|
public class Hiryu : BaseMount
|
|
{
|
|
public override string DefaultName => "a hiryu";
|
|
|
|
[Constructible]
|
|
public Hiryu() : base(243, 0x3E94, AIType.AI_Melee)
|
|
{
|
|
Hue = GetHue();
|
|
|
|
SetStr(1201, 1410);
|
|
SetDex(171, 270);
|
|
SetInt(301, 325);
|
|
|
|
SetHits(901, 1100);
|
|
SetMana(60);
|
|
|
|
SetDamage(20, 30);
|
|
|
|
SetDamageType(ResistanceType.Physical, 100);
|
|
|
|
SetResistance(ResistanceType.Physical, 55, 70);
|
|
SetResistance(ResistanceType.Fire, 70, 90);
|
|
SetResistance(ResistanceType.Cold, 15, 25);
|
|
SetResistance(ResistanceType.Poison, 40, 50);
|
|
SetResistance(ResistanceType.Energy, 40, 50);
|
|
|
|
SetSkill(SkillName.Anatomy, 75.1, 80.0);
|
|
SetSkill(SkillName.MagicResist, 85.1, 100.0);
|
|
SetSkill(SkillName.Tactics, 100.1, 110.0);
|
|
SetSkill(SkillName.Wrestling, 100.1, 120.0);
|
|
|
|
Fame = 18000;
|
|
Karma = -18000;
|
|
|
|
Tamable = true;
|
|
ControlSlots = 4;
|
|
MinTameSkill = 98.7;
|
|
|
|
if (Utility.RandomDouble() < .33)
|
|
{
|
|
PackItem(Seed.RandomBonsaiSeed());
|
|
}
|
|
|
|
if (Core.ML && Utility.RandomDouble() < .33)
|
|
{
|
|
PackItem(Seed.RandomPeculiarSeed(3));
|
|
}
|
|
}
|
|
|
|
public Hiryu(Serial serial) : base(serial)
|
|
{
|
|
}
|
|
|
|
public override string CorpseName => "a hiryu corpse";
|
|
public override double WeaponAbilityChance => 0.07; /* 1 in 15 chance of using per landed hit */
|
|
|
|
public override bool StatLossAfterTame => true;
|
|
|
|
public override int TreasureMapLevel => 5;
|
|
public override int Meat => 16;
|
|
public override int Hides => 60;
|
|
public override FoodType FavoriteFood => FoodType.Meat;
|
|
public override bool CanAngerOnTame => true;
|
|
|
|
private static MonsterAbility[] _abilities = { MonsterAbility.GraspingClaw };
|
|
public override MonsterAbility[] GetMonsterAbilities() => _abilities;
|
|
|
|
public override WeaponAbility GetWeaponAbility() => WeaponAbility.Dismount;
|
|
|
|
private static int GetHue()
|
|
{
|
|
return Utility.Random(1075) switch
|
|
{
|
|
1074 => 0x85C, // Strong Green 0.09%
|
|
1073 => 0x490, // Strong Purple 0.09%
|
|
>= 1071 => 0x030, // Green 0.19%
|
|
>= 1069 => 0x037, // Strong Yellow 0.19%
|
|
>= 1066 => 0x295, // Light Green 0.28%
|
|
>= 1063 => 0x123, // Cyan 0.28%
|
|
>= 1058 => 0x482, // Ice Blue 0.47%
|
|
>= 1050 => 0x487, // Blue/Yellow 0.74%
|
|
>= 1040 => CraftResources.GetHue(CraftResource.Gold), // Gold 0.93%
|
|
>= 1030 => CraftResources.GetHue(CraftResource.Agapite), // Agapite 0.93%
|
|
>= 1020 => 0x495, // Strong Cyan 0.93%
|
|
>= 1010 => 0x48D, // Light Blue 0.93%
|
|
>= 1000 => 0x47F, // Ice Green 0.93%
|
|
_ => 0 // No Hue 93.02%
|
|
} | 0x8000;
|
|
}
|
|
|
|
public override int GetAngerSound() => 0x4FE;
|
|
|
|
public override int GetIdleSound() => 0x4FD;
|
|
|
|
public override int GetAttackSound() => 0x4FC;
|
|
|
|
public override int GetHurtSound() => 0x4FF;
|
|
|
|
public override int GetDeathSound() => 0x4FB;
|
|
|
|
public override void GenerateLoot()
|
|
{
|
|
AddLoot(LootPack.FilthyRich, 3);
|
|
AddLoot(LootPack.Gems, 4);
|
|
}
|
|
|
|
public override void Serialize(IGenericWriter writer)
|
|
{
|
|
base.Serialize(writer);
|
|
writer.Write(2);
|
|
}
|
|
|
|
public override void Deserialize(IGenericReader reader)
|
|
{
|
|
base.Deserialize(reader);
|
|
var version = reader.ReadInt();
|
|
|
|
if (version <= 1)
|
|
{
|
|
Timer.StartTimer(() => Fix(version));
|
|
}
|
|
|
|
if (version < 2)
|
|
{
|
|
for (var i = 0; i < Skills.Length; ++i)
|
|
{
|
|
Skills[i].Cap = Math.Max(100.0, Skills[i].Cap * 0.9);
|
|
|
|
if (Skills[i].Base > Skills[i].Cap)
|
|
{
|
|
Skills[i].Base = Skills[i].Cap;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private void Fix(int version)
|
|
{
|
|
switch (version)
|
|
{
|
|
case 1:
|
|
{
|
|
if (InternalItem != null)
|
|
{
|
|
InternalItem.Hue = Hue;
|
|
}
|
|
|
|
goto case 0;
|
|
}
|
|
case 0:
|
|
{
|
|
Hue = GetHue();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|