-
Notifications
You must be signed in to change notification settings - Fork 485
Castle Siege Life Stones #728
Copy link
Copy link
Open
Labels
Description
Summary
Implement Life Stones — guild-summoned NPCs that heal nearby allies during Castle Siege battle. Each guild can place one Life Stone, which goes through a creation phase before becoming active.
Prerequisites
- Castle Siege Guild Selection & Participant Tracking #724 (Guild Selection) — for join side awareness.
- Castle Siege NPCs (Gates, Statues, Crown, Switches, Levers) #725 (NPCs) — for the
CastleSiegeLifeStoneNPC class pattern. - Castle Siege State Machine #722 (State Machine) — for
Startstate andCastleSiegeContext.
Requirements
1. Life Stone NPC — GameLogic/CastleSiege/NPC/CastleSiegeLifeStone.cs (created in Phase 6)
Extends AttackableNpcBase. Characteristics:
- Attackable (enemies can destroy it).
- No movement, no attack ability.
- Immune to pushback and Radiance effects.
- Does not drop loot on death.
- Tracks: owning guild ID, join side, creation phase progress.
2. Life Stone Intelligence — GameLogic/CastleSiege/Intelligence/CastleSiegeLifeStoneIntelligence.cs (created in Phase 6)
Creation Phase (60 seconds, 5 stages):
- On spawn, the Life Stone is in "creating" state.
- Every 12 seconds, advance to the next visual stage (0→1→2→3→4).
- Send
CastleSiegeLifeStoneStatepacket to nearby players at each stage. - After 60 seconds (stage 4 complete), transition to "active" state.
Active Phase:
- Every AI tick: find all players within 3 tiles.
- Filter to same-side players only.
- Heal each player:
+1% of MaxHPfor HP, MP, AG (not shield). - Use existing
IAttackableattribute system for healing.
Death/Destruction:
- Remove from
CastleSiegeContexttracking. - No loot drops (override drop generator behavior or check in
AttackableNpcBase).
3. Summon Life Stone Action — New file: GameLogic/CastleSiege/Actions/CastleSiegeSummonLifeStoneAction.cs
Validation:
- Current state is
Start. - Player has a guild and a join side ≠
None. - Player's guild does not already have an active Life Stone (check
CastleSiegeContext). - Player is in the Castle Siege map.
Effect:
- Create a
CastleSiegeLifeStoneat the player's position. - Spawn it on the map.
- Track in
CastleSiegeContext(guild → Life Stone mapping).
4. Life Stone Forced Destruction
Life Stones are forcefully killed when:
SetPlayerJoinSideAsync(killLifeStones: true)is called (on castle capture/side swap).- Castle Siege state changes away from
Start. - The Life Stone leaves the CS map (shouldn't happen normally).
Implement in CastleSiegeContext.KillAllLifeStonesAsync():
- Iterate all tracked Life Stones.
- Call kill/die on each.
- Remove from tracking.
5. View Interface & Remote View
ICastleSiegeLifeStoneStatePlugIn— sends creation phase progress.CastleSiegeLifeStoneStatePlugIn— remote view implementation.
Files to Create
| File | Description |
|---|---|
GameLogic/CastleSiege/Actions/CastleSiegeSummonLifeStoneAction.cs |
Summon logic |
GameLogic/Views/CastleSiege/ICastleSiegeLifeStoneStatePlugIn.cs |
View interface |
GameServer/RemoteView/CastleSiege/CastleSiegeLifeStoneStatePlugIn.cs |
Remote view |
(NPC class and intelligence created in Phase 6.)
Acceptance Criteria
- Each guild can place exactly one Life Stone during battle.
- Life Stone goes through a 60-second creation phase with 5 visual stages.
- Active Life Stones heal nearby (≤3 tiles) same-side players at 1% max HP per tick.
- Life Stones do not drop loot on death.
- Life Stones are immune to pushback.
- All Life Stones are destroyed on castle capture (side swap).
- All Life Stones are destroyed when battle ends.
- Life Stone creation state is broadcast to nearby players.
Reactions are currently unavailable