feat(hs): team-base respawn + reapply earned buffs on respawn

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Acentech Dev
2026-07-21 00:25:44 +03:00
parent 89aef08bed
commit 83cb9b9fe4
2 changed files with 19 additions and 0 deletions

View File

@@ -624,6 +624,10 @@ public class HeykelSavasiContext : MiniGameContext
}
}
/// <summary>Reapplies the team's earned buffs to a player who just (re)spawned.</summary>
/// <param name="player">The player who (re)spawned.</param>
public ValueTask OnPlayerRespawnedAsync(Player player) => this.ReapplyBuffsAsync(player);
/// <summary>
/// Pure, dependency-free tracker for statue-break progress and win detection. Extracted out of
/// <see cref="HeykelSavasiContext"/> so it can be unit-tested directly, without constructing a full

View File

@@ -1204,6 +1204,13 @@ public class Player : AsyncDisposable, IBucketMapObserver, IAttackable, IAttacke
await this.CurrentMap.AddAsync(summon).ConfigureAwait(false);
summon.OnSpawn();
}
// ADAMU-CUSTOM: Heykel Savasi -> reapply the team's earned buffs after (re)spawning during battle.
if (this.CurrentMiniGame is HeykelSavasiContext heykelSavasiRebuff
&& heykelSavasiRebuff.State == MiniGameState.Playing)
{
await heykelSavasiRebuff.OnPlayerRespawnedAsync(this).ConfigureAwait(false);
}
}
/// <summary>
@@ -2325,6 +2332,14 @@ public class Player : AsyncDisposable, IBucketMapObserver, IAttackable, IAttacke
};
}
// ADAMU-CUSTOM: Heykel Savasi -> respawn at the player's own team base while the battle is running.
if (this.CurrentMiniGame is HeykelSavasiContext heykelSavasiRespawn
&& heykelSavasiRespawn.State == MiniGameState.Playing
&& heykelSavasiRespawn.GetTeam(this) != HeykelSavasiTeam.None)
{
return heykelSavasiRespawn.GetTeamSpawnGate(heykelSavasiRespawn.GetTeam(this));
}
var spawnTargetMapDefinition = this.CurrentMap.Definition.SafezoneMap ?? this.CurrentMap.Definition;
var targetMap = await this.GameContext.GetMapAsync((ushort)spawnTargetMapDefinition.Number, false).ConfigureAwait(false);
return targetMap?.SafeZoneSpawnGate