ModernUO/Scripts/Items/Talismans/TalismanSlayer.cs
eos 287bacac0e - Spawners now show all (instead of only 2) spawned objects, grouped by type, sorted alphabetically in their mouseover menu. (Displayed amounts fixed too.)
- Talisman slayers fixed to account for inheritance.
- Added repond slayer vulnerability to Troglodyte.
- Added overload for AOS.Damage with chaos damage support.
- Corrected order of ML artifact award messages.
- MageAI corrected to not meditate when already meditating.
- Changed MageAI necro/mage bias to something more sensible.
- Changed speed of most named ML mobs.
- Skeletal steeds are now bleed immune.
- Damage cap of 200 (before resists) added to fire breath attacks.
- Damaging aura effect added to BaseCreature.
- Necromancy skill added to several undead mobs.
- The succubus special drain effect message no longer shows.
- Corrected Sir Patrick's drain effect to account for LOS.
- Added healing skill to Troglodytes.
- Added named ML mobs for the Labyrinth, Painted Caves, Palace of Paroxysmus, Sanctuary and Twisted Weald.
- Added changelings.
- Disabled auto unequiping of weapons when meditating for nonplayers.
- Added cast animations for players in wraith form, lich form and horrific beast.
- Fixed Holy Light to account for LOS.
- Fixed Animate Dead to account for inheritance.
- Fixed Wither friendly fire issue when cast by monsters.
2012-03-04 05:01:41 +00:00

114 lines
3.3 KiB
C#

using System;
using System.Collections.Generic;
using Server;
using Server.Mobiles;
namespace Server.Items
{
public enum TalismanSlayerName
{
None,
Bear,
Vermin,
Bat,
Mage,
Beetle,
Bird,
Ice,
Flame,
Bovine
}
public static class TalismanSlayer
{
private static Dictionary<TalismanSlayerName, Type[]> m_Table = new Dictionary<TalismanSlayerName,Type[]>();
public static void Initialize()
{
m_Table[ TalismanSlayerName.Bear ] = new Type[]
{
typeof( GrizzlyBear ), typeof( BlackBear ), typeof( BrownBear ), typeof( PolarBear ) //, typeof( Grobu )
};
m_Table[ TalismanSlayerName.Vermin ] = new Type[]
{
typeof( RatmanMage ), typeof( RatmanMage ), typeof( RatmanArcher ), typeof( Barracoon),
typeof( Ratman ), typeof( Sewerrat ), typeof( Rat ), typeof( GiantRat ) //, typeof( Chiikkaha )
};
m_Table[ TalismanSlayerName.Bat ] = new Type[]
{
typeof( Mongbat ), typeof( StrongMongbat ), typeof( VampireBat )
};
m_Table[ TalismanSlayerName.Mage ] = new Type[]
{
typeof( EvilMage ), typeof( EvilMageLord ), typeof( AncientLich ), typeof( Lich ), typeof( LichLord ),
typeof( SkeletalMage ), typeof( BoneMagi ), typeof( OrcishMage ), typeof( KhaldunZealot ), typeof( JukaMage ),
};
m_Table[ TalismanSlayerName.Beetle ] = new Type[]
{
typeof( Beetle ), typeof( RuneBeetle ), typeof( FireBeetle ), typeof( DeathwatchBeetle ),
typeof( DeathwatchBeetleHatchling )
};
m_Table[ TalismanSlayerName.Bird ] = new Type[]
{
typeof( Bird ), typeof( TropicalBird ), typeof( Chicken ), typeof( Crane ),
typeof( DesertOstard ), typeof( Eagle ), typeof( ForestOstard ), typeof( FrenziedOstard ),
typeof( Phoenix ), /*typeof( Pyre ), typeof( Swoop ), typeof( Saliva ),*/ typeof( Harpy ),
typeof( StoneHarpy ) // ?????
};
m_Table[ TalismanSlayerName.Ice ] = new Type[]
{
typeof( ArcticOgreLord ), typeof( IceElemental ), typeof( SnowElemental ), typeof( FrostOoze ),
typeof( IceFiend ), /*typeof( UnfrozenMummy ),*/ typeof( FrostSpider ), typeof( LadyOfTheSnow ),
typeof( FrostTroll ),
// TODO WinterReaper, check
typeof( IceSnake ), typeof( SnowLeopard ), typeof( PolarBear ), typeof( IceSerpent ), typeof( GiantIceWorm )
};
m_Table[ TalismanSlayerName.Flame ] = new Type[]
{
typeof( FireBeetle ), typeof( HellHound ), typeof( LavaSerpent ), typeof( FireElemental ),
typeof( PredatorHellCat ), typeof( Phoenix ), typeof( FireGargoyle ), typeof( HellCat ),
/*typeof( Pyre ),*/ typeof( FireSteed ), typeof( LavaLizard ),
// TODO check
typeof( LavaSnake ),
};
m_Table[ TalismanSlayerName.Bovine ] = new Type[]
{
typeof( Cow ), typeof( Bull ), typeof( Gaman ) /*, typeof( MinotaurCaptain ),
typeof( MinotaurScout ), typeof( Minotaur )*/
// TODO TormentedMinotaur
};
}
public static bool Slays( TalismanSlayerName name, Mobile m )
{
if ( !m_Table.ContainsKey( name ) )
return false;
Type[] types = m_Table[ name ];
if ( types == null || m == null )
return false;
Type type = m.GetType();
for ( int i = 0; i < types.Length; i++ )
{
if ( types[ i ].IsAssignableFrom( type ) )
return true;
}
return false;
}
}
}