Tarmslitaren / FrosthavenAssistant

flutter app
GNU Affero General Public License v3.0
189 stars 48 forks source link

Incorrect formula for calculating hazardous terrain damage #99

Open valsinats42 opened 1 year ago

valsinats42 commented 1 year ago

Hello, thanks for the app! Using it for our new GH session, I noticed that the value of the hazardous terrain damage seems incorrect. The current code calculates is as such:

static int getHazardValue() {
    return 1 + (_gameState.level.value / 3.0).ceil();
}

But the rulebook (pg. 14) says that

each hex inflicts half the damage of a trap (rounded down)

So perhaps the code above should be as follows?

static int getHazardValue() {
    return (getTrapValue() / 2.0).floor();
}
Tarmslitaren commented 1 year ago

It is using the Frosthaven formula. I will add options to use gloomhaven rules for various things at some point