Vehicle AC reverts to 10 every time defense dialog is opened and closed
Issue #280
resolved
Setup
dnd5e: 1.4.1
obsidian: 5.0.11
Steps to Reproduce
- Create Vehicle sheet
- Change AC to 20
- Open Defenses dialogue
- Close Defenses dialogue
Expected
Vehicle AC is shown as 20
Observed
Vehicle AC is shown as 10 again
Comments (2)
-
reporter -
repo owner - changed status to resolved
Thanks for the report, should be fixed in 5.0.12.
- Log in to comment
Further testing shows this affects a number of the attributes on the vehicle sheets. Maximum HP for example often reverts, however it sometimes remembers what you entered in weird ways. For example I put in 200 and it got stuck at 2000, then I changed it to 10 and it got stuck at 1000.
After some analysis I think it has something to do with getData in js/sheets/vehicle.js. The data returned from super.getData() always has an ac of 10 regardless of the value that was entered into the sheet, and that seems to be what’s being used when calculating bonuses.