Merge pull request #786 from ze-dom/DW_master_tree_finishup
(cherry picked from commit 06cc3489b92cc4b83a3a743ac9e29d00c144a303)
This commit is contained in:
@@ -330,12 +330,12 @@ internal enum MagicEffectNumber : short
|
||||
/// <summary>
|
||||
/// The wiz enhance strengthener effect.
|
||||
/// </summary>
|
||||
WizEnhance2 = 138,
|
||||
WizEnhanceStrengthener = 138,
|
||||
|
||||
/// <summary>
|
||||
/// The wiz enhance mastery effect.
|
||||
/// </summary>
|
||||
WizEnhance3 = 139,
|
||||
WizEnhanceMastery = 139,
|
||||
|
||||
/// <summary>
|
||||
/// The critical damage increase mastery effect.
|
||||
|
||||
@@ -12,9 +12,6 @@ using MUnique.OpenMU.GameLogic.Attributes;
|
||||
/// <summary>
|
||||
/// Initializer which initializes the wizardry enhance effect.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It includes all attributes which are enhanced by the wizardry skill and its master skills.
|
||||
/// </remarks>
|
||||
public class WizardryEnhanceEffectInitializer : InitializerBase
|
||||
{
|
||||
/// <summary>
|
||||
@@ -39,30 +36,18 @@ public class WizardryEnhanceEffectInitializer : InitializerBase
|
||||
magicEffect.SendDuration = false;
|
||||
magicEffect.StopByDeath = true;
|
||||
magicEffect.Duration = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
magicEffect.Duration.ConstantValue.Value = 1200f; // 20 minutes
|
||||
magicEffect.Duration.ConstantValue.Value = 1800f; // 30 minutes
|
||||
|
||||
var powerUpDefinition = this.Context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(powerUpDefinition);
|
||||
powerUpDefinition.TargetAttribute = Stats.MinimumWizBaseDmg.GetPersistent(this.GameConfiguration);
|
||||
var minWizDmgPowerUp = this.Context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(minWizDmgPowerUp);
|
||||
minWizDmgPowerUp.TargetAttribute = Stats.MinimumWizBaseDmg.GetPersistent(this.GameConfiguration);
|
||||
minWizDmgPowerUp.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
minWizDmgPowerUp.Boost.MaximumValue = 100f; // 100 dmg
|
||||
|
||||
powerUpDefinition.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
powerUpDefinition.Boost.ConstantValue.Value = 1.2f;
|
||||
powerUpDefinition.Boost.ConstantValue.AggregateType = AggregateType.Multiplicate;
|
||||
|
||||
var powerUpDefinition2 = this.Context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(powerUpDefinition2);
|
||||
powerUpDefinition2.TargetAttribute = Stats.MaximumWizBaseDmg.GetPersistent(this.GameConfiguration);
|
||||
|
||||
powerUpDefinition2.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
powerUpDefinition2.Boost.ConstantValue.Value = 1f;
|
||||
powerUpDefinition2.Boost.ConstantValue.AggregateType = AggregateType.Multiplicate;
|
||||
|
||||
var powerUpDefinition3 = this.Context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(powerUpDefinition3);
|
||||
powerUpDefinition3.TargetAttribute = Stats.CriticalDamageChance.GetPersistent(this.GameConfiguration);
|
||||
|
||||
powerUpDefinition3.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
powerUpDefinition3.Boost.ConstantValue.Value = 1f;
|
||||
powerUpDefinition3.Boost.ConstantValue.AggregateType = AggregateType.Multiplicate;
|
||||
var minWizDmgPerEnergy = this.Context.CreateNew<AttributeRelationship>();
|
||||
minWizDmgPerEnergy.InputAttribute = Stats.TotalEnergy.GetPersistent(this.GameConfiguration);
|
||||
minWizDmgPerEnergy.InputOperator = InputOperator.Multiply;
|
||||
minWizDmgPerEnergy.InputOperand = 0.2f / 9; // 45 energy adds 1 min wiz damage
|
||||
minWizDmgPowerUp.Boost.RelatedValues.Add(minWizDmgPerEnergy);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// <copyright file="WizardryEnhanceMasteryEffectInitializer.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.Skills;
|
||||
|
||||
using MUnique.OpenMU.AttributeSystem;
|
||||
using MUnique.OpenMU.DataModel.Attributes;
|
||||
using MUnique.OpenMU.DataModel.Configuration;
|
||||
using MUnique.OpenMU.GameLogic.Attributes;
|
||||
|
||||
/// <summary>
|
||||
/// Initializer which initializes the wizardry enhance mastery effect.
|
||||
/// </summary>
|
||||
public class WizardryEnhanceMasteryEffectInitializer : InitializerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WizardryEnhanceMasteryEffectInitializer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The context.</param>
|
||||
/// <param name="gameConfiguration">The game configuration.</param>
|
||||
public WizardryEnhanceMasteryEffectInitializer(IContext context, GameConfiguration gameConfiguration)
|
||||
: base(context, gameConfiguration)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
var magicEffect = this.Context.CreateNew<MagicEffectDefinition>();
|
||||
this.GameConfiguration.MagicEffects.Add(magicEffect);
|
||||
magicEffect.Number = (byte)MagicEffectNumber.WizEnhanceMastery;
|
||||
magicEffect.Name = "Wizardry Enhance Mastery Skill Effect";
|
||||
|
||||
var wizardryEnhanceEffect = this.GameConfiguration.MagicEffects.First(e => e.Number == (short)MagicEffectNumber.WizEnhanceStrengthener);
|
||||
magicEffect.InformObservers = wizardryEnhanceEffect.InformObservers;
|
||||
magicEffect.SubType = wizardryEnhanceEffect.SubType;
|
||||
magicEffect.SendDuration = wizardryEnhanceEffect.SendDuration;
|
||||
magicEffect.StopByDeath = wizardryEnhanceEffect.StopByDeath;
|
||||
magicEffect.Duration = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
magicEffect.Duration.ConstantValue.Value = wizardryEnhanceEffect.Duration!.ConstantValue.Value;
|
||||
magicEffect.Duration.MaximumValue = wizardryEnhanceEffect.Duration.MaximumValue;
|
||||
|
||||
foreach (var powerUp in wizardryEnhanceEffect.PowerUpDefinitions)
|
||||
{
|
||||
var powerUpCopy = this.Context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(powerUpCopy);
|
||||
powerUpCopy.TargetAttribute = powerUp.TargetAttribute!.GetPersistent(this.GameConfiguration);
|
||||
powerUpCopy.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
powerUpCopy.Boost.ConstantValue.Value = powerUp.Boost!.ConstantValue.Value;
|
||||
powerUpCopy.Boost.ConstantValue.AggregateType = powerUp.Boost.ConstantValue.AggregateType;
|
||||
powerUpCopy.Boost.MaximumValue = powerUp.Boost.MaximumValue;
|
||||
|
||||
foreach (var boostRelatedValue in powerUp.Boost.RelatedValues)
|
||||
{
|
||||
var boostRelatedValueCopy = this.Context.CreateNew<AttributeRelationship>();
|
||||
boostRelatedValueCopy.InputAttribute = boostRelatedValue.InputAttribute!.GetPersistent(this.GameConfiguration);
|
||||
boostRelatedValueCopy.InputOperator = boostRelatedValue.InputOperator;
|
||||
boostRelatedValueCopy.InputOperand = boostRelatedValue.InputOperand;
|
||||
boostRelatedValueCopy.AggregateType = boostRelatedValue.AggregateType;
|
||||
powerUpCopy.Boost.RelatedValues.Add(boostRelatedValueCopy);
|
||||
}
|
||||
}
|
||||
|
||||
var critChancePowerUp = this.Context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(critChancePowerUp);
|
||||
critChancePowerUp.TargetAttribute = Stats.CriticalDamageChance.GetPersistent(this.GameConfiguration);
|
||||
critChancePowerUp.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
// <copyright file="WizardryEnhanceStrengthenerEffectInitializer.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.Skills;
|
||||
|
||||
using MUnique.OpenMU.AttributeSystem;
|
||||
using MUnique.OpenMU.DataModel.Attributes;
|
||||
using MUnique.OpenMU.DataModel.Configuration;
|
||||
using MUnique.OpenMU.GameLogic.Attributes;
|
||||
|
||||
/// <summary>
|
||||
/// Initializer which initializes the wizardry enhance strengthener effect.
|
||||
/// </summary>
|
||||
public class WizardryEnhanceStrengthenerEffectInitializer : InitializerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WizardryEnhanceStrengthenerEffectInitializer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The context.</param>
|
||||
/// <param name="gameConfiguration">The game configuration.</param>
|
||||
public WizardryEnhanceStrengthenerEffectInitializer(IContext context, GameConfiguration gameConfiguration)
|
||||
: base(context, gameConfiguration)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
var magicEffect = this.Context.CreateNew<MagicEffectDefinition>();
|
||||
this.GameConfiguration.MagicEffects.Add(magicEffect);
|
||||
magicEffect.Number = (byte)MagicEffectNumber.WizEnhanceStrengthener;
|
||||
magicEffect.Name = "Wizardry Enhance Strengthener Skill Effect";
|
||||
|
||||
var wizardryEnhanceEffect = this.GameConfiguration.MagicEffects.First(e => e.Number == (short)MagicEffectNumber.WizEnhance);
|
||||
magicEffect.InformObservers = wizardryEnhanceEffect.InformObservers;
|
||||
magicEffect.SubType = wizardryEnhanceEffect.SubType;
|
||||
magicEffect.SendDuration = wizardryEnhanceEffect.SendDuration;
|
||||
magicEffect.StopByDeath = wizardryEnhanceEffect.StopByDeath;
|
||||
magicEffect.Duration = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
magicEffect.Duration.ConstantValue.Value = wizardryEnhanceEffect.Duration!.ConstantValue.Value;
|
||||
magicEffect.Duration.MaximumValue = wizardryEnhanceEffect.Duration.MaximumValue;
|
||||
|
||||
foreach (var powerUp in wizardryEnhanceEffect.PowerUpDefinitions)
|
||||
{
|
||||
var powerUpCopy = this.Context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(powerUpCopy);
|
||||
powerUpCopy.TargetAttribute = powerUp.TargetAttribute!.GetPersistent(this.GameConfiguration);
|
||||
powerUpCopy.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
powerUpCopy.Boost.ConstantValue.Value = powerUp.Boost!.ConstantValue.Value;
|
||||
powerUpCopy.Boost.ConstantValue.AggregateType = powerUp.Boost.ConstantValue.AggregateType;
|
||||
powerUpCopy.Boost.MaximumValue = powerUp.Boost.MaximumValue;
|
||||
|
||||
foreach (var boostRelatedValue in powerUp.Boost.RelatedValues)
|
||||
{
|
||||
var boostRelatedValueCopy = this.Context.CreateNew<AttributeRelationship>();
|
||||
boostRelatedValueCopy.InputAttribute = boostRelatedValue.InputAttribute!.GetPersistent(this.GameConfiguration);
|
||||
boostRelatedValueCopy.InputOperator = boostRelatedValue.InputOperator;
|
||||
boostRelatedValueCopy.InputOperand = boostRelatedValue.InputOperand;
|
||||
boostRelatedValueCopy.AggregateType = boostRelatedValue.AggregateType;
|
||||
powerUpCopy.Boost.RelatedValues.Add(boostRelatedValueCopy);
|
||||
}
|
||||
}
|
||||
|
||||
var maxDmgPowerUp = this.Context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(maxDmgPowerUp);
|
||||
maxDmgPowerUp.TargetAttribute = Stats.MaximumWizBaseDmg.GetPersistent(this.GameConfiguration);
|
||||
maxDmgPowerUp.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
|
||||
maxDmgPowerUp.Boost.ConstantValue.Value = 1f;
|
||||
maxDmgPowerUp.Boost.ConstantValue.AggregateType = AggregateType.Multiplicate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
// <copyright file="FinishDarkWizardMasterTreePlugIn.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.Updates;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using MUnique.OpenMU.AttributeSystem;
|
||||
using MUnique.OpenMU.DataModel.Attributes;
|
||||
using MUnique.OpenMU.DataModel.Configuration;
|
||||
using MUnique.OpenMU.GameLogic.Attributes;
|
||||
using MUnique.OpenMU.Persistence.Initialization.Skills;
|
||||
using MUnique.OpenMU.PlugIns;
|
||||
|
||||
/// <summary>
|
||||
/// This update completes the dark wizard master tree expansion of wizardry effects.
|
||||
/// </summary>
|
||||
[PlugIn]
|
||||
[Display(Name = PlugInName, Description = PlugInDescription)]
|
||||
[Guid("C1D2E3F4-5A6B-7C8D-9E0F-1A2B3C4D5E6F")]
|
||||
public class FinishDarkWizardMasterTreePlugIn : UpdatePlugInBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The plug in name.
|
||||
/// </summary>
|
||||
internal const string PlugInName = "Finish Dark Wizard Master Tree PlugIn";
|
||||
|
||||
/// <summary>
|
||||
/// The plug in description.
|
||||
/// </summary>
|
||||
internal const string PlugInDescription = "This update completes the dark wizard master tree expansion of wizardry effects.";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override UpdateVersion Version => UpdateVersion.FinishDarkWizardMasterTree;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string DataInitializationKey => VersionSeasonSix.DataInitialization.Id;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => PlugInName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Description => PlugInDescription;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsMandatory => true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override DateTime CreatedAt => new(2026, 7, 7, 16, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override async ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration)
|
||||
{
|
||||
// Update Wizardry Enhance effect
|
||||
var wizardryEnhanceEffect = gameConfiguration.MagicEffects.First(e => e.Number == (short)MagicEffectNumber.WizEnhance);
|
||||
wizardryEnhanceEffect.Duration = context.CreateNew<PowerUpDefinitionValue>();
|
||||
wizardryEnhanceEffect.Duration.ConstantValue.Value = 1800f; // 30 minutes
|
||||
wizardryEnhanceEffect.PowerUpDefinitions.Clear();
|
||||
|
||||
var minWizDmgPowerUp = context.CreateNew<PowerUpDefinition>();
|
||||
wizardryEnhanceEffect.PowerUpDefinitions.Add(minWizDmgPowerUp);
|
||||
minWizDmgPowerUp.TargetAttribute = Stats.MinimumWizBaseDmg.GetPersistent(gameConfiguration);
|
||||
minWizDmgPowerUp.Boost = context.CreateNew<PowerUpDefinitionValue>();
|
||||
minWizDmgPowerUp.Boost.MaximumValue = 100f; // 100 dmg
|
||||
|
||||
var minWizDmgPerEnergy = context.CreateNew<AttributeRelationship>();
|
||||
minWizDmgPerEnergy.InputAttribute = Stats.TotalEnergy.GetPersistent(gameConfiguration);
|
||||
minWizDmgPerEnergy.InputOperator = InputOperator.Multiply;
|
||||
minWizDmgPerEnergy.InputOperand = 0.2f / 9; // 45 energy adds 1 min wiz damage
|
||||
minWizDmgPowerUp.Boost.RelatedValues.Add(minWizDmgPerEnergy);
|
||||
|
||||
// Create Wiz Enhance Strengthener & Mastery Skill Effects
|
||||
var wizEnhanceStrengthenerEffect = this.CreateWizEnhanceStrengthenerEffect(context, gameConfiguration);
|
||||
var wizEnhanceMasteryEffect = this.CreateWizEnhanceMasteryEffect(context, gameConfiguration);
|
||||
|
||||
// Update master skills
|
||||
if (gameConfiguration.Skills.FirstOrDefault(s => s.Number == (short)SkillNumber.ExpansionofWizStreng) is { } expansionOfWizStreng)
|
||||
{
|
||||
expansionOfWizStreng.MagicEffectDef = wizEnhanceStrengthenerEffect;
|
||||
}
|
||||
|
||||
if (gameConfiguration.Skills.FirstOrDefault(s => s.Number == (short)SkillNumber.ExpansionofWizMas) is { } expansionOfWizMastery)
|
||||
{
|
||||
expansionOfWizMastery.MagicEffectDef = wizEnhanceMasteryEffect;
|
||||
|
||||
if (expansionOfWizMastery.MasterDefinition is { } masterDefinition)
|
||||
{
|
||||
masterDefinition.ReplacedSkill = gameConfiguration.Skills.First(s => s.Number == (short)SkillNumber.ExpansionofWizStreng);
|
||||
masterDefinition.Aggregation = AggregateType.AddRaw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private MagicEffectDefinition CreateWizEnhanceStrengthenerEffect(IContext context, GameConfiguration gameConfiguration)
|
||||
{
|
||||
var magicEffect = context.CreateNew<MagicEffectDefinition>();
|
||||
gameConfiguration.MagicEffects.Add(magicEffect);
|
||||
magicEffect.Number = (byte)MagicEffectNumber.WizEnhanceStrengthener;
|
||||
magicEffect.Name = "Wizardry Enhance Strengthener Skill Effect";
|
||||
|
||||
var wizardryEnhanceEffect = gameConfiguration.MagicEffects.First(e => e.Number == (short)MagicEffectNumber.WizEnhance);
|
||||
magicEffect.InformObservers = wizardryEnhanceEffect.InformObservers;
|
||||
magicEffect.SubType = wizardryEnhanceEffect.SubType;
|
||||
magicEffect.SendDuration = wizardryEnhanceEffect.SendDuration;
|
||||
magicEffect.StopByDeath = wizardryEnhanceEffect.StopByDeath;
|
||||
magicEffect.Duration = context.CreateNew<PowerUpDefinitionValue>();
|
||||
magicEffect.Duration.ConstantValue.Value = wizardryEnhanceEffect.Duration!.ConstantValue.Value;
|
||||
magicEffect.Duration.MaximumValue = wizardryEnhanceEffect.Duration.MaximumValue;
|
||||
|
||||
foreach (var powerUp in wizardryEnhanceEffect.PowerUpDefinitions)
|
||||
{
|
||||
var powerUpCopy = context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(powerUpCopy);
|
||||
powerUpCopy.TargetAttribute = powerUp.TargetAttribute!.GetPersistent(gameConfiguration);
|
||||
powerUpCopy.Boost = context.CreateNew<PowerUpDefinitionValue>();
|
||||
powerUpCopy.Boost.ConstantValue.Value = powerUp.Boost!.ConstantValue.Value;
|
||||
powerUpCopy.Boost.ConstantValue.AggregateType = powerUp.Boost.ConstantValue.AggregateType;
|
||||
powerUpCopy.Boost.MaximumValue = powerUp.Boost.MaximumValue;
|
||||
|
||||
foreach (var boostRelatedValue in powerUp.Boost.RelatedValues)
|
||||
{
|
||||
var boostRelatedValueCopy = context.CreateNew<AttributeRelationship>();
|
||||
boostRelatedValueCopy.InputAttribute = boostRelatedValue.InputAttribute!.GetPersistent(gameConfiguration);
|
||||
boostRelatedValueCopy.InputOperator = boostRelatedValue.InputOperator;
|
||||
boostRelatedValueCopy.InputOperand = boostRelatedValue.InputOperand;
|
||||
boostRelatedValueCopy.AggregateType = boostRelatedValue.AggregateType;
|
||||
powerUpCopy.Boost.RelatedValues.Add(boostRelatedValueCopy);
|
||||
}
|
||||
}
|
||||
|
||||
var maxDmgPowerUp = context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(maxDmgPowerUp);
|
||||
maxDmgPowerUp.TargetAttribute = Stats.MaximumWizBaseDmg.GetPersistent(gameConfiguration);
|
||||
maxDmgPowerUp.Boost = context.CreateNew<PowerUpDefinitionValue>();
|
||||
maxDmgPowerUp.Boost.ConstantValue.Value = 1f;
|
||||
maxDmgPowerUp.Boost.ConstantValue.AggregateType = AggregateType.Multiplicate;
|
||||
|
||||
return magicEffect;
|
||||
}
|
||||
|
||||
private MagicEffectDefinition CreateWizEnhanceMasteryEffect(IContext context, GameConfiguration gameConfiguration)
|
||||
{
|
||||
var magicEffect = context.CreateNew<MagicEffectDefinition>();
|
||||
gameConfiguration.MagicEffects.Add(magicEffect);
|
||||
magicEffect.Number = (byte)MagicEffectNumber.WizEnhanceMastery;
|
||||
magicEffect.Name = "Wizardry Enhance Mastery Skill Effect";
|
||||
|
||||
var wizardryEnhanceEffect = gameConfiguration.MagicEffects.First(e => e.Number == (short)MagicEffectNumber.WizEnhanceStrengthener);
|
||||
magicEffect.InformObservers = wizardryEnhanceEffect.InformObservers;
|
||||
magicEffect.SubType = wizardryEnhanceEffect.SubType;
|
||||
magicEffect.SendDuration = wizardryEnhanceEffect.SendDuration;
|
||||
magicEffect.StopByDeath = wizardryEnhanceEffect.StopByDeath;
|
||||
magicEffect.Duration = context.CreateNew<PowerUpDefinitionValue>();
|
||||
magicEffect.Duration.ConstantValue.Value = wizardryEnhanceEffect.Duration!.ConstantValue.Value;
|
||||
magicEffect.Duration.MaximumValue = wizardryEnhanceEffect.Duration.MaximumValue;
|
||||
|
||||
foreach (var powerUp in wizardryEnhanceEffect.PowerUpDefinitions)
|
||||
{
|
||||
var powerUpCopy = context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(powerUpCopy);
|
||||
powerUpCopy.TargetAttribute = powerUp.TargetAttribute!.GetPersistent(gameConfiguration);
|
||||
powerUpCopy.Boost = context.CreateNew<PowerUpDefinitionValue>();
|
||||
powerUpCopy.Boost.ConstantValue.Value = powerUp.Boost!.ConstantValue.Value;
|
||||
powerUpCopy.Boost.ConstantValue.AggregateType = powerUp.Boost.ConstantValue.AggregateType;
|
||||
powerUpCopy.Boost.MaximumValue = powerUp.Boost.MaximumValue;
|
||||
|
||||
foreach (var boostRelatedValue in powerUp.Boost.RelatedValues)
|
||||
{
|
||||
var boostRelatedValueCopy = context.CreateNew<AttributeRelationship>();
|
||||
boostRelatedValueCopy.InputAttribute = boostRelatedValue.InputAttribute!.GetPersistent(gameConfiguration);
|
||||
boostRelatedValueCopy.InputOperator = boostRelatedValue.InputOperator;
|
||||
boostRelatedValueCopy.InputOperand = boostRelatedValue.InputOperand;
|
||||
boostRelatedValueCopy.AggregateType = boostRelatedValue.AggregateType;
|
||||
powerUpCopy.Boost.RelatedValues.Add(boostRelatedValueCopy);
|
||||
}
|
||||
}
|
||||
|
||||
var critChancePowerUp = context.CreateNew<PowerUpDefinition>();
|
||||
magicEffect.PowerUpDefinitions.Add(critChancePowerUp);
|
||||
critChancePowerUp.TargetAttribute = Stats.CriticalDamageChance.GetPersistent(gameConfiguration);
|
||||
critChancePowerUp.Boost = context.CreateNew<PowerUpDefinitionValue>();
|
||||
|
||||
return magicEffect;
|
||||
}
|
||||
}
|
||||
@@ -479,7 +479,7 @@ public enum UpdateVersion
|
||||
/// The version of the <see cref="AddIsQuestItemFlagPlugIn"/>.
|
||||
/// </summary>
|
||||
AddIsQuestItemFlag = 94,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The version of the <see cref="AddImperialWeapons050UpdateSeason6"/>.
|
||||
/// </summary>
|
||||
@@ -514,4 +514,9 @@ public enum UpdateVersion
|
||||
/// The version of the <see cref="AddElfSoldierBuffPlugIn"/>.
|
||||
/// </summary>
|
||||
AddElfSoldierBuff = 101,
|
||||
|
||||
/// <summary>
|
||||
/// The version of the <see cref="FinishDarkWizardMasterTreePlugIn"/>.
|
||||
/// </summary>
|
||||
FinishDarkWizardMasterTree = 102,
|
||||
}
|
||||
|
||||
@@ -81,6 +81,8 @@ internal class SkillsInitializer : SkillsInitializerBase
|
||||
{ SkillNumber.EarthshakeMastery, MagicEffectNumber.Stunned },
|
||||
{ SkillNumber.CritDmgIncPowUp3, MagicEffectNumber.CriticalDamageIncreaseMastery },
|
||||
{ SkillNumber.SwellLifeProficiency, MagicEffectNumber.GreaterFortitudeProficiency },
|
||||
{ SkillNumber.ExpansionofWizStreng, MagicEffectNumber.WizEnhanceStrengthener },
|
||||
{ SkillNumber.ExpansionofWizMas, MagicEffectNumber.WizEnhanceMastery },
|
||||
};
|
||||
|
||||
private readonly IDictionary<byte, MasterSkillRoot> _masterSkillRoots;
|
||||
@@ -701,6 +703,8 @@ internal class SkillsInitializer : SkillsInitializerBase
|
||||
new StunEffectInitializer(this.Context, this.GameConfiguration).Initialize();
|
||||
new CriticalDamageIncreaseMasteryEffectInitializer(this.Context, this.GameConfiguration).Initialize();
|
||||
new LifeSwellProficiencyEffectInitializer(this.Context, this.GameConfiguration).Initialize();
|
||||
new WizardryEnhanceStrengthenerEffectInitializer(this.Context, this.GameConfiguration).Initialize();
|
||||
new WizardryEnhanceMasteryEffectInitializer(this.Context, this.GameConfiguration).Initialize();
|
||||
}
|
||||
|
||||
private void MapSkillsToEffects()
|
||||
@@ -800,7 +804,7 @@ internal class SkillsInitializer : SkillsInitializerBase
|
||||
this.AddMasterSkillDefinition(SkillNumber.ExpansionofWizStreng, SkillNumber.ExpansionofWizardry, SkillNumber.Undefined, 2, 2, SkillNumber.ExpansionofWizardry, 20, Formula120Value, Formula120, Stats.MaximumWizBaseDmg, AggregateType.Multiplicate);
|
||||
this.AddMasterSkillDefinition(SkillNumber.InfernoStrengthener, SkillNumber.Inferno, SkillNumber.FlameStrengthener, 2, 3, SkillNumber.Inferno, 20, Formula502);
|
||||
this.AddMasterSkillDefinition(SkillNumber.BlastStrengthener, SkillNumber.Cometfall, SkillNumber.LightningStrengthener, 2, 3, SkillNumber.Cometfall, 20, Formula502);
|
||||
this.AddMasterSkillDefinition(SkillNumber.ExpansionofWizMas, SkillNumber.ExpansionofWizStreng, SkillNumber.Undefined, 2, 3, SkillNumber.ExpansionofWizardry, 20, Formula120Value, Formula120, targetAttribute: Stats.CriticalDamageChance, AggregateType.Multiplicate);
|
||||
this.AddMasterSkillDefinition(SkillNumber.ExpansionofWizMas, SkillNumber.ExpansionofWizStreng, SkillNumber.Undefined, 2, 3, SkillNumber.ExpansionofWizStreng, 20, Formula120Value, Formula120, Stats.CriticalDamageChance, AggregateType.AddRaw);
|
||||
this.AddMasterSkillDefinition(SkillNumber.PoisonStrengthener, SkillNumber.Poison, SkillNumber.Undefined, 2, 3, SkillNumber.Poison, 20, Formula632);
|
||||
this.AddMasterSkillDefinition(SkillNumber.EvilSpiritStreng, SkillNumber.EvilSpirit, SkillNumber.Undefined, 2, 4, SkillNumber.EvilSpirit, 20, Formula502);
|
||||
this.AddPassiveMasterSkillDefinition(SkillNumber.MagicMasteryGrandMaster, Stats.WizardryBaseDmg, AggregateType.AddRaw, Formula502, 4, 2, SkillNumber.EvilSpiritStreng);
|
||||
|
||||
Reference in New Issue
Block a user