#W# Bosses: Working on Dungeon Bosses. Summon Items and Alters.

This commit is contained in:
WarrentyExpired 2026-10-28 18:58:52 -04:00
parent 76e38ff3f7
commit 0daf369b33
7 changed files with 207 additions and 1 deletions

View file

@ -0,0 +1,68 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using ModernUO.Serialization;
namespace Server.Custom.Dungeons
{
[SerializationGenerator(0)]
public abstract partial class BossAlter : Item
{
private Mobile _ActiveBoss;
[CommandProperty(AccessLevel.GameMaster)]
public Mobile ActiveBoss { get => _ActiveBoss; set => _ActiveBoss = value; }
public abstract Type SummonItem { get; }
public abstract Type BossType { get; }
public BossAlter(int itemID) : base(itemID)
{
Movable = false;
}
public override bool OnDragDrop(Mobile from, Item dropped)
{
if (dropped.GetType() != SummonItem)
{
from.SendMessage(33, "The altar rejects your offering. It requires a different catalyst.");
return false;
}
if (_ActiveBoss != null && _ActiveBoss.Alive && !_ActiveBoss.Deleted)
{
from.SendMessage(33, "The guardian of this domain is already present!");
return false;
}
dropped.Delete();
Effects.PlaySound(Location, Map, 0x20F);
Effects.SendLocationEffect(Location, Map, 0x3728, 10, 10);
Effects.SendLocationEffect(Location, Map, 0x3709, 10, 30, 1153, 0);
try
{
Mobile boss = (Mobile)Activator.CreateInstance(BossType);
boss.MoveToWorld(new Point3D(X + 1, Y + 1, Z), Map);
boss.PlaySound(boss.GetAngerSound());
_ActiveBoss = boss;
from.SendMessage(89, "The altar consumes your offering, and a terrible presence enters the room!");
}
catch (Exception e)
{
Console.WriteLine($"Error spawning dungeon boss: {e.Message}");
from.SendMessage(33, "The altar flickers, but nothing happens.");
}
return true;
}
public BossAlter(Serial serial) : base(serial)
{
}
}
}

View file

@ -0,0 +1,27 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using ModernUO.Serialization;
namespace Server.Custom.Dungeons
{
[SerializationGenerator(0)]
public partial class ShameAlter : BossAlter
{
public override Type SummonItem => typeof(PulsingBloodClot);
public override Type BossType => typeof(BloodstoneTitan);
[Constructible]
public ShameAlter() : base(0xFFBD)
{
Name = "Altar of the Bloodstone Titan";
Hue = 1157;
}
public ShameAlter(Serial serial) : base(serial)
{
}
}
}

View file

@ -0,0 +1,23 @@
using System;
using Server;
using Server.Items;
using ModernUO.Serialization;
namespace Server.Custom.Dungeons
{
[SerializationGenerator(0)] // ModernUO Auto-Serialization
public partial class PulsingBloodClot : Item
{
[Constructible] // Spelled with an 'i' for ModernUO
public PulsingBloodClot() : base(0x122A)
{
Name = "Pulsing Blood Clot";
Weight = 1.0;
Hue = 1157;
}
public PulsingBloodClot(Serial serial) : base(serial)
{
}
}
}

View file

@ -0,0 +1,57 @@
using ModernUO.Serialization;
namespace Server.Mobiles
{
[SerializationGenerator(0, false)]
public partial class BloodstoneTitan : BaseCreature
{
[Constructible]
public BloodstoneTitan() : base(AIType.AI_Mage)
{
Body = 829;
Hue = 1157;
BaseSoundID = 278;
SetStr(1026, 1115);
SetDex(80, 100);
SetInt(550, 750);
SetHits(1200, 1300);
SetDamage(27, 37);
SetDamageType(ResistanceType.Physical, 40);
SetDamageType(ResistanceType.Poison, 30);
SetDamageType(ResistanceType.Energy, 30);
SetResistance(ResistanceType.Physical, 55, 65);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 50, 60);
SetResistance(ResistanceType.Energy, 30, 40);
SetSkill(SkillName.EvalInt, 99.1, 110.0);
SetSkill(SkillName.Magery, 99.1, 110.0);
SetSkill(SkillName.Meditation, 80.4, 100.0);
SetSkill(SkillName.MagicResist, 80.1, 95.0);
SetSkill(SkillName.Tactics, 99.1, 100.0);
SetSkill(SkillName.Wrestling, 99.1, 100.0);
Fame = 32000;
Karma = -32000;
VirtualArmor = 60;
}
public override string CorpseName => "a bloodstone corpse";
public override string DefaultName => "a bloodstone titan";
public override int TreasureMapLevel => 5;
public override void GenerateLoot()
{
AddLoot(LootPack.SuperBoss, 2);
AddLoot(LootPack.SuperBoss, 2);
}
}
}