feat(tvt): test-phase statue HP override, stationary guards, in-game rename
- Statue HP overridden to 100k at spawn (MaximumHealthOverride) for the test phase - no DB change. - Guards made fully stationary by overriding their definition's IntelligenceTypeName to NullMonsterIntelligence at runtime (no wander, no chase); no DB change. - Statue/guard in-game names rebranded to 'TvT Statue' / 'TvT Guard' (runtime designation override).
This commit is contained in:
@@ -120,6 +120,21 @@ public class HeykelSavasiContext : MiniGameContext
|
|||||||
(459, 56, 58),
|
(459, 56, 58),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TEST-PHASE statue health: overrides the statue definition's real (3,000,000) health at spawn via
|
||||||
|
/// <see cref="MonsterSpawnArea.MaximumHealthOverride"/>, so statues can be fully broken within a match
|
||||||
|
/// while tuning. Applied purely at spawn time (no DB/config change); raise or remove after testing.
|
||||||
|
/// </summary>
|
||||||
|
private const int StatueTestHealth = 100_000;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Assembly-qualified type name of the NPC intelligence used to make the statue guards completely
|
||||||
|
/// STATIONARY (no wandering, no chasing): they stay at their fixed spawn tile next to the statue until
|
||||||
|
/// killed. Applied by overriding the guard definition's <c>IntelligenceTypeName</c> at runtime (see
|
||||||
|
/// <see cref="SpawnStatueAsync"/>), so no configuration/DB change is needed.
|
||||||
|
/// </summary>
|
||||||
|
private const string StationaryGuardIntelligenceTypeName = "MUnique.OpenMU.GameLogic.NPC.NullMonsterIntelligence, MUnique.OpenMU.GameLogic";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Maps a destroyed statue's index (0..5) to the <see cref="MUnique.OpenMU.DataModel.Configuration.MagicEffectDefinition.Number"/>
|
/// Maps a destroyed statue's index (0..5) to the <see cref="MUnique.OpenMU.DataModel.Configuration.MagicEffectDefinition.Number"/>
|
||||||
/// of the class buff granted to the whole attacking team. All of these effects already exist in
|
/// of the class buff granted to the whole attacking team. All of these effects already exist in
|
||||||
@@ -774,6 +789,9 @@ public class HeykelSavasiContext : MiniGameContext
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rename the in-game statue name to the event branding (runtime override, no DB change).
|
||||||
|
statueDefinition.Designation = "TvT Statue";
|
||||||
|
|
||||||
// Distinct spawn-index ranges per (defender, index), so the up-front spawns never collide:
|
// Distinct spawn-index ranges per (defender, index), so the up-front spawns never collide:
|
||||||
// e.g. Red index 0 -> 1000..1003, Blue index 3 -> 2030..2033.
|
// e.g. Red index 0 -> 1000..1003, Blue index 3 -> 2030..2033.
|
||||||
var spawnIndexBase = ((int)defender * 1000) + (index * 10);
|
var spawnIndexBase = ((int)defender * 1000) + (index * 10);
|
||||||
@@ -788,6 +806,10 @@ public class HeykelSavasiContext : MiniGameContext
|
|||||||
Y2 = pos.Y,
|
Y2 = pos.Y,
|
||||||
Direction = Direction.South,
|
Direction = Direction.South,
|
||||||
SpawnTrigger = SpawnTrigger.OnceAtEventStart,
|
SpawnTrigger = SpawnTrigger.OnceAtEventStart,
|
||||||
|
|
||||||
|
// TEST PHASE: lower the statue's effective HP so it can be broken within a match (see
|
||||||
|
// StatueTestHealth). Overrides the definition's 3M health only for this spawn - no DB change.
|
||||||
|
MaximumHealthOverride = StatueTestHealth,
|
||||||
};
|
};
|
||||||
|
|
||||||
var statueNpc = await this._mapInitializer.InitializeSpawnAsync(spawnIndexBase, this.Map, statueSpawnArea, this).ConfigureAwait(false);
|
var statueNpc = await this._mapInitializer.InitializeSpawnAsync(spawnIndexBase, this.Map, statueSpawnArea, this).ConfigureAwait(false);
|
||||||
@@ -805,6 +827,12 @@ public class HeykelSavasiContext : MiniGameContext
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Runtime overrides (no DB change): make the guards fully STATIONARY next to the statue and
|
||||||
|
// brand their in-game name. Guard 580 is only used by this event, so mutating its shared
|
||||||
|
// definition here is safe and idempotent (re-applied on every event start).
|
||||||
|
guardDefinition.IntelligenceTypeName = StationaryGuardIntelligenceTypeName;
|
||||||
|
guardDefinition.Designation = "TvT Guard";
|
||||||
|
|
||||||
var spawnedGuards = 0;
|
var spawnedGuards = 0;
|
||||||
for (var i = 0; i < GuardsPerStatue; i++)
|
for (var i = 0; i < GuardsPerStatue; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user