#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
|
|
@ -1,68 +0,0 @@
|
|||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ namespace Server.Custom.Events
|
|||
private bool _triggered;
|
||||
|
||||
[Constructible]
|
||||
public PortalSpawner() : base(0x0F6C)
|
||||
public PortalSpawner() : base(0xFF93)
|
||||
{
|
||||
Name = "a horrific tear";
|
||||
Hue = 1157;
|
||||
|
|
@ -24,6 +24,28 @@ namespace Server.Custom.Events
|
|||
{
|
||||
}
|
||||
|
||||
private bool _zAdjusted;
|
||||
|
||||
public override void OnMapChange()
|
||||
{
|
||||
base.OnMapChange();
|
||||
|
||||
// Now it checks the moment it officially enters the world
|
||||
if (!_zAdjusted && Map != null && Map != Map.Internal)
|
||||
{
|
||||
_zAdjusted = true;
|
||||
|
||||
// Wait one tick for the spawner to finish snapping it to the floor
|
||||
Timer.DelayCall(TimeSpan.Zero, () =>
|
||||
{
|
||||
if (!Deleted)
|
||||
{
|
||||
Z += 5; // Adjust as needed
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HandlesOnMovement => true;
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue