-
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 1 commit
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 |
|---|---|---|
|
|
@@ -1606,36 +1606,26 @@ 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; | ||
| } | ||
| 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 +1644,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 +1717,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); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -457,6 +457,11 @@ protected void CreateWeapon( | |
| { | ||
| item.BasePowerUpAttributes.Add(this.CreateItemBasePowerUpDefinition(Stats.AmmunitionConsumptionRate, 1, AggregateType.AddRaw)); | ||
| item.BasePowerUpAttributes.Add(this.CreateItemBasePowerUpDefinition(slot == 0 ? Stats.IsCrossBowEquipped : Stats.IsBowEquipped, 1, AggregateType.AddRaw)); | ||
|
|
||
| if (number == 18 || number == 19 || number == 22 || number == 23 || number == 24) // Divine Crossbow of Archangel, Great Reign Crossbow, Albatross Bow, Stinger Bow, Air Lyn Bow | ||
| { | ||
| item.BasePowerUpAttributes.Add(this.CreateItemBasePowerUpDefinition(Stats.ExtraProjectiles, 1, AggregateType.AddRaw)); | ||
| } | ||
|
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. |
||
| } | ||
|
|
||
| if (group < (int)ItemGroups.Bows && width == 2) | ||
|
|
||

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.