fix: Fixes inaccessible items. (#1435)

### Summary
- [X] Fighters and Paladins did not have the correct strength to equip certain items in AOS+
- [X] Removed Chaos/Order shields from Fighters
- [X] Moved all item equips so they are done after stats are assigned.
This commit is contained in:
Kamron Batman 2023-07-28 19:29:06 -07:00 • committed by GitHub
parent 6547239fa6
commit b8df42721f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 225 additions and 301 deletions

View file

@ -12,6 +12,28 @@ public partial class HireBard : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
Title = "the bard";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(16, 16);
SetDex(26, 26);
SetInt(26, 26);
SetDamage(5, 10);
SetSkill(SkillName.Tactics, 35, 57);
SetSkill(SkillName.Magery, 22, 22);
SetSkill(SkillName.Swords, 45, 67);
SetSkill(SkillName.Archery, 36, 67);
SetSkill(SkillName.Parry, 45, 60);
SetSkill(SkillName.Musicianship, 66.0, 97.5);
SetSkill(SkillName.Peacemaking, 65.0, 87.5);
Fame = 100;
Karma = 100;
if (Female = Utility.RandomBool()) if (Female = Utility.RandomBool())
{ {
Body = 0x191; Body = 0x191;
@ -38,28 +60,6 @@ public partial class HireBard : BaseHire
EquipItem(new ShortPants(Utility.RandomNeutralHue())); EquipItem(new ShortPants(Utility.RandomNeutralHue()));
} }
Title = "the bard";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(16, 16);
SetDex(26, 26);
SetInt(26, 26);
SetDamage(5, 10);
SetSkill(SkillName.Tactics, 35, 57);
SetSkill(SkillName.Magery, 22, 22);
SetSkill(SkillName.Swords, 45, 67);
SetSkill(SkillName.Archery, 36, 67);
SetSkill(SkillName.Parry, 45, 60);
SetSkill(SkillName.Musicianship, 66.0, 97.5);
SetSkill(SkillName.Peacemaking, 65.0, 87.5);
Fame = 100;
Karma = 100;
EquipItem(new Shoes(Utility.RandomNeutralHue())); EquipItem(new Shoes(Utility.RandomNeutralHue()));
switch (Utility.Random(2)) switch (Utility.Random(2))

View file

@ -12,6 +12,28 @@ public partial class HireBardArcher : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
Title = "the bard";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(16, 16);
SetDex(26, 26);
SetInt(26, 26);
SetDamage(5, 10);
SetSkill(SkillName.Tactics, 35, 57);
SetSkill(SkillName.Magery, 22, 22);
SetSkill(SkillName.Swords, 45, 67);
SetSkill(SkillName.Archery, 36, 67);
SetSkill(SkillName.Parry, 45, 60);
SetSkill(SkillName.Musicianship, 66.0, 97.5);
SetSkill(SkillName.Peacemaking, 65.0, 87.5);
Fame = 100;
Karma = 100;
if (Female = Utility.RandomBool()) if (Female = Utility.RandomBool())
{ {
Body = 0x191; Body = 0x191;
@ -38,28 +60,6 @@ public partial class HireBardArcher : BaseHire
EquipItem(new ShortPants(Utility.RandomNeutralHue())); EquipItem(new ShortPants(Utility.RandomNeutralHue()));
} }
Title = "the bard";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(16, 16);
SetDex(26, 26);
SetInt(26, 26);
SetDamage(5, 10);
SetSkill(SkillName.Tactics, 35, 57);
SetSkill(SkillName.Magery, 22, 22);
SetSkill(SkillName.Swords, 45, 67);
SetSkill(SkillName.Archery, 36, 67);
SetSkill(SkillName.Parry, 45, 60);
SetSkill(SkillName.Musicianship, 66.0, 97.5);
SetSkill(SkillName.Peacemaking, 65.0, 87.5);
Fame = 100;
Karma = 100;
EquipItem(new Shoes(Utility.RandomNeutralHue())); EquipItem(new Shoes(Utility.RandomNeutralHue()));
switch (Utility.Random(2)) switch (Utility.Random(2))

View file

@ -12,6 +12,25 @@ public partial class HireBeggar : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
Title = "the beggar";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(26, 26);
SetDex(21, 21);
SetInt(36, 36);
SetDamage(1, 1);
SetSkill(SkillName.Begging, 66, 97);
SetSkill(SkillName.Tactics, 5, 27);
SetSkill(SkillName.Wrestling, 5, 27);
SetSkill(SkillName.Magery, 2, 2);
Fame = 0;
Karma = 0;
if (Female = Utility.RandomBool()) if (Female = Utility.RandomBool())
{ {
Body = 0x191; Body = 0x191;
@ -38,25 +57,6 @@ public partial class HireBeggar : BaseHire
EquipItem(new ShortPants(Utility.RandomNeutralHue())); EquipItem(new ShortPants(Utility.RandomNeutralHue()));
} }
Title = "the beggar";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(26, 26);
SetDex(21, 21);
SetInt(36, 36);
SetDamage(1, 1);
SetSkill(SkillName.Begging, 66, 97);
SetSkill(SkillName.Tactics, 5, 27);
SetSkill(SkillName.Wrestling, 5, 27);
SetSkill(SkillName.Magery, 2, 2);
Fame = 0;
Karma = 0;
EquipItem(new Sandals(Utility.RandomNeutralHue())); EquipItem(new Sandals(Utility.RandomNeutralHue()));
switch (Utility.Random(2)) switch (Utility.Random(2))

View file

@ -12,17 +12,6 @@ public partial class HireFighter : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
}
Title = "the fighter"; Title = "the fighter";
HairItemID = Race.RandomHair(Female); HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue(); HairHue = Race.RandomHairHue();
@ -45,6 +34,17 @@ public partial class HireFighter : BaseHire
Fame = 100; Fame = 100;
Karma = 100; Karma = 100;
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
}
switch (Utility.Random(2)) switch (Utility.Random(2))
{ {
case 0: case 0:
@ -62,110 +62,44 @@ public partial class HireFighter : BaseHire
EquipItem(new Shirt()); EquipItem(new Shirt());
// Pick a random sword // Pick a random sword
switch (Utility.Random(5)) BaseWeapon weapon = Utility.Random(5) switch
{ {
case 0: 1 => new Broadsword(),
{ 2 => new VikingSword(),
EquipItem(new Longsword()); 3 => new BattleAxe(),
break; 4 => new TwoHandedAxe(),
} _ => new Longsword()
case 1: };
{
EquipItem(new Broadsword()); EquipItem(weapon);
break;
}
case 2:
{
EquipItem(new VikingSword());
break;
}
case 3:
{
EquipItem(new BattleAxe());
break;
}
case 4:
{
EquipItem(new TwoHandedAxe());
break;
}
}
// Pick a random shield // Pick a random shield
if (FindItemOnLayer(Layer.TwoHanded) == null) if (FindItemOnLayer(Layer.TwoHanded) == null)
{ {
switch (Utility.Random(8)) BaseShield shield = Utility.Random(6) switch
{ {
case 0: 1 => new HeaterShield(),
{ 2 => new MetalKiteShield(),
EquipItem(new BronzeShield()); 3 => new MetalShield(),
break; 4 => new WoodenKiteShield(),
} 5 => new WoodenShield(),
case 1: _ => new BronzeShield()
{ };
EquipItem(new HeaterShield());
break; EquipItem(shield);
}
case 2:
{
EquipItem(new MetalKiteShield());
break;
}
case 3:
{
EquipItem(new MetalShield());
break;
}
case 4:
{
EquipItem(new WoodenKiteShield());
break;
}
case 5:
{
EquipItem(new WoodenShield());
break;
}
case 6:
{
EquipItem(new OrderShield());
break;
}
case 7:
{
EquipItem(new ChaosShield());
break;
}
}
} }
switch (Utility.Random(5)) BaseArmor helm = Utility.Random(5) switch
{ {
case 0: 1 => new Bascinet(),
{ 2 => new CloseHelm(),
break; 3 => new NorseHelm(),
} 4 => new Helmet(),
case 1: _ => null
{ };
EquipItem(new Bascinet());
break; EquipItem(helm);
}
case 2:
{
EquipItem(new CloseHelm());
break;
}
case 3:
{
EquipItem(new NorseHelm());
break;
}
case 4:
{
EquipItem(new Helmet());
break;
}
}
// Pick some armour // Pick some armour
switch (Utility.Random(4)) switch (Utility.Random(4))
{ {

View file

@ -12,17 +12,6 @@ public partial class HireMage : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
Title = "the mage"; Title = "the mage";
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
HairItemID = Race.RandomHair(Female); HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue(); HairHue = Race.RandomHairHue();
@ -44,6 +33,18 @@ public partial class HireMage : BaseHire
Fame = 100; Fame = 100;
Karma = 100; Karma = 100;
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
EquipItem(new Shirt()); EquipItem(new Shirt());
EquipItem(new Robe(Utility.RandomNeutralHue())); EquipItem(new Robe(Utility.RandomNeutralHue()));

View file

@ -12,51 +12,12 @@ public partial class HirePaladin : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
}
Title = "the paladin"; Title = "the paladin";
HairItemID = Race.RandomHair(Female); HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue(); HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this); Race.RandomFacialHair(this);
switch (Utility.Random(5)) SetStr(Core.AOS ? 100 : 86, 100);
{
case 0:
{
break;
}
case 1:
{
EquipItem(new Bascinet());
break;
}
case 2:
{
EquipItem(new CloseHelm());
break;
}
case 3:
{
EquipItem(new NorseHelm());
break;
}
case 4:
{
EquipItem(new Helmet());
break;
}
}
SetStr(86, 100);
SetDex(81, 95); SetDex(81, 95);
SetInt(61, 75); SetInt(61, 75);
@ -74,6 +35,28 @@ public partial class HirePaladin : BaseHire
Fame = 100; Fame = 100;
Karma = 250; Karma = 250;
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
}
BaseArmor helm = Utility.Random(5) switch
{
1 => new Bascinet(),
2 => new CloseHelm(),
3 => new NorseHelm(),
4 => new Helmet(),
_ => null
};
EquipItem(helm);
EquipItem(new Shoes(Utility.RandomNeutralHue())); EquipItem(new Shoes(Utility.RandomNeutralHue()));
EquipItem(new Shirt()); EquipItem(new Shirt());
EquipItem(new VikingSword()); EquipItem(new VikingSword());

View file

@ -12,6 +12,24 @@ public partial class HirePeasant : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
Title = "the peasant";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(26, 26);
SetDex(21, 21);
SetInt(16, 16);
SetDamage(10, 23);
SetSkill(SkillName.Tactics, 5, 27);
SetSkill(SkillName.Wrestling, 5, 5);
SetSkill(SkillName.Swords, 5, 27);
Fame = 0;
Karma = 0;
if (Female = Utility.RandomBool()) if (Female = Utility.RandomBool())
{ {
Body = 0x191; Body = 0x191;
@ -37,27 +55,11 @@ public partial class HirePeasant : BaseHire
Name = NameList.RandomName("male"); Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue())); EquipItem(new ShortPants(Utility.RandomNeutralHue()));
} }
Title = "the peasant";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
EquipItem(new Katana()); EquipItem(new Katana());
SetStr(26, 26);
SetDex(21, 21);
SetInt(16, 16);
SetDamage(10, 23);
SetSkill(SkillName.Tactics, 5, 27);
SetSkill(SkillName.Wrestling, 5, 5);
SetSkill(SkillName.Swords, 5, 27);
Fame = 0;
Karma = 0;
EquipItem(new Sandals(Utility.RandomNeutralHue())); EquipItem(new Sandals(Utility.RandomNeutralHue()));
switch (Utility.Random(2)) switch (Utility.Random(2))
{ {
case 0: case 0:

View file

@ -12,18 +12,6 @@ public partial class HireRanger : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
Title = "the ranger"; Title = "the ranger";
HairItemID = Race.RandomHair(Female); HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue(); HairHue = Race.RandomHairHue();
@ -46,6 +34,18 @@ public partial class HireRanger : BaseHire
Fame = 100; Fame = 100;
Karma = 125; Karma = 125;
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
EquipItem(new Shoes(Utility.RandomNeutralHue())); EquipItem(new Shoes(Utility.RandomNeutralHue()));
EquipItem(new Shirt()); EquipItem(new Shirt());

View file

@ -12,17 +12,6 @@ public partial class HireRangerArcher : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
}
Title = "the ranger"; Title = "the ranger";
HairItemID = Race.RandomHair(Female); HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue(); HairHue = Race.RandomHairHue();
@ -45,6 +34,17 @@ public partial class HireRangerArcher : BaseHire
Fame = 100; Fame = 100;
Karma = 125; Karma = 125;
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
}
EquipItem(new Shoes(Utility.RandomNeutralHue())); EquipItem(new Shoes(Utility.RandomNeutralHue()));
EquipItem(new Shirt()); EquipItem(new Shirt());

