Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -3,111 +3,113 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Savage : BaseCreature
|
||||
{
|
||||
public override string CorpseName => "a savage corpse";
|
||||
[Constructible]
|
||||
public Savage() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = NameList.RandomName( "savage" );
|
||||
public class Savage : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Savage() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Name = NameList.RandomName("savage");
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
Body = 184;
|
||||
else
|
||||
Body = 183;
|
||||
if (Female = Utility.RandomBool())
|
||||
Body = 184;
|
||||
else
|
||||
Body = 183;
|
||||
|
||||
SetStr( 96, 115 );
|
||||
SetDex( 86, 105 );
|
||||
SetInt( 51, 65 );
|
||||
SetStr(96, 115);
|
||||
SetDex(86, 105);
|
||||
SetInt(51, 65);
|
||||
|
||||
SetDamage( 23, 27 );
|
||||
SetDamage(23, 27);
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetSkill( SkillName.Fencing, 60.0, 82.5 );
|
||||
SetSkill( SkillName.Macing, 60.0, 82.5 );
|
||||
SetSkill( SkillName.Poisoning, 60.0, 82.5 );
|
||||
SetSkill( SkillName.MagicResist, 57.5, 80.0 );
|
||||
SetSkill( SkillName.Swords, 60.0, 82.5 );
|
||||
SetSkill( SkillName.Tactics, 60.0, 82.5 );
|
||||
SetSkill(SkillName.Fencing, 60.0, 82.5);
|
||||
SetSkill(SkillName.Macing, 60.0, 82.5);
|
||||
SetSkill(SkillName.Poisoning, 60.0, 82.5);
|
||||
SetSkill(SkillName.MagicResist, 57.5, 80.0);
|
||||
SetSkill(SkillName.Swords, 60.0, 82.5);
|
||||
SetSkill(SkillName.Tactics, 60.0, 82.5);
|
||||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
||||
PackItem( new Bandage( Utility.RandomMinMax( 1, 15 ) ) );
|
||||
PackItem(new Bandage(Utility.RandomMinMax(1, 15)));
|
||||
|
||||
if ( Female && 0.1 > Utility.RandomDouble() )
|
||||
PackItem( new TribalBerry() );
|
||||
else if ( !Female && 0.1 > Utility.RandomDouble() )
|
||||
PackItem( new BolaBall() );
|
||||
if (Female && 0.1 > Utility.RandomDouble())
|
||||
PackItem(new TribalBerry());
|
||||
else if (!Female && 0.1 > Utility.RandomDouble())
|
||||
PackItem(new BolaBall());
|
||||
|
||||
AddItem( new Spear() );
|
||||
AddItem( new BoneArms() );
|
||||
AddItem( new BoneLegs() );
|
||||
AddItem(new Spear());
|
||||
AddItem(new BoneArms());
|
||||
AddItem(new BoneLegs());
|
||||
|
||||
if ( 0.5 > Utility.RandomDouble() )
|
||||
AddItem( new SavageMask() );
|
||||
else if ( 0.1 > Utility.RandomDouble() )
|
||||
AddItem( new OrcishKinMask() );
|
||||
}
|
||||
if (0.5 > Utility.RandomDouble())
|
||||
AddItem(new SavageMask());
|
||||
else if (0.1 > Utility.RandomDouble())
|
||||
AddItem(new OrcishKinMask());
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
public Savage(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int Meat => 1;
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool ShowFameTitle => false;
|
||||
public override string CorpseName => "a savage corpse";
|
||||
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs;
|
||||
public override int Meat => 1;
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool ShowFameTitle => false;
|
||||
|
||||
public override bool IsEnemy( Mobile m )
|
||||
{
|
||||
if ( m.BodyMod == 183 || m.BodyMod == 184 )
|
||||
return false;
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.SavagesAndOrcs;
|
||||
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Meager);
|
||||
}
|
||||
|
||||
public override void AggressiveAction( Mobile aggressor, bool criminal )
|
||||
{
|
||||
base.AggressiveAction( aggressor, criminal );
|
||||
public override bool IsEnemy(Mobile m)
|
||||
{
|
||||
if (m.BodyMod == 183 || m.BodyMod == 184)
|
||||
return false;
|
||||
|
||||
if ( aggressor.BodyMod == 183 || aggressor.BodyMod == 184 )
|
||||
{
|
||||
AOS.Damage( aggressor, 50, 0, 100, 0, 0, 0 );
|
||||
aggressor.BodyMod = 0;
|
||||
aggressor.HueMod = -1;
|
||||
aggressor.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Head );
|
||||
aggressor.PlaySound( 0x307 );
|
||||
aggressor.SendLocalizedMessage( 1040008 ); // Your skin is scorched as the tribal paint burns away!
|
||||
return base.IsEnemy(m);
|
||||
}
|
||||
|
||||
if ( aggressor is PlayerMobile mobile )
|
||||
mobile.SavagePaintExpiration = TimeSpan.Zero;
|
||||
}
|
||||
}
|
||||
public override void AggressiveAction(Mobile aggressor, bool criminal)
|
||||
{
|
||||
base.AggressiveAction(aggressor, criminal);
|
||||
|
||||
public override void AlterMeleeDamageTo( Mobile to, ref int damage )
|
||||
{
|
||||
if ( to is Dragon || to is WhiteWyrm || to is SwampDragon || to is Drake || to is Nightmare || to is Hiryu || to is LesserHiryu || to is Daemon )
|
||||
damage *= 3;
|
||||
}
|
||||
if (aggressor.BodyMod == 183 || aggressor.BodyMod == 184)
|
||||
{
|
||||
AOS.Damage(aggressor, 50, 0, 100, 0, 0, 0);
|
||||
aggressor.BodyMod = 0;
|
||||
aggressor.HueMod = -1;
|
||||
aggressor.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
|
||||
aggressor.PlaySound(0x307);
|
||||
aggressor.SendLocalizedMessage(1040008); // Your skin is scorched as the tribal paint burns away!
|
||||
|
||||
public Savage( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (aggressor is PlayerMobile mobile)
|
||||
mobile.SavagePaintExpiration = TimeSpan.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
public override void AlterMeleeDamageTo(Mobile to, ref int damage)
|
||||
{
|
||||
if (to is Dragon || to is WhiteWyrm || to is SwampDragon || to is Drake || to is Nightmare || to is Hiryu ||
|
||||
to is LesserHiryu || to is Daemon)
|
||||
damage *= 3;
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue