#W# Removed: Removed ToT Stuff.
This commit is contained in:
parent
624de0f229
commit
4160a83eaa
9 changed files with 2 additions and 2179 deletions
|
|
@ -1,231 +0,0 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Engines.Stealables;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public abstract partial class BasePigmentsOfTokuno : Item, IUsesRemaining
|
||||
{
|
||||
private static readonly Type[] m_Glasses =
|
||||
{
|
||||
typeof(MaritimeGlasses),
|
||||
typeof(WizardsGlasses),
|
||||
typeof(TradeGlasses),
|
||||
typeof(LyricalGlasses),
|
||||
typeof(NecromanticGlasses),
|
||||
typeof(LightOfWayGlasses),
|
||||
typeof(FoldedSteelGlasses),
|
||||
typeof(PoisonedGlasses),
|
||||
typeof(TreasureTrinketGlasses),
|
||||
typeof(MaceShieldGlasses),
|
||||
typeof(ArtsGlasses),
|
||||
typeof(AnthropomorphistGlasses)
|
||||
};
|
||||
|
||||
private static readonly Type[] m_Replicas =
|
||||
{
|
||||
typeof(ANecromancerShroud),
|
||||
typeof(BraveKnightOfTheBritannia),
|
||||
typeof(CaptainJohnsHat),
|
||||
typeof(DetectiveBoots),
|
||||
typeof(DjinnisRing),
|
||||
typeof(EmbroideredOakLeafCloak),
|
||||
typeof(GuantletsOfAnger),
|
||||
typeof(LieutenantOfTheBritannianRoyalGuard),
|
||||
typeof(OblivionsNeedle),
|
||||
typeof(RoyalGuardSurvivalKnife),
|
||||
typeof(SamaritanRobe),
|
||||
typeof(TheMostKnowledgePerson),
|
||||
typeof(TheRobeOfBritanniaAri),
|
||||
typeof(AcidProofRobe),
|
||||
typeof(Calm),
|
||||
typeof(CrownOfTalKeesh),
|
||||
typeof(FangOfRactus),
|
||||
typeof(GladiatorsCollar),
|
||||
typeof(OrcChieftainHelm),
|
||||
typeof(Pacify),
|
||||
typeof(Quell),
|
||||
typeof(ShroudOfDeciet),
|
||||
typeof(Subdue)
|
||||
};
|
||||
|
||||
private static readonly Type[] m_DyableHeritageItems =
|
||||
{
|
||||
typeof(ChargerOfTheFallen),
|
||||
typeof(SamuraiHelm),
|
||||
typeof(HolySword),
|
||||
typeof(LeggingsOfEmbers),
|
||||
typeof(ShaminoCrossbow)
|
||||
};
|
||||
|
||||
private TextDefinition m_Label;
|
||||
|
||||
[EncodedInt]
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private int _usesRemaining;
|
||||
|
||||
public BasePigmentsOfTokuno() : base(0xEFF)
|
||||
{
|
||||
_usesRemaining = 1;
|
||||
}
|
||||
|
||||
public BasePigmentsOfTokuno(int uses) : base(0xEFF)
|
||||
{
|
||||
_usesRemaining = uses;
|
||||
}
|
||||
|
||||
public BasePigmentsOfTokuno(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1070933; // Pigments of Tokuno
|
||||
|
||||
protected TextDefinition Label
|
||||
{
|
||||
get => m_Label;
|
||||
set
|
||||
{
|
||||
m_Label = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
bool IUsesRemaining.ShowUsesRemaining
|
||||
{
|
||||
get => true;
|
||||
set { }
|
||||
}
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
m_Label.AddTo(list);
|
||||
list.Add(1060584, _usesRemaining); // uses remaining: ~1_val~
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsAccessibleTo(from) && from.InRange(GetWorldLocation(), 3))
|
||||
{
|
||||
from.SendLocalizedMessage(1070929); // Select the artifact or enhanced magic item to dye.
|
||||
from.BeginTarget(3, false, TargetFlags.None, InternalCallback);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502436); // That is not accessible.
|
||||
}
|
||||
}
|
||||
|
||||
private void InternalCallback(Mobile from, object targeted)
|
||||
{
|
||||
if (Deleted || UsesRemaining <= 0 || !from.InRange(GetWorldLocation(), 3) ||
|
||||
!IsAccessibleTo(from))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (targeted is not Item i)
|
||||
{
|
||||
from.SendLocalizedMessage(1070931); // You can only dye artifacts and enhanced magic items with this tub.
|
||||
}
|
||||
else if (!from.InRange(i.GetWorldLocation(), 3) || !IsAccessibleTo(from))
|
||||
{
|
||||
from.SendLocalizedMessage(502436); // That is not accessible.
|
||||
}
|
||||
else if (from.Items.Contains(i))
|
||||
{
|
||||
from.SendLocalizedMessage(1070930); // Can't dye artifacts or enhanced magic items that are being worn.
|
||||
}
|
||||
else if (i.IsLockedDown)
|
||||
{
|
||||
// You may not dye artifacts and enhanced magic items which are locked down.
|
||||
from.SendLocalizedMessage(1070932);
|
||||
}
|
||||
else if (i.QuestItem)
|
||||
{
|
||||
from.SendLocalizedMessage(1151836); // You may not dye toggled quest items.
|
||||
}
|
||||
else if (i is MetalPigmentsOfTokuno)
|
||||
{
|
||||
from.SendLocalizedMessage(1042417); // You cannot dye that.
|
||||
}
|
||||
else if (i is LesserPigmentsOfTokuno)
|
||||
{
|
||||
from.SendLocalizedMessage(1042417); // You cannot dye that.
|
||||
}
|
||||
else if (i is PigmentsOfTokuno)
|
||||
{
|
||||
from.SendLocalizedMessage(1042417); // You cannot dye that.
|
||||
}
|
||||
else if (!IsValidItem(i))
|
||||
{
|
||||
// You can only dye artifacts and enhanced magic items with this tub. //Yes, it says tub on OSI. Don't ask me why ;p
|
||||
from.SendLocalizedMessage(1070931);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Notes: on OSI there IS no hue check to see if it's already hued. and no messages on successful hue either
|
||||
i.Hue = Hue;
|
||||
|
||||
if (--UsesRemaining <= 0)
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
|
||||
from.PlaySound(0x23E); // As per OSI TC1
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsValidItem(Item i)
|
||||
{
|
||||
if (i is BasePigmentsOfTokuno)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var t = i.GetType();
|
||||
|
||||
var resource = CraftResource.None;
|
||||
|
||||
if (i is BaseWeapon weapon)
|
||||
{
|
||||
resource = weapon.Resource;
|
||||
}
|
||||
else if (i is BaseArmor armor)
|
||||
{
|
||||
resource = armor.Resource;
|
||||
}
|
||||
else if (i is BaseClothing clothing)
|
||||
{
|
||||
resource = clothing.Resource;
|
||||
}
|
||||
|
||||
if (!CraftResources.IsStandard(resource))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return t.InTypeList(TreasuresOfTokuno.TokunoDyable)
|
||||
|| t.InTypeList(TreasuresOfTokuno.LesserArtifactsTotal)
|
||||
|| t.InTypeList(TreasuresOfTokuno.GreaterArtifacts)
|
||||
|| t.InTypeList(DemonKnight.ArtifactRarity10)
|
||||
|| t.InTypeList(DemonKnight.ArtifactRarity11)
|
||||
|| t.InTypeList(MondainsLegacy.Artifacts)
|
||||
|| t.InTypeList(StealableArtifacts.TypesOfEntries)
|
||||
|| t.InTypeList(Paragon.Artifacts)
|
||||
|| t.InTypeList(Leviathan.Artifacts)
|
||||
|| t.InTypeList(TreasureMapChest.Artifacts)
|
||||
|| t.InTypeList(m_Replicas)
|
||||
|| t.InTypeList(m_DyableHeritageItems)
|
||||
|| t.InTypeList(m_Glasses);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,367 +0,0 @@
|
|||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DarkenedSky : Kama
|
||||
{
|
||||
[Constructible]
|
||||
public DarkenedSky()
|
||||
{
|
||||
WeaponAttributes.HitLightning = 60;
|
||||
Attributes.WeaponSpeed = 25;
|
||||
Attributes.WeaponDamage = 50;
|
||||
}
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override int LabelNumber => 1070966; // Darkened Sky
|
||||
|
||||
public override void GetDamageTypes(
|
||||
Mobile wielder, out int phys, out int fire, out int cold, out int pois,
|
||||
out int nrgy, out int chaos, out int direct
|
||||
)
|
||||
{
|
||||
phys = fire = pois = chaos = direct = 0;
|
||||
cold = nrgy = 50;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class KasaOfTheRajin : Kasa
|
||||
{
|
||||
[Constructible]
|
||||
public KasaOfTheRajin() => Attributes.SpellDamage = 12;
|
||||
|
||||
public override int LabelNumber => 1070969; // Kasa of the Raj-in
|
||||
|
||||
public override int BasePhysicalResistance => 12;
|
||||
public override int BaseFireResistance => 17;
|
||||
public override int BaseColdResistance => 21;
|
||||
public override int BasePoisonResistance => 17;
|
||||
public override int BaseEnergyResistance => 17;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class RuneBeetleCarapace : PlateDo
|
||||
{
|
||||
[Constructible]
|
||||
public RuneBeetleCarapace()
|
||||
{
|
||||
Attributes.BonusMana = 10;
|
||||
Attributes.RegenMana = 3;
|
||||
Attributes.LowerManaCost = 15;
|
||||
ArmorAttributes.LowerStatReq = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override int LabelNumber => 1070968; // Rune Beetle Carapace
|
||||
|
||||
public override int BaseColdResistance => 14;
|
||||
public override int BaseEnergyResistance => 14;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Stormgrip : LeatherNinjaMitts
|
||||
{
|
||||
[Constructible]
|
||||
public Stormgrip()
|
||||
{
|
||||
Attributes.BonusInt = 8;
|
||||
Attributes.Luck = 125;
|
||||
Attributes.WeaponDamage = 25;
|
||||
}
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override int LabelNumber => 1070970; // Stormgrip
|
||||
|
||||
public override int BasePhysicalResistance => 10;
|
||||
public override int BaseColdResistance => 18;
|
||||
public override int BaseEnergyResistance => 18;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SwordOfTheStampede : NoDachi
|
||||
{
|
||||
[Constructible]
|
||||
public SwordOfTheStampede()
|
||||
{
|
||||
WeaponAttributes.HitHarm = 100;
|
||||
Attributes.AttackChance = 10;
|
||||
Attributes.WeaponDamage = 60;
|
||||
}
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override int LabelNumber => 1070964; // Sword of the Stampede
|
||||
|
||||
public override void GetDamageTypes(
|
||||
Mobile wielder, out int phys, out int fire, out int cold, out int pois,
|
||||
out int nrgy, out int chaos, out int direct
|
||||
)
|
||||
{
|
||||
phys = fire = pois = nrgy = chaos = direct = 0;
|
||||
cold = 100;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SwordsOfProsperity : Daisho
|
||||
{
|
||||
[Constructible]
|
||||
public SwordsOfProsperity()
|
||||
{
|
||||
WeaponAttributes.MageWeapon = 30;
|
||||
Attributes.SpellChanneling = 1;
|
||||
Attributes.CastSpeed = 1;
|
||||
Attributes.Luck = 200;
|
||||
}
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override int LabelNumber => 1070963; // Swords of Prosperity
|
||||
|
||||
public override void GetDamageTypes(
|
||||
Mobile wielder, out int phys, out int fire, out int cold, out int pois,
|
||||
out int nrgy, out int chaos, out int direct
|
||||
)
|
||||
{
|
||||
phys = cold = pois = nrgy = chaos = direct = 0;
|
||||
fire = 100;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class TheHorselord : Yumi
|
||||
{
|
||||
[Constructible]
|
||||
public TheHorselord()
|
||||
{
|
||||
Attributes.BonusDex = 5;
|
||||
Attributes.RegenMana = 1;
|
||||
Attributes.Luck = 125;
|
||||
Attributes.WeaponDamage = 50;
|
||||
|
||||
Slayer = SlayerName.ElementalBan;
|
||||
Slayer2 = SlayerName.ReptilianDeath;
|
||||
}
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override int LabelNumber => 1070967; // The Horselord
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class TomeOfLostKnowledge : Spellbook
|
||||
{
|
||||
[Constructible]
|
||||
public TomeOfLostKnowledge()
|
||||
{
|
||||
LootType = LootType.Regular;
|
||||
Hue = 0x530;
|
||||
|
||||
SkillBonuses.SetValues(0, SkillName.Magery, 15.0);
|
||||
Attributes.BonusInt = 8;
|
||||
Attributes.LowerManaCost = 15;
|
||||
Attributes.SpellDamage = 15;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070971; // Tome of Lost Knowledge
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class WindsEdge : Tessen
|
||||
{
|
||||
[Constructible]
|
||||
public WindsEdge()
|
||||
{
|
||||
WeaponAttributes.HitLeechMana = 40;
|
||||
|
||||
Attributes.WeaponDamage = 50;
|
||||
Attributes.WeaponSpeed = 50;
|
||||
Attributes.DefendChance = 10;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070965; // Wind's Edge
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override void GetDamageTypes(
|
||||
Mobile wielder, out int phys, out int fire, out int cold, out int pois,
|
||||
out int nrgy, out int chaos, out int direct
|
||||
)
|
||||
{
|
||||
phys = fire = cold = pois = chaos = direct = 0;
|
||||
nrgy = 100;
|
||||
}
|
||||
}
|
||||
|
||||
public enum PigmentType
|
||||
{
|
||||
None,
|
||||
ParagonGold,
|
||||
VioletCouragePurple,
|
||||
InvulnerabilityBlue,
|
||||
LunaWhite,
|
||||
DryadGreen,
|
||||
ShadowDancerBlack,
|
||||
BerserkerRed,
|
||||
NoxGreen,
|
||||
RumRed,
|
||||
FireOrange,
|
||||
FadedCoal,
|
||||
Coal,
|
||||
FadedGold,
|
||||
StormBronze,
|
||||
Rose,
|
||||
MidnightCoal,
|
||||
FadedBronze,
|
||||
FadedRose,
|
||||
DeepRose
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class PigmentsOfTokuno : BasePigmentsOfTokuno
|
||||
{
|
||||
private static readonly int[][] _table =
|
||||
{
|
||||
// Hue, Label
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.None,*/ 0, -1
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.ParagonGold,*/ 0x501, 1070987
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.VioletCouragePurple,*/ 0x486, 1070988
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.InvulnerabilityBlue,*/ 0x4F2, 1070989
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.LunaWhite,*/ 0x47E, 1070990
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.DryadGreen,*/ 0x48F, 1070991
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.ShadowDancerBlack,*/ 0x455, 1070992
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.BerserkerRed,*/ 0x21, 1070993
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.NoxGreen,*/ 0x58C, 1070994
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.RumRed,*/ 0x66C, 1070995
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.FireOrange,*/ 0x54F, 1070996
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.Fadedcoal,*/ 0x96A, 1079579
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.Coal,*/ 0x96B, 1079580
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.FadedGold,*/ 0x972, 1079581
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.StormBronze,*/ 0x977, 1079582
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.Rose,*/ 0x97C, 1079583
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.MidnightCoal,*/ 0x96C, 1079584
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.FadedBronze,*/ 0x975, 1079585
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.FadedRose,*/ 0x97B, 1079586
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.DeepRose,*/ 0x97E, 1079587
|
||||
}
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public PigmentsOfTokuno(PigmentType type = PigmentType.None) : this(
|
||||
type,
|
||||
type is PigmentType.None or >= PigmentType.FadedCoal ? 10 : 50
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public PigmentsOfTokuno(PigmentType type, int uses) : base(uses) => Type = type;
|
||||
|
||||
[SerializableField(0, fieldChanged: nameof(OnTypeChanged))]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private PigmentType _type;
|
||||
|
||||
private void OnTypeChanged(PigmentType oldValue, PigmentType newValue)
|
||||
{
|
||||
var v = (int)_type;
|
||||
if (v >= 0 && v < _table.Length)
|
||||
{
|
||||
Hue = _table[v][0];
|
||||
Label = _table[v][1];
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = 0;
|
||||
Label = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070933; // Pigments of Tokuno
|
||||
|
||||
public static int[] GetInfo(PigmentType type)
|
||||
{
|
||||
var v = (int)type;
|
||||
|
||||
if (v < 0 || v >= _table.Length)
|
||||
{
|
||||
v = 0;
|
||||
}
|
||||
|
||||
return _table[v];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,674 +0,0 @@
|
|||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class AncientFarmersKasa : Kasa
|
||||
{
|
||||
[Constructible]
|
||||
public AncientFarmersKasa()
|
||||
{
|
||||
Attributes.BonusStr = 5;
|
||||
Attributes.BonusStam = 5;
|
||||
Attributes.RegenStam = 5;
|
||||
|
||||
SkillBonuses.SetValues(0, SkillName.AnimalLore, 5.0);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070922; // Ancient Farmer's Kasa
|
||||
public override int BaseColdResistance => 19;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class AncientSamuraiDo : PlateDo
|
||||
{
|
||||
[Constructible]
|
||||
public AncientSamuraiDo()
|
||||
{
|
||||
ArmorAttributes.LowerStatReq = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
SkillBonuses.SetValues(0, SkillName.Parry, 10.0);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070926; // Ancient Samurai Do
|
||||
|
||||
public override int BasePhysicalResistance => 15;
|
||||
public override int BaseFireResistance => 12;
|
||||
public override int BaseColdResistance => 10;
|
||||
public override int BasePoisonResistance => 11;
|
||||
public override int BaseEnergyResistance => 8;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ArmsOfTacticalExcellence : LeatherHiroSode
|
||||
{
|
||||
[Constructible]
|
||||
public ArmsOfTacticalExcellence()
|
||||
{
|
||||
Attributes.BonusDex = 5;
|
||||
SkillBonuses.SetValues(0, SkillName.Tactics, 12.0);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070921; // Arms of Tactical Excellence
|
||||
|
||||
public override int BaseFireResistance => 9;
|
||||
public override int BaseColdResistance => 13;
|
||||
public override int BasePoisonResistance => 8;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class BlackLotusHood : ClothNinjaHood
|
||||
{
|
||||
[Constructible]
|
||||
public BlackLotusHood()
|
||||
{
|
||||
Attributes.LowerManaCost = 6;
|
||||
Attributes.AttackChance = 6;
|
||||
ClothingAttributes.SelfRepair = 5;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070919; // Black Lotus Hood
|
||||
|
||||
public override int BasePhysicalResistance => 0;
|
||||
public override int BaseFireResistance => 11;
|
||||
public override int BaseColdResistance => 15;
|
||||
public override int BasePoisonResistance => 11;
|
||||
public override int BaseEnergyResistance => 11;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DaimyosHelm : PlateBattleKabuto
|
||||
{
|
||||
[Constructible]
|
||||
public DaimyosHelm()
|
||||
{
|
||||
ArmorAttributes.LowerStatReq = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
ArmorAttributes.SelfRepair = 3;
|
||||
Attributes.WeaponSpeed = 10;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070920; // Daimyo's Helm
|
||||
|
||||
public override int BaseColdResistance => 10;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DemonForks : Sai
|
||||
{
|
||||
[Constructible]
|
||||
public DemonForks()
|
||||
{
|
||||
WeaponAttributes.ResistFireBonus = 10;
|
||||
WeaponAttributes.ResistPoisonBonus = 10;
|
||||
|
||||
Attributes.ReflectPhysical = 10;
|
||||
Attributes.WeaponDamage = 35;
|
||||
Attributes.DefendChance = 10;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070917; // Demon Forks
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class DragonNunchaku : Nunchaku
|
||||
{
|
||||
[Constructible]
|
||||
public DragonNunchaku()
|
||||
{
|
||||
WeaponAttributes.ResistFireBonus = 5;
|
||||
WeaponAttributes.SelfRepair = 3;
|
||||
WeaponAttributes.HitFireball = 50;
|
||||
|
||||
Attributes.WeaponDamage = 40;
|
||||
Attributes.WeaponSpeed = 20;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070914; // Dragon Nunchaku
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Exiler : Tetsubo
|
||||
{
|
||||
[Constructible]
|
||||
public Exiler()
|
||||
{
|
||||
WeaponAttributes.HitDispel = 33;
|
||||
Slayer = SlayerName.Exorcism;
|
||||
|
||||
Attributes.WeaponDamage = 40;
|
||||
Attributes.WeaponSpeed = 20;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070913; // Exiler
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override void GetDamageTypes(
|
||||
Mobile wielder, out int phys, out int fire, out int cold, out int pois,
|
||||
out int nrgy, out int chaos, out int direct
|
||||
)
|
||||
{
|
||||
phys = fire = cold = pois = chaos = direct = 0;
|
||||
|
||||
nrgy = 100;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GlovesOfTheSun : LeatherNinjaMitts
|
||||
{
|
||||
[Constructible]
|
||||
public GlovesOfTheSun()
|
||||
{
|
||||
Attributes.RegenHits = 2;
|
||||
Attributes.NightSight = 1;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 18;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070924; // Gloves of the Sun
|
||||
|
||||
public override int BaseFireResistance => 24;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class HanzosBow : Yumi
|
||||
{
|
||||
[Constructible]
|
||||
public HanzosBow()
|
||||
{
|
||||
WeaponAttributes.HitLeechHits = 40;
|
||||
WeaponAttributes.SelfRepair = 3;
|
||||
|
||||
Attributes.WeaponDamage = 50;
|
||||
|
||||
SkillBonuses.SetValues(0, SkillName.Ninjitsu, 10);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070918; // Hanzo's Bow
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class LegsOfStability : PlateSuneate
|
||||
{
|
||||
[Constructible]
|
||||
public LegsOfStability()
|
||||
{
|
||||
Attributes.BonusStam = 5;
|
||||
|
||||
ArmorAttributes.SelfRepair = 3;
|
||||
ArmorAttributes.LowerStatReq = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070925; // Legs of Stability
|
||||
|
||||
public override int BasePhysicalResistance => 20;
|
||||
public override int BasePoisonResistance => 18;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class PeasantsBokuto : Bokuto
|
||||
{
|
||||
[Constructible]
|
||||
public PeasantsBokuto()
|
||||
{
|
||||
WeaponAttributes.SelfRepair = 3;
|
||||
WeaponAttributes.HitLowerDefend = 30;
|
||||
|
||||
Attributes.WeaponDamage = 35;
|
||||
Attributes.WeaponSpeed = 10;
|
||||
Slayer = SlayerName.SnakesBane;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070912; // Peasant's Bokuto
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class PilferedDancerFans : Tessen
|
||||
{
|
||||
[Constructible]
|
||||
public PilferedDancerFans()
|
||||
{
|
||||
Attributes.WeaponDamage = 20;
|
||||
Attributes.WeaponSpeed = 20;
|
||||
Attributes.CastRecovery = 2;
|
||||
Attributes.DefendChance = 5;
|
||||
Attributes.SpellChanneling = 1;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070916; // Pilfered Dancer Fans
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class TheDestroyer : NoDachi
|
||||
{
|
||||
[Constructible]
|
||||
public TheDestroyer()
|
||||
{
|
||||
WeaponAttributes.HitLeechStam = 40;
|
||||
|
||||
Attributes.BonusStr = 6;
|
||||
Attributes.AttackChance = 10;
|
||||
Attributes.WeaponDamage = 50;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070915; // The Destroyer
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class TomeOfEnlightenment : Spellbook
|
||||
{
|
||||
[Constructible]
|
||||
public TomeOfEnlightenment()
|
||||
{
|
||||
LootType = LootType.Regular;
|
||||
Hue = 0x455;
|
||||
|
||||
Attributes.BonusInt = 5;
|
||||
Attributes.SpellDamage = 10;
|
||||
Attributes.CastSpeed = 1;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070934; // Tome of Enlightenment
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class LeurociansMempoOfFortune : LeatherMempo
|
||||
{
|
||||
[Constructible]
|
||||
public LeurociansMempoOfFortune()
|
||||
{
|
||||
LootType = LootType.Regular;
|
||||
Hue = 0x501;
|
||||
|
||||
Attributes.Luck = 300;
|
||||
Attributes.RegenMana = 1;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1071460; // Leurocian's mempo of fortune
|
||||
|
||||
public override int BasePhysicalResistance => 15;
|
||||
public override int BaseFireResistance => 10;
|
||||
public override int BaseColdResistance => 10;
|
||||
public override int BasePoisonResistance => 10;
|
||||
public override int BaseEnergyResistance => 15;
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
}
|
||||
|
||||
// Non weapon/armor ones:
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class AncientUrn : Item
|
||||
{
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private string _urnName;
|
||||
|
||||
[Constructible]
|
||||
public AncientUrn() : this(Names.RandomElement())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public AncientUrn(string urnName) : base(0x241D) => _urnName = urnName;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public static string[] Names { get; } =
|
||||
{
|
||||
"Akira",
|
||||
"Avaniaga",
|
||||
"Aya",
|
||||
"Chie",
|
||||
"Emiko",
|
||||
"Fumiyo",
|
||||
"Gennai",
|
||||
"Gennosuke",
|
||||
"Genjo",
|
||||
"Hamato",
|
||||
"Harumi",
|
||||
"Ikuyo",
|
||||
"Juri",
|
||||
"Kaori",
|
||||
"Kaoru",
|
||||
"Kiyomori",
|
||||
"Mayako",
|
||||
"Motoki",
|
||||
"Musashi",
|
||||
"Nami",
|
||||
"Nobukazu",
|
||||
"Roku",
|
||||
"Romi",
|
||||
"Ryo",
|
||||
"Sanzo",
|
||||
"Sakamae",
|
||||
"Satoshi",
|
||||
"Takamori",
|
||||
"Takuro",
|
||||
"Teruyo",
|
||||
"Toshiro",
|
||||
"Yago",
|
||||
"Yeijiro",
|
||||
"Yoshi",
|
||||
"Zeshin"
|
||||
};
|
||||
|
||||
public override int LabelNumber => 1071014; // Ancient Urn
|
||||
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
Utility.Intern(ref _urnName);
|
||||
}
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add(1070935, _urnName); // Ancient Urn of ~1_name~
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
LabelTo(from, 1070935, _urnName); // Ancient Urn of ~1_name~
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class HonorableSwords : Item
|
||||
{
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private string _swordsName;
|
||||
|
||||
[Constructible]
|
||||
public HonorableSwords() : this(AncientUrn.Names.RandomElement())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HonorableSwords(string swordsName) : base(0x2853) => _swordsName = swordsName;
|
||||
|
||||
public override double DefaultWeight => 5.0;
|
||||
|
||||
public override int LabelNumber => 1071015; // Honorable Swords
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add(1070936, _swordsName); // Honorable Swords of ~1_name~
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
LabelTo(from, 1070936, _swordsName); // Honorable Swords of ~1_name~
|
||||
}
|
||||
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
Utility.Intern(ref _swordsName);
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flippable(0x2811, 0x2812)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ChestOfHeirlooms : LockableContainer
|
||||
{
|
||||
[Constructible]
|
||||
public ChestOfHeirlooms() : base(0x2811)
|
||||
{
|
||||
Locked = true;
|
||||
LockLevel = 95;
|
||||
MaxLockLevel = 140;
|
||||
RequiredSkill = 95;
|
||||
|
||||
TrapType = TrapType.ExplosionTrap;
|
||||
TrapLevel = 10;
|
||||
TrapPower = 100;
|
||||
|
||||
GumpID = 0x10B;
|
||||
|
||||
for (var i = 0; i < 10; ++i)
|
||||
{
|
||||
var item = Loot.RandomChestOfHeirloomsContent();
|
||||
|
||||
var attributeCount = Utility.RandomMinMax(1, 5);
|
||||
var min = 20;
|
||||
var max = 80;
|
||||
|
||||
if (item is BaseWeapon weapon)
|
||||
{
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max);
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)Utility.Random(6);
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random(6);
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);
|
||||
}
|
||||
}
|
||||
else if (item is BaseArmor armor)
|
||||
{
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);
|
||||
}
|
||||
else
|
||||
{
|
||||
armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
|
||||
armor.Durability = (ArmorDurabilityLevel)Utility.Random(6);
|
||||
}
|
||||
}
|
||||
else if (Core.AOS)
|
||||
{
|
||||
if (item is BaseHat hat)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max);
|
||||
}
|
||||
else if (item is BaseJewel jewel)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(jewel, attributeCount, min, max);
|
||||
}
|
||||
}
|
||||
|
||||
DropItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070937; // Chest of heirlooms
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class FluteOfRenewal : BambooFlute
|
||||
{
|
||||
[Constructible]
|
||||
public FluteOfRenewal()
|
||||
{
|
||||
// -1 to exclude Fey slayer. Try to confirm no fey slayer on this on OSI
|
||||
Slayer = SlayerGroup.Groups[Utility.Random(SlayerGroup.Groups.Length - 1)].Super.Name;
|
||||
|
||||
ReplenishesCharges = true;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1070927; // Flute of Renewal
|
||||
|
||||
public override int InitMinUses => 300;
|
||||
public override int InitMaxUses => 300;
|
||||
}
|
||||
|
||||
public enum LesserPigmentType
|
||||
{
|
||||
None,
|
||||
PaleOrange,
|
||||
FreshRose,
|
||||
ChaosBlue,
|
||||
Silver,
|
||||
NobleGold,
|
||||
LightGreen,
|
||||
PaleBlue,
|
||||
FreshPlum,
|
||||
DeepBrown,
|
||||
BurntBrown
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class LesserPigmentsOfTokuno : BasePigmentsOfTokuno
|
||||
{
|
||||
private static readonly int[][] _table =
|
||||
{
|
||||
// Hue, Label
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.None,*/ 0, -1
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.PaleOrange,*/ 0x02E, 1071458
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.FreshRose,*/ 0x4B9, 1071455
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.ChaosBlue,*/ 0x005, 1071459
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.Silver,*/ 0x3E9, 1071451
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.NobleGold,*/ 0x227, 1071457
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.LightGreen,*/ 0x1C8, 1071454
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.PaleBlue,*/ 0x24F, 1071456
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.FreshPlum,*/ 0x145, 1071450
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.DeepBrown,*/ 0x3F0, 1071452
|
||||
},
|
||||
new[]
|
||||
{
|
||||
/*PigmentType.BurntBrown,*/ 0x41A, 1071453
|
||||
}
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public LesserPigmentsOfTokuno() : this((LesserPigmentType)Utility.Random(0, 11))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public LesserPigmentsOfTokuno(LesserPigmentType type) : base(1) => Type = type;
|
||||
|
||||
[SerializableField(0, fieldChanged: nameof(OnTypeChanged))]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private LesserPigmentType _type;
|
||||
|
||||
private void OnTypeChanged(LesserPigmentType oldValue, LesserPigmentType newValue)
|
||||
{
|
||||
var v = (int)_type;
|
||||
if (v >= 0 && v < _table.Length)
|
||||
{
|
||||
Hue = _table[v][0];
|
||||
Label = _table[v][1];
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = 0;
|
||||
Label = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public static int[] GetInfo(LesserPigmentType type)
|
||||
{
|
||||
var v = (int)type;
|
||||
|
||||
if (v < 0 || v >= _table.Length)
|
||||
{
|
||||
v = 0;
|
||||
}
|
||||
|
||||
return _table[v];
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class MetalPigmentsOfTokuno : BasePigmentsOfTokuno
|
||||
{
|
||||
[Constructible]
|
||||
public MetalPigmentsOfTokuno() : base(1)
|
||||
{
|
||||
RandomHue();
|
||||
Label = -1;
|
||||
}
|
||||
|
||||
public void RandomHue()
|
||||
{
|
||||
var a = Utility.Random(0, 30);
|
||||
if (a != 0)
|
||||
{
|
||||
Hue = a + 0x960;
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,711 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Json;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Misc
|
||||
{
|
||||
public enum TreasuresOfTokunoEra
|
||||
{
|
||||
None,
|
||||
ToTOne,
|
||||
ToTTwo,
|
||||
ToTThree
|
||||
}
|
||||
|
||||
public class ToTConfig
|
||||
{
|
||||
public TreasuresOfTokunoEra DropEra { get; set; }
|
||||
public TreasuresOfTokunoEra RewardEra { get; set; }
|
||||
}
|
||||
|
||||
public static class TreasuresOfTokuno
|
||||
{
|
||||
public const string ToTConfigurationPath = "Configuration/tot.json";
|
||||
public const int ItemsPerReward = 10;
|
||||
|
||||
private static readonly Type[][] m_LesserArtifacts =
|
||||
{
|
||||
// ToT One Rewards
|
||||
new[]
|
||||
{
|
||||
typeof(AncientFarmersKasa), typeof(AncientSamuraiDo), typeof(ArmsOfTacticalExcellence),
|
||||
typeof(BlackLotusHood),
|
||||
typeof(DaimyosHelm), typeof(DemonForks), typeof(DragonNunchaku), typeof(Exiler), typeof(GlovesOfTheSun),
|
||||
typeof(HanzosBow), typeof(LegsOfStability), typeof(PeasantsBokuto), typeof(PilferedDancerFans),
|
||||
typeof(TheDestroyer),
|
||||
typeof(TomeOfEnlightenment), typeof(AncientUrn), typeof(HonorableSwords), typeof(PigmentsOfTokuno),
|
||||
typeof(FluteOfRenewal), typeof(ChestOfHeirlooms)
|
||||
},
|
||||
// ToT Two Rewards
|
||||
new[]
|
||||
{
|
||||
typeof(MetalPigmentsOfTokuno), typeof(AncientFarmersKasa), typeof(AncientSamuraiDo),
|
||||
typeof(ArmsOfTacticalExcellence),
|
||||
typeof(MetalPigmentsOfTokuno), typeof(BlackLotusHood), typeof(DaimyosHelm), typeof(DemonForks),
|
||||
typeof(MetalPigmentsOfTokuno), typeof(DragonNunchaku), typeof(Exiler), typeof(GlovesOfTheSun),
|
||||
typeof(HanzosBow),
|
||||
typeof(MetalPigmentsOfTokuno), typeof(LegsOfStability), typeof(PeasantsBokuto), typeof(PilferedDancerFans),
|
||||
typeof(TheDestroyer),
|
||||
typeof(MetalPigmentsOfTokuno), typeof(TomeOfEnlightenment), typeof(AncientUrn), typeof(HonorableSwords),
|
||||
typeof(MetalPigmentsOfTokuno), typeof(FluteOfRenewal), typeof(ChestOfHeirlooms)
|
||||
},
|
||||
// ToT Three Rewards
|
||||
new[]
|
||||
{
|
||||
typeof(LesserPigmentsOfTokuno), typeof(AncientFarmersKasa), typeof(AncientSamuraiDo),
|
||||
typeof(ArmsOfTacticalExcellence),
|
||||
typeof(LesserPigmentsOfTokuno), typeof(BlackLotusHood), typeof(DaimyosHelm), typeof(HanzosBow),
|
||||
typeof(LesserPigmentsOfTokuno), typeof(DemonForks), typeof(DragonNunchaku), typeof(Exiler),
|
||||
typeof(GlovesOfTheSun),
|
||||
typeof(LesserPigmentsOfTokuno), typeof(LegsOfStability), typeof(PeasantsBokuto), typeof(PilferedDancerFans),
|
||||
typeof(TheDestroyer),
|
||||
typeof(LesserPigmentsOfTokuno), typeof(TomeOfEnlightenment), typeof(AncientUrn), typeof(HonorableSwords),
|
||||
typeof(FluteOfRenewal),
|
||||
typeof(LesserPigmentsOfTokuno), typeof(LeurociansMempoOfFortune), typeof(ChestOfHeirlooms)
|
||||
}
|
||||
};
|
||||
|
||||
private static Type[][] m_GreaterArtifacts;
|
||||
|
||||
public static Type[] LesserArtifactsTotal { get; } =
|
||||
{
|
||||
typeof(AncientFarmersKasa), typeof(AncientSamuraiDo), typeof(ArmsOfTacticalExcellence), typeof(BlackLotusHood),
|
||||
typeof(DaimyosHelm), typeof(DemonForks), typeof(DragonNunchaku), typeof(Exiler), typeof(GlovesOfTheSun),
|
||||
typeof(HanzosBow), typeof(LegsOfStability), typeof(PeasantsBokuto), typeof(PilferedDancerFans),
|
||||
typeof(TheDestroyer),
|
||||
typeof(TomeOfEnlightenment), typeof(AncientUrn), typeof(HonorableSwords), typeof(PigmentsOfTokuno),
|
||||
typeof(FluteOfRenewal),
|
||||
typeof(LeurociansMempoOfFortune), typeof(LesserPigmentsOfTokuno), typeof(MetalPigmentsOfTokuno),
|
||||
typeof(ChestOfHeirlooms)
|
||||
};
|
||||
|
||||
public static Type[] TokunoDyable { get; } =
|
||||
{
|
||||
typeof(DupresShield), typeof(CrimsonCincture), typeof(OssianGrimoire), typeof(QuiverOfInfinity),
|
||||
typeof(BaseFormTalisman), typeof(BaseWand), typeof(JesterHatofChuckles)
|
||||
};
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
var pathToTFile = Path.Combine(Core.BaseDirectory, ToTConfigurationPath);
|
||||
_totConfig = File.Exists(pathToTFile)
|
||||
? JsonConfig.Deserialize<ToTConfig>(pathToTFile)
|
||||
: new ToTConfig
|
||||
{
|
||||
DropEra = TreasuresOfTokunoEra.None,
|
||||
RewardEra = TreasuresOfTokunoEra.ToTOne,
|
||||
};
|
||||
}
|
||||
|
||||
private static ToTConfig _totConfig;
|
||||
|
||||
public static TreasuresOfTokunoEra DropEra
|
||||
{
|
||||
get => _totConfig.DropEra;
|
||||
set
|
||||
{
|
||||
_totConfig.DropEra = value;
|
||||
SaveConfiguration();
|
||||
}
|
||||
}
|
||||
|
||||
public static TreasuresOfTokunoEra RewardEra
|
||||
{
|
||||
get => _totConfig.RewardEra;
|
||||
set
|
||||
{
|
||||
_totConfig.RewardEra = value;
|
||||
SaveConfiguration();
|
||||
}
|
||||
}
|
||||
|
||||
private static void SaveConfiguration()
|
||||
{
|
||||
var pathToTFile = Path.Combine(Core.BaseDirectory, ToTConfigurationPath);
|
||||
JsonConfig.Serialize(pathToTFile, _totConfig);
|
||||
}
|
||||
|
||||
public static Type[] LesserArtifacts => m_LesserArtifacts[(int)RewardEra - 1];
|
||||
|
||||
public static Type[] GreaterArtifacts
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_GreaterArtifacts == null)
|
||||
{
|
||||
m_GreaterArtifacts = new Type[ToTRedeemGump.NormalRewards.Length][];
|
||||
|
||||
for (var i = 0; i < m_GreaterArtifacts.Length; i++)
|
||||
{
|
||||
m_GreaterArtifacts[i] = new Type[ToTRedeemGump.NormalRewards[i].Length];
|
||||
|
||||
for (var j = 0; j < m_GreaterArtifacts[i].Length; j++)
|
||||
{
|
||||
m_GreaterArtifacts[i][j] = ToTRedeemGump.NormalRewards[i][j].Type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return m_GreaterArtifacts[(int)RewardEra - 1];
|
||||
}
|
||||
}
|
||||
|
||||
private static bool CheckLocation(Mobile m)
|
||||
{
|
||||
var r = m.Region;
|
||||
|
||||
if (r.IsPartOf<HouseRegion>() || BaseBoat.FindBoatAt(m.Location, m.Map) != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: a CanReach of something check as opposed to above?
|
||||
if (r.IsPartOf("Yomotsu Mines") || r.IsPartOf("Fan Dancer's Dojo"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return m.Map == Map.Tokuno;
|
||||
}
|
||||
|
||||
public static void HandleKill(Mobile victim, Mobile killer)
|
||||
{
|
||||
if (DropEra == TreasuresOfTokunoEra.None || killer is not PlayerMobile pm || victim is not BaseCreature bc ||
|
||||
!CheckLocation(bc) || !CheckLocation(pm) || !killer.InRange(victim, 18))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (bc.Controlled || bc.Owners.Count > 0 || bc.Fame <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 25000 for 1/100 chance, 10 hyrus
|
||||
// 1500, 1/1000 chance, 20 lizard men for that chance.
|
||||
|
||||
pm.ToTTotalMonsterFame += (int)(bc.Fame * (1 + Math.Sqrt(pm.Luck) / 100));
|
||||
|
||||
// This is the Exponential regression with only 2 datapoints.
|
||||
// A log. func would also work, but it didn't make as much sense.
|
||||
// This function isn't OSI exact being that I don't know OSI's func they used ;p
|
||||
var x = pm.ToTTotalMonsterFame;
|
||||
|
||||
// const double A = 8.63316841 * Math.Pow( 10, -4 );
|
||||
const double A = 0.000863316841;
|
||||
// const double B = 4.25531915 * Math.Pow( 10, -6 );
|
||||
const double B = 0.00000425531915;
|
||||
|
||||
var chance = A * Math.Pow(10, B * x);
|
||||
|
||||
if (chance <= Utility.RandomDouble())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Item i;
|
||||
|
||||
try
|
||||
{
|
||||
i = m_LesserArtifacts[(int)DropEra - 1].RandomElement().CreateInstance<Item>();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// For your valor in combating the fallen beast, a special artifact has been bestowed on you.
|
||||
pm.SendLocalizedMessage(1062317);
|
||||
|
||||
if (!pm.PlaceInBackpack(i))
|
||||
{
|
||||
if (pm.BankBox?.TryDropItem(killer, i, false) == true)
|
||||
{
|
||||
pm.SendLocalizedMessage(1079730); // The item has been placed into your bank box.
|
||||
}
|
||||
else
|
||||
{
|
||||
// You find an artifact, but your backpack and bank are too full to hold it.
|
||||
pm.SendLocalizedMessage(1072523);
|
||||
i.MoveToWorld(pm.Location, pm.Map);
|
||||
}
|
||||
}
|
||||
|
||||
pm.ToTTotalMonsterFame = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class IharaSoko : BaseVendor
|
||||
{
|
||||
protected List<SBInfo> m_SBInfos = new();
|
||||
|
||||
[Constructible]
|
||||
public IharaSoko() : base("the Imperial Minister of Trade")
|
||||
{
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Hue = 0x8403;
|
||||
}
|
||||
|
||||
public override bool IsActiveVendor => false;
|
||||
public override bool IsInvulnerable => true;
|
||||
public override bool DisallowAllMoves => true;
|
||||
public override bool ClickTitle => true;
|
||||
public override bool CanTeach => false;
|
||||
public override string DefaultName => "Ihara Soko";
|
||||
protected override List<SBInfo> SBInfos => m_SBInfos;
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Waraji(0x711));
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Kamishimo(0x483));
|
||||
|
||||
AddItem(new LightPlateJingasa
|
||||
{
|
||||
Hue = 0x711
|
||||
});
|
||||
}
|
||||
|
||||
public override bool CanBeDamaged() => false;
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if (m.Alive && m is PlayerMobile pm)
|
||||
{
|
||||
var gumps = pm.GetGumps();
|
||||
|
||||
if (pm.Alive && (Z - pm.Z).Abs() < 16 && InRange(m, 3) && !InRange(oldLocation, 3))
|
||||
{
|
||||
if (pm.ToTItemsTurnedIn >= TreasuresOfTokuno.ItemsPerReward)
|
||||
{
|
||||
// Congratulations! You have turned in enough minor treasures to earn a greater reward.
|
||||
SayTo(pm, 1070980);
|
||||
|
||||
gumps.Close<ToTTurnInGump>(); // Sanity
|
||||
|
||||
if (!pm.HasGump<ToTRedeemGump>())
|
||||
{
|
||||
gumps.Send(new ToTRedeemGump(this, false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pm.ToTItemsTurnedIn == 0)
|
||||
{
|
||||
// Bring me 10 of the lost treasures of Tokuno and I will reward you with a valuable item.
|
||||
SayTo(pm, 1071013);
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(
|
||||
pm,
|
||||
1070981, // You have turned in ~1_COUNT~ minor artifacts. Turn in ~2_NUM~ to receive a reward.
|
||||
$"{pm.ToTItemsTurnedIn}\t{TreasuresOfTokuno.ItemsPerReward}"
|
||||
);
|
||||
}
|
||||
|
||||
var buttons = ToTTurnInGump.FindRedeemableItems(pm);
|
||||
|
||||
if (buttons?.Count > 0 && !pm.HasGump<ToTTurnInGump>())
|
||||
{
|
||||
gumps.Send(new ToTTurnInGump(this, buttons));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const int leaveRange = 7;
|
||||
|
||||
if (!InRange(m, leaveRange) && InRange(oldLocation, leaveRange))
|
||||
{
|
||||
gumps.Close<ToTRedeemGump>();
|
||||
gumps.Close<ToTTurnInGump>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void TurnToTokuno()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class ItemTileButtonInfo : ImageTileButtonInfo
|
||||
{
|
||||
public ItemTileButtonInfo(Item i) : base(
|
||||
i.ItemID,
|
||||
i.Hue,
|
||||
i.Name is not { Length: > 0 } ? i.LabelNumber : i.Name
|
||||
) => Item = i;
|
||||
|
||||
public Item Item { get; set; }
|
||||
}
|
||||
|
||||
public class ToTTurnInGump : BaseImageTileButtonsGump
|
||||
{
|
||||
private readonly Mobile m_Collector;
|
||||
|
||||
// Click a minor artifact to give it to Ihara Soko.
|
||||
public ToTTurnInGump(Mobile collector, List<ImageTileButtonInfo> buttons)
|
||||
: base(1071012, buttons) => m_Collector = collector;
|
||||
|
||||
public static List<ImageTileButtonInfo> FindRedeemableItems(Mobile m)
|
||||
{
|
||||
var pack = m.Backpack;
|
||||
if (pack == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var buttons = new List<ImageTileButtonInfo>();
|
||||
foreach (var item in pack.FindItems())
|
||||
{
|
||||
if (!item.InTypeList(TreasuresOfTokuno.LesserArtifactsTotal))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item is ChestOfHeirlooms heirlooms && (!heirlooms.Locked || heirlooms.TrapLevel != 10))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item is PigmentsOfTokuno tokuno && tokuno.Type != PigmentType.None)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
buttons.Add(new ItemTileButtonInfo(item));
|
||||
}
|
||||
|
||||
return buttons;
|
||||
}
|
||||
|
||||
public override void HandleButtonResponse(NetState sender, int adjustedButton, ImageTileButtonInfo buttonInfo)
|
||||
{
|
||||
var pm = sender.Mobile as PlayerMobile;
|
||||
|
||||
var item = ((ItemTileButtonInfo)buttonInfo).Item;
|
||||
|
||||
if (!(pm != null && item.IsChildOf(pm.Backpack) && pm.InRange(m_Collector.Location, 7)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
item.Delete();
|
||||
|
||||
var gumps = pm.GetGumps();
|
||||
|
||||
if (++pm.ToTItemsTurnedIn >= TreasuresOfTokuno.ItemsPerReward)
|
||||
{
|
||||
// Congratulations! You have turned in enough minor treasures to earn a greater reward.
|
||||
m_Collector.SayTo(pm, 1070980);
|
||||
|
||||
gumps.Close<ToTTurnInGump>(); // Sanity
|
||||
|
||||
if (!gumps.Has<ToTRedeemGump>())
|
||||
{
|
||||
gumps.Send(new ToTRedeemGump(m_Collector, false));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Collector.SayTo(
|
||||
pm,
|
||||
1070981, // You have turned in ~1_COUNT~ minor artifacts. Turn in ~2_NUM~ to receive a reward.
|
||||
$"{pm.ToTItemsTurnedIn}\t{TreasuresOfTokuno.ItemsPerReward}"
|
||||
);
|
||||
|
||||
var buttons = FindRedeemableItems(pm);
|
||||
|
||||
gumps.Close<ToTTurnInGump>(); // Sanity
|
||||
|
||||
if (buttons?.Count > 0)
|
||||
{
|
||||
gumps.Send(new ToTTurnInGump(m_Collector, buttons));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void HandleCancel(NetState sender)
|
||||
{
|
||||
if (sender.Mobile is not PlayerMobile pm || !pm.InRange(m_Collector.Location, 7))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (pm.ToTItemsTurnedIn == 0)
|
||||
{
|
||||
// Bring me 10 of the lost treasures of Tokuno and I will reward you with a valuable item.
|
||||
m_Collector.SayTo(pm, 1071013);
|
||||
}
|
||||
// This case should ALWAYS be true with this gump, just a sanity check
|
||||
else if (pm.ToTItemsTurnedIn < TreasuresOfTokuno.ItemsPerReward)
|
||||
{
|
||||
m_Collector.SayTo(
|
||||
pm,
|
||||
1070981, // You have turned in ~1_COUNT~ minor artifacts. Turn in ~2_NUM~ to receive a reward.
|
||||
$"{pm.ToTItemsTurnedIn}\t{TreasuresOfTokuno.ItemsPerReward}"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Collector.SayTo(pm, 1070982); // When you wish to choose your reward, you have but to approach me again.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ToTRedeemGump : BaseImageTileButtonsGump
|
||||
{
|
||||
private readonly Mobile m_Collector;
|
||||
|
||||
public ToTRedeemGump(Mobile collector, bool pigments) : base(
|
||||
pigments ? 1070986 : 1070985,
|
||||
pigments
|
||||
? PigmentRewards[(int)TreasuresOfTokuno.RewardEra - 1].ToArray<ImageTileButtonInfo>()
|
||||
: NormalRewards[(int)TreasuresOfTokuno.RewardEra - 1].ToArray<ImageTileButtonInfo>()
|
||||
) =>
|
||||
m_Collector = collector;
|
||||
|
||||
public static TypeTileButtonInfo[][] NormalRewards { get; } =
|
||||
{
|
||||
// ToT One Rewards
|
||||
new[]
|
||||
{
|
||||
new TypeTileButtonInfo(typeof(SwordsOfProsperity), 0x27A9, 1070963, 1071002),
|
||||
new TypeTileButtonInfo(typeof(SwordOfTheStampede), 0x27A2, 1070964, 1070978),
|
||||
new TypeTileButtonInfo(typeof(WindsEdge), 0x27A3, 1070965, 1071003),
|
||||
new TypeTileButtonInfo(typeof(DarkenedSky), 0x27AD, 1070966, 1071004),
|
||||
new TypeTileButtonInfo(typeof(TheHorselord), 0x27A5, 1070967, 1071005),
|
||||
new TypeTileButtonInfo(typeof(RuneBeetleCarapace), 0x277D, 1070968, 1071006),
|
||||
new TypeTileButtonInfo(typeof(KasaOfTheRajin), 0x2798, 1070969, 1071007),
|
||||
new TypeTileButtonInfo(typeof(Stormgrip), 0x2792, 1070970, 1071008),
|
||||
new TypeTileButtonInfo(typeof(TomeOfLostKnowledge), 0x0EFA, 0x530, 1070971, 1071009),
|
||||
new TypeTileButtonInfo(typeof(PigmentsOfTokuno), 0x0EFF, 1070933, 1071011)
|
||||
},
|
||||
// ToT Two Rewards
|
||||
new[]
|
||||
{
|
||||
new TypeTileButtonInfo(typeof(SwordsOfProsperity), 0x27A9, 1070963, 1071002),
|
||||
new TypeTileButtonInfo(typeof(SwordOfTheStampede), 0x27A2, 1070964, 1070978),
|
||||
new TypeTileButtonInfo(typeof(WindsEdge), 0x27A3, 1070965, 1071003),
|
||||
new TypeTileButtonInfo(typeof(DarkenedSky), 0x27AD, 1070966, 1071004),
|
||||
new TypeTileButtonInfo(typeof(TheHorselord), 0x27A5, 1070967, 1071005),
|
||||
new TypeTileButtonInfo(typeof(RuneBeetleCarapace), 0x277D, 1070968, 1071006),
|
||||
new TypeTileButtonInfo(typeof(KasaOfTheRajin), 0x2798, 1070969, 1071007),
|
||||
new TypeTileButtonInfo(typeof(Stormgrip), 0x2792, 1070970, 1071008),
|
||||
new TypeTileButtonInfo(typeof(TomeOfLostKnowledge), 0x0EFA, 0x530, 1070971, 1071009),
|
||||
new TypeTileButtonInfo(typeof(PigmentsOfTokuno), 0x0EFF, 1070933, 1071011)
|
||||
},
|
||||
// ToT Three Rewards
|
||||
new[]
|
||||
{
|
||||
new TypeTileButtonInfo(typeof(SwordsOfProsperity), 0x27A9, 1070963, 1071002),
|
||||
new TypeTileButtonInfo(typeof(SwordOfTheStampede), 0x27A2, 1070964, 1070978),
|
||||
new TypeTileButtonInfo(typeof(WindsEdge), 0x27A3, 1070965, 1071003),
|
||||
new TypeTileButtonInfo(typeof(DarkenedSky), 0x27AD, 1070966, 1071004),
|
||||
new TypeTileButtonInfo(typeof(TheHorselord), 0x27A5, 1070967, 1071005),
|
||||
new TypeTileButtonInfo(typeof(RuneBeetleCarapace), 0x277D, 1070968, 1071006),
|
||||
new TypeTileButtonInfo(typeof(KasaOfTheRajin), 0x2798, 1070969, 1071007),
|
||||
new TypeTileButtonInfo(typeof(Stormgrip), 0x2792, 1070970, 1071008),
|
||||
new TypeTileButtonInfo(typeof(TomeOfLostKnowledge), 0x0EFA, 0x530, 1070971, 1071009)
|
||||
}
|
||||
};
|
||||
|
||||
public static PigmentsTileButtonInfo[][] PigmentRewards { get; } =
|
||||
{
|
||||
// ToT One Pigment Rewards
|
||||
new[]
|
||||
{
|
||||
new PigmentsTileButtonInfo(PigmentType.ParagonGold),
|
||||
new PigmentsTileButtonInfo(PigmentType.VioletCouragePurple),
|
||||
new PigmentsTileButtonInfo(PigmentType.InvulnerabilityBlue),
|
||||
new PigmentsTileButtonInfo(PigmentType.LunaWhite),
|
||||
new PigmentsTileButtonInfo(PigmentType.DryadGreen),
|
||||
new PigmentsTileButtonInfo(PigmentType.ShadowDancerBlack),
|
||||
new PigmentsTileButtonInfo(PigmentType.BerserkerRed),
|
||||
new PigmentsTileButtonInfo(PigmentType.NoxGreen),
|
||||
new PigmentsTileButtonInfo(PigmentType.RumRed),
|
||||
new PigmentsTileButtonInfo(PigmentType.FireOrange)
|
||||
},
|
||||
// ToT Two Pigment Rewards
|
||||
new[]
|
||||
{
|
||||
new PigmentsTileButtonInfo(PigmentType.FadedCoal),
|
||||
new PigmentsTileButtonInfo(PigmentType.Coal),
|
||||
new PigmentsTileButtonInfo(PigmentType.FadedGold),
|
||||
new PigmentsTileButtonInfo(PigmentType.StormBronze),
|
||||
new PigmentsTileButtonInfo(PigmentType.Rose),
|
||||
new PigmentsTileButtonInfo(PigmentType.MidnightCoal),
|
||||
new PigmentsTileButtonInfo(PigmentType.FadedBronze),
|
||||
new PigmentsTileButtonInfo(PigmentType.FadedRose),
|
||||
new PigmentsTileButtonInfo(PigmentType.DeepRose)
|
||||
},
|
||||
// ToT Three Pigment Rewards
|
||||
new[]
|
||||
{
|
||||
new PigmentsTileButtonInfo(PigmentType.ParagonGold),
|
||||
new PigmentsTileButtonInfo(PigmentType.VioletCouragePurple),
|
||||
new PigmentsTileButtonInfo(PigmentType.InvulnerabilityBlue),
|
||||
new PigmentsTileButtonInfo(PigmentType.LunaWhite),
|
||||
new PigmentsTileButtonInfo(PigmentType.DryadGreen),
|
||||
new PigmentsTileButtonInfo(PigmentType.ShadowDancerBlack),
|
||||
new PigmentsTileButtonInfo(PigmentType.BerserkerRed),
|
||||
new PigmentsTileButtonInfo(PigmentType.NoxGreen),
|
||||
new PigmentsTileButtonInfo(PigmentType.RumRed),
|
||||
new PigmentsTileButtonInfo(PigmentType.FireOrange)
|
||||
}
|
||||
};
|
||||
|
||||
public override void HandleButtonResponse(NetState sender, int adjustedButton, ImageTileButtonInfo buttonInfo)
|
||||
{
|
||||
if (sender.Mobile is not PlayerMobile pm || !pm.InRange(m_Collector.Location, 7) ||
|
||||
!(pm.ToTItemsTurnedIn >= TreasuresOfTokuno.ItemsPerReward))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Item item = null;
|
||||
|
||||
if (buttonInfo is PigmentsTileButtonInfo p)
|
||||
{
|
||||
item = new PigmentsOfTokuno(p.Pigment);
|
||||
}
|
||||
else
|
||||
{
|
||||
var t = (TypeTileButtonInfo)buttonInfo;
|
||||
|
||||
if (t.Type == typeof(PigmentsOfTokuno)) // Special case of course.
|
||||
{
|
||||
pm.CloseGump<ToTTurnInGump>(); // Sanity
|
||||
pm.SendGump(new ToTRedeemGump(m_Collector, true), true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
item = t.Type.CreateInstance<Item>();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
return; // Sanity
|
||||
}
|
||||
|
||||
if (pm.AddToBackpack(item))
|
||||
{
|
||||
pm.ToTItemsTurnedIn -= TreasuresOfTokuno.ItemsPerReward;
|
||||
m_Collector.SayTo(
|
||||
pm,
|
||||
1070984, // You have earned the gratitude of the Empire. I have placed the ~1_OBJTYPE~ in your backpack.
|
||||
item.Name?.Length > 0 ? item.Name : $"#{item.LabelNumber}"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Delete();
|
||||
m_Collector.SayTo(pm, 500722); // You don't have enough room in your backpack!
|
||||
m_Collector.SayTo(pm, 1070982); // When you wish to choose your reward, you have but to approach me again.
|
||||
}
|
||||
}
|
||||
|
||||
public override void HandleCancel(NetState sender)
|
||||
{
|
||||
if (sender.Mobile is not PlayerMobile pm || !pm.InRange(m_Collector.Location, 7))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (pm.ToTItemsTurnedIn == 0)
|
||||
{
|
||||
// Bring me 10 of the lost treasures of Tokuno and I will reward you with a valuable item.
|
||||
m_Collector.SayTo(pm, 1071013);
|
||||
}
|
||||
// This and above case should ALWAYS be FALSE with this gump, just a sanity check
|
||||
else if (pm.ToTItemsTurnedIn < TreasuresOfTokuno.ItemsPerReward)
|
||||
{
|
||||
m_Collector.SayTo(
|
||||
pm,
|
||||
1070981, // You have turned in ~1_COUNT~ minor artifacts. Turn in ~2_NUM~ to receive a reward.
|
||||
$"{pm.ToTItemsTurnedIn}\t{TreasuresOfTokuno.ItemsPerReward}"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Collector.SayTo(pm, 1070982); // When you wish to choose your reward, you have but to approach me again.
|
||||
}
|
||||
}
|
||||
|
||||
public class TypeTileButtonInfo : ImageTileButtonInfo
|
||||
{
|
||||
public TypeTileButtonInfo(Type type, int itemID, TextDefinition label, int localizedToolTip = -1) : this(
|
||||
type,
|
||||
itemID,
|
||||
0,
|
||||
label,
|
||||
localizedToolTip
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
public TypeTileButtonInfo(
|
||||
Type type, int itemID, int hue, TextDefinition label, int localizedToolTip = -1
|
||||
) : base(
|
||||
itemID,
|
||||
hue,
|
||||
label,
|
||||
localizedToolTip
|
||||
) =>
|
||||
Type = type;
|
||||
|
||||
public Type Type { get; }
|
||||
}
|
||||
|
||||
public class PigmentsTileButtonInfo : ImageTileButtonInfo
|
||||
{
|
||||
public PigmentsTileButtonInfo(PigmentType p) : base(
|
||||
0xEFF,
|
||||
PigmentsOfTokuno.GetInfo(p)[0],
|
||||
PigmentsOfTokuno.GetInfo(p)[1]
|
||||
) =>
|
||||
Pigment = p;
|
||||
|
||||
public PigmentType Pigment { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Notes
|
||||
|
||||
Pigments of tokuno do NOT check for if item is already hued 0; APPARENTLY he still accepts it if it's < 10 charges.
|
||||
|
||||
Chest of Heirlooms don't show if unlocked.
|
||||
|
||||
Chest of heirlooms, locked, HARD to pick at 100 lock picking but not impossible. had 95 health to 0, cause it's trapped >< (explosion i think)
|
||||
*/
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Misc;
|
||||
|
||||
[ManualDirtyChecking]
|
||||
[TypeAlias("Server.Misc.TreasuresOfTokunoPersistance")]
|
||||
[Obsolete("Deprecated in favor of a configuration file. Only used for legacy deserialization")]
|
||||
public class TreasuresOfTokunoPersistence : Item
|
||||
{
|
||||
public TreasuresOfTokunoPersistence() : base(1) => Movable = false;
|
||||
|
||||
public TreasuresOfTokunoPersistence(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
TreasuresOfTokuno.RewardEra = (TreasuresOfTokunoEra)reader.ReadEncodedInt();
|
||||
TreasuresOfTokuno.DropEra = (TreasuresOfTokunoEra)reader.ReadEncodedInt();
|
||||
|
||||
Timer.DelayCall(Delete);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
using System;
|
||||
using Server.Misc;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class ToTAdminGump : Gump
|
||||
{
|
||||
private static readonly string[] m_ToTInfo =
|
||||
[
|
||||
// Opening Message
|
||||
"<center>Treasures of Tokuno Admin</center><br>" +
|
||||
"-Use the gems to switch eras<br>" +
|
||||
"-Drop era and Reward era can be changed separately<br>" +
|
||||
"-Drop era can be deactivated, Reward era is always activated",
|
||||
// Treasures of Tokuno 1 message
|
||||
"<center>Treasures of Tokuno 1</center><br>" +
|
||||
"-10 charge Bleach Pigment can drop as a Lesser Artifact<br>" +
|
||||
"-50 charge Neon Pigments available as a reward<br>",
|
||||
// Treasures of Tokuno 2 message
|
||||
"<center>Treasures of Tokuno 2</center><br>" +
|
||||
"-30 types of 1 charge Metallic Pigments drop as Lesser Artifacts<br>" +
|
||||
"-1 charge Bleach Pigment can drop as a Lesser Artifact<br>" +
|
||||
"-10 charge Greater Metallic Pigments available as a reward",
|
||||
// Treasures of Tokuno 3 message
|
||||
"<center>Treasures of Tokuno 3</center><br>" +
|
||||
"-10 types of 1 charge Fresh Pigments drop as Lesser Artifacts<br>" +
|
||||
"-1 charge Bleach Pigment can drop as a Lesser Artifact<br>" +
|
||||
"-Leurocian's Mempo Of Fortune can drop as a Lesser Artifact"
|
||||
];
|
||||
|
||||
private readonly int m_ToTEras;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public ToTAdminGump() : base(30, 50)
|
||||
{
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Draggable = true;
|
||||
Resizable = false;
|
||||
|
||||
m_ToTEras = Enum.GetValues(typeof(TreasuresOfTokunoEra)).Length - 1;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 320, 75 + m_ToTEras * 25, 9200);
|
||||
AddImageTiled(25, 18, 270, 10, 9267);
|
||||
AddLabel(75, 5, 54, "Treasures of Tokuno Admin");
|
||||
AddLabel(10, 25, 54, "ToT Era");
|
||||
AddLabel(90, 25, 54, "Drop Era");
|
||||
AddLabel(195, 25, 54, "Reward Era");
|
||||
AddLabel(287, 25, 54, "Info");
|
||||
|
||||
AddBackground(320, 0, 200, 150, 9200);
|
||||
AddImageTiled(325, 5, 190, 140, 2624);
|
||||
AddAlphaRegion(325, 5, 190, 140);
|
||||
|
||||
SetupToTEras();
|
||||
}
|
||||
|
||||
public void SetupToTEras()
|
||||
{
|
||||
var isActivated = TreasuresOfTokuno.DropEra != TreasuresOfTokunoEra.None;
|
||||
AddButton(75, 50, isActivated ? 2361 : 2360, isActivated ? 2361 : 2360, 1);
|
||||
AddLabel(90, 45, isActivated ? 167 : 137, isActivated ? "Activated" : "Deactivated");
|
||||
|
||||
for (var i = 0; i < m_ToTEras; i++)
|
||||
{
|
||||
var yoffset = i * 25;
|
||||
|
||||
var isThisDropEra = (int)TreasuresOfTokuno.DropEra - 1 == i;
|
||||
var isThisRewardEra = (int)TreasuresOfTokuno.RewardEra - 1 == i;
|
||||
var dropButtonID = isThisDropEra ? 2361 : 2360;
|
||||
var rewardButtonID = isThisRewardEra ? 2361 : 2360;
|
||||
|
||||
AddLabel(10, 70 + yoffset, 2100, $"ToT {i + 1}");
|
||||
AddButton(75, 75 + yoffset, dropButtonID, dropButtonID, 2 + i * 2);
|
||||
AddLabel(90, 70 + yoffset, isThisDropEra ? 167 : 137, isThisDropEra ? "Active" : "Inactive");
|
||||
AddButton(180, 75 + yoffset, rewardButtonID, rewardButtonID, 2 + i * 2 + 1);
|
||||
AddLabel(195, 70 + yoffset, isThisRewardEra ? 167 : 137, isThisRewardEra ? "Active" : "Inactive");
|
||||
|
||||
AddButton(285, 70 + yoffset, 4005, 4006, i, GumpButtonType.Page, 2 + i);
|
||||
}
|
||||
|
||||
for (var i = 0; i < m_ToTInfo.Length; i++)
|
||||
{
|
||||
AddPage(1 + i);
|
||||
AddHtml(330, 10, 180, 130, m_ToTInfo[i], false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
var button = info.ButtonID;
|
||||
var from = sender.Mobile;
|
||||
|
||||
if (button == 1)
|
||||
{
|
||||
TreasuresOfTokuno.DropEra = TreasuresOfTokunoEra.None;
|
||||
from.SendMessage("Treasures of Tokuno Drops have been deactivated");
|
||||
}
|
||||
else if (button >= 2)
|
||||
{
|
||||
int selectedToT;
|
||||
if (button % 2 == 0)
|
||||
{
|
||||
selectedToT = button / 2;
|
||||
TreasuresOfTokuno.DropEra = (TreasuresOfTokunoEra)selectedToT;
|
||||
from.SendMessage($"Treasures of Tokuno {selectedToT} Drops have been enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedToT = (button - 1) / 2;
|
||||
TreasuresOfTokuno.RewardEra = (TreasuresOfTokunoEra)selectedToT;
|
||||
from.SendMessage($"Treasures of Tokuno {selectedToT} Rewards have been enabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
CommandSystem.Register("ToTAdmin", AccessLevel.Administrator, ToTAdmin_OnCommand);
|
||||
}
|
||||
|
||||
[Usage("ToTAdmin"), Description("Displays a menu to configure Treasures of Tokuno.")]
|
||||
public static void ToTAdmin_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new ToTAdminGump());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -243,24 +243,14 @@ namespace Server
|
|||
|
||||
public static Type[] GrimmochJournalTypes { get; } =
|
||||
{
|
||||
typeof(GrimmochJournal1), typeof(GrimmochJournal2), typeof(GrimmochJournal3),
|
||||
typeof(GrimmochJournal6), typeof(GrimmochJournal7), typeof(GrimmochJournal11),
|
||||
typeof(GrimmochJournal14), typeof(GrimmochJournal17), typeof(GrimmochJournal23)
|
||||
};
|
||||
|
||||
public static Type[] LysanderNotebookTypes { get; } =
|
||||
{
|
||||
typeof(LysanderNotebook1), typeof(LysanderNotebook2), typeof(LysanderNotebook3),
|
||||
typeof(LysanderNotebook7), typeof(LysanderNotebook8), typeof(LysanderNotebook11)
|
||||
};
|
||||
|
||||
public static Type[] TavarasJournalTypes { get; } =
|
||||
{
|
||||
typeof(TavarasJournal1), typeof(TavarasJournal2), typeof(TavarasJournal3),
|
||||
typeof(TavarasJournal6), typeof(TavarasJournal7), typeof(TavarasJournal8),
|
||||
typeof(TavarasJournal9), typeof(TavarasJournal11), typeof(TavarasJournal14),
|
||||
typeof(TavarasJournal16), typeof(TavarasJournal16b), typeof(TavarasJournal17),
|
||||
typeof(TavarasJournal19)
|
||||
};
|
||||
|
||||
public static Type[] NewWandTypes { get; } =
|
||||
|
|
|
|||
|
|
@ -3608,7 +3608,7 @@ namespace Server.Mobiles
|
|||
region.IsPartOf("Fan Dancer's Dojo")))
|
||||
{
|
||||
givenToTKill = true;
|
||||
TreasuresOfTokuno.HandleKill(this, ds.m_Mobile);
|
||||
//TreasuresOfTokuno.HandleKill(this, ds.m_Mobile);
|
||||
}
|
||||
|
||||
if (ds.m_Mobile is PlayerMobile pm)
|
||||
|
|
|
|||
|
|
@ -498,28 +498,7 @@ namespace Server.Misc
|
|||
{
|
||||
cont = new Bag { Hue = 0x501, Name = "Tokuno Minor Artifacts" };
|
||||
|
||||
PlaceItemIn(cont, 42, 70, new Exiler());
|
||||
PlaceItemIn(cont, 38, 53, new HanzosBow());
|
||||
PlaceItemIn(cont, 45, 40, new TheDestroyer());
|
||||
PlaceItemIn(cont, 92, 80, new DragonNunchaku());
|
||||
PlaceItemIn(cont, 42, 56, new PeasantsBokuto());
|
||||
PlaceItemIn(cont, 44, 71, new TomeOfEnlightenment());
|
||||
PlaceItemIn(cont, 35, 35, new ChestOfHeirlooms());
|
||||
PlaceItemIn(cont, 29, 0, new HonorableSwords());
|
||||
PlaceItemIn(cont, 49, 85, new AncientUrn());
|
||||
PlaceItemIn(cont, 51, 58, new FluteOfRenewal());
|
||||
PlaceItemIn(cont, 70, 51, new PigmentsOfTokuno());
|
||||
PlaceItemIn(cont, 40, 79, new AncientSamuraiDo());
|
||||
PlaceItemIn(cont, 51, 61, new LegsOfStability());
|
||||
PlaceItemIn(cont, 88, 78, new GlovesOfTheSun());
|
||||
PlaceItemIn(cont, 55, 62, new AncientFarmersKasa());
|
||||
PlaceItemIn(cont, 55, 83, new ArmsOfTacticalExcellence());
|
||||
PlaceItemIn(cont, 50, 85, new DaimyosHelm());
|
||||
PlaceItemIn(cont, 52, 78, new BlackLotusHood());
|
||||
PlaceItemIn(cont, 52, 79, new DemonForks());
|
||||
PlaceItemIn(cont, 33, 49, new PilferedDancerFans());
|
||||
|
||||
PlaceItemIn(bank, 58, 124, cont);
|
||||
PlaceItemIn(bank, 58, 124, cont);
|
||||
}
|
||||
|
||||
if (Core.SE) // This bag came only after SE.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue