#W# Bosses: Working on Dungeon Bosses. Added some reward drops to increase stat/skill/totalskill cap.
This commit is contained in:
parent
00c25cd506
commit
69a2b8772b
11 changed files with 406 additions and 3 deletions
60
Projects/UOContent/Items/Custom/CrystalOfInsight.cs
Normal file
60
Projects/UOContent/Items/Custom/CrystalOfInsight.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[SerializationGenerator(0)]
|
||||
public partial class CrystalOfInsight : Item
|
||||
{
|
||||
[Constructible]
|
||||
public CrystalOfInsight() : base(0x1F19) // A cool crystal/gem graphic
|
||||
{
|
||||
Name = "a crystalline shard of insight";
|
||||
Hue = 0x47E; // Matches the Diamond Core stance hue
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
// Security check: Must be in the player's main backpack to use
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // "That must be in your pack for you to use it."
|
||||
return;
|
||||
}
|
||||
|
||||
// In UO integer logic, 720.0 is 7200, and 1.0 is 10
|
||||
int maxCap = 7200;
|
||||
int capIncrease = 10;
|
||||
|
||||
if (from.SkillsCap >= maxCap)
|
||||
{
|
||||
from.SendMessage(38, "Your mind cannot expand any further. You are already at the absolute maximum skill cap.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply the permanent increase
|
||||
from.SkillsCap += capIncrease;
|
||||
|
||||
// Failsafe: If they somehow used a +1.0 item while at 719.5, hard-cap it at exactly 720.0
|
||||
if (from.SkillsCap > maxCap)
|
||||
{
|
||||
from.SkillsCap = maxCap;
|
||||
}
|
||||
|
||||
// Theatrical effects to make the reward feel powerful
|
||||
from.SendMessage(0x47E, "The crystal shatters in your hands, expanding your mind! Your total skill cap has permanently increased by 1.0.");
|
||||
from.PlaySound(0x1F8); // Shatter sound (same as the Titan's stance shift)
|
||||
from.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist); // Sparkle effect around the player
|
||||
|
||||
// Destroy the item now that it has been consumed
|
||||
Delete();
|
||||
}
|
||||
|
||||
public CrystalOfInsight(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue