-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add new config options for Boss Skill Presets #4436
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
Merged
Wires77
merged 12 commits into
PathOfBuildingCommunity:dev
from
Regisle:preset_boss_damage
Jul 2, 2022
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
da2a86d
Automatically set config values when a boss is selected
Wires77 df86c00
Adding placeholder to EditControl
Wires77 bbf29a2
modify placeholders to be true placeholders
Regisle 4e043ea
move placeholder to own list and save values
Regisle def26d3
add some boss skills to a dropdown for setting presets
Regisle a0b310d
cleanup and shaper slam
Regisle 32b6fcf
fix clearing values when none boss skill preset is picked
Regisle 27d1270
Automatically set Enemy Damage Type when a boss preset is selected. …
Wires77 89a4de0
Small spacing fix
Wires77 2a61971
Merge branch 'dev' into preset_boss_damage
Wires77 7b01cb6
Adding clarification to maven memory game EHP
Wires77 b95c42e
Change boss values to match current GGG classifications
Wires77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,9 @@ end | |
|
|
||
| -- Calculate physical damage reduction from armour, float | ||
| function calcs.armourReductionF(armour, raw) | ||
| if armour == 0 and raw == 0 then | ||
| return 0 | ||
| end | ||
| return (armour / (armour + raw * 5) * 100) | ||
| end | ||
|
|
||
|
|
@@ -865,48 +868,21 @@ function calcs.defence(env, actor) | |
| }, | ||
| } | ||
| end | ||
| local enemyCritChance = env.configInput["enemyCritChance"] or 5 | ||
| local enemyCritDamage = env.configInput["enemyCritDamage"] or 30 | ||
| local enemyCritChance = env.configInput["enemyCritChance"] or env.configPlaceholder["enemyCritChance"] or 0 | ||
| local enemyCritDamage = env.configInput["enemyCritDamage"] or env.configPlaceholder["enemyCritDamage"] or 0 | ||
| output["EnemyCritEffect"] = 1 + enemyCritChance / 100 * (enemyCritDamage / 100) * (1 - output.CritExtraDamageReduction / 100) | ||
| for _, damageType in ipairs(dmgTypeList) do | ||
| local enemyDamageMult = calcLib.mod(enemyDB, nil, "Damage", damageType.."Damage", isElemental[damageType] and "ElementalDamage" or nil) --missing taunt from allies | ||
| local enemyDamage = env.configInput["enemy"..damageType.."Damage"] | ||
| local enemyPen = env.configInput["enemy"..damageType.."Pen"] | ||
| local sourceStr = enemyDamage == nil and "Default" or "Config" | ||
|
|
||
| if env.configInput["enemyIsBoss"] == "Uber Atziri" then -- random boss (not specificaly uber ziri) | ||
| if enemyDamage == nil then | ||
| enemyDamage = env.data.monsterDamageTable[env.enemyLevel] * 1.5 * data.misc.stdBossDPSMult | ||
| if damageType == "Chaos" then | ||
| enemyDamage = enemyDamage / 4 | ||
| end | ||
| end | ||
| elseif env.configInput["enemyIsBoss"] == "Shaper" then | ||
| if enemyDamage == nil then | ||
| enemyDamage = env.data.monsterDamageTable[env.enemyLevel] * 1.5 * data.misc.shaperDPSMult | ||
| if damageType == "Chaos" then | ||
| enemyDamage = enemyDamage / 4 | ||
| end | ||
| end | ||
| if enemyPen == nil and isElemental[damageType] then | ||
| enemyPen = data.misc.shaperPen | ||
| end | ||
| elseif env.configInput["enemyIsBoss"] == "Sirus" then | ||
| if enemyDamage == nil then | ||
| enemyDamage = env.data.monsterDamageTable[env.enemyLevel] * 1.5 * data.misc.sirusDPSMult | ||
| if damageType == "Chaos" then | ||
| enemyDamage = enemyDamage / 4 | ||
| end | ||
| end | ||
| if enemyPen == nil and isElemental[damageType] then | ||
| enemyPen = data.misc.sirusPen | ||
| end | ||
| else | ||
| if enemyDamage == nil and damageType == "Physical" then | ||
| enemyDamage = env.data.monsterDamageTable[env.enemyLevel] * 1.5 | ||
| end | ||
|
|
||
| if enemyDamage == nil and env.configPlaceholder["enemy"..damageType.."Damage"] then | ||
| enemyDamage = env.configPlaceholder["enemy"..damageType.."Damage"] | ||
| end | ||
| if enemyPen == nil and env.configPlaceholder["enemy"..damageType.."Pen"] then | ||
| enemyPen = env.configPlaceholder["enemy"..damageType.."Pen"] | ||
| end | ||
|
|
||
| enemyDamage = enemyDamage or 0 | ||
| output[damageType.."EnemyPen"] = enemyPen or 0 | ||
| output["totalEnemyDamageIn"] = output["totalEnemyDamageIn"] + enemyDamage | ||
|
|
@@ -1090,7 +1066,7 @@ function calcs.defence(env, actor) | |
| for _, damageType in ipairs(dmgTypeList) do | ||
| -- Calculate incoming damage multiplier | ||
| local resist = modDB:Flag(nil, "SelfIgnore"..damageType.."Resistance") and 0 or output[damageType.."ResistWhenHit"] or output[damageType.."Resist"] | ||
| local enemyPen = modDB:Flag(nil, "SelfIgnore"..damageType.."Resistance") and 0 or env.configInput["enemy"..damageType.."Pen"] or output[damageType.."EnemyPen"] or 0 | ||
| local enemyPen = modDB:Flag(nil, "SelfIgnore"..damageType.."Resistance") and 0 or output[damageType.."EnemyPen"] | ||
| local takenFlat = modDB:Sum("BASE", nil, "DamageTaken", damageType.."DamageTaken", "DamageTakenWhenHit", damageType.."DamageTakenWhenHit") | ||
| if damageCategoryConfig == "Melee" or damageCategoryConfig == "Projectile" then | ||
| takenFlat = takenFlat + modDB:Sum("BASE", nil, "DamageTakenFromAttacks", damageType.."DamageTakenFromAttacks") | ||
|
|
@@ -1752,7 +1728,7 @@ function calcs.defence(env, actor) | |
|
|
||
| --survival time | ||
| do | ||
| local enemySkillTime = env.configInput.enemySpeed or 700 | ||
| local enemySkillTime = env.configInput.enemySpeed or env.configPlaceholder.enemySpeed or 700 | ||
|
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. Again, not sure if this will ever get to the 700 value 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. same as above |
||
| local enemyActionSpeed = calcs.actionSpeedMod(actor.enemy) | ||
| enemySkillTime = enemySkillTime / 1000 / enemyActionSpeed | ||
| output["EHPsurvivalTime"] = output["TotalNumberOfHits"] * enemySkillTime | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can this ever be 0 now?
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.
because of order of initialization it will be nil for a first pass, but is instantly rebuilt so, no the value will never be zero but it errors due to nil value on initialization