- Fixed the Palace of Paroxysmus region bounds.

- Fixed a typo in the Huntsman's Forest region name.
- Added the Bravehorn's drinking pool and Huntsman's Forest quest regions to Felucca.
- Fixed CheckObjectTypes not sending invalid condition replies, because the commands are not always flushed after checking this.
- When using an item condition with [online or [ipaddress, the command will now correctly say it does not support items.
- The [Go menu now handles comments in the XML location files correctly.
- Added the Increased Karma Loss attribute.
- Renamed DummyTheif to DummyThief.
This commit is contained in:
eos 2012-05-20 02:35:53 +00:00
parent 6da31d15da
commit 99b0ad9de5
19 changed files with 64 additions and 44 deletions

View file

@ -49,7 +49,12 @@
<go x="6222" y="335" z="60" /> <go x="6222" y="335" z="60" />
<entrance x="5574" y="3024" z="31" /> <entrance x="5574" y="3024" z="31" />
<music name="ParoxysmusLair" /> <music name="ParoxysmusLair" />
<zrange min="-50" /> </region>
<region priority="50" name="Bravehorn's drinking pool">
<rect x="1302" y="2331" width="38" height="22" />
</region>
<region priority="50" name="Huntsman's Forest">
<rect x="1595" y="550" width="120" height="120" />
</region> </region>
<!--End--> <!--End-->
<region type="TownRegion" priority="50" name="Cove"> <region type="TownRegion" priority="50" name="Cove">
@ -794,12 +799,11 @@
<go x="6222" y="335" z="60" /> <go x="6222" y="335" z="60" />
<entrance x="5574" y="3024" z="31" /> <entrance x="5574" y="3024" z="31" />
<music name="ParoxysmusLair" /> <music name="ParoxysmusLair" />
<zrange min="-50" />
</region> </region>
<region priority="50" name="Bravehorn's drinking pool"> <region priority="50" name="Bravehorn's drinking pool">
<rect x="1302" y="2331" width="38" height="22" /> <rect x="1302" y="2331" width="38" height="22" />
</region> </region>
<region priority="50" name="Huntsman's forrest"> <region priority="50" name="Huntsman's Forest">
<rect x="1595" y="550" width="120" height="120" /> <rect x="1595" y="550" width="120" height="120" />
</region> </region>
<!--End--> <!--End-->

View file

@ -44,7 +44,7 @@ namespace Server.Commands.Generic
bool items, mobiles; bool items, mobiles;
if ( !CheckObjectTypes( command, ext, out items, out mobiles ) ) if ( !CheckObjectTypes( from, command, ext, out items, out mobiles ) )
return; return;
IPooledEnumerable eable; IPooledEnumerable eable;

View file

@ -113,7 +113,7 @@ namespace Server.Commands.Generic
m_Commands[command.Commands[i]] = command; m_Commands[command.Commands[i]] = command;
} }
public bool CheckObjectTypes( BaseCommand command, Extensions ext, out bool items, out bool mobiles ) public bool CheckObjectTypes( Mobile from, BaseCommand command, Extensions ext, out bool items, out bool mobiles )
{ {
items = mobiles = false; items = mobiles = false;
@ -153,7 +153,7 @@ namespace Server.Commands.Generic
} }
else if ( condIsMobile ) else if ( condIsMobile )
{ {
command.LogFailure( "You may not use a mobile type condition for this command." ); from.SendMessage( "You may not use a mobile type condition for this command." );
return false; return false;
} }
@ -167,7 +167,7 @@ namespace Server.Commands.Generic
} }
else if ( condIsItem ) else if ( condIsItem )
{ {
command.LogFailure( "You may not use an item type condition for this command." ); from.SendMessage( "You may not use an item type condition for this command." );
return false; return false;
} }

View file

@ -50,7 +50,7 @@ namespace Server.Commands.Generic
bool items, mobiles; bool items, mobiles;
if ( !CheckObjectTypes( command, ext, out items, out mobiles ) ) if ( !CheckObjectTypes( from, command, ext, out items, out mobiles ) )
return; return;
if ( !items ) if ( !items )

View file

@ -24,7 +24,7 @@ namespace Server.Commands.Generic
bool items, mobiles; bool items, mobiles;
if ( !CheckObjectTypes( command, ext, out items, out mobiles ) ) if ( !CheckObjectTypes( from, command, ext, out items, out mobiles ) )
return; return;
ArrayList list = new ArrayList(); ArrayList list = new ArrayList();

View file

@ -25,12 +25,12 @@ namespace Server.Commands.Generic
bool items, mobiles; bool items, mobiles;
if ( !CheckObjectTypes( command, ext, out items, out mobiles ) ) if ( !CheckObjectTypes( from, command, ext, out items, out mobiles ) )
return; return;
if ( !mobiles ) // sanity check if ( !mobiles ) // sanity check
{ {
command.LogFailure( "This command does not support mobiles." ); command.LogFailure( "This command does not support items." );
return; return;
} }

View file

@ -26,12 +26,12 @@ namespace Server.Commands.Generic
bool items, mobiles; bool items, mobiles;
if ( !CheckObjectTypes( command, ext, out items, out mobiles ) ) if ( !CheckObjectTypes( from, command, ext, out items, out mobiles ) )
return; return;
if ( !mobiles ) // sanity check if ( !mobiles ) // sanity check
{ {
command.LogFailure( "This command does not support mobiles." ); command.LogFailure( "This command does not support items." );
return; return;
} }

View file

@ -24,7 +24,7 @@ namespace Server.Commands.Generic
bool items, mobiles; bool items, mobiles;
if ( !CheckObjectTypes( command, ext, out items, out mobiles ) ) if ( !CheckObjectTypes( from, command, ext, out items, out mobiles ) )
return; return;
Region reg = from.Region; Region reg = from.Region;

View file

