AVR-1069: !init shuffle does not take ieffects into account#2200
Merged
codybanman merged 6 commits intoavrae:nightlyfrom Oct 28, 2025
Merged
AVR-1069: !init shuffle does not take ieffects into account#2200codybanman merged 6 commits intoavrae:nightlyfrom
codybanman merged 6 commits intoavrae:nightlyfrom
Conversation
1drturtle
suggested changes
Jul 31, 2025
Contributor
1drturtle
left a comment
There was a problem hiding this comment.
Looks good. See comment on possible improvement.
…t is sorted after combatant added to group
…that init is sorted after combatant added to group" This reverts commit 49f35f4.
Contributor
|
LGTM as well, the 3 line duplication around |
codybanman
requested changes
Sep 22, 2025
Contributor
codybanman
left a comment
There was a problem hiding this comment.
This is good. I've added a suggestion but it mainly just needs cleanup to get passed the linter
Comment on lines
+370
to
+389
| if isinstance(c, CombatantGroup): | ||
| gc = c.get_combatants()[0] | ||
| args = ieffect_handler(gc, argparse(""), "initiative") | ||
| b = args.join("b", "+", ephem=True) | ||
|
|
||
| # set up dice. Note that we still use the first combatant in the group for consistency with the ieffects | ||
| roll_str = gc.init_skill.d20(base_adv=args.adv(boolwise=True, ephem=True)) | ||
|
|
||
| else: | ||
| args = ieffect_handler(c, argparse(""), "initiative") | ||
| b = args.join("b", "+", ephem=True) | ||
|
|
||
| # set up dice | ||
| roll_str = c.init_skill.d20(base_adv=args.adv(boolwise=True, ephem=True)) | ||
|
|
||
| if b is not None: | ||
| roll_str = f"{roll_str}+{b}" | ||
|
|
||
| # roll | ||
| init_roll = roll(roll_str) |
Contributor
There was a problem hiding this comment.
You could clean up some of the redundancy by doing something like this.
Suggested change
| if isinstance(c, CombatantGroup): | |
| gc = c.get_combatants()[0] | |
| args = ieffect_handler(gc, argparse(""), "initiative") | |
| b = args.join("b", "+", ephem=True) | |
| # set up dice. Note that we still use the first combatant in the group for consistency with the ieffects | |
| roll_str = gc.init_skill.d20(base_adv=args.adv(boolwise=True, ephem=True)) | |
| else: | |
| args = ieffect_handler(c, argparse(""), "initiative") | |
| b = args.join("b", "+", ephem=True) | |
| # set up dice | |
| roll_str = c.init_skill.d20(base_adv=args.adv(boolwise=True, ephem=True)) | |
| if b is not None: | |
| roll_str = f"{roll_str}+{b}" | |
| # roll | |
| init_roll = roll(roll_str) | |
| combatant = c | |
| if isinstance(c, CombatantGroup): | |
| combatant = c.get_combatants()[0] | |
| args = ieffect_handler(combatant, argparse(""), "initiative") | |
| b = args.join("b", "+", ephem=True) | |
| # set up dice. Note that we still use the first combatant in the group for consistency with the ieffects | |
| roll_str = combatant.init_skill.d20(base_adv=args.adv(boolwise=True, ephem=True)) | |
| if b is not None: | |
| roll_str = f"{roll_str}+{b}" | |
| # roll | |
| init_roll = roll(roll_str) |
7 tasks
7he4lph4
pushed a commit
to 7he4lph4/avrae
that referenced
this pull request
Nov 18, 2025
7he4lph4
pushed a commit
to 7he4lph4/avrae
that referenced
this pull request
Nov 18, 2025
…vrae#2200)" This reverts commit c6849ce.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
AVR-1069 !init shuffle does not account for ieffects
Changelog Entry
!init shufflewas updated to takeieffects into accountChecklist
PR Type
Other