-
Notifications
You must be signed in to change notification settings - Fork 558
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
Changes from all commits
983db56
daf72d7
60fc096
2f55293
681b0e7
2b30d22
e56c5c5
e399325
b7df2de
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); | ||
|
|
||
|
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. I think TripleShot still needs some adjustments. Currently if you are just 1 tile away, not all projectiles register on the target. Also, because of the delay and the spawning of independent Tasks to perform each projectile attack, sometimes unnecessary attacks are being performed when the target has died already. Probably a race condition This can be tested by using TripleShot close range on targets which die from 1 hit, and you can see that 2 or 3 arrows are consumed.
Member
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. Oh, yea. This can be a follow-up issue/pr. I think this PR is fine as it is :) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,11 +36,11 @@ public override void Initialize() | |
| magicEffect.StopByDeath = true; | ||
| magicEffect.Duration = this.Context.CreateNew<PowerUpDefinitionValue>(); | ||
| magicEffect.Duration.ConstantValue.Value = 60; // 60 Seconds | ||
|
|
||
| // The buff gives 3 + (energy / 7) damage | ||
| var powerUpDefinition = this.Context.CreateNew<PowerUpDefinition>(); | ||
| magicEffect.PowerUpDefinitions.Add(powerUpDefinition); | ||
| powerUpDefinition.TargetAttribute = Stats.GreaterDamageBonus.GetPersistent(this.GameConfiguration); | ||
|
|
||
| // The buff gives 3 + (energy / 7) damage | ||
| powerUpDefinition.Boost = this.Context.CreateNew<PowerUpDefinitionValue>(); | ||
| powerUpDefinition.Boost.ConstantValue.Value = 3f; | ||
| powerUpDefinition.Boost.ConstantValue.AggregateType = AggregateType.AddRaw; | ||
|
|
@@ -50,5 +50,13 @@ public override void Initialize() | |
| boostPerEnergy.InputOperator = InputOperator.Multiply; | ||
| boostPerEnergy.InputOperand = 1f / 7f; // one damage per 7 energy | ||
| powerUpDefinition.Boost.RelatedValues.Add(boostPerEnergy); | ||
|
|
||
| // Placeholder for AttackIncreaseStr and AttackIncreaseMastery master skills | ||
| var powerUpDefinition2 = this.Context.CreateNew<PowerUpDefinition>(); | ||
| magicEffect.PowerUpDefinitions.Add(powerUpDefinition2); | ||
| powerUpDefinition2.TargetAttribute = Stats.GreaterDamageBonus.GetPersistent(this.GameConfiguration); | ||
| powerUpDefinition2.Boost = this.Context.CreateNew<PowerUpDefinitionValue>(); | ||
| powerUpDefinition2.Boost.ConstantValue.Value = 1f; | ||
| powerUpDefinition2.Boost.ConstantValue.AggregateType = AggregateType.Multiplicate; | ||
|
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. |
||
| } | ||
| } | ||



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.