@ -34,8 +34,11 @@ namespace Server.Gumps
{ {
ArrayList children = new ArrayList(); ArrayList children = new ArrayList();
while ( xml.Read() && xml.NodeType == XmlNodeType.Element ) while ( xml.Read() && ( xml.NodeType == XmlNodeType.Element || xml.NodeType == XmlNodeType.Comment ) )
{ {
if ( xml.NodeType == XmlNodeType.Comment )
continue;
if ( xml.Name == "child" ) if ( xml.Name == "child" )
{ {
ChildNode n = new ChildNode( xml, this ); ChildNode n = new ChildNode( xml, this );

View file

@ -1531,6 +1531,9 @@ namespace Server.Items
if ( (prop = m_AosAttributes.WeaponSpeed) != 0 ) if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~% list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
if ( Core.ML && (prop = m_AosAttributes.IncreasedKarmaLoss) != 0 )
list.Add( 1075210, prop.ToString() ); // Increased Karma Loss ~1val~%
base.AddResistanceProperties( list ); base.AddResistanceProperties( list );
if ( (prop = GetDurabilityBonus()) > 0 ) if ( (prop = GetDurabilityBonus()) > 0 )

View file

@ -657,6 +657,9 @@ namespace Server.Items
if ( (prop = m_AosAttributes.WeaponSpeed) != 0 ) if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~% list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
if ( Core.ML && (prop = m_AosAttributes.IncreasedKarmaLoss) != 0 )
list.Add( 1075210, prop.ToString() ); // Increased Karma Loss ~1val~%
base.AddResistanceProperties( list ); base.AddResistanceProperties( list );
if ( (prop = m_AosClothingAttributes.DurabilityBonus) > 0 ) if ( (prop = m_AosClothingAttributes.DurabilityBonus) > 0 )

View file

@ -273,6 +273,9 @@ namespace Server.Items
if ( (prop = m_AosAttributes.WeaponSpeed) != 0 ) if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~% list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
if ( Core.ML && (prop = m_AosAttributes.IncreasedKarmaLoss) != 0 )
list.Add( 1075210, prop.ToString() ); // Increased Karma Loss ~1val~%
base.AddResistanceProperties( list ); base.AddResistanceProperties( list );
if ( m_HitPoints >= 0 && m_MaxHitPoints > 0 ) if ( m_HitPoints >= 0 && m_MaxHitPoints > 0 )

View file

@ -672,6 +672,9 @@ namespace Server.Items
if ( (prop = m_AosAttributes.WeaponSpeed) != 0 ) if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~% list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
if ( Core.ML && (prop = m_AosAttributes.IncreasedKarmaLoss) != 0 )
list.Add( 1075210, prop.ToString() ); // Increased Karma Loss ~1val~%
list.Add( 1042886, m_Count.ToString() ); // ~1_NUMBERS_OF_SPELLS~ Spells list.Add( 1042886, m_Count.ToString() ); // ~1_NUMBERS_OF_SPELLS~ Spells
} }

View file

@ -7,14 +7,14 @@ namespace Server.Items
public override int LabelNumber { get { return 1078148; } } // Ossian Grimoire public override int LabelNumber { get { return 1078148; } } // Ossian Grimoire
[Constructable] [Constructable]
public OssianGrimoire() : base() public OssianGrimoire()
{ {
LootType = LootType.Blessed; LootType = LootType.Blessed;
SkillBonuses.SetValues( 0, SkillName.Necromancy, 10.0 ); SkillBonuses.SetValues( 0, SkillName.Necromancy, 10.0 );
Attributes.RegenMana = 1; Attributes.RegenMana = 1;
Attributes.CastSpeed = 1; Attributes.CastSpeed = 1;
//Attributes.IncreasedKarmaLoss = 5; Attributes.IncreasedKarmaLoss = 5;
} }
public OssianGrimoire( Serial serial ) : base( serial ) public OssianGrimoire( Serial serial ) : base( serial )
@ -25,7 +25,7 @@ namespace Server.Items
{ {
base.Serialize( writer ); base.Serialize( writer );
writer.WriteEncodedInt( 0 ); //version writer.WriteEncodedInt( 1 ); //version
} }
public override void Deserialize( GenericReader reader ) public override void Deserialize( GenericReader reader )
@ -33,6 +33,9 @@ namespace Server.Items
base.Deserialize( reader ); base.Deserialize( reader );
int version = reader.ReadEncodedInt(); int version = reader.ReadEncodedInt();
if ( version == 0 )
Attributes.IncreasedKarmaLoss = 5;
} }
} }
} }

View file

@ -42,20 +42,12 @@ namespace Server.Items
public override int LabelNumber { get { return 1071023; } } // Talisman public override int LabelNumber { get { return 1071023; } } // Talisman
public virtual bool ForceShowName { get { return false; } } // used to override default summoner/removal name public virtual bool ForceShowName { get { return false; } } // used to override default summoner/removal name
private int m_KarmaLoss;
private int m_MaxCharges; private int m_MaxCharges;
private int m_Charges; private int m_Charges;
private int m_MaxChargeTime; private int m_MaxChargeTime;
private int m_ChargeTime; private int m_ChargeTime;
private bool m_Blessed; private bool m_Blessed;
[CommandProperty(AccessLevel.GameMaster)]
public int KarmaLoss
{
get { return m_KarmaLoss; }
set { m_KarmaLoss = value; InvalidateProperties(); }
}
[CommandProperty(AccessLevel.GameMaster)] [CommandProperty(AccessLevel.GameMaster)]
public int MaxCharges public int MaxCharges
{ {
@ -497,8 +489,8 @@ namespace Server.Items
if ((prop = m_AosAttributes.WeaponSpeed) != 0) if ((prop = m_AosAttributes.WeaponSpeed) != 0)
list.Add(1060486, prop.ToString()); // swing speed increase ~1_val~% list.Add(1060486, prop.ToString()); // swing speed increase ~1_val~%
if (m_KarmaLoss != 0) if (Core.ML && (prop = m_AosAttributes.IncreasedKarmaLoss) != 0)
list.Add(1075210, m_KarmaLoss.ToString()); // Increased Karma Loss ~1val~% list.Add(1075210, prop.ToString()); // Increased Karma Loss ~1val~%
if (m_MaxCharges > 0) if (m_MaxCharges > 0)
list.Add(1060741, m_Charges.ToString()); // charges: ~1_val~ list.Add(1060741, m_Charges.ToString()); // charges: ~1_val~
@ -529,7 +521,7 @@ namespace Server.Items
Killer = 0x00000010, Killer = 0x00000010,
Summoner = 0x00000020, Summoner = 0x00000020,
Removal = 0x00000040, Removal = 0x00000040,
KarmaLoss = 0x00000080, OldKarmaLoss = 0x00000080,
Skill = 0x00000100, Skill = 0x00000100,
SuccessBonus = 0x00000200, SuccessBonus = 0x00000200,
ExceptionalBonus = 0x00000400, ExceptionalBonus = 0x00000400,
@ -555,7 +547,6 @@ namespace Server.Items
SetSaveFlag(ref flags, SaveFlag.Killer, m_Killer != null && !m_Killer.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Killer, m_Killer != null && !m_Killer.IsEmpty);
SetSaveFlag(ref flags, SaveFlag.Summoner, m_Summoner != null && !m_Summoner.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Summoner, m_Summoner != null && !m_Summoner.IsEmpty);
SetSaveFlag(ref flags, SaveFlag.Removal, m_Removal != TalismanRemoval.None); SetSaveFlag(ref flags, SaveFlag.Removal, m_Removal != TalismanRemoval.None);
SetSaveFlag(ref flags, SaveFlag.KarmaLoss, m_KarmaLoss != 0);
SetSaveFlag(ref flags, SaveFlag.Skill, (int)m_Skill != 0); SetSaveFlag(ref flags, SaveFlag.Skill, (int)m_Skill != 0);
SetSaveFlag(ref flags, SaveFlag.SuccessBonus, m_SuccessBonus != 0); SetSaveFlag(ref flags, SaveFlag.SuccessBonus, m_SuccessBonus != 0);
SetSaveFlag(ref flags, SaveFlag.ExceptionalBonus, m_ExceptionalBonus != 0); SetSaveFlag(ref flags, SaveFlag.ExceptionalBonus, m_ExceptionalBonus != 0);
@ -586,9 +577,6 @@ namespace Server.Items
if (GetSaveFlag(flags, SaveFlag.Removal)) if (GetSaveFlag(flags, SaveFlag.Removal))
writer.WriteEncodedInt((int)m_Removal); writer.WriteEncodedInt((int)m_Removal);
if (GetSaveFlag(flags, SaveFlag.KarmaLoss))
writer.WriteEncodedInt(m_KarmaLoss);
if (GetSaveFlag(flags, SaveFlag.Skill)) if (GetSaveFlag(flags, SaveFlag.Skill))
writer.WriteEncodedInt((int)m_Skill); writer.WriteEncodedInt((int)m_Skill);
@ -658,8 +646,8 @@ namespace Server.Items
if (GetSaveFlag(flags, SaveFlag.Removal)) if (GetSaveFlag(flags, SaveFlag.Removal))
m_Removal = (TalismanRemoval)reader.ReadEncodedInt(); m_Removal = (TalismanRemoval)reader.ReadEncodedInt();
if (GetSaveFlag(flags, SaveFlag.KarmaLoss)) if (GetSaveFlag(flags, SaveFlag.OldKarmaLoss))
m_KarmaLoss = reader.ReadEncodedInt(); m_AosAttributes.IncreasedKarmaLoss = reader.ReadEncodedInt();
if (GetSaveFlag(flags, SaveFlag.Skill)) if (GetSaveFlag(flags, SaveFlag.Skill))
m_Skill = (SkillName)reader.ReadEncodedInt(); m_Skill = (SkillName)reader.ReadEncodedInt();

View file

@ -3306,6 +3306,9 @@ namespace Server.Items
if ( (prop = m_AosAttributes.WeaponSpeed) != 0 ) if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~% list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
if ( Core.ML && (prop = m_AosAttributes.IncreasedKarmaLoss) != 0 )
list.Add( 1075210, prop.ToString() ); // Increased Karma Loss ~1val~%
int phys, fire, cold, pois, nrgy, chaos, direct; int phys, fire, cold, pois, nrgy, chaos, direct;
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct ); GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );

