Vehicle AC reverts to 10 every time defense dialog is opened and closed

Issue #280 resolved
Ben Freeland created an issue

Setup

dnd5e: 1.4.1
obsidian: 5.0.11

Steps to Reproduce

  1. Create Vehicle sheet
  2. Change AC to 20
  3. Open Defenses dialogue
  4. Close Defenses dialogue

Expected

Vehicle AC is shown as 20

Observed

Vehicle AC is shown as 10 again

Comments (2)

  1. Ben Freeland reporter

    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.

  2. Log in to comment