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

Fix/reset turn #105

Merged
merged 2 commits into from
Jan 22, 2022
Merged

Fix/reset turn #105

merged 2 commits into from
Jan 22, 2022

Conversation

Eryx5502
Copy link
Contributor

There are some small changes on the rollInitiative function:

  1. The reason why the active PC wasn't the one with highest initiative after rollInitiative on a new round was because the updateTurn parameter. It defaults to true, which means the turn must be updated such that the active player isn't changed by rollInitiative. Defaulting to false does the trick.
  2. When refreshing the page, the initiative of some PC was randomly reset. I think awaiting for super.rollInitiative for all ids solves this issue.
  3. When given a string as ids, we were iterating through its letters which is not the intention.

@Eryx5502 Eryx5502 requested a review from Linkaynn January 18, 2022 16:05
Copy link
Contributor

@Linkaynn Linkaynn left a comment

Choose a reason for hiding this comment

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

@Eryx5502

Nice bug catch!

LGTM!

@Eryx5502 Eryx5502 merged commit 72179f2 into main Jan 22, 2022
@Eryx5502 Eryx5502 deleted the fix/reset-turn branch January 22, 2022 12:20
@Linkaynn Linkaynn added this to the v1.14.0 milestone Feb 13, 2022
@Linkaynn Linkaynn added the bug Something isn't working label Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants