MonsterBlocks icon indicating copy to clipboard operation
MonsterBlocks copied to clipboard

Active effects with math operations are accumulating with each opening of MonsterBlock sheet

Open Pyroman2xxx opened this issue 4 years ago • 3 comments

When using Monster Blocks, every time I open a token's sheet that is present on the map, all of the Active Effects with math operators fire and are resolved. This causes the values to be incorrect from what they should be after opening the sheet multiple times. The first time I open the sheet the values are correct, each subsequent opening runs the operators again and again.

Two examples:

  • I use Active Effects to add racial bonuses to an NPC by dragging a race item on to the sheet (e.g. human adds 1 to each ability score while the item is on the sheet). With this race item, each time I open the sheet it increases all attributes by 1 so that, by the time I have opened the sheet 4 times, all ability scores have increased by 4 (opening the first time shows the correct +1 to each score).
  • I have Ray of Frost decrease an NPC's speed by 10 (AE: Add -10) when hit while the effect remains. Each time I open the sheet its speed is reduced by 10. Open 3 times and its speed is -30 (opening it the first time shows the correct -10 from the spell).

There are no errors in the console so this is baked into the code. It only affects NPCs and only when using Monster Blocks as the sheet. Also, it affects NPCs no matter if they are on a map or in the Actors Directory.

Pyroman2xxx avatar Jun 12 '21 19:06 Pyroman2xxx

That's certainly weird.

zeel01 avatar Jun 12 '21 19:06 zeel01

That's certainly weird.

Agreed, and I will also add that the accumulation is permanent. When I remove the human item , for example, it removes only the single +1 to all scores but the accumulation still remains as permanent score increases.

Pyroman2xxx avatar Jun 12 '21 20:06 Pyroman2xxx

Ooh, that actually helps. I bet I know what the problem is, and if it's what I think... It's going to be a real pain to fix.

zeel01 avatar Jun 12 '21 20:06 zeel01