Thank you robinzig for your advice of needing to remove the event listeners. That is exactly my problem. With this knowledge I am a bit more skill as a javascript programmer now.robinzig wrote: ↑15 August 2021, 20:28 So your onRemoveDiceSpell adds the click handler - but where is this called from? (From the name I guess it's itself a handler for some player action.) Are you removing those handlers between calls to this function? If not then you are going to get exactly what you're seeing - more and more identical handlers added to the same event as the game goes on. You'll need to disconnect at the appropriate places if doing it this way. (Typically in onLeavingState if this action is only associated with a particular game state.)
Thanks