mysurvive / pf2e-thaum-vuln

Improvement for Thaumaturge Exploit Vulnerability
MIT License
10 stars 11 forks source link

Fix some issues with Amulet's Abeyance character selection #132

Closed xyzzy42 closed 4 months ago

xyzzy42 commented 4 months ago

The dialog for selecting which tokens should get the Amulet's Abeyance effect didn't actually work.

While the background color changed to/from transparent and red, none of the tokens would actually get unchosen.

The code to unselect the buttons not clicked on was using the siblings of the button clicked on. But the button has no siblings, it's inside of a div by itself. It's the button's parent div that has the other divs as siblings.

With paragon amulet, as soon as a token was clicked on, the dialog would enforce the non-paragon radio button behavior of selecting only one token at a time. Change this so paragon amulet can toggle each token individually.

Also move the common token button styles to the CSS section, instead of injecting them on each button. Make the background color based on having the "chosen" attribute or not in the CSS, so it doesn't need to be changed in the js code based on button state.