This commit is contained in:
mark 2009-08-09 07:18:50 +00:00
parent 57b345a480
commit 68d742d262
28 changed files with 432 additions and 193 deletions

View file

@ -963,17 +963,17 @@
<smartNoHousing active="true" />
<region type="GuardedRegion" name="New Haven Moongate">
<rect x="3446" y="2674" width="10" height="10" />
</region>
</region>
<region type="TownRegion" name="New Haven">
<rune name="New Haven City" />
<rect x="3423" y="2480" width="111" height="143" />
<go x="3503" y="2574" z="14" />
<music name="Ocllo" />
<region name="Gentle Rest Inn">
<rune name="The Gentle Rest Inn in New Haven" />
<region name="Gentle Rest Inn">
<rune name="The Gentle Rest Inn in New Haven" />
<rect x="3493" y="2513" width="10" height="10"/>
<rect x="3503" y="2513" width="7" height="17" />
<logoutDelay active="false" />
<rect x="3503" y="2513" width="7" height="17" />
<logoutDelay active="false" />
</region>
</region>
<!--

View file

@ -2487,10 +2487,6 @@ namespace Server.Mobiles
if ( bFacFriend && !m_Mobile.IsFriend( m ) )
continue;
// Same goes for faction enemies.
if ( bFacFoe && !m_Mobile.IsEnemy( m ) )
continue;
//Ignore anyone under EtherealVoyage
if( TransformationSpellHelper.UnderTransformation( m, typeof( EtherealVoyageSpell ) ) )
continue;
@ -2521,11 +2517,17 @@ namespace Server.Mobiles
if ( !bValid )
continue;
}
} else {
// If it's an enemy factioned mobile, make sure we can be harmful to it.
if ( bFacFoe && !bFacFriend && !m_Mobile.CanBeHarmful( m, false ) )
continue;
// Same goes for faction enemies.
if ( bFacFoe && !m_Mobile.IsEnemy( m ) )
continue;
// If it's an enemy factioned mobile, make sure we can be harmful to it.
if ( bFacFoe && !bFacFriend && !m_Mobile.CanBeHarmful( m, false ) )
continue;
}
theirVal = m_Mobile.GetFightModeRanking( m, acqType, bPlayerOnly );

View file

@ -14,6 +14,7 @@ using Server.Engines.Quests;
using Server.Factions;
using Server.Spells.Bushido;
using Server.Spells.Spellweaving;
using Server.Spells.Necromancy;
namespace Server.Mobiles
{
@ -565,32 +566,22 @@ namespace Server.Mobiles
#endregion
#region Spill Acid
public void SpillAcid( TimeSpan duration, int minDamage, int maxDamage )
{
SpillAcid( duration, minDamage, maxDamage, null, 1, 1 );
}
public void SpillAcid( Mobile target, int amount, string name )
{
SpillAcid( TimeSpan.FromSeconds(10), 5, 10, target, amount, amount, AosElementAttribute.Poison , name );
}
public void SpillAcid( TimeSpan duration, int minDamage, int maxDamage, Mobile target )
{
SpillAcid( duration, minDamage, maxDamage, target, 1, 1 );
}
public void SpillAcid( TimeSpan duration, int minDamage, int maxDamage, int count )
{
SpillAcid( duration, minDamage, maxDamage, null, count, count );
SpillAcid( duration, minDamage, maxDamage, target, 1, 1, 0, null );
}
public void SpillAcid( TimeSpan duration, int minDamage, int maxDamage, int minAmount, int maxAmount )
{
SpillAcid( duration, minDamage, maxDamage, null, minAmount, maxAmount );
SpillAcid( duration, minDamage, maxDamage, null, minAmount, maxAmount, 0, null );
}
public void SpillAcid( TimeSpan duration, int minDamage, int maxDamage, Mobile target, int count )
{
SpillAcid( duration, minDamage, maxDamage, target, count, count );
}
public void SpillAcid( TimeSpan duration, int minDamage, int maxDamage, Mobile target, int minAmount, int maxAmount )
public void SpillAcid( TimeSpan duration, int minDamage, int maxDamage, Mobile target, int minAmount, int maxAmount, AosElementAttribute damagetype, string name )
{
if ( (target != null && target.Map == null) || this.Map == null )
return;
@ -599,30 +590,28 @@ namespace Server.Mobiles
for ( int i = 0; i < pools; ++i )
{
PoolOfAcid acid = new PoolOfAcid( duration, minDamage, maxDamage );
if ( target != null && target.Map != null )
{
acid.MoveToWorld( target.Location, target.Map );
continue;
}
bool validLocation = false;
Point3D loc = this.Location;
Map map = this.Map;
for ( int j = 0; !validLocation && j < 10; ++j )
PoolOfAcid acid = new PoolOfAcid( duration, minDamage, maxDamage, damagetype, name );
if ( target != null && target.Map != null && pools == 1 )
{
int x = X + Utility.Random( 3 ) - 1;
int y = Y + Utility.Random( 3 ) - 1;
int z = map.GetAverageZ( x, y );
if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
loc = new Point3D( x, y, Z );
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
loc = new Point3D( x, y, z );
loc = target.Location;
map = target.Map;
} else
{
bool validLocation = false;
for ( int j = 0; !validLocation && j < 10; ++j )
{
loc = new Point3D(
loc.X+(Utility.Random(0,3)-2),
loc.Y+(Utility.Random(0,3)-2),
loc.Z );
loc.Z = map.GetAverageZ( loc.X, loc.Y );
validLocation = map.CanFit( loc, 16, false, false ) ;
}
}
acid.MoveToWorld( loc, map );
}
}
@ -905,6 +894,20 @@ namespace Server.Mobiles
}
}
public virtual bool IsNecroFamiliar
{
get
{
if ( !Summoned )
return false;
if ( m_ControlMaster != null && SummonFamiliarSpell.Table.Contains( m_ControlMaster ) )
return SummonFamiliarSpell.Table[ m_ControlMaster ] == this;
return false;
}
}
public override void Damage( int amount, Mobile from )
{
int oldHits = this.Hits;
@ -1067,7 +1070,7 @@ namespace Server.Mobiles
get
{
if ( m_HitsMax >= 0 )
return m_HitsMax;
return m_HitsMax + GetStatOffset( StatType.Str );
return Str;
}
@ -1086,7 +1089,7 @@ namespace Server.Mobiles
get
{
if ( m_StamMax >= 0 )
return m_StamMax;
return m_StamMax + GetStatOffset( StatType.Dex );
return Dex;
}
@ -1105,7 +1108,7 @@ namespace Server.Mobiles
get
{
if ( m_ManaMax >= 0 )
return m_ManaMax;
return m_ManaMax + GetStatOffset( StatType.Int );
return Int;
}
@ -2377,6 +2380,11 @@ namespace Server.Mobiles
if ( m_AI != null )
m_AI.OnCurrentOrderChanged();
InvalidateProperties();
if ( m_ControlMaster != null )
m_ControlMaster.InvalidateProperties();
}
}
@ -3938,11 +3946,20 @@ namespace Server.Mobiles
{
base.AddNameProperties( list );
if ( Controlled && Commandable )
if ( Core.ML )
{
if ( Summoned )
list.Add( 1049646 ); // (summoned)
else if ( IsBonded ) //Intentional difference (showing ONLY bonded when bonded instead of bonded & tame)
if ( Backpack is StrongBackpack )
list.Add( TotalWeight == 1 ? 1072788 : 1072789, TotalWeight.ToString() ); // Weight: ~1_WEIGHT~ stones
if ( m_ControlOrder == OrderType.Guard )
list.Add( 1080078 ); // guarding
}
if ( Summoned && !IsAnimatedDead && !IsNecroFamiliar )
list.Add( 1049646 ); // (summoned)
else if ( Controlled && Commandable )
{
if ( IsBonded ) //Intentional difference (showing ONLY bonded when bonded instead of bonded & tame)
list.Add( 1049608 ); // (bonded)
else
list.Add( 502006 ); // (tame)
@ -4419,6 +4436,8 @@ namespace Server.Mobiles
Delta( MobileDelta.Noto );
}
InvalidateProperties();
return true;
}

View file

@ -86,8 +86,11 @@ namespace Server.Engines.Craft
int index = -1;
// Other Items
index = AddCraft( typeof( Board ), 1044294, 1027127, 0.0, 0.0, typeof( Log ), 1044466, 1, 1044465 );
SetUseAllRes( index, true );
if ( Core.Expansion == Expansion.AOS || Core.Expansion == Expansion.SE )
{
index = AddCraft( typeof( Board ), 1044294, 1027127, 0.0, 0.0, typeof( Log ), 1044466, 1, 1044465 );
SetUseAllRes( index, true );
}
AddCraft( typeof( BarrelStaves ), 1044294, 1027857, 00.0, 25.0, typeof( Log ), 1044041, 5, 1044351 );
AddCraft( typeof( BarrelLid ), 1044294, 1027608, 11.0, 36.0, typeof( Log ), 1044041, 4, 1044351 );

View file

@ -52,9 +52,21 @@ namespace Server.Engines.Harvest
}
}
}
if ( m_System is Lumberjacking && targeted is IChopable )
((IChopable)targeted).OnChop( from );
else if ( m_System is Lumberjacking && targeted is IAxe )
{
IAxe obj = (IAxe)targeted;
Item item = (Item)targeted;
if ( !item.IsChildOf( from.Backpack ) )
from.SendLocalizedMessage( 1062334 ); // This item must be in your backpack to be used.
else if ( obj.Axe( from, (BaseAxe)m_Tool ) )
from.PlaySound( 0x13E );
}
else if ( m_System is Lumberjacking && targeted is ICarvable )
((ICarvable)targeted).Carve( from, (Item)m_Tool );
else if ( m_System is Lumberjacking && FurnitureAttribute.Check( targeted as Item ) )
DestroyFurniture( from, (Item)targeted );
else if ( m_System is Mining && targeted is TreasureMap )

View file

@ -134,13 +134,7 @@ namespace Server.Engines.Harvest
public override bool CheckHarvest( Mobile from, Item tool )
{
if ( !base.CheckHarvest( from, tool ) )
return false;
if ( tool.Parent != from )
{
from.SendLocalizedMessage( 500487 ); // The axe must be equipped for any serious wood chopping.
return false;
}
return false;
return true;
}
@ -161,7 +155,20 @@ namespace Server.Engines.Harvest
public override void OnBadHarvestTarget( Mobile from, Item tool, object toHarvest )
{
from.SendLocalizedMessage( 500489 ); // You can't use an axe on that.
if ( toHarvest is Mobile )
{
Mobile obj = (Mobile)toHarvest;
obj.PublicOverheadMessage( Server.Network.MessageType.Regular, 0x3E9, 500450 ); // You can only skin dead creatures.
}
else if ( toHarvest is Item )
{
Item obj = (Item)toHarvest;
obj.PublicOverheadMessage( Server.Network.MessageType.Regular, 0x3E9, 500464 ); // Use this on corpses to carve away meat and hide
}
else if ( toHarvest is Targeting.StaticTarget || toHarvest is Targeting.LandTarget )
from.SendLocalizedMessage( 500489 ); // You can't use an axe on that.
else
from.SendLocalizedMessage( 1005213 ); // You can't do that
}
public override void OnHarvestStarted( Mobile from, Item tool, HarvestDefinition def, object toHarvest )

View file

@ -147,15 +147,24 @@ namespace Server.Engines.Quests.Collector
if ( obj != null && !obj.Completed )
{
BankBox bank = player.FindBankNoCreate();
if ( bank != null && bank.ConsumeTotal( typeof( Gold ), 10 ) )
if ( player.Backpack!= null && player.Backpack.ConsumeTotal( typeof( Gold ), 10 ) )
{
obj.Complete();
}
else
{
player.SendLocalizedMessage( 1055108 ); // You don't have enough gold to buy the sheet music.
BankBox bank = player.FindBankNoCreate();
if ( bank != null && bank.ConsumeTotal( typeof( Gold ), 10 ) )
{
obj.Complete();
}
else
{
player.SendLocalizedMessage( 1055108 ); // You don't have enough gold to buy the sheet music.
}
}
}
}

View file

@ -34,7 +34,6 @@ namespace Server.Gumps
killers.Add( ai.Attacker );
ai.Reported = true;
}
if ( ai.Attacker.Player && (DateTime.Now - ai.LastCombatTime) < TimeSpan.FromSeconds( 30.0 ) && !toGive.Contains( ai.Attacker ) )
toGive.Add( ai.Attacker );
}
@ -70,6 +69,19 @@ namespace Server.Gumps
if ( killers.Count > 0 )
new GumpTimer( m, killers ).Start();
/*
TODO: Check entire combatant system and see if the
cobatant lists should be handled a different
way, and change it accordingly. This is a
small-scope patch to prevent an exploit.
*/
for ( int i = m.Aggressors.Count - 1; i >= 0; --i )
{
m.Aggressors.RemoveAt ( i );
}
}
private class GumpTimer : Timer

View file

@ -101,7 +101,7 @@ namespace Server.Items
if ( house != null && house.IsCoOwner( from ) )
{
Effects.PlaySound( Location, Map, 0x11C );
Effects.PlaySound( Location, Map, 0x3B3 );
from.SendLocalizedMessage( 500461 ); // You destroy the item.
Destroy();
}

View file