View file

@ -232,7 +232,8 @@ namespace Server
EnhancePotions=0x00080000, EnhancePotions=0x00080000,
Luck=0x00100000, Luck=0x00100000,
SpellChanneling=0x00200000, SpellChanneling=0x00200000,
NightSight=0x00400000 NightSight=0x00400000,
IncreasedKarmaLoss=0x00800000
} }
public sealed class AosAttributes : BaseAttributes public sealed class AosAttributes : BaseAttributes
@ -437,6 +438,9 @@ namespace Server
[CommandProperty( AccessLevel.GameMaster )] [CommandProperty( AccessLevel.GameMaster )]
public int NightSight { get { return this[AosAttribute.NightSight]; } set { this[AosAttribute.NightSight] = value; } } public int NightSight { get { return this[AosAttribute.NightSight]; } set { this[AosAttribute.NightSight] = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public int IncreasedKarmaLoss { get { return this[AosAttribute.IncreasedKarmaLoss]; } set { this[AosAttribute.IncreasedKarmaLoss] = value; } }
} }
[Flags] [Flags]

View file

@ -719,13 +719,13 @@ namespace Server.Mobiles
} }
} }
public class DummyTheif : Dummy [TypeAlias( "Server.Mobiles.DummyTheif" )]
public class DummyThief : Dummy
{ {
[Constructable] [Constructable]
public DummyTheif() : base(AIType.AI_Thief, FightMode.Closest, 15, 1, 0.2, 0.6) public DummyThief() : base(AIType.AI_Thief, FightMode.Closest, 15, 1, 0.2, 0.6)
{ {
// A Dummy Hybrid Theif // A Dummy Hybrid Thief
int iHue = 20 + Team * 40; int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40; int jHue = 25 + Team * 40;
@ -739,7 +739,7 @@ namespace Server.Mobiles
this.Skills[SkillName.Wrestling].Base = 120; this.Skills[SkillName.Wrestling].Base = 120;
// Name // Name
this.Name = "Hybrid Theif"; this.Name = "Hybrid Thief";
// Equip // Equip
Spellbook book = new Spellbook(); Spellbook book = new Spellbook();
@ -793,7 +793,7 @@ namespace Server.Mobiles
AddToBackpack( band ); AddToBackpack( band );
} }
public DummyTheif( Serial serial ) : base( serial ) public DummyThief( Serial serial ) : base( serial )
{ {
} }

View file

@ -25,10 +25,13 @@ namespace Server.Spells.Necromancy
public override int ComputeKarmaAward() public override int ComputeKarmaAward()
{ {
//TODO: Verify this formula being that Necro spells don't HAVE a circle. //TODO: Verify this formula being that Necro spells don't HAVE a circle.
//int karma = -(70 + (10 * (int)Circle));
int karma = -(40 + (int)(10 * (CastDelayBase.TotalSeconds / CastDelaySecondsPerTick)));
//return -(70 + (10 * (int)Circle)); if ( Core.ML ) // Pub 36: "Added a new property called Increased Karma Loss which grants higher karma loss for casting necromancy spells."
karma += AOS.Scale( karma, AosAttributes.GetValue( Caster, AosAttribute.IncreasedKarmaLoss ) );
return -(40 + (int)(10 * (CastDelayBase.TotalSeconds / CastDelaySecondsPerTick))); return karma;
} }
public override void GetCastSkills( out double min, out double max ) public override void GetCastSkills( out double min, out double max )