-
Notifications
You must be signed in to change notification settings - Fork 552
Elf Master Tree Finishup #831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
983db56
daf72d7
60fc096
2f55293
681b0e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,8 +17,8 @@ public class MonsterAttributeHolder : IAttributeSystem | |
| new Dictionary<AttributeDefinition, Func<AttackableNpcBase, float>> | ||
| { | ||
| { Stats.CurrentHealth, m => m.Health }, | ||
| { Stats.DefensePvm, m => m.Attributes.GetValueOfAttribute(Stats.DefenseBase) + ((m as Monster)?.SummonedBy?.Attributes?[Stats.SummonedMonsterDefenseIncrease] ?? 0) }, | ||
| { Stats.DefensePvp, m => m.Attributes.GetValueOfAttribute(Stats.DefenseBase) + ((m as Monster)?.SummonedBy?.Attributes?[Stats.SummonedMonsterDefenseIncrease] ?? 0) }, | ||
| { Stats.DefensePvm, m => m.Attributes.GetValueOfAttribute(Stats.DefenseBase) * (1 + ((m as Monster)?.SummonedBy?.Attributes?[Stats.SummonedMonsterDefenseIncrease] ?? 0)) }, | ||
| { Stats.DefensePvp, m => m.Attributes.GetValueOfAttribute(Stats.DefenseBase) * (1 + ((m as Monster)?.SummonedBy?.Attributes?[Stats.SummonedMonsterDefenseIncrease] ?? 0)) }, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| { Stats.DamageReceiveDecrement, m => 1.0f }, | ||
| { Stats.AttackDamageIncrease, m => 1.0f }, | ||
| { Stats.MovementSpeedFactor, m => 1.0f }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // <copyright file="Player.cs" company="MUnique"> | ||
| // <copyright file="Player.cs" company="MUnique"> | ||
| // Licensed under the MIT License. See LICENSE file in the project root for full license information. | ||
| // </copyright> | ||
|
|
||
|
|
@@ -1606,36 +1606,33 @@ void AddSkillPowersToResult(ICollection<PowerUpDefinition> powerUps, ref (Attrib | |
| var durationExtended = false; | ||
| foreach (var powerUpDef in powerUps) | ||
| { | ||
| IElement powerUp; | ||
| IElement powerUp = this.Attributes!.CreateElement(powerUpDef); | ||
| if (skillEntry.Level > 0) | ||
| { | ||
| powerUp = this.Attributes!.CreateElement(powerUpDef); | ||
|
|
||
| foreach (var masterSkillEntry in GetMasterSkillEntries(skillEntry)) | ||
| { | ||
| var extendsDuration = masterSkillEntry.Skill?.MasterDefinition?.ExtendsDuration ?? false; | ||
| if (extendsDuration && !durationExtended) | ||
| { | ||
| durationElement = new CombinedElement(durationElement, new ConstantElement(masterSkillEntry.CalculateValue())); | ||
| } | ||
| else if (extendsDuration) | ||
| { | ||
| continue; | ||
| var value = masterSkillEntry.CalculateValue(); | ||
| if (value < 1) | ||
| { | ||
| value *= 100; | ||
| } | ||
|
|
||
| durationElement = new CombinedElement(durationElement, new ConstantElement(value)); | ||
| durationElementPvp = new CombinedElement(durationElementPvp, new ConstantElement(value)); | ||
| } | ||
| else | ||
|
|
||
| if (masterSkillEntry.Skill?.MasterDefinition?.TargetAttribute is not null) | ||
| { | ||
| // Apply either for all, or just for the specified TargetAttribute of the master skill | ||
| powerUp = AppedMasterSkillPowerUp(masterSkillEntry, powerUpDef, powerUp); | ||
| } | ||
| } | ||
|
|
||
| // After the first iteration all possible duration extensions have been applied | ||
| durationExtended = true; | ||
| } | ||
| else | ||
| { | ||
| powerUp = this.Attributes!.CreateElement(powerUpDef); | ||
| } | ||
|
|
||
| result[i] = (powerUpDef.TargetAttribute!, powerUp); | ||
| i++; | ||
|
|
@@ -1654,15 +1651,12 @@ IEnumerable<SkillEntry> GetMasterSkillEntries(SkillEntry masterSkillEntry) | |
|
|
||
| IElement AppedMasterSkillPowerUp(SkillEntry masterSkillEntry, PowerUpDefinition powerUpDef, IElement powerUp) | ||
| { | ||
| if (masterSkillEntry.Skill?.MasterDefinition is not { } masterSkillDefinition) | ||
| { | ||
| return powerUp; | ||
| } | ||
| var masterSkillDefinition = masterSkillEntry.Skill!.MasterDefinition!; | ||
|
|
||
| if (masterSkillDefinition.TargetAttribute is { } masterSkillTargetAttribute | ||
| && masterSkillTargetAttribute == powerUpDef.TargetAttribute) | ||
| if (masterSkillDefinition.TargetAttribute == powerUpDef.TargetAttribute | ||
| && masterSkillDefinition.Aggregation == powerUp.AggregateType) | ||
| { | ||
| var additionalValue = new SimpleElement(masterSkillEntry.CalculateValue(), masterSkillEntry.Skill.MasterDefinition?.Aggregation ?? powerUp.AggregateType); | ||
| var additionalValue = new SimpleElement(masterSkillEntry.CalculateValue(), masterSkillDefinition.Aggregation); | ||
| powerUp = new CombinedElement(powerUp, additionalValue); | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Matching by both |
||
|
|
||
|
|
@@ -1730,7 +1724,6 @@ public async ValueTask CreateSummonedMonsterAsync(MonsterDefinition definition) | |
| area.MaximumHealthOverride = (int)monster.Attributes[Stats.MaximumHealth]; | ||
| area.MaximumHealthOverride += (int)(monster.Attributes[Stats.MaximumHealth] * this.Attributes?[Stats.SummonedMonsterHealthIncrease] ?? 0); | ||
|
|
||
| // todo: Stats.SummonedMonsterDefenseIncrease | ||
| this.Summon = (monster, intelligence); | ||
| monster.Initialize(); | ||
| await gameMap.AddAsync(monster).ConfigureAwait(false); | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zTeamS6.3, emu
Recovery is the only other
Regenerationtype skill and has no master skill successor, so we are good.