@ -4,7 +4,7 @@ using Server.Engines.Harvest;
namespace Server.Items
{
public class GargoylesPickaxe : BaseAxe
public class GargoylesPickaxe : BaseAxe, IUsesRemaining
{
public override int LabelNumber{ get{ return 1041281; } } // a gargoyle's pickaxe
public override HarvestSystem HarvestSystem{ get{ return Mining.System; } }

View file

@ -4,7 +4,7 @@ using Server.Engines.Harvest;
namespace Server.Items
{
public class SturdyPickaxe : BaseAxe
public class SturdyPickaxe : BaseAxe, IUsesRemaining
{
public override int LabelNumber{ get{ return 1045126; } } // sturdy pickaxe
public override HarvestSystem HarvestSystem{ get{ return Mining.System; } }

View file

@ -4,7 +4,7 @@ using Server.Items;
namespace Server.Items
{
[FlipableAttribute( 0x1bdd, 0x1be0 )]
public class Log : Item, ICommodity
public class Log : Item, ICommodity, IAxe
{
private CraftResource m_Resource;
@ -31,7 +31,7 @@ namespace Server.Items
}
[Constructable]
public Log( int amount ) : this( CraftResource.RegularWood )
public Log( int amount ) : this( CraftResource.RegularWood, amount )
{
}
@ -40,7 +40,6 @@ namespace Server.Items
: this( resource, 1 )
{
}
[Constructable]
public Log( CraftResource resource, int amount )
: base( 0x1BDD )
@ -67,7 +66,6 @@ namespace Server.Items
list.Add( CraftResources.GetName( m_Resource ) );
}
}
public Log( Serial serial ) : base( serial )
{
}
@ -99,38 +97,63 @@ namespace Server.Items
if ( version == 0 )
m_Resource = CraftResource.RegularWood;
}
}
public virtual bool TryCreateBoards( Mobile from, double skill, Item item )
{
if ( Deleted || !from.CanSee( this ) )
return false;
else if ( from.Skills.Carpentry.Value < skill &&
from.Skills.Lumberjacking.Value < skill )
{
from.SendLocalizedMessage( 1072652 ); // You cannot work this strange and unusual wood.
return false;
}
base.ScissorHelper( from, item, 1, false );
return true;
}
public virtual bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 0, new Board() ) )
return false;
return true;
}
}
public class HeartwoodLog : Log
{
[Constructable]
public HeartwoodLog() : this( 1 )
{
}
[Constructable]
public HeartwoodLog( int amount )
: base( CraftResource.Heartwood, amount )
{
}
public HeartwoodLog( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 100, new HeartwoodBoard() ) )
return false;
return true;
}
}
public class BloodwoodLog : Log
@ -140,31 +163,35 @@ namespace Server.Items
: this( 1 )
{
}
[Constructable]
public BloodwoodLog( int amount )
: base( CraftResource.Bloodwood, amount )
{
}
public BloodwoodLog( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 100, new BloodwoodBoard() ) )
return false;
return true;
}
}
public class FrostwoodLog : Log
@ -199,6 +226,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 100, new FrostwoodBoard() ) )
return false;
return true;
}
}
public class OakLog : Log
@ -233,6 +268,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 65, new OakBoard() ) )
return false;
return true;
}
}
public class AshLog : Log
@ -267,6 +310,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 80, new AshBoard() ) )
return false;
return true;
}
}
public class YewLog : Log
@ -301,5 +352,13 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 95, new YewBoard() ) )
return false;
return true;
}
}
}

View file

@ -257,7 +257,7 @@ namespace Server.Items
- Summoning Undead
*/
double val = (targ.Hits * 1.6) + targ.Stam + targ.Mana;
double val = (targ.HitsMax * 1.6) + targ.StamMax + targ.ManaMax;
val += targ.SkillsTotal / 10;

View file

@ -119,7 +119,7 @@ namespace Server.Items
}
else
{
list.Add( new BallEntry( new BallCallback( SummonPet ), 6181 ) );
list.Add(new BallEntry(new BallCallback( CastSummonPet ), 6181 ));
list.Add( new BallEntry( new BallCallback( UpdatePetName ), 6183 ) );
list.Add( new BallEntry( new BallCallback( UnlinkPet ), 6182 ) );
}

View file

@ -8,7 +8,12 @@ using Server.ContextMenus;
namespace Server.Items
{
public abstract class BaseAxe : BaseMeleeWeapon, IUsesRemaining
public interface IAxe
{
bool Axe( Mobile from, BaseAxe axe );
}
public abstract class BaseAxe : BaseMeleeWeapon
{
public override int DefHitSound{ get{ return 0x232; } }
public override int DefMissSound{ get{ return 0x23A; } }
@ -75,13 +80,26 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( HarvestSystem == null )
if ( HarvestSystem == null || Deleted )
return;
if ( IsChildOf( from.Backpack ) || Parent == from )
HarvestSystem.BeginHarvesting( from, this );
else
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
Point3D loc = this.GetWorldLocation();
if ( !from.InLOS( loc ) || !from.InRange( loc, 2 ) )
{
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that
return;
}
else if ( !this.IsAccessibleTo( from ) )
{
this.PublicOverheadMessage( Server.Network.MessageType.Regular, 0x3E9, 1061637 ); // You are not allowed to access this.
return;
}
if ( !(this.HarvestSystem is Mining) )
from.SendLocalizedMessage( 1010018 ); // What do you want to use this item on?
HarvestSystem.BeginHarvesting( from, this );
}
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )

View file

