Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7dc2492c96 |
@@ -232,6 +232,32 @@ i.fvtt-cthulhu-eternal {
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 1.02);
|
||||
}
|
||||
.chat-san-request ul .combatants-grid,
|
||||
.chat-lethal-damage ul .combatants-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 4px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
.chat-san-request ul .combatants-grid button.apply-wounds-btn,
|
||||
.chat-lethal-damage ul .combatants-grid button.apply-wounds-btn {
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 0.7);
|
||||
border: 1px solid #4b4a44;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
background-color: #f0f0e0;
|
||||
color: #1c1c1c;
|
||||
}
|
||||
.chat-san-request ul .combatants-grid button.apply-wounds-btn:hover,
|
||||
.chat-lethal-damage ul .combatants-grid button.apply-wounds-btn:hover {
|
||||
background-color: #d5d5c5;
|
||||
border-color: #2d2d2a;
|
||||
}
|
||||
.fvtt-cthulhu-eternal .protagonist-sheet-common label {
|
||||
font-family: var(--font-secondary);
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
|
||||
@@ -197,11 +197,30 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
|
||||
}
|
||||
if (game.user.isGM) {
|
||||
$(html).find(".li-apply-wounds").each((i, btn) => {
|
||||
btn.style.display = "inline"
|
||||
btn.style.display = "block"
|
||||
})
|
||||
$(html).find(".li-apply-wounds-select").click((event) => {
|
||||
$(html).find(".apply-wounds-btn").click((event) => {
|
||||
CthulhuEternalUtils.applyWounds(message, event)
|
||||
})
|
||||
$(html).find(".apply-wounds-btn").hover(
|
||||
function (event) {
|
||||
// Mouse enter - select the token
|
||||
let combatantId = $(this).data("combatant-id")
|
||||
if (combatantId && game.combat) {
|
||||
let combatant = game.combat.combatants.get(combatantId)
|
||||
if (combatant?.token) {
|
||||
let token = canvas.tokens.get(combatant.token.id)
|
||||
if (token) {
|
||||
token.control({ releaseOthers: true })
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
function (event) {
|
||||
// Mouse leave - release selection
|
||||
canvas.tokens.releaseAll()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@@ -127,6 +127,8 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
|
||||
dmgBonus = -2
|
||||
} else if (this.characteristics.str.value <= 8) {
|
||||
dmgBonus = -1
|
||||
} else if (this.characteristics.str.value <= 12) {
|
||||
dmgBonus = 0
|
||||
} else if (this.characteristics.str.value <= 16) {
|
||||
dmgBonus = 1
|
||||
} else if (this.characteristics.str.value <= 40) {
|
||||
|
||||
@@ -594,8 +594,8 @@ export default class CthulhuEternalUtils {
|
||||
// Remove the chat message
|
||||
this.removeChatMessageId(message.id)
|
||||
|
||||
// Get the targetted actorId from the HTML select event
|
||||
let targetCombatantId = event.target.value
|
||||
// Get the targetted actorId from the button's data attribute
|
||||
let targetCombatantId = event.currentTarget.dataset.combatantId
|
||||
let combatant = game.combat.combatants.get(targetCombatantId)
|
||||
let targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
|
||||
if (!targetActor) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000269
|
||||
MANIFEST-000273
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/11/12-23:48:30.686758 7f4781ffb6c0 Recovering log #267
|
||||
2025/11/12-23:48:30.697449 7f4781ffb6c0 Delete type=3 #265
|
||||
2025/11/12-23:48:30.697507 7f4781ffb6c0 Delete type=0 #267
|
||||
2025/11/13-13:58:42.410831 7f4780bff6c0 Level-0 table #272: started
|
||||
2025/11/13-13:58:42.410865 7f4780bff6c0 Level-0 table #272: 0 bytes OK
|
||||
2025/11/13-13:58:42.417362 7f4780bff6c0 Delete type=0 #270
|
||||
2025/11/13-13:58:42.434870 7f4780bff6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end)
|
||||
2025/11/21-23:23:35.521610 7f21eeffd6c0 Recovering log #271
|
||||
2025/11/21-23:23:35.612353 7f21eeffd6c0 Delete type=3 #269
|
||||
2025/11/21-23:23:35.612430 7f21eeffd6c0 Delete type=0 #271
|
||||
2025/11/21-23:35:34.796894 7f21ed7fa6c0 Level-0 table #276: started
|
||||
2025/11/21-23:35:34.796917 7f21ed7fa6c0 Level-0 table #276: 0 bytes OK
|
||||
2025/11/21-23:35:34.806397 7f21ed7fa6c0 Delete type=0 #274
|
||||
2025/11/21-23:35:34.806600 7f21ed7fa6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/11/12-23:40:11.531092 7f47827fc6c0 Recovering log #263
|
||||
2025/11/12-23:40:11.541025 7f47827fc6c0 Delete type=0 #263
|
||||
2025/11/12-23:40:11.541091 7f47827fc6c0 Delete type=3 #261
|
||||
2025/11/12-23:40:47.861546 7f4780bff6c0 Level-0 table #268: started
|
||||
2025/11/12-23:40:47.861580 7f4780bff6c0 Level-0 table #268: 0 bytes OK
|
||||
2025/11/12-23:40:47.867844 7f4780bff6c0 Delete type=0 #266
|
||||
2025/11/12-23:40:47.874806 7f4780bff6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end)
|
||||
2025/11/12-23:48:30.686758 7f4781ffb6c0 Recovering log #267
|
||||
2025/11/12-23:48:30.697449 7f4781ffb6c0 Delete type=3 #265
|
||||
2025/11/12-23:48:30.697507 7f4781ffb6c0 Delete type=0 #267
|
||||
2025/11/13-13:58:42.410831 7f4780bff6c0 Level-0 table #272: started
|
||||
2025/11/13-13:58:42.410865 7f4780bff6c0 Level-0 table #272: 0 bytes OK
|
||||
2025/11/13-13:58:42.417362 7f4780bff6c0 Delete type=0 #270
|
||||
2025/11/13-13:58:42.434870 7f4780bff6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000438
|
||||
MANIFEST-000442
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/11/12-23:48:30.659183 7f47817fa6c0 Recovering log #436
|
||||
2025/11/12-23:48:30.670042 7f47817fa6c0 Delete type=3 #434
|
||||
2025/11/12-23:48:30.670124 7f47817fa6c0 Delete type=0 #436
|
||||
2025/11/13-13:58:42.417482 7f4780bff6c0 Level-0 table #441: started
|
||||
2025/11/13-13:58:42.417509 7f4780bff6c0 Level-0 table #441: 0 bytes OK
|
||||
2025/11/13-13:58:42.423396 7f4780bff6c0 Delete type=0 #439
|
||||
2025/11/13-13:58:42.434882 7f4780bff6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end)
|
||||
2025/11/21-23:23:35.280848 7f21edffb6c0 Recovering log #440
|
||||
2025/11/21-23:23:35.368467 7f21edffb6c0 Delete type=3 #438
|
||||
2025/11/21-23:23:35.368552 7f21edffb6c0 Delete type=0 #440
|
||||
2025/11/21-23:35:34.777225 7f21ed7fa6c0 Level-0 table #445: started
|
||||
2025/11/21-23:35:34.777275 7f21ed7fa6c0 Level-0 table #445: 0 bytes OK
|
||||
2025/11/21-23:35:34.786357 7f21ed7fa6c0 Delete type=0 #443
|
||||
2025/11/21-23:35:34.806576 7f21ed7fa6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/11/12-23:40:11.502931 7f4781ffb6c0 Recovering log #432
|
||||
2025/11/12-23:40:11.512928 7f4781ffb6c0 Delete type=0 #432
|
||||
2025/11/12-23:40:11.512984 7f4781ffb6c0 Delete type=3 #430
|
||||
2025/11/12-23:40:47.855365 7f4780bff6c0 Level-0 table #437: started
|
||||
2025/11/12-23:40:47.855411 7f4780bff6c0 Level-0 table #437: 0 bytes OK
|
||||
2025/11/12-23:40:47.861414 7f4780bff6c0 Delete type=0 #435
|
||||
2025/11/12-23:40:47.874794 7f4780bff6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end)
|
||||
2025/11/12-23:48:30.659183 7f47817fa6c0 Recovering log #436
|
||||
2025/11/12-23:48:30.670042 7f47817fa6c0 Delete type=3 #434
|
||||
2025/11/12-23:48:30.670124 7f47817fa6c0 Delete type=0 #436
|
||||
2025/11/13-13:58:42.417482 7f4780bff6c0 Level-0 table #441: started
|
||||
2025/11/13-13:58:42.417509 7f4780bff6c0 Level-0 table #441: 0 bytes OK
|
||||
2025/11/13-13:58:42.423396 7f4780bff6c0 Delete type=0 #439
|
||||
2025/11/13-13:58:42.434882 7f4780bff6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000084
|
||||
MANIFEST-000088
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/11/12-23:48:30.674156 7f4781ffb6c0 Recovering log #82
|
||||
2025/11/12-23:48:30.683495 7f4781ffb6c0 Delete type=3 #80
|
||||
2025/11/12-23:48:30.683546 7f4781ffb6c0 Delete type=0 #82
|
||||
2025/11/13-13:58:42.404378 7f4780bff6c0 Level-0 table #87: started
|
||||
2025/11/13-13:58:42.404437 7f4780bff6c0 Level-0 table #87: 0 bytes OK
|
||||
2025/11/13-13:58:42.410719 7f4780bff6c0 Delete type=0 #85
|
||||
2025/11/13-13:58:42.434856 7f4780bff6c0 Manual compaction at level-0 from '!folders!0DI3T2jve3nsmsfZ' @ 72057594037927935 : 1 .. '!items!zyxA9DhO36t5OBDv' @ 0 : 0; will stop at (end)
|
||||
2025/11/21-23:23:35.396467 7f21ef7fe6c0 Recovering log #86
|
||||
2025/11/21-23:23:35.502570 7f21ef7fe6c0 Delete type=3 #84
|
||||
2025/11/21-23:23:35.502631 7f21ef7fe6c0 Delete type=0 #86
|
||||
2025/11/21-23:35:34.786516 7f21ed7fa6c0 Level-0 table #91: started
|
||||
2025/11/21-23:35:34.786543 7f21ed7fa6c0 Level-0 table #91: 0 bytes OK
|
||||
2025/11/21-23:35:34.796797 7f21ed7fa6c0 Delete type=0 #89
|
||||
2025/11/21-23:35:34.806589 7f21ed7fa6c0 Manual compaction at level-0 from '!folders!0DI3T2jve3nsmsfZ' @ 72057594037927935 : 1 .. '!items!zyxA9DhO36t5OBDv' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/11/12-23:40:11.517421 7f4782ffd6c0 Recovering log #78
|
||||
2025/11/12-23:40:11.527038 7f4782ffd6c0 Delete type=0 #78
|
||||
2025/11/12-23:40:11.527106 7f4782ffd6c0 Delete type=3 #76
|
||||
2025/11/12-23:40:47.867960 7f4780bff6c0 Level-0 table #83: started
|
||||
2025/11/12-23:40:47.867984 7f4780bff6c0 Level-0 table #83: 0 bytes OK
|
||||
2025/11/12-23:40:47.874660 7f4780bff6c0 Delete type=0 #81
|
||||
2025/11/12-23:40:47.874816 7f4780bff6c0 Manual compaction at level-0 from '!folders!0DI3T2jve3nsmsfZ' @ 72057594037927935 : 1 .. '!items!zyxA9DhO36t5OBDv' @ 0 : 0; will stop at (end)
|
||||
2025/11/12-23:48:30.674156 7f4781ffb6c0 Recovering log #82
|
||||
2025/11/12-23:48:30.683495 7f4781ffb6c0 Delete type=3 #80
|
||||
2025/11/12-23:48:30.683546 7f4781ffb6c0 Delete type=0 #82
|
||||
2025/11/13-13:58:42.404378 7f4780bff6c0 Level-0 table #87: started
|
||||
2025/11/13-13:58:42.404437 7f4780bff6c0 Level-0 table #87: 0 bytes OK
|
||||
2025/11/13-13:58:42.410719 7f4780bff6c0 Delete type=0 #85
|
||||
2025/11/13-13:58:42.434856 7f4780bff6c0 Manual compaction at level-0 from '!folders!0DI3T2jve3nsmsfZ' @ 72057594037927935 : 1 .. '!items!zyxA9DhO36t5OBDv' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -111,8 +111,8 @@ i.fvtt-cthulhu-eternal {
|
||||
padding: 2px 2px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
min-width: 6.0rem;
|
||||
max-width: 6.0rem;
|
||||
min-width: 6rem;
|
||||
max-width: 6rem;
|
||||
}
|
||||
}
|
||||
.san-loose-buttons {
|
||||
@@ -128,8 +128,8 @@ i.fvtt-cthulhu-eternal {
|
||||
padding: 2px 2px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
min-width: 3.0rem;
|
||||
max-width: 3.0rem;
|
||||
min-width: 3rem;
|
||||
max-width: 3rem;
|
||||
}
|
||||
}
|
||||
.result-non-lethal {
|
||||
@@ -141,5 +141,28 @@ i.fvtt-cthulhu-eternal {
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 1.02);
|
||||
}
|
||||
.combatants-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 4px;
|
||||
margin: 8px 0;
|
||||
button.apply-wounds-btn {
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 0.7);
|
||||
border: 1px solid #4b4a44;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
background-color: #f0f0e0;
|
||||
color: #1c1c1c;
|
||||
&:hover {
|
||||
background-color: #d5d5c5;
|
||||
border-color: #2d2d2a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +1,58 @@
|
||||
<div class="{{cssClass}}">
|
||||
<div class="chat-lethal-damage">
|
||||
<ul>
|
||||
<li><strong>{{weapon.name}} : {{localize "CTHULHUETERNAL.Label.damageRoll"}}</strong></li>
|
||||
<li>{{localize "CTHULHUETERNAL.Label.result"}} :{{rollResult}} ({{formula}})</li>
|
||||
<li><strong>{{weapon.name}}
|
||||
:
|
||||
{{localize "CTHULHUETERNAL.Label.damageRoll"}}</strong></li>
|
||||
<li>{{localize "CTHULHUETERNAL.Label.result"}}
|
||||
:{{rollResult}}
|
||||
({{formula}})</li>
|
||||
|
||||
{{#if (gt weapon.system.killRadius 0)}}
|
||||
<li>{{localize "CTHULHUETERNAL.Label.killRadius"}} : {{weapon.system.killRadius}} {{weapon.system.rangeUnit}}</li>
|
||||
<li>{{localize "CTHULHUETERNAL.Label.killRadiusInfo"}}</li>
|
||||
<li>{{localize "CTHULHUETERNAL.Label.killRadius"}}
|
||||
:
|
||||
{{weapon.system.killRadius}}
|
||||
{{weapon.system.rangeUnit}}</li>
|
||||
<li>{{localize "CTHULHUETERNAL.Label.killRadiusInfo"}}</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if (gt weapon.system.armorPiercing 0)}}
|
||||
<li>{{localize "CTHULHUETERNAL.Label.armorPiercing"}} : {{weapon.system.armorPiercing}}</li>
|
||||
<li>{{localize "CTHULHUETERNAL.Label.armorPiercing"}}
|
||||
:
|
||||
{{weapon.system.armorPiercing}}</li>
|
||||
{{/if}}
|
||||
{{#if (gt weapon.system.penetration 0)}}
|
||||
<li>{{localize "CTHULHUETERNAL.Label.penetration"}} : {{weapon.system.penetration}}</li>
|
||||
<li>{{localize "CTHULHUETERNAL.Label.penetration"}}
|
||||
:
|
||||
{{weapon.system.penetration}}</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if ammoUsed}}
|
||||
<li>{{localize "CTHULHUETERNAL.Label.ammoUsed"}}: {{ammoUsed}} / {{weapon.system.ammo.value}}</li>
|
||||
<li>{{localize "CTHULHUETERNAL.Label.ammoUsed"}}:
|
||||
{{ammoUsed}}
|
||||
/
|
||||
{{weapon.system.ammo.value}}</li>
|
||||
{{/if}}
|
||||
|
||||
<li class="li-apply-wounds">
|
||||
{{localize "CTHULHUETERNAL.Label.applyWounds"}}
|
||||
<select name="combatant" class="li-apply-wounds-select">
|
||||
<option value="none"></option>
|
||||
{{selectOptions combatants valueAttr="id" labelAttr="name"}}
|
||||
</select>
|
||||
<div>{{localize "CTHULHUETERNAL.Label.applyWounds"}}</div>
|
||||
<div class="combatants-grid">
|
||||
{{#each combatants}}
|
||||
<button
|
||||
class="apply-wounds-btn"
|
||||
data-combatant-id="{{this.id}}"
|
||||
title="{{this.name}}"
|
||||
>
|
||||
{{this.name}}
|
||||
</button>
|
||||
{{/each}}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="result-non-lethal">{{localize "CTHULHUETERNAL.Label.damageMessage"}}: <strong>{{rollResult}}</strong>
|
||||
<li class="result-non-lethal">{{localize
|
||||
"CTHULHUETERNAL.Label.damageMessage"
|
||||
}}:
|
||||
<strong>{{rollResult}}</strong>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user