Skip to content

Revamped Combat Tracker #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 66 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
511d3c9
Legacy setting for Combat Tracker layout
Lakeyzer Nov 9, 2024
40b4be5
Merge branch 'develop' into feature/combat_tracker_deluxe
Lakeyzer Nov 9, 2024
21fe763
Setup basic layout
Lakeyzer Nov 9, 2024
a58b3a0
Added actor component with manual damage
Lakeyzer Nov 9, 2024
cfd3a63
Select Actor
Lakeyzer Nov 10, 2024
1a7e345
Return to current actor
Lakeyzer Nov 10, 2024
d9cf32f
Actor menu added
Lakeyzer Nov 10, 2024
c9b703a
Select environment as actor
Lakeyzer Nov 11, 2024
e948834
Updated layout
Lakeyzer Nov 11, 2024
285920b
Select damage type in manual
Lakeyzer Nov 11, 2024
e32605e
Show combat log in top
Lakeyzer Nov 11, 2024
658c3eb
Added Actor Details
Lakeyzer Nov 12, 2024
7c66a29
Setup Roll Actions
Lakeyzer Nov 13, 2024
7c75520
Start with actor actions overview
Lakeyzer Nov 15, 2024
f127f7c
Merge branch 'develop' into feature/combat_tracker_deluxe
Lakeyzer Nov 20, 2024
fd626c9
Added actor action overview
Lakeyzer Nov 20, 2024
78cb295
Started health bar component
Lakeyzer Nov 22, 2024
06b9f64
Health bar styling improvements
Lakeyzer Nov 27, 2024
6d7908c
Merge branch 'develop' into feature/combat_tracker_deluxe
Lakeyzer Nov 27, 2024
d4b64d0
Merge branch 'develop' into feature/combat_tracker_deluxe
Lakeyzer Nov 29, 2024
b49863f
Merge branch 'develop' into feature/combat_tracker_deluxe
Lakeyzer Jan 3, 2025
50a4485
Finish Target Entities with including quick edit
Lakeyzer Jan 10, 2025
04a8f21
Show Conditions and Reminder on Target Entities
Lakeyzer Jan 10, 2025
e93f9ca
Improved Effect layout
Lakeyzer Jan 11, 2025
6fdc045
Collapse effects
Lakeyzer Jan 12, 2025
be0f8fd
Damage meters styling updated
Lakeyzer Jan 12, 2025
134fb74
Top of the round bar styled
Lakeyzer Jan 12, 2025
0dce559
Merge branch 'develop' into feature/combat_tracker_deluxe
Lakeyzer Jan 18, 2025
fbbcdcc
Drag entities and update initiative to match new position
Lakeyzer Jan 31, 2025
37165bf
Use BasicEntity instead of TargetItem
Lakeyzer Feb 2, 2025
009db90
Started with rolling spells
Lakeyzer Feb 16, 2025
9270d4a
Update health bar color percentages
Lakeyzer May 16, 2025
f968fc9
Merge branch 'develop' into feature/combat_tracker_deluxe
Lakeyzer Jun 13, 2025
9c98c2d
update Damage knob when value of damage field changes
HarmlessHarm Jun 20, 2025
4f27928
show missed button in roll when action misses
HarmlessHarm Jun 20, 2025
118912b
Roll spells from top actor panel
Lakeyzer Jun 20, 2025
ac573df
Reset selected actor on turn change
Lakeyzer Jun 20, 2025
c0e371a
[0-9] no whitespace wrap
HarmlessHarm Jun 20, 2025
ae654fd
check if damage is done when triggering reminder
HarmlessHarm Jun 20, 2025
89c7e98
start turn reminder check
HarmlessHarm Jun 20, 2025
032f153
Recharge limited use actions and start of turn reminders fixed
HarmlessHarm Jun 20, 2025
74a1ea8
Don't allow negative damage/healing
Lakeyzer Jun 20, 2025
1bcac0c
Set multipliers from Targeted overview
Lakeyzer Jul 4, 2025
ce4d479
Apply correct manual damage, using multipliers and defenses
Lakeyzer Jul 4, 2025
b71db9e
Targetet Monster panel skills and saves after fix
HarmlessHarm Jun 27, 2025
014f7c8
Shift + D to change Actor
HarmlessHarm Jun 27, 2025
84e9429
change add entity keybind to +
HarmlessHarm Jun 27, 2025
78a6eef
event bus to close popups
HarmlessHarm Jun 27, 2025
1a45eb1
prettier formatting
HarmlessHarm Jun 27, 2025
b0a632e
Refactors limited use action counters
HarmlessHarm Jul 4, 2025
afe6fa1
Set multipliers and resistances from targeted overview
Lakeyzer Jul 11, 2025
383ae13
Show legendary count in Actions Dropdown
HarmlessHarm Jul 4, 2025
bd2864a
Limited use counter component in actions
HarmlessHarm Jul 11, 2025
45336d9
fix plurar bold font
HarmlessHarm Jul 11, 2025
19a4b6c
Fix action rolls from ViewEntity
Lakeyzer Jul 11, 2025
970b32b
Created component for card actions
Lakeyzer Jul 12, 2025
f0288ad
Fix path to Card
Lakeyzer Jul 18, 2025
a6f9953
Added abilities with mods and saves to CardDetails
Lakeyzer Jul 18, 2025
f0cb3cb
Added stats to CardDetails
Lakeyzer Jul 18, 2025
3baeadd
Skills added to CardDetails
Lakeyzer Jul 18, 2025
999f395
Use Card instead of ViewEntity for Target
Lakeyzer Jul 18, 2025
95b2186
Minor improvements for CardDetails
Lakeyzer Jul 18, 2025
727a85d
Added CardSpellcasting
Lakeyzer Jul 18, 2025
2275993
Styling improvements for Targeted pane
Lakeyzer Aug 1, 2025
dd9eb56
Death Saving Throws implemented
Lakeyzer Aug 3, 2025
de2a703
Hide dead saves info when not on 0 hp
Lakeyzer Aug 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/Drawer.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<template>
<div class="drawer">
<a @click="hideDrawer()" v-shortkey="['esc']" @shortkey="hideDrawer()" class="hide">
<i aria-hidden="true" class="far fa-chevron-double-right" />
<span class="neutral-2 ml-2 d-none d-sm-inline">[esc]</span>
<q-tooltip anchor="bottom middle" self="center middle"> Hide [esc] </q-tooltip>
<i aria-hidden="true" class="far fa-chevron-double-right mr-2" />
<hk-show-keybind :binds="['esc']" />
<q-tooltip anchor="bottom middle" self="center middle">
Hide <hk-show-keybind :binds="['esc']" show />
</q-tooltip>
</a>
<q-scroll-area :dark="$store.getters.theme === 'dark'" :thumb-style="{ width: '5px' }">
<div class="drawer__content" :class="drawer.classes">
Expand Down
135 changes: 83 additions & 52 deletions src/components/combat/DeathSaves.vue
Original file line number Diff line number Diff line change
@@ -1,63 +1,76 @@
<template>
<div>
<template v-if="target.curHp === 0 && !target.stable && !target.dead">
<a
class="btn btn-sm btn-clear"
@click="setDrawer({ show: true, type: 'drawers/DeathSaves' })"
>
What is this <i aria-hidden="true" class="fas fa-question"></i>
</a>
<div class="px-1 my-3 d-flex justify-content-between saves">
<div v-for="(n, index) in 5" :key="index">
<template v-if="Object.keys(target.saves).length == n">
<a v-show="target.saves[n] === 'succes'" class="green" @click="save('unset', n)">
<i aria-hidden="true" class="fas fa-check-circle"></i>
<q-tooltip anchor="top middle" self="center middle"> Undo </q-tooltip>
</a>
<a v-show="target.saves[n] === 'fail'" class="red" @click="save('unset', n)">
<i aria-hidden="true" class="fas fa-times-circle"></i>
<q-tooltip anchor="top middle" self="center middle"> Undo </q-tooltip>
</a>
</template>
<template v-else>
<span v-show="target.saves[n] === 'succes'" class="green"
><i aria-hidden="true" class="fas fa-check-circle"></i
></span>
<span v-show="target.saves[n] === 'fail'" class="red"
><i aria-hidden="true" class="fas fa-times-circle"></i
></span>
</template>
<span v-show="!target.saves[n]" class="neutral-2"
><i aria-hidden="true" class="fas fa-dot-circle"></i
></span>
</div>
</div>
<div v-if="Object.keys(target.saves).length < 5" class="d-flex gap-1 justify-content-between">
<div v-if="target.curHp === 0 && !target.stable && !target.dead" class="saves__wrapper">
<div v-if="showActions" class="d-flex gap-1 justify-content-between items-center">
<template v-if="Object.keys(target.saves).length < 5 && death_fails < 3 && !target.dead">
<button
class="btn btn-block save bg-green"
class="btn btn-block bg-neutral-5"
@click="save('succes', Object.keys(target.saves).length)"
>
<i aria-hidden="true" class="fas fa-check"></i>
<i aria-hidden="true" class="fas fa-check green mr-1" /> Save
</button>
<button
class="btn btn-block save bg-red"
class="btn btn-block bg-neutral-5"
@click="save('fail', Object.keys(target.saves).length)"
>
<i aria-hidden="true" class="fas fa-times"></i>
<i aria-hidden="true" class="fas fa-times red mr-1" /> Fail
</button>
</div>
<a v-if="death_fails >= 3" class="btn btn-block bg-red my-3" @click="kill_revive(false)"
><i aria-hidden="true" class="fas fa-skull"></i>
{{ target.entityType.capitalize() }} died</a
</template>
<button
v-if="death_fails >= 3"
class="btn btn-block bg-neutral-5"
@click="kill_revive(false)"
>
<a class="btn btn-block my-3" @click="set_stable({ key: target.key, action: 'set' })"
><i aria-hidden="true" class="fas fa-heartbeat"></i> Stabilize</a
>
</template>
<a v-else-if="target.dead" class="btn bg-green btn-block my-3" @click="kill_revive(true)"
><i aria-hidden="true" class="fas fa-hand-holding-magic"></i> Revive</a
>
<i aria-hidden="true" class="fas fa-skull red mr-1" />
{{ target.entityType.capitalize() }} died
</button>
<button class="btn btn-block bg-neutral-5" @click="stabilize">
<i aria-hidden="true" class="fas fa-heartbeat mr-1" /> Stabilize
</button>
</div>
<div class="d-flex justify-content-start gap-1 items-center saves">
<div v-for="(n, index) in 5" :key="index">
<template v-if="Object.keys(target.saves).length == n">
<button
v-show="target.saves[n] === 'succes'"
class="green pointer"
@click="save('unset', n)"
>
<i aria-hidden="true" class="fas fa-check-circle" />
<q-tooltip anchor="top middle" self="center middle"> Undo </q-tooltip>
</button>
<button v-show="target.saves[n] === 'fail'" class="red pointer" @click="save('unset', n)">
<i aria-hidden="true" class="fas fa-times-circle" />
<q-tooltip anchor="top middle" self="center middle"> Undo </q-tooltip>
</button>
</template>
<template v-else>
<span v-show="target.saves[n] === 'succes'" class="green">
<i aria-hidden="true" class="fas fa-check-circle" />
</span>
<span v-show="target.saves[n] === 'fail'" class="red">
<i aria-hidden="true" class="fas fa-times-circle" />
</span>
</template>
<span v-show="!target.saves[n]" class="neutral-2">
<i aria-hidden="true" class="fas fa-skull" />
</span>
</div>
</div>
</div>
<button
v-else-if="target.dead && showActions"
class="btn bg-neutral-5"
@click="kill_revive(true)"
>
<i aria-hidden="true" class="fas fa-hand-holding-magic mr-1" /> Revive
</button>
<button
v-else-if="target.stable && showActions"
class="btn bg-neutral-5"
@click="set_stable({ key: target.key, action: 'unset' })"
>
<i aria-hidden="true" class="fas fa-heart-broken mr-1" /> Destabilize
</button>
</template>

<script>
Expand All @@ -67,7 +80,16 @@ import { dice } from "src/mixins/dice.js";
export default {
name: "DeathSaves",
mixins: [dice],
props: ["target"],
props: {
target: {
type: Object,
required: true,
},
showActions: {
type: Boolean,
default: false,
},
},
computed: {
...mapGetters(["entities", "targeted"]),
death_fails() {
Expand All @@ -81,7 +103,7 @@ export default {
},
},
methods: {
...mapActions(["setDrawer", "set_save", "set_dead", "set_stable"]),
...mapActions(["set_save", "set_dead", "set_stable"]),
save(check, index) {
this.set_save({
key: this.target.key,
Expand All @@ -108,6 +130,15 @@ export default {

<style lang="scss" scoped>
.saves {
font-size: 20px;
font-size: 18px;

&__wrapper {
display: flex;
gap: 10px;

button {
white-space: nowrap;
}
}
}
</style>
8 changes: 4 additions & 4 deletions src/components/combat/Finished.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
<q-tab-panel name="dmg">
<div class="row q-col-gutter-md">
<div class="col-12 col-md-6">
<Dmg />
<DamageMeters />
</div>
<div class="col-12 col-md-6">
<h2>Log</h2>
Expand All @@ -212,8 +212,8 @@
</template>

<script>
import Dmg from "src/components/combat/side/Dmg.vue";
import Log from "src/components/combat/side/Log.vue";
import DamageMeters from "src/components/combat/side/DamageMeters.vue";
import Log from "src/components/combat/legacy/side/Log.vue";
import { currencyMixin } from "src/mixins/currency.js";
import { mapActions, mapGetters } from "vuex";

Expand All @@ -222,7 +222,7 @@ export default {
props: ["encounter"],
mixins: [currencyMixin],
components: {
Dmg,
DamageMeters,
Log,
Players: () => import("src/components/campaign/Players.vue"),
},
Expand Down
109 changes: 109 additions & 0 deletions src/components/combat/Pane.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<template>
<div class="combat-pane" @focus="$emit('focus')">
<div class="combat-pane__header">
<div class="combat-pane__header-title">
<slot name="header-title">
{{ title }}
</slot>
</div>
<slot name="header-action" />
</div>
<q-scroll-area
:dark="$store.getters.theme === 'dark'"
:thumb-style="{ width: '5px' }"
:class="{ shadow: scroll > 0 }"
@scroll="setScroll"
>
<div class="combat-pane__content">
<slot />
</div>
</q-scroll-area>
</div>
</template>

<script>
export default {
name: "CombatTrackerPane",
props: {
title: {
type: String,
},
},
data() {
return {
scroll: 0,
};
},
methods: {
setScroll(e) {
this.scroll = e.verticalPosition;
},
},
};
</script>

<style lang="scss" scoped>
.combat-pane {
background-color: $neutral-6-transparent;
border-radius: $border-radius;

&__header {
display: flex;
justify-content: space-between;
align-items: center;
background-color: $neutral-8;
padding: 0 10px;
min-height: 51px;
border-top-left-radius: inherit;
border-top-right-radius: inherit;

&.shadow {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}

&-title {
font-size: 18px;
font-weight: bold;
}
}
&__content {
padding: 10px;
}
.q-scrollarea {
position: relative;
height: calc(100% - 52px);
max-width: 100%;

// Position relative on scrollarea__content causes target items to overflow horizontally
&::v-deep {
.q-scrollarea__content {
position: unset;
}
}

&:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
pointer-events: none;
}
&.shadow:before {
box-shadow: inset 0px 15px 15px -20px $black;
}
}
}

@media only screen and (max-width: 576px) {
.combat-pane {
&__header {
&-title {
font-size: 15px;
}
}
}
}
</style>
Loading