Skip to content

Commit

Permalink
min difficulty is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon committed Jul 26, 2024
1 parent 134cb36 commit b691c88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/Monster.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function difficulty(mon: Monster): number {
difficulty = Math.floor(difficulty);
difficulty *= ( (hp ?? 1) + speed - attack_cost + ( morale + agro ) * 0.1 ) * 0.01 +
( vision_day + 2 * vision_night ) * 0.01;
return Math.floor(difficulty);
return Math.max(1, Math.floor(difficulty));
}
function difficultyDescription(diff: number) {
Expand Down

0 comments on commit b691c88

Please sign in to comment.