This commit is contained in:
parent
2204d5fb86
commit
03fc95bfb7
105 changed files with 9135 additions and 161 deletions
|
|
@ -12,6 +12,15 @@ namespace Server.Mobiles
|
|||
{
|
||||
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Greed; } }
|
||||
|
||||
public override Type[] UniqueList{ get{ return new Type[] { typeof( FangOfRactus ) }; } }
|
||||
public override Type[] SharedList{ get{ return new Type[] { typeof( EmbroideredOakLeafCloak ),
|
||||
typeof( DjinnisRing ),
|
||||
typeof( DetectiveBoots ),
|
||||
typeof( GuantletsOfAnger ) }; } }
|
||||
public override Type[] DecorativeList{ get{ return new Type[] { typeof( SwampTile ), typeof( MonsterStatuette ) }; } }
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { MonsterStatuetteType.Slime }; } }
|
||||
|
||||
[Constructable]
|
||||
public Barracoon() : base( AIType.AI_Melee )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,6 +23,13 @@ namespace Server.Mobiles
|
|||
|
||||
public abstract ChampionSkullType SkullType{ get; }
|
||||
|
||||
public abstract Type[] UniqueList{ get; }
|
||||
public abstract Type[] SharedList{ get; }
|
||||
public abstract Type[] DecorativeList{ get; }
|
||||
public abstract MonsterStatuetteType[] StatueTypes{ get; }
|
||||
|
||||
public virtual bool NoGoodies{ get{ return false; } }
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
|
@ -37,6 +44,38 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public Item GetArtifact()
|
||||
{
|
||||
double random = Utility.RandomDouble();
|
||||
if ( 0.05 >= random )
|
||||
return CreateArtifact( UniqueList );
|
||||
else if ( 0.15 >= random )
|
||||
return CreateArtifact( SharedList );
|
||||
else if ( 0.30 >= random )
|
||||
return CreateArtifact( DecorativeList );
|
||||
return null;
|
||||
}
|
||||
|
||||
public Item CreateArtifact( Type[] list )
|
||||
{
|
||||
if( list.Length == 0 )
|
||||
return null;
|
||||
|
||||
int random = Utility.Random( list.Length );
|
||||
|
||||
Type type = list[random];
|
||||
|
||||
Item artifact = Loot.Construct( type );
|
||||
|
||||
if( artifact is MonsterStatuette && StatueTypes.Length > 0 )
|
||||
{
|
||||
((MonsterStatuette)artifact).Type = StatueTypes[Utility.Random( StatueTypes.Length )];
|
||||
((MonsterStatuette)artifact).LootType = LootType.Regular;
|
||||
}
|
||||
|
||||
return artifact;
|
||||
}
|
||||
|
||||
private PowerScroll CreateRandomPowerScroll()
|
||||
{
|
||||
int level;
|
||||
|
|
@ -175,6 +214,9 @@ namespace Server.Mobiles
|
|||
{
|
||||
GivePowerScrolls();
|
||||
|
||||
if( NoGoodies )
|
||||
return base.OnBeforeDeath();
|
||||
|
||||
Map map = this.Map;
|
||||
|
||||
if ( map != null )
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class Harrower : BaseCreature
|
||||
{
|
||||
public Type[] UniqueList{ get{ return new Type[] { typeof( AcidProofRobe ) }; } }
|
||||
public Type[] SharedList{ get{ return new Type[] { typeof( TheRobeOfBritanniaAri ) }; } }
|
||||
public Type[] DecorativeList{ get{ return new Type[] { typeof( EvilIdolSkull ), typeof( SkullPole ) }; } }
|
||||
|
||||
private bool m_TrueForm;
|
||||
private Item m_GateItem;
|
||||
private List<HarrowerTentacles> m_Tentacles;
|
||||
|
|
@ -361,16 +365,23 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
m_DamageEntries = new Dictionary<Mobile, int>();
|
||||
|
||||
for ( int i = 0; i < m_Tentacles.Count; ++i )
|
||||
{
|
||||
Mobile m = m_Tentacles[i];
|
||||
|
||||
if ( !m.Deleted )
|
||||
m.Kill();
|
||||
|
||||
RegisterDamageTo( m );
|
||||
}
|
||||
|
||||
m_Tentacles.Clear();
|
||||
|
||||
RegisterDamageTo( this );
|
||||
AwardArtifact( GetArtifact() );
|
||||
|
||||
if ( m_GateItem != null )
|
||||
m_GateItem.Delete();
|
||||
}
|
||||
|
|
@ -384,6 +395,115 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
Dictionary<Mobile, int> m_DamageEntries;
|
||||
|
||||
public virtual void RegisterDamageTo( Mobile m )
|
||||
{
|
||||
if( m == null )
|
||||
return;
|
||||
|
||||
foreach( DamageEntry de in m.DamageEntries )
|
||||
{
|
||||
Mobile damager = de.Damager;
|
||||
|
||||
Mobile master = damager.GetDamageMaster( m );
|
||||
|
||||
if( master != null )
|
||||
damager = master;
|
||||
|
||||
RegisterDamage( damager, de.DamageGiven );
|
||||
}
|
||||
}
|
||||
|
||||
public void RegisterDamage( Mobile from, int amount )
|
||||
{
|
||||
if( from == null || !from.Player )
|
||||
return;
|
||||
|
||||
if( m_DamageEntries.ContainsKey( from ) )
|
||||
m_DamageEntries[from] += amount;
|
||||
else
|
||||
m_DamageEntries.Add( from, amount );
|
||||
|
||||
from.SendMessage(String.Format("Total Damage: {0}", m_DamageEntries[from]) );
|
||||
}
|
||||
|
||||
public void AwardArtifact( Item artifact )
|
||||
{
|
||||
if (artifact == null )
|
||||
return;
|
||||
|
||||
int totalDamage = 0;
|
||||
|
||||
Dictionary<Mobile, int> validEntries = new Dictionary<Mobile, int>();
|
||||
|
||||
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
|
||||
{
|
||||
if( IsEligable( kvp.Key, artifact ) )
|
||||
{
|
||||
validEntries.Add( kvp.Key, kvp.Value );
|
||||
totalDamage += kvp.Value;
|
||||
}
|
||||
}
|
||||
|
||||
int randomDamage = Utility.RandomMinMax( 1, totalDamage );
|
||||
|
||||
totalDamage = 0;
|
||||
|
||||
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
|
||||
{
|
||||
totalDamage += kvp.Value;
|
||||
|
||||
if( totalDamage > randomDamage )
|
||||
{
|
||||
GiveArtifact( kvp.Key, artifact );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void GiveArtifact( Mobile to, Item artifact )
|
||||
{
|
||||
if ( to == null || artifact == null )
|
||||
return;
|
||||
|
||||
Container pack = to.Backpack;
|
||||
|
||||
if ( pack == null || !pack.TryDropItem( to, artifact, false ) )
|
||||
artifact.Delete();
|
||||
else
|
||||
to.SendLocalizedMessage( 1062317 ); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
|
||||
}
|
||||
|
||||
public bool IsEligable( Mobile m, Item Artifact )
|
||||
{
|
||||
return m.Player && m.Alive && m.InRange( Location, 32 ) && m.Backpack != null && m.Backpack.CheckHold( m, Artifact, false );
|
||||
}
|
||||
|
||||
public Item GetArtifact()
|
||||
{
|
||||
double random = Utility.RandomDouble();
|
||||
if ( 0.05 >= random )
|
||||
return CreateArtifact( UniqueList );
|
||||
else if ( 0.15 >= random )
|
||||
return CreateArtifact( SharedList );
|
||||
else if ( 0.30 >= random )
|
||||
return CreateArtifact( DecorativeList );
|
||||
return null;
|
||||
}
|
||||
|
||||
public Item CreateArtifact( Type[] list )
|
||||
{
|
||||
if( list.Length == 0 )
|
||||
return null;
|
||||
|
||||
int random = Utility.Random( list.Length );
|
||||
|
||||
Type type = list[random];
|
||||
|
||||
return Loot.Construct( type );
|
||||
}
|
||||
|
||||
private class TeleportTimer : Timer
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,19 @@ namespace Server.Mobiles
|
|||
|
||||
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Enlightenment; } }
|
||||
|
||||
public override Type[] UniqueList{ get{ return new Type[] { typeof( OrcChieftainHelm ) }; } }
|
||||
public override Type[] SharedList{ get{ return new Type[] { typeof( RoyalGuardSurvivalKnife ),
|
||||
typeof( DjinnisRing ),
|
||||
typeof( LieutenantOfTheBritannianRoyalGuard ),
|
||||
typeof( SamaritanRobe ),
|
||||
typeof( DetectiveBoots ),
|
||||
typeof( TheMostKnowledgePerson ) }; } }
|
||||
public override Type[] DecorativeList{ get{ return new Type[] { typeof( WaterTile ),
|
||||
typeof( WindSpirit ),
|
||||
typeof( Pier ), }; } }
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { }; } }
|
||||
|
||||
[Constructable]
|
||||
public LordOaks() : base( AIType.AI_Mage, FightMode.Evil )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@ namespace Server.Mobiles
|
|||
{
|
||||
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Venom; } }
|
||||
|
||||
public override Type[] UniqueList{ get{ return new Type[] { typeof( Calm ) }; } }
|
||||
public override Type[] SharedList{ get{ return new Type[] { typeof( OblivionsNeedle ), typeof( ANecromancerShroud ) }; } }
|
||||
public override Type[] DecorativeList{ get{ return new Type[] { typeof( Web ), typeof( MonsterStatuette ) }; } }
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { MonsterStatuetteType.Spider }; } }
|
||||
|
||||
[Constructable]
|
||||
public Mephitis() : base( AIType.AI_Melee )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@ namespace Server.Mobiles
|
|||
{
|
||||
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Death; } }
|
||||
|
||||
public override Type[] UniqueList{ get{ return new Type[] { typeof( ShroudOfDeciet ) }; } }
|
||||
public override Type[] SharedList{ get{ return new Type[] { typeof( ANecromancerShroud ),
|
||||
typeof( DetectiveBoots ),
|
||||
typeof( CaptainJohnsHat ) }; } }
|
||||
public override Type[] DecorativeList{ get{ return new Type[] { typeof( WallBlood ), typeof( TatteredAncientMummyWrapping ) }; } }
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { }; } }
|
||||
|
||||
[Constructable]
|
||||
public Neira() : base( AIType.AI_Mage )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,17 @@ namespace Server.Mobiles
|
|||
{
|
||||
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Power; } }
|
||||
|
||||
public override Type[] UniqueList{ get{ return new Type[] { typeof( CrownOfTalKeesh ) }; } }
|
||||
public override Type[] SharedList{ get{ return new Type[] { typeof( TheMostKnowledgePerson ),
|
||||
typeof( BraveKnightOfTheBritannia ),
|
||||
typeof( LieutenantOfTheBritannianRoyalGuard ) }; } }
|
||||
public override Type[] DecorativeList{ get{ return new Type[] { typeof( LavaTile ),
|
||||
typeof( MonsterStatuette ),
|
||||
typeof( MonsterStatuette ) }; } }
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { MonsterStatuetteType.OphidianArchMage,
|
||||
MonsterStatuetteType.OphidianWarrior }; } }
|
||||
|
||||
[Constructable]
|
||||
public Rikktor() : base( AIType.AI_Melee )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@ namespace Server.Mobiles
|
|||
{
|
||||
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Pain; } }
|
||||
|
||||
public override Type[] UniqueList{ get{ return new Type[] { typeof( GladiatorsCollar ) }; } }
|
||||
public override Type[] SharedList{ get{ return new Type[] { typeof( LieutenantOfTheBritannianRoyalGuard ) }; } }
|
||||
public override Type[] DecorativeList{ get{ return new Type[] { typeof( LavaTile ), typeof( DemonSkull ) }; } }
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { }; } }
|
||||
|
||||
[Constructable]
|
||||
public Semidar() : base( AIType.AI_Mage )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,15 @@ namespace Server.Mobiles
|
|||
{
|
||||
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Power; } }
|
||||
|
||||
public override Type[] UniqueList{ get{ return new Type[] { typeof( Pacify ) }; } }
|
||||
public override Type[] SharedList{ get{ return new Type[] { typeof( BraveKnightOfTheBritannia ),
|
||||
typeof( DetectiveBoots ),
|
||||
typeof( EmbroideredOakLeafCloak ),
|
||||
typeof( LieutenantOfTheBritannianRoyalGuard ) }; } }
|
||||
public override Type[] DecorativeList{ get{ return new Type[] { typeof( Futon ), typeof( SwampTile ) }; } }
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { }; } }
|
||||
|
||||
public override WeaponAbility GetWeaponAbility()
|
||||
{
|
||||
return WeaponAbility.DoubleStrike;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue