Skip to content

Commit

Permalink
Added to hit bonus on monster attacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakeyzer committed Jul 14, 2023
1 parent f6fe942 commit f65b454
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.17.0",
"version": "2.18.0",
"name": "harmless_key",
"description": "A Dungeons and Dragons Combat Tracker",
"productName": "Harmless Key",
Expand Down
10 changes: 10 additions & 0 deletions src/components/combat/actions/Roll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@
"
>
<!-- Rolls -->
<span v-if="!isNil(action.action_list[0].attack_bonus)">
{{
action.action_list[0].attack_bonus < 0
? `-${Math.abs(action.action_list[0].attack_bonus)}`
: `+${action.action_list[0].attack_bonus}`
}}
to hit
</span>
<span v-if="action.action_list[0].rolls">
<span
v-for="(roll, roll_index) in action.action_list[0].rolls"
Expand Down Expand Up @@ -298,6 +306,7 @@ import { setHP } from "src/mixins/HpManipulations.js";
import { damage_type_icons } from "src/utils/generalConstants";
import { runEncounter } from "src/mixins/runEncounter.js";
import Projectiles from "./Projectiles";
import { isNil } from "lodash";

export default {
name: "Roll",
Expand All @@ -321,6 +330,7 @@ export default {
],
rollObject: {},
projectile_dialog: false,
isNil: isNil,
};
},
computed: {
Expand Down

0 comments on commit f65b454

Please sign in to comment.