@ -6,7 +6,7 @@ using Server.Engines.Harvest;
namespace Server.Items
{
[FlipableAttribute( 0xE86, 0xE85 )]
public class Pickaxe : BaseAxe
public class Pickaxe : BaseAxe, IUsesRemaining
{
public override HarvestSystem HarvestSystem{ get{ return Mining.System; } }

View file

@ -371,7 +371,7 @@ namespace Server.Mobiles
{
get
{
return TimeSpan.FromSeconds( ((m_Mount.IsDonationItem && RewardSystem.GetRewardLevel( m_Rider ) < 3)? ( 7.5 + ( Core.AOS ? 2.0 : 3.0)) : ( Core.AOS ? 2.0 : 3.0)) );
return TimeSpan.FromSeconds( ((m_Mount.IsDonationItem && RewardSystem.GetRewardLevel( m_Rider ) < 3)? ( 7.5 + ( Core.AOS ? 3.0 : 2.0)) : ( Core.AOS ? 3.0 : 2.0)) );
}
}

View file

@ -1,6 +1,7 @@
using System;
using Server;
using Server.Items;
using Server.Spells;
namespace Server.Mobiles
{
@ -12,9 +13,8 @@ namespace Server.Mobiles
{
return WeaponAbility.CrushingBlow;
}
[Constructable]
public DeathwatchBeetle() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
public DeathwatchBeetle() : base( AIType.AI_Melee, Core.ML ? FightMode.Aggressor : FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a deathwatch beetle";
Body = 242;
@ -30,7 +30,6 @@ namespace Server.Mobiles
SetDamageType( ResistanceType.Physical, 100 );
SetResistance( ResistanceType.Physical, 35, 40 );
SetResistance( ResistanceType.Fire, 15, 30 );
SetResistance( ResistanceType.Cold, 15, 30 );
@ -53,7 +52,6 @@ namespace Server.Mobiles
case 3: PackItem( new LeatherLegs() ); break;
case 4: PackItem( new LeatherCap() ); break;
case 5: PackItem( new LeatherChest() ); break;
}
if ( Utility.RandomDouble() < .5 )
@ -95,15 +93,40 @@ namespace Server.Mobiles
AddLoot( LootPack.Potions, 1 );
}
public override int Feathers{ get{ return 50; } }
public override int Meat{ get{ return 1; } }
public override void AlterMeleeDamageTo( Mobile to, ref int damage )
{
if ( Utility.RandomBool() && (this.Mana > 14) && to != null )
{
damage = (damage + (damage / 2));
to.SendLocalizedMessage( 1060091 ); // You take extra damage from the crushing attack!
to.PlaySound( 0x1E1 );
to.FixedParticles( 0x377A, 1, 32, 0x26da, 0, 0, 0 );
Mana -= 15;
}
}
/*
* Death spit: 0x118
* Effect: source.MovingParticles( m, 0x36D4, 1, 0, false, false, 0x3F, 0, 0x1F73, 1, 0, 255, 0x100 );
* Message: 1070821
*/
public override void OnDamage( int amount, Mobile from, bool willKill )
{
Mobile combatant = Combatant;
if ( combatant == null || combatant.Deleted || combatant.Map != Map || !InRange( combatant, 12 ) || !CanBeHarmful( combatant ) || !InLOS( combatant ) )
return;
if( Utility.Random( 10 ) == 0 )
PoisonAttack( combatant );
base.OnDamage( amount, from, willKill );
}
public void PoisonAttack( Mobile m )
{
DoHarmful( m );
this.MovingParticles( m, 0x36D4, 1, 0, false, false, 0x3F, 0, 0x1F73, 1, 0, (EffectLayer)255, 0x100 );
m.ApplyPoison( this, Poison.Regular );
m.SendLocalizedMessage( 1070821, this.Name ); // %s spits a poisonous substance at you!
}
public override int Hides{ get{ return 8; } }
public DeathwatchBeetle( Serial serial ) : base( serial )
{
}

View file

@ -1,6 +1,7 @@
using System;
using System.Collections;
using Server;
using Server.Network;
using Server.Items;
namespace Server.Mobiles
@ -19,6 +20,8 @@ namespace Server.Mobiles
SetDex( 51, 75 );
SetInt( 41, 55 );
SetMana ( 30 );
SetHits( 151, 180 );
SetDamage( 6, 12 );
@ -48,8 +51,6 @@ namespace Server.Mobiles
case 2: PackItem( new Axle() ); break;
}
}
}
@ -59,18 +60,6 @@ namespace Server.Mobiles
AddLoot( LootPack.Meager );
AddLoot( LootPack.Average );
}
public override int Meat{ get{ return 1; } }
public override int Hides{ get{ return 10; } }
public override HideType HideType{ get{ return HideType.Spined; } }
// TODO: Soul Sap
/*
* Message: 1070820
* Spits pool of acid (blood, hue 0x3F), hits lost 6-10 per second/step
* Damage is resistable (physical)
* Acid last 10 seconds
*/
public override int GetAngerSound()
{
@ -101,12 +90,13 @@ namespace Server.Mobiles
{
base.OnGaveMeleeAttack (defender);
if ( 0.1 > Utility.RandomDouble() )
if ( Utility.RandomBool() )
{
if ( !IsBeingDrained( defender ) )
if ( !IsBeingDrained( defender ) && Mana > 14)
{
defender.SendLocalizedMessage( 1070848 ); // You feel your life force being stolen away.
BeginLifeDrain( defender, this );
Mana-=15;
}
}
}
@ -135,7 +125,7 @@ namespace Server.Mobiles
{
if ( m.Alive )
{
int damageGiven = AOS.Damage( m, from, 5, 100, 0, 0, 0, 0 );
int damageGiven = AOS.Damage( m, from, 5, 0, 0, 0, 0, 100 );
from.Hits += damageGiven;
}
@ -157,14 +147,33 @@ namespace Server.Mobiles
m.SendLocalizedMessage( 1070849 ); // The drain on your life force is gone.
}
/*
public override bool OnBeforeDeath()
public override void OnDamage( int amount, Mobile from, bool willKill )
{
SpillAcid( 1, 4, 10, 6, 10 );
return base.OnBeforeDeath();
if ( from != null && from.Map != null )
{
int amt=0;
Mobile target = this;
int rand = Utility.Random( 1, 100 );
if ( willKill )
{
amt = ((( rand % 5 ) >> 2 ) + 3);
}
if ( ( Hits < 100 ) && ( rand < 21 ) )
{
target = ( rand % 2 ) < 1 ? this : from;
amt++;
}
if ( amt > 0 )
{
SpillAcid( target, amt, "slime" );
from.SendLocalizedMessage( 1070820 );
if ( Mana > 14)
Mana -= 15;
amt ^= amt;
}
}
base.OnDamage( amount, from, willKill );
}
*/
public Kappa( Serial serial ) : base( serial )
{

View file

@ -2864,6 +2864,20 @@ namespace Server.Mobiles
list.Add( 1060776, "{0}\t{1}", pl.Rank.Title, faction.Definition.PropName ); // ~1_val~, ~2_val~
}
}
if ( Core.ML )
{
for ( int i = AllFollowers.Count - 1; i >= 0; i-- )
{
BaseCreature c = AllFollowers[ i ] as BaseCreature;
if ( c != null && c.ControlOrder == OrderType.Guard )
{
list.Add( 501129 ); // guarded
break;
}
}
}
}
public override void OnSingleClick( Mobile from )

