feat(hs): add HeykelSavasi MiniGameDefinition initializer

This commit is contained in:
Acentech Dev
2026-07-20 22:44:38 +03:00
parent b90013c4bb
commit 5d0f475472
2 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
// <copyright file="HeykelSavasiInitializer.cs" company="MUnique">
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </copyright>
namespace MUnique.OpenMU.Persistence.Initialization.VersionSeasonSix.Events;
using MUnique.OpenMU.DataModel.Configuration;
using MUnique.OpenMU.Persistence.Initialization.VersionSeasonSix.Maps;
/// <summary>
/// The initializer for the Heykel Savasi event.
/// </summary>
internal class HeykelSavasiInitializer : InitializerBase
{
/// <summary>
/// The Zen reward given to each member of the winning team (applied directly by the event context, not via <see cref="MiniGameReward"/>).
/// </summary>
public const int WinnerZenReward = 10_000_000;
/// <summary>
/// Initializes a new instance of the <see cref="HeykelSavasiInitializer" /> class.
/// </summary>
/// <param name="context">The context.</param>
/// <param name="gameConfiguration">The game configuration.</param>
public HeykelSavasiInitializer(IContext context, GameConfiguration gameConfiguration)
: base(context, gameConfiguration)
{
}
/// <inheritdoc />
public override void Initialize()
{
var heykelSavasi = this.Context.CreateNew<MiniGameDefinition>();
heykelSavasi.SetGuid((short)MiniGameType.HeykelSavasi, 0);
this.GameConfiguration.MiniGameDefinitions.Add(heykelSavasi);
heykelSavasi.Name = "Heykel Savasi";
heykelSavasi.Description = "Takim vs takim heykel kirma savasi.";
heykelSavasi.Type = MiniGameType.HeykelSavasi;
heykelSavasi.GameLevel = 0;
heykelSavasi.MapCreationPolicy = MiniGameMapCreationPolicy.Shared;
heykelSavasi.EnterDuration = TimeSpan.FromMinutes(5);
heykelSavasi.GameDuration = TimeSpan.FromMinutes(5);
heykelSavasi.ExitDuration = TimeSpan.FromSeconds(15);
heykelSavasi.MaximumPlayerCount = 20;
heykelSavasi.AllowParty = false;
heykelSavasi.SaveRankingStatistics = false;
heykelSavasi.Entrance = this.GameConfiguration.Maps
.First(m => m.Number == HeykelSavasiMap.Number)
.ExitGates.First(g => g.IsSpawnGate); // Fallback entrance; the real per-team base gate is chosen by the join action.
}
}

View File

@@ -88,6 +88,7 @@ public class GameConfigurationInitializer : GameConfigurationInitializerBase
new DevilSquareInitializer(this.Context, this.GameConfiguration).Initialize(); new DevilSquareInitializer(this.Context, this.GameConfiguration).Initialize();
new BloodCastleInitializer(this.Context, this.GameConfiguration).Initialize(); new BloodCastleInitializer(this.Context, this.GameConfiguration).Initialize();
new ChaosCastleInitializer(this.Context, this.GameConfiguration).Initialize(); new ChaosCastleInitializer(this.Context, this.GameConfiguration).Initialize();
new HeykelSavasiInitializer(this.Context, this.GameConfiguration).Initialize();
} }
private void CreateJewelMixes() private void CreateJewelMixes()