From 296ef1be685b48d4c44c4485e87e1558ef63d113 Mon Sep 17 00:00:00 2001 From: xavier Date: Sat, 19 Jan 2013 23:06:49 +0000 Subject: [PATCH] fixes to miasma special moves. --- Scripts/Items/Weapons/Abilities/MortalStrike.cs | 10 ++++++++-- Scripts/Mobiles/BaseCreature.cs | 4 +++- Scripts/Mobiles/Monsters/ML/Labyrinth/Miasma.cs | 11 ++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Scripts/Items/Weapons/Abilities/MortalStrike.cs b/Scripts/Items/Weapons/Abilities/MortalStrike.cs index b892c1661..3c9180bb7 100644 --- a/Scripts/Items/Weapons/Abilities/MortalStrike.cs +++ b/Scripts/Items/Weapons/Abilities/MortalStrike.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using Server.Mobiles; namespace Server.Items { @@ -21,8 +22,13 @@ namespace Server.Items public override void OnHit(Mobile attacker, Mobile defender, int damage) { - if ( !Validate( attacker ) || !CheckMana( attacker, true ) ) - return; + if( !Validate( attacker ) || !CheckMana( attacker, true ) ) + { + if( !( defender is BaseCreature ) || !( defender as BaseCreature ).HasManaOveride ) + { + return; + } + } ClearCurrentAbility( attacker ); diff --git a/Scripts/Mobiles/BaseCreature.cs b/Scripts/Mobiles/BaseCreature.cs index 3b41e853b..a875ce43c 100644 --- a/Scripts/Mobiles/BaseCreature.cs +++ b/Scripts/Mobiles/BaseCreature.cs @@ -477,6 +477,8 @@ namespace Server.Mobiles } } + public virtual bool HasManaOveride { get { return false; } } + public virtual FoodType FavoriteFood{ get{ return FoodType.Meat; } } public virtual PackInstinct PackInstinct{ get{ return PackInstinct.None; } } @@ -5249,7 +5251,7 @@ namespace Server.Mobiles } } } - else + else if( m_FailedReturnHome > 0 ) { m_FailedReturnHome = 0; } diff --git a/Scripts/Mobiles/Monsters/ML/Labyrinth/Miasma.cs b/Scripts/Mobiles/Monsters/ML/Labyrinth/Miasma.cs index cddd4d4d0..34cfce127 100644 --- a/Scripts/Mobiles/Monsters/ML/Labyrinth/Miasma.cs +++ b/Scripts/Mobiles/Monsters/ML/Labyrinth/Miasma.cs @@ -42,6 +42,14 @@ namespace Server.Mobiles Karma = -21000; } + /* yes, this is OSI style */ + public override double WeaponAbilityChance { get { return .5; } } + public override double HitPoisonChance { get { return 0.1; } } + public override Poison HitPoison { get { return ( Poison.Lethal ); } } + public override bool HasManaOveride { get { return false; } } + public override bool GivesMLMinorArtifact { get { return true; } } + public override int TreasureMapLevel { get { return 5; } } + public override void GenerateLoot() { AddLoot( LootPack.UltraRich, 2 ); @@ -83,9 +91,6 @@ namespace Server.Mobiles } */ - public override bool GivesMLMinorArtifact{ get{ return true; } } - public override int TreasureMapLevel{ get{ return 5; } } - public Miasma( Serial serial ) : base( serial ) {