2 Commits

Author SHA1 Message Date
Acentech Dev
b890e82a88 refactor(CS-P3): siege defenses = 6 castle gates only (removed 4 statues per user - kept clean gate mechanic)
Some checks failed
.NET Core / build (push) Has been cancelled
2026-07-15 11:18:28 +03:00
Acentech Dev
8114930855 feat(CS-P3): 4 real guardian statues (283) at castle positions 82/107/94,129/131/126 - all defenses required for throne 2026-07-15 10:53:57 +03:00

View File

@@ -27,13 +27,10 @@ public sealed class CastleSiegeEventPlugIn : IPeriodicTaskPlugIn, ISupportCustom
private const ushort ValleyOfLorenMapNumber = 30; private const ushort ValleyOfLorenMapNumber = 30;
private const short CastleGateNumber = 277; // client MONSTER_CASTLE_GATE1 -> renders a real gate + blocks terrain until broken private const short CastleGateNumber = 277; // client MONSTER_CASTLE_GATE1 -> renders a real gate + blocks terrain until broken
private const short GateTemplateNumber = 131; // BloodCastle "Castle Gate" destructible (has HP) — HP template for 277 private const short GateTemplateNumber = 131; // BloodCastle "Castle Gate" destructible (has HP) — HP template for 277
private const short GuardianStatueNumber = 283; // "Guardian Statue" — inner castle defense
private const short StatueTemplateNumber = 132; // BloodCastle "Statue of Saint" destructible (has HP) — HP template for 283
private const int SwitchHoldRange = 3; private const int SwitchHoldRange = 3;
// Castle defenses spawned at siege start — destructibles the attackers must break: (number, x, y). // Castle defenses spawned at siege start — the 6 REAL castle gates (client g_byGateLocation).
// Gates are at the 6 REAL castle gate positions (client g_byGateLocation) so the client renders them // The client renders them closed and blocks the terrain until each is broken. All must fall before the throne.
// closed and blocks the terrain until broken. Guardian statues stand inside near the throne.
private static readonly (short Number, byte X, byte Y)[] DefenseSpawns = private static readonly (short Number, byte X, byte Y)[] DefenseSpawns =
{ {
(CastleGateNumber, 67, 114), (CastleGateNumber, 67, 114),
@@ -42,8 +39,6 @@ public sealed class CastleSiegeEventPlugIn : IPeriodicTaskPlugIn, ISupportCustom
(CastleGateNumber, 81, 161), (CastleGateNumber, 81, 161),
(CastleGateNumber, 107, 161), (CastleGateNumber, 107, 161),
(CastleGateNumber, 93, 204), (CastleGateNumber, 93, 204),
(GuardianStatueNumber, 170, 208),
(GuardianStatueNumber, 182, 208),
}; };
// Crown Switch positions on Valley of Loren (from the map init) — held by standing on them: (number, x, y). // Crown Switch positions on Valley of Loren (from the map init) — held by standing on them: (number, x, y).
@@ -177,10 +172,9 @@ public sealed class CastleSiegeEventPlugIn : IPeriodicTaskPlugIn, ISupportCustom
continue; continue;
} }
// The stock CS gate (277) / statue (283) definitions have no HP and aren't destructible; // The stock CS gate (277) definition has no HP and isn't destructible; make it breakable
// make them breakable by borrowing the HP/attributes of a working destructible (131/132). // by borrowing the HP/attributes of a working destructible (BloodCastle gate 131).
var template = gameContext.Configuration.Monsters.FirstOrDefault( var template = gameContext.Configuration.Monsters.FirstOrDefault(m => m.Number == GateTemplateNumber);
m => m.Number == (spawn.Number == CastleGateNumber ? GateTemplateNumber : StatueTemplateNumber));
EnsureDestructible(definition, template); EnsureDestructible(definition, template);
var spawnArea = new MonsterSpawnArea var spawnArea = new MonsterSpawnArea