* 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.
154 lines
4 KiB
C#
154 lines
4 KiB
C#
using System.Collections.Generic;
|
|
using Server.ContextMenus;
|
|
using Server.Items;
|
|
|
|
namespace Server.Mobiles
|
|
{
|
|
public class Beetle : BaseMount
|
|
{
|
|
public override string DefaultName => "a giant beetle";
|
|
|
|
[Constructible]
|
|
public Beetle() : base( 0x317, 0x3EBC, AIType.AI_Melee)
|
|
{
|
|
SetStr(300);
|
|
SetDex(100);
|
|
SetInt(500);
|
|
|
|
SetHits(200);
|
|
|
|
SetDamage(7, 20);
|
|
|
|
SetDamageType(ResistanceType.Physical, 100);
|
|
|
|
SetResistance(ResistanceType.Physical, 30, 40);
|
|
SetResistance(ResistanceType.Fire, 20, 30);
|
|
SetResistance(ResistanceType.Cold, 20, 30);
|
|
SetResistance(ResistanceType.Poison, 20, 30);
|
|
SetResistance(ResistanceType.Energy, 20, 30);
|
|
|
|
SetSkill(SkillName.MagicResist, 80.0);
|
|
SetSkill(SkillName.Tactics, 100.0);
|
|
SetSkill(SkillName.Wrestling, 100.0);
|
|
|
|
Fame = 4000;
|
|
Karma = -4000;
|
|
|
|
Tamable = true;
|
|
ControlSlots = 3;
|
|
MinTameSkill = 29.1;
|
|
|
|
var pack = Backpack;
|
|
|
|
pack?.Delete();
|
|
|
|
pack = new StrongBackpack();
|
|
pack.Movable = false;
|
|
|
|
AddItem(pack);
|
|
}
|
|
|
|
public Beetle(Serial serial) : base(serial)
|
|
{
|
|
}
|
|
|
|
public override string CorpseName => "a giant beetle corpse";
|
|
public virtual double BoostedSpeed => 0.1;
|
|
|
|
public override bool SubdueBeforeTame => true; // Must be beaten into submission
|
|
public override bool ReduceSpeedWithDamage => false;
|
|
|
|
public override FoodType FavoriteFood => FoodType.Meat;
|
|
|
|
public override int GetAngerSound() => 0x21D;
|
|
|
|
public override int GetIdleSound() => 0x21D;
|
|
|
|
public override int GetAttackSound() => 0x162;
|
|
|
|
public override int GetHurtSound() => 0x163;
|
|
|
|
public override int GetDeathSound() => 0x21D;
|
|
|
|
public override void OnHarmfulSpell(Mobile from)
|
|
{
|
|
if (!Controlled && ControlMaster == null)
|
|
{
|
|
CurrentSpeed = BoostedSpeed;
|
|
}
|
|
}
|
|
|
|
public override void OnCombatantChange()
|
|
{
|
|
if (Combatant == null && !Controlled && ControlMaster == null)
|
|
{
|
|
CurrentSpeed = PassiveSpeed;
|
|
}
|
|
}
|
|
|
|
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 bool OnBeforeDeath()
|
|
{
|
|
if (!base.OnBeforeDeath())
|
|
{
|
|
return false;
|
|
}
|
|
|
|
PackAnimal.CombineBackpacks(this);
|
|
|
|
return true;
|
|
}
|
|
|
|
public override DeathMoveResult GetInventoryMoveResultFor(Item item) => DeathMoveResult.MoveToCorpse;
|
|
|
|
public override bool IsSnoop(Mobile from)
|
|
{
|
|
if (PackAnimal.CheckAccess(this, from))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return base.IsSnoop(from);
|
|
}
|
|
|
|
public override bool OnDragDrop(Mobile from, Item item)
|
|
{
|
|
if (CheckFeed(from, item))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
if (PackAnimal.CheckAccess(this, from))
|
|
{
|
|
AddToBackpack(item);
|
|
return true;
|
|
}
|
|
|
|
return base.OnDragDrop(from, item);
|
|
}
|
|
|
|
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target) => PackAnimal.CheckAccess(this, from);
|
|
|
|
public override bool CheckNonlocalLift(Mobile from, Item item) => PackAnimal.CheckAccess(this, from);
|
|
|
|
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
|
{
|
|
base.GetContextMenuEntries(from, list);
|
|
|
|
PackAnimal.GetContextMenuEntries(this, from, list);
|
|
}
|
|
}
|
|
}
|