View file

@ -12,18 +12,6 @@ public partial class HireSailor : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
Title = "the sailor"; Title = "the sailor";
HairItemID = Race.RandomHair(Female); HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue(); HairHue = Race.RandomHairHue();
@ -45,9 +33,23 @@ public partial class HireSailor : BaseHire
SetSkill(SkillName.Lockpicking, 65, 87); SetSkill(SkillName.Lockpicking, 65, 87);
SetSkill(SkillName.Hiding, 65, 87); SetSkill(SkillName.Hiding, 65, 87);
SetSkill(SkillName.Snooping, 65, 87); SetSkill(SkillName.Snooping, 65, 87);
Fame = 100; Fame = 100;
Karma = 0; Karma = 0;
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue()));
}
EquipItem(new Shoes(Utility.RandomNeutralHue())); EquipItem(new Shoes(Utility.RandomNeutralHue()));
EquipItem(new Cutlass()); EquipItem(new Cutlass());

View file

@ -12,6 +12,31 @@ public partial class HireThief : BaseHire
SpeechHue = Utility.RandomDyedHue(); SpeechHue = Utility.RandomDyedHue();
Hue = Race.Human.RandomSkinHue(); Hue = Race.Human.RandomSkinHue();
Title = "the thief";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(81, 95);
SetDex(86, 100);
SetInt(61, 75);
SetDamage(10, 23);
SetSkill(SkillName.Stealing, 66.0, 97.5);
SetSkill(SkillName.Peacemaking, 65.0, 87.5);
SetSkill(SkillName.MagicResist, 25.0, 47.5);
SetSkill(SkillName.Healing, 65.0, 87.5);
SetSkill(SkillName.Tactics, 65.0, 87.5);
SetSkill(SkillName.Fencing, 65.0, 87.5);
SetSkill(SkillName.Parry, 45.0, 60.5);
SetSkill(SkillName.Lockpicking, 65, 87);
SetSkill(SkillName.Hiding, 65, 87);
SetSkill(SkillName.Snooping, 65, 87);
Fame = 100;
Karma = 0;
if (Female = Utility.RandomBool()) if (Female = Utility.RandomBool())
{ {
Body = 0x191; Body = 0x191;
@ -37,29 +62,6 @@ public partial class HireThief : BaseHire
Name = NameList.RandomName("male"); Name = NameList.RandomName("male");
EquipItem(new ShortPants(Utility.RandomNeutralHue())); EquipItem(new ShortPants(Utility.RandomNeutralHue()));
} }
Title = "the thief";
HairItemID = Race.RandomHair(Female);
HairHue = Race.RandomHairHue();
Race.RandomFacialHair(this);
SetStr(81, 95);
SetDex(86, 100);
SetInt(61, 75);
SetDamage(10, 23);
SetSkill(SkillName.Stealing, 66.0, 97.5);
SetSkill(SkillName.Peacemaking, 65.0, 87.5);
SetSkill(SkillName.MagicResist, 25.0, 47.5);
SetSkill(SkillName.Healing, 65.0, 87.5);
SetSkill(SkillName.Tactics, 65.0, 87.5);
SetSkill(SkillName.Fencing, 65.0, 87.5);
SetSkill(SkillName.Parry, 45.0, 60.5);
SetSkill(SkillName.Lockpicking, 65, 87);
SetSkill(SkillName.Hiding, 65, 87);
SetSkill(SkillName.Snooping, 65, 87);
Fame = 100;
Karma = 0;
EquipItem(new Sandals(Utility.RandomNeutralHue())); EquipItem(new Sandals(Utility.RandomNeutralHue()));
EquipItem(new Dagger()); EquipItem(new Dagger());

View file

@ -39,8 +39,8 @@ namespace Server.Mobiles
VirtualArmor = 16; VirtualArmor = 16;
PackReg(6); PackReg(6);
EquipItem(new Robe(Utility.RandomNeutralHue())); PackItem(new Robe(Utility.RandomNeutralHue()));
EquipItem(new Sandals()); PackItem(new Sandals());
} }
public override string CorpseName => "an evil mage corpse"; public override string CorpseName => "an evil mage corpse";

View file

@ -42,16 +42,16 @@ namespace Server.Mobiles
VirtualArmor = 16; VirtualArmor = 16;
PackReg(23); PackReg(23);
EquipItem(new Robe(Utility.RandomMetalHue())); PackItem(new Robe(Utility.RandomMetalHue()));
EquipItem(new WizardsHat(Utility.RandomMetalHue())); PackItem(new WizardsHat(Utility.RandomMetalHue()));
if (Utility.RandomBool()) if (Utility.RandomBool())
{ {
EquipItem(new Shoes()); PackItem(new Shoes());
} }
else else
{ {
EquipItem(new Sandals()); PackItem(new Sandals());
} }
} }