diff --git a/src/Persistence/Initialization/Updates/AddPoisonWingsUpdateSeason6.cs b/src/Persistence/Initialization/Updates/AddPoisonWingsUpdateSeason6.cs new file mode 100644 index 0000000..cbed78f --- /dev/null +++ b/src/Persistence/Initialization/Updates/AddPoisonWingsUpdateSeason6.cs @@ -0,0 +1,56 @@ +// +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// + +namespace MUnique.OpenMU.Persistence.Initialization.Updates; + +using System.Runtime.InteropServices; +using MUnique.OpenMU.DataModel.Configuration; +using MUnique.OpenMU.Persistence.Initialization.VersionSeasonSix.Items; +using MUnique.OpenMU.PlugIns; + +/// +/// Adds two imported wings at free item slots: Poison Wing (12/240, Dark Knight) and +/// Poison Cape (12/241, Dark Lord + Rage Fighter). Basic wings: base defense, class +/// restriction, CanFly; no wing options. +/// +[PlugIn] +[Display(Name = PlugInName, Description = PlugInDescription)] +[Guid("7E4A2C63-9B1D-4F8A-A5C6-1D3E8F2B4A07")] +public class AddPoisonWingsUpdateSeason6 : UpdatePlugInBase +{ + internal const string PlugInName = "Add Poison Wing & Poison Cape (12/240, 12/241)"; + internal const string PlugInDescription = "Adds Poison Wing (12/240, Dark Knight) and Poison Cape (12/241, Dark Lord + Rage Fighter) as basic wings."; + + /// + public override UpdateVersion Version => UpdateVersion.AddPoisonWingsSeason6; + + /// + public override string DataInitializationKey => VersionSeasonSix.DataInitialization.Id; + + /// + public override string Name => PlugInName; + + /// + public override string Description => PlugInDescription; + + /// + public override bool IsMandatory => true; + + /// + public override DateTime CreatedAt => new(2026, 07, 19, 17, 0, 0, DateTimeKind.Utc); + + /// +#pragma warning disable CS1998 + protected override async ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration) +#pragma warning restore CS1998 + { + // Idempotency guard: skip if Poison Wing (12/240) already exists. + if (gameConfiguration.Items.Any(i => i.Group == 12 && i.Number == 240)) + { + return; + } + + new Wings(context, gameConfiguration).CreatePoisonWings(); + } +} diff --git a/src/Persistence/Initialization/Updates/UpdateVersion.cs b/src/Persistence/Initialization/Updates/UpdateVersion.cs index 4ef0224..c44d31a 100644 --- a/src/Persistence/Initialization/Updates/UpdateVersion.cs +++ b/src/Persistence/Initialization/Updates/UpdateVersion.cs @@ -494,4 +494,9 @@ public enum UpdateVersion /// The version of the (Acheron, Debenter, Uruk, Ferea). /// AddImportedMapsSeason6 = 97, + + /// + /// The version of the (Poison Wing 12/240, Poison Cape 12/241). + /// + AddPoisonWingsSeason6 = 98, } \ No newline at end of file diff --git a/src/Persistence/Initialization/VersionSeasonSix/Items/Wings.cs b/src/Persistence/Initialization/VersionSeasonSix/Items/Wings.cs index ca73adf..2a587f2 100644 --- a/src/Persistence/Initialization/VersionSeasonSix/Items/Wings.cs +++ b/src/Persistence/Initialization/VersionSeasonSix/Items/Wings.cs @@ -102,6 +102,18 @@ public class Wings : WingsInitializerBase this.CreateWing(40, 2, 3, "Cape of Emperor", 150, 45, 220, 400, 0, 0, 0, 0, 3, 0, 0, this.BuildOptions((0b00, OptionType.HealthRecover), (0b11, OptionType.PhysDamage), (0b10, OptionType.Defense)), 39, 24, this._damageIncreaseByLevelTable, thirdWingOptions); this.CreateWing(43, 4, 3, "Wing of Dimension", 150, 45, 220, 400, 0, 0, 0, 0, 0, 3, 0, this.BuildOptions((0b00, OptionType.HealthRecover), (0b11, OptionType.WizDamage), (0b10, OptionType.CurseDamage)), 39, 39, this._damageIncreaseByLevelTable, thirdWingOptions); this.CreateWing(50, 2, 3, "Cape of Overrule", 150, 45, 220, 400, 0, 0, 0, 0, 0, 0, 3, this.BuildOptions((0b00, OptionType.HealthRecover), (0b11, OptionType.PhysDamage), (0b10, OptionType.Defense)), 39, 39, this._damageIncreaseByLevelTable, thirdWingOptions); + + this.CreatePoisonWings(); + } + + /// + /// ADAMU-CUSTOM: two imported wings (basic: base defense + class restriction, no wing options). + /// Poison Wing (12/240, Dark Knight), Poison Cape (12/241, Dark Lord + Rage Fighter). + /// + public void CreatePoisonWings() + { + this.CreateWing(240, 5, 3, "Poison Wing", 100, 30, 200, 180, 0, 1, 0, 0, 0, 0, 0); + this.CreateWing(241, 5, 3, "Poison Cape", 100, 30, 200, 180, 0, 0, 0, 0, 1, 0, 1); } private void CreateFeather()