mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
add death roll in character sheet (#191)
This commit is contained in:
parent
b4fff7b9e6
commit
e3b9dcad2a
3 changed files with 34 additions and 4 deletions
|
|
@ -699,7 +699,6 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
|||
static async makeDeathMove() {
|
||||
if (this.document.system.resources.hitPoints.value === this.document.system.resources.hitPoints.max) {
|
||||
await new DhpDeathMove(this.document).render(true);
|
||||
await this.minimize();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,12 +12,39 @@
|
|||
background: transparent;
|
||||
}
|
||||
|
||||
img {
|
||||
.portrait {
|
||||
position: relative;
|
||||
height: 235px;
|
||||
width: 275px;
|
||||
border-bottom: 1px solid light-dark(@dark-blue, @golden);
|
||||
cursor: pointer;
|
||||
object-fit: cover;
|
||||
|
||||
img {
|
||||
height: 235px;
|
||||
width: 275px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.death-roll-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.death-roll {
|
||||
filter: grayscale(1);
|
||||
|
||||
.death-roll-btn {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
right: 30%;
|
||||
font-size: 6rem;
|
||||
color: @beige;
|
||||
|
||||
&:hover {
|
||||
text-shadow: 0 0 8px @beige;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info-section {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
<aside class="character-sidebar-sheet">
|
||||
<img class="portrait" src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
||||
<div class="portrait {{#if (gte document.system.resources.hitPoints.value document.system.resources.hitPoints.maxTotal)}}death-roll{{/if}}">
|
||||
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
||||
<a class="death-roll-btn" data-tooltip="{{localize "DAGGERHEART.Sheets.PC.Health.DeathMoveTooltip"}}" data-action="makeDeathMove"><i class="fas fa-skull death-save" ></i></a>
|
||||
</div>
|
||||
|
||||
<div class="info-section">
|
||||
<div class="resources-section">
|
||||
<div class="status-bar">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue