Skip to content

DK Master Tree Finishup#766

Draft
ze-dom wants to merge 5 commits intoMUnique:masterfrom
ze-dom:DK_master_tree_finishup
Draft

DK Master Tree Finishup#766
ze-dom wants to merge 5 commits intoMUnique:masterfrom
ze-dom:DK_master_tree_finishup

Conversation

@ze-dom
Copy link
Copy Markdown
Contributor

@ze-dom ze-dom commented May 2, 2026

To-do

  • Comment changes with source references
  • UpdatePlugin

Developments

  • Added Cold magic effect number (similar to Iced; used in Chain Drive and Strike of Destruction skills)
  • Added Swell Life magic effect maximum values
  • Added Swell Life Proficiency magic effect
  • Added Twisting Slash Mastery, Rageful Blow Mastery, Spear Mastery, Mace Mastery, Swell Life Strengthener, and Swell Life Proficiency skill effects
  • Replaced Stats.PollutionMoveTargetChance and Stats.StunChance for the more generic and descriptive Stats.MasteryMoveTargetChance and Stats.MasteryStunChance, which can serve several classes

Bugfixes

  • Map names in logs
  • Changed Chain Drive magic effect number from Iced to Cold
  • Fixed Life Swell magic effect boost calcs
  • Fixed MagicEffect comparison in SkillsInitizalizerBase.CreateEffect() (bug introduced in previous PR)
  • Fixed double wield damage calcs

Comment on lines -373 to 383
var baseSkill = skillEntry.GetBaseSkill();

if (player.GameContext.PlugInManager.GetStrategy<short, IAreaSkillPlugIn>(baseSkill.Number) is { } strategy)
if (player.GameContext.PlugInManager.GetStrategy<short, IAreaSkillPlugIn>(skillEntry.Skill.Number) is { } strategy)
{
await strategy.AfterTargetGotAttackedAsync(player, target, skillEntry, targetAreaCenter, hitInfo).ConfigureAwait(false);
return;
}

var baseSkill = skillEntry.GetBaseSkill();
if (player.GameContext.PlugInManager.GetStrategy<short, IAreaSkillPlugIn>(baseSkill.Number) is { } baseSkillStrategy)
{
await baseSkillStrategy.AfterTargetGotAttackedAsync(player, target, skillEntry, targetAreaCenter, hitInfo).ConfigureAwait(false);
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added for TwistingSlashMasterySkillPlugIn.cs.
Another option is to change the Key there to the base Twisting Slash skill and keep this as before.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var magicEffect = new MagicEffect(TimeSpan.FromSeconds(2), stunEffectDefinition, [new MagicEffect.ElementWithTarget(powerUp, Stats.IsStunned)]);
await attackable.MagicEffectList.AddEffectAsync(magicEffect).ConfigureAwait(false);
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
return item.ItemSlot >= InventoryConstants.HelmSlot && item.ItemSlot <= InventoryConstants.BootsSlot;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

result.AttributeCombinations.Add(this.CreateAttributeRelationship(Stats.ComboBonus, 0.5f, Stats.TotalEnergy));

result.AttributeCombinations.Add(this.CreateConditionalRelationship(Stats.AttackSpeedAny, Stats.IsOneHandedSwordEquipped, Stats.WeaponMasteryAttackSpeed));
result.AttributeCombinations.Add(this.CreateConditionalRelationship(Stats.DoubleDamageChance, Stats.IsSpearEquipped, Stats.SpearMasteryDoubleDamageChance));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magicEffect.StopByDeath = true;
magicEffect.Duration = this.Context.CreateNew<PowerUpDefinitionValue>();
magicEffect.Duration.ConstantValue.Value = 60f;
magicEffect.Duration.MaximumValue = 180f;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emu

var boostPerPartyMember = this.Context.CreateNew<AttributeRelationship>();
boostPerPartyMember.InputAttribute = Stats.NearbyPartyMemberCount.GetPersistent(this.GameConfiguration);
boostPerPartyMember.InputOperator = InputOperator.Multiply;
boostPerPartyMember.InputOperand = 1f / 100;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


healthPowerUpDefinition.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
healthPowerUpDefinition.Boost.ConstantValue.Value = 0.12f;
healthPowerUpDefinition.Boost.MaximumValue = 2f;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emu

Comment on lines +71 to +81
// one percent per party member in view
var boostPerPartyMember = this.Context.CreateNew<AttributeRelationship>();
boostPerPartyMember.InputAttribute = Stats.NearbyPartyMemberCount.GetPersistent(this.GameConfiguration);
boostPerPartyMember.InputOperator = InputOperator.Multiply;
boostPerPartyMember.InputOperand = 1f / 100;

var manaPowerUpDefinition = this.Context.CreateNew<PowerUpDefinition>();
magicEffect.PowerUpDefinitions.Add(manaPowerUpDefinition);
manaPowerUpDefinition.TargetAttribute = Stats.SwellLifeManaIncrease.GetPersistent(this.GameConfiguration);
manaPowerUpDefinition.Boost = this.Context.CreateNew<PowerUpDefinitionValue>();
manaPowerUpDefinition.Boost.RelatedValues.Add(boostPerPartyMember);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skill.SkipElementalModifier = true;
skill.MagicEffectDef = this.CreateEffect(ElementalType.Ice, MagicEffectNumber.Cold, Stats.IsIced, 10);
return;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
skill.ElementalModifierTarget = Stats.IceResistance.GetPersistent(this.GameConfiguration);
skill.SkipElementalModifier = true;
skill.MagicEffectDef = this.CreateEffect(ElementalType.Ice, MagicEffectNumber.Cold, Stats.IsIced, 10);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// The cold effect caused by chain drive and strike of destruction skills. Like <see cref="Iced"/>, it also slows down movement.
/// </summary>
Cold = 0x56,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -71 to -74
if (multiValues == 0 && this.Elements.All(e => e.AggregateType != AggregateType.Multiplicate))
{
multiValues = 1;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an impossible situation since in line 66 an enumerable with "1" is concatenated.

Comment thread src/GameLogic/Player.cs
{
await this.InvokeViewPlugInAsync<IItemDurabilityChangedPlugIn>(p => p.ItemDurabilityChangedAsync(randomArmorItem, false)).ConfigureAwait(false);
}
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zTeamS6.3, emu
The sources seem to be bugged here, because they use the attacker's instead of the defender's durability reduction master skill to attenuate the effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant