Skip to content
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

New special duration: RestComplete, NextD20Roll deletion fixes, Effect name fix #208

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

sasquach45932
Copy link
Contributor

Added: New special duration: RestComplete

Fixed: Incorrect effect name, when applying effect on multiple target.
Fixed: EndOfTheRound ignores system.bonuses.attack.boons.attribute.
Fixed: NextD20Roll ignores system.bonuses.attack.boons.attribute, system.bonuses.attack.boons.weapon and system.bonuses.attack.boons.spell on deletion.

Copy link
Contributor

@juanferrer juanferrer left a comment

Choose a reason for hiding this comment

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

Looks good, just a few small fixes

if (
effect.changes.find(e => e.key.includes('system.bonuses.attack.boons.all')) || !effect.changes.length ||
effect.changes.find(e => e.key.includes(`system.bonuses.attack.boons.${nAttackAttribute}`)) ||
effect.changes.find(e => e.key.includes(`system.bonuses.attack.boons.weapon`))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe needs to be added for spells as well?

if (specialDuration === 'NextD20Roll') {
let nAttackAttribute = attackAttribute.length ? attackAttribute : 'None'
if (
effect.changes.find(e => e.key.includes('system.bonuses.attack.boons.all')) || !effect.changes.length ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably best to move the end !effect.changes.length === 0 to the top or the bottom. Same for lines 515, 598, 697 and 802.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Code checks the same bonuses what each function rollItem/Talent/Weapon/Spell uses, so If you set a bonus to system.bonuses.attack.boons.spell effect will be removed when spell casted.
Same as weapon attack checks only for system.bonuses.attack.boons.${AttackAttribute}, system.bonuses.attack.boons.all and system.bonuses.attack.boons.all and not for system.bonuses.attack.boons.spell.
That is the logic.

@ClipplerBlood ClipplerBlood merged commit 21e403c into Xacus:master Oct 7, 2024
2 checks passed
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.

3 participants