View file

@ -1506,9 +1506,13 @@ namespace Server.Multis
}
else if ( m_LockDowns.IndexOf( item ) != -1 )
{
m.SendLocalizedMessage( 1005526 );//That is already locked down
m.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1005526 ); //That is already locked down
return true;
}
}
else if ( item is HouseSign || item is Static )
{
m.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1005526 ); // This is already locked down.
}
else
{
m.SendLocalizedMessage( 1005377 );//You cannot lock that down
@ -1801,7 +1805,7 @@ namespace Server.Multis
}
else
{
m.SendLocalizedMessage( 501722 );//That isn't locked down...
m.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1010416 ); // This is not locked down or secured.
}
}
@ -3404,7 +3408,7 @@ namespace Server.Multis
{
if ( !from.Alive || m_House.Deleted || !m_House.IsCoOwner( from ) )
return;
if ( targeted is Item )
{
if ( m_Release )
@ -3418,15 +3422,24 @@ namespace Server.Multis
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1062392 ); // You must double click the contract in your pack to lock it down.
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501732 ); // I cannot lock this down!
}
else if ( (Item)targeted is AddonComponent )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3E9, 501727 ); // You cannot lock that down!
from.LocalOverheadMessage( MessageType.Regular, 0x3E9, 501732 ); // I cannot lock this down!
}
else
{
m_House.LockDown( from, (Item)targeted );
}
}
}
}
else if ( targeted is StaticTarget )
{
return;
}
else
{
from.SendLocalizedMessage( 1005377 );//You cannot lock that down
from.SendLocalizedMessage( 1005377 ); //You cannot lock that down
}
}
}

View file

@ -51,7 +51,7 @@ namespace Server.Multis
public override bool IsActive { get { return Customizer == null; } }
public virtual int CustomizationCost { get { return (Core.SE ? 0 : 10000); } }
public virtual int CustomizationCost { get { return (Core.AOS ? 0 : 10000); } }
public bool IsFixture( Item item )
{

View file

@ -86,7 +86,7 @@ namespace Server.Regions
if ( m is BaseCreature && ((BaseCreature)m).NoHouseRestrictions )
{
}
else if ( m is BaseCreature && ((BaseCreature)m).IsHouseSummonable && (BaseCreature.Summoning || m_House.IsInside( oldLocation, 16 )) )
else if ( m is BaseCreature && ((BaseCreature)m).IsHouseSummonable && !(BaseCreature.Summoning || m_House.IsInside( oldLocation, 16 )) )
{
}
else if ( (m_House.Public || !m_House.IsAosRules) && m_House.IsBanned( m ) && m_House.IsInside( m ) )
@ -138,8 +138,13 @@ namespace Server.Regions
if ( from is BaseCreature && ((BaseCreature)from).NoHouseRestrictions )
{
}
else if ( from is BaseCreature && ((BaseCreature)from).IsHouseSummonable && (BaseCreature.Summoning || m_House.IsInside( oldLocation, 16 )) )
else if ( from is BaseCreature && ((BaseCreature)from).IsHouseSummonable && !(BaseCreature.Summoning || m_House.IsInside( oldLocation, 16 )) )
{
return false;
}
else if ( from is BaseCreature && !((BaseCreature)from).Controlled && m_House.IsAosRules && !m_House.Public)
{
return false;
}
else if ( (m_House.Public || !m_House.IsAosRules) && m_House.IsBanned( from ) && m_House.IsInside( newLocation, 16 ) )
{

View file

@ -44,7 +44,7 @@ namespace Server.SkillHandlers
if ( familiar != null && !familiar.Deleted && familiar is DarkWolfFamiliar )
{
if ( creature is DireWolf || creature is GreyWolf || creature is TimberWolf || creature is WhiteWolf )
if ( creature is DireWolf || creature is GreyWolf || creature is TimberWolf || creature is WhiteWolf || creature is BakeKitsune )
return true;
}
@ -328,7 +328,7 @@ namespace Server.SkillHandlers
minSkill += 24.9;
if ( alreadyOwned || m_Tamer.CheckTargetSkill( SkillName.AnimalTaming, m_Creature, minSkill - 25.0, minSkill + 25.0 ) )
if ( CheckMastery( m_Tamer, m_Creature ) || alreadyOwned || m_Tamer.CheckTargetSkill( SkillName.AnimalTaming, m_Creature, minSkill - 25.0, minSkill + 25.0 ) )
{
if ( m_Creature.Owners.Count == 0 ) // First tame
{

View file

@ -96,10 +96,15 @@ namespace Server.Spells.Ninjitsu
{
AnimalFormContext context = GetContext( Caster );
if ( context != null )
int mana = ScaleMana( RequiredMana );
if ( mana > Caster.Mana )
{
Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
}
else if ( context != null )
{
if( ConsumeMana() )
RemoveContext( Caster, context, true );
Caster.Mana -= mana;
}
else if ( Caster is PlayerMobile )
{
@ -110,35 +115,24 @@ namespace Server.Spells.Ninjitsu
}
else
{
if ( ConsumeMana() && Morph( Caster, GetLastAnimalForm( Caster ) ) == MorphResult.Fail )
if ( Morph( Caster, GetLastAnimalForm( Caster ) ) == MorphResult.Fail )
DoFizzle();
else
Caster.Mana -= mana;
}
}
else
{
if ( ConsumeMana() && Morph( Caster, GetLastAnimalForm( Caster ) ) == MorphResult.Fail )
if ( Morph( Caster, GetLastAnimalForm( Caster ) ) == MorphResult.Fail )
DoFizzle();
else
Caster.Mana -= mana;
}
}
FinishSequence();
}
public bool ConsumeMana()
{
int mana = ScaleMana( RequiredMana );
if ( Caster.Mana < mana )
{
Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}
Caster.Mana -= mana;
return true;
}
private static Hashtable m_LastAnimalForms = new Hashtable();
public int GetLastAnimalForm( Mobile m )
@ -253,6 +247,8 @@ namespace Server.Spells.Ninjitsu
m.HueMod = -1;
m.BodyMod = 0;
}
m.FixedParticles( 0x3728, 10, 13, 2023, EffectLayer.Waist );
context.Timer.Stop();
}
@ -353,55 +349,87 @@ namespace Server.Spells.Ninjitsu
{
m_Caster = caster;
m_Spell = spell;
AddPage( 0 );
AddBackground( 0, 0, 408, 298, 0x13BE );
AddBackground( 4, 28, 400, 240, 0xBB8 );
AddHtmlLocalized( 4, 4, 400, 20, 1063394, 0x0, false, false ); // <center>Animal Form Selection Menu</center>
AddButton( 25, 272, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 60, 274, 150, 20, 1011036, 0x0, false, false ); // OKAY
AddButton( 285, 272, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 320, 274, 150, 20, 1011012, 0x0, false, false ); // CANCEL
AddBackground( 0, 0, 520, 404, 0x13BE );
AddImageTiled( 10, 10, 500, 20, 0xA40 );
AddImageTiled( 10, 40, 500, 324, 0xA40 );
AddImageTiled( 10, 374, 500, 20, 0xA40 );
AddAlphaRegion( 10, 10, 500, 384 );
AddHtmlLocalized( 14, 12, 500, 20, 1063394, 0x7FFF, false, false ); // <center>Polymorph Selection Menu</center>
AddButton( 10, 374, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 45, 376, 450, 20, 1011012, 0x7FFF, false, false ); // CANCEL
double ninjitsu = caster.Skills.Ninjitsu.Value;
int current = 0;
for ( int i = 0; i < entries.Length; ++i )
{
bool enabled = ( ninjitsu >= entries[i].ReqSkill );
int page = current / 10 + 1;
int pos = current % 10;
int x = 100 * ( i % 4 );
int y = 80 * ( i / 4 );
TextDefinition.AddHtmlText( this, 10 + x, 30 + y, 100, 18, entries[i].Name, false, false );
if ( enabled )
if ( pos == 0 )
{
AddRadio( 10 + x, 50 + y, 0xD2, 0xD3, false, 100 + i );
AddItem( 30 + x, 50 + y, entries[i].ItemID, entries[i].Hue );
}
else
AddItem( 10 + x, 50 + y, entries[i].ItemID, 0x3E3 );
if ( page > 1 )
{
AddButton( 400, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, page );
AddHtmlLocalized( 440, 376, 60, 20, 1043353, 0x7FFF, false, false ); // Next
}
AddTooltip( enabled ? entries[i].Tooltip : 1070708 );
AddPage( page );
if ( page > 1 )
{
AddButton( 300, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 1 );
AddHtmlLocalized( 340, 376, 60, 20, 1011393, 0x7FFF, false, false ); // Back
}
}
if( enabled )
{
int x = ( pos % 2 == 0 ) ? 14 : 264;
int y = ( pos / 2 ) * 64 + 44;
Rectangle2D b = ItemBounds.Table[ entries[ i ].ItemID ];
AddImageTiledButton( x, y, 0x918, 0x919, i + 1, GumpButtonType.Reply, 0, entries[i].ItemID, 0x0, 40 - b.Width / 2 - b.X, 30 - b.Height / 2 - b.Y, entries[i].Tooltip );
AddHtmlLocalized( x + 84, y, 250, 60, entries[i].Name, 0x7FFF, false, false );
current++;
}
}
}
public override void OnResponse( NetState sender, RelayInfo info )
{
if ( info.ButtonID == 1 && info.Switches.Length > 0 )
int entryID = info.ButtonID - 1;
if ( entryID < 0 || entryID >= m_Entries.Length )
return;
int mana = m_Spell.ScaleMana( m_Spell.RequiredMana );
if ( mana > m_Caster.Mana )
{
int entryID = info.Switches[0] - 100;
if ( m_Spell.ConsumeMana() && AnimalForm.Morph( m_Caster, entryID ) == MorphResult.Fail )
m_Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
}
else
{
if ( AnimalForm.Morph( m_Caster, entryID ) == MorphResult.Fail )
{
m_Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 502632 ); // The spell fizzles.
m_Caster.FixedParticles( 0x3735, 1, 30, 9503, EffectLayer.Waist );
m_Caster.PlaySound( 0x5C );
}
else
{
m_Caster.Mana -= mana;
}
}
}
}

View file

@ -21,7 +21,6 @@ namespace Server.Spells.Ninjitsu
public override bool BlocksMovement{ get{ return false; } }
//public override int CastDelayBase{ get{ return 1; } }
public override double CastDelayFastScalar { get { return 0; } }
public override int CastRecoveryBase{ get{ return 7; } }

View file

@ -46,10 +46,10 @@ namespace Server.Mobiles
SetStam( 250 );
SetMana( 0 );
SetDamage( 5, 7 );
SetDamage( 6, 8 );
SetDamageType( ResistanceType.Poison, 100 );
SetDamageType( ResistanceType.Physical, 0 );
SetResistance( ResistanceType.Physical, 90 );
SetSkill( SkillName.Wrestling, 90.0 );

View file

@ -1,6 +1,7 @@
using System;
using Server.Mobiles;
using Server.Targeting;
using Server.Multis;
namespace Server.Spells.Spellweaving
{
@ -64,7 +65,10 @@ namespace Server.Spells.Spellweaving
m_MobileTarg = (m != null);
BaseHouse house = BaseHouse.FindHouseAt( p, map, 0 );
if ( house != null)
if ( !house.IsFriend ( Caster ) )
return;
if( !SpellHelper.FindValidSpawnLocation( map, ref p, m_MobileTarg ) )
{
@ -85,6 +89,8 @@ namespace Server.Spells.Spellweaving
m = null;
NatureFury nf = new NatureFury( m );
if ( !Caster.InLOS ( p ) )
return;
BaseCreature.Summon( nf, false, Caster, p , 0x5CB, duration );
Timer t = null;
@ -110,6 +116,7 @@ namespace Server.Spells.Spellweaving
: base( 10, true, TargetFlags.None )
{
m_Owner = owner;
CheckLOS = true;
}
protected override void OnTarget( Mobile from, object o )