Fix #44 - Auto use damage bonus for melee/unarmed
This commit is contained in:
parent
82731c2d40
commit
5f9057db37
@ -290,6 +290,24 @@ i.fvtt-cthulhu-eternal {
|
|||||||
width: auto;
|
width: auto;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-hp {
|
||||||
|
gap: 2px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-hp input {
|
||||||
|
flex: none;
|
||||||
|
width: 2rem;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-hp .damage-bonus {
|
||||||
|
font-size: calc(var(--font-size-standard) * 0.8);
|
||||||
|
}
|
||||||
|
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-hp .hp-separator {
|
||||||
|
font-size: calc(var(--font-size-standard) * 1.2);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-dv .form-fields,
|
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-dv .form-fields,
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-dmax .form-fields {
|
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-dmax .form-fields {
|
||||||
flex: none;
|
flex: none;
|
||||||
@ -395,44 +413,9 @@ i.fvtt-cthulhu-eternal {
|
|||||||
min-width: 1rem;
|
min-width: 1rem;
|
||||||
max-width: 1rem;
|
max-width: 1rem;
|
||||||
}
|
}
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos {
|
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right label {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos label {
|
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
}
|
}
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos .protagonist-hp {
|
|
||||||
display: flex;
|
|
||||||
gap: 2px;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos .protagonist-hp .protagonist-hp-value .form-fields input {
|
|
||||||
flex: none;
|
|
||||||
width: 50px;
|
|
||||||
margin-left: 4px;
|
|
||||||
font-size: calc(var(--font-size-standard) * 1.4);
|
|
||||||
}
|
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos .protagonist-hp .protagonist-hp-max {
|
|
||||||
clear: both;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin: 3px 0;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos .protagonist-hp .protagonist-hp-max input {
|
|
||||||
width: 50px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: calc(var(--font-size-standard) * 1.4);
|
|
||||||
}
|
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos .protagonist-hp .hp-separator {
|
|
||||||
font-size: calc(var(--font-size-standard) * 1.2);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc-play {
|
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc-play {
|
||||||
min-width: 500px;
|
min-width: 500px;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,9 @@
|
|||||||
},
|
},
|
||||||
"Protagonist": {
|
"Protagonist": {
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
|
"damageBonus": {
|
||||||
|
"label": "Dmg.Bonus"
|
||||||
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"permanentRating": {
|
"permanentRating": {
|
||||||
"label": "Permanent Rating"
|
"label": "Permanent Rating"
|
||||||
|
@ -210,6 +210,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
|
|||||||
case "damage":
|
case "damage":
|
||||||
li = $(event.currentTarget).parents(".item");
|
li = $(event.currentTarget).parents(".item");
|
||||||
item = this.actor.items.get(li.data("item-id"));
|
item = this.actor.items.get(li.data("item-id"));
|
||||||
|
item.damageBonus = this.actor.system.damageBonus
|
||||||
break
|
break
|
||||||
case "san":
|
case "san":
|
||||||
item = foundry.utils.duplicate(this.actor.system.san)
|
item = foundry.utils.duplicate(this.actor.system.san)
|
||||||
|
@ -113,6 +113,8 @@ export const RESOURCE_BREAKDOWN = [
|
|||||||
{ value: 20, hand: 6, stowed: 6, storage: 8, checks: 3}
|
{ value: 20, hand: 6, stowed: 6, storage: 8, checks: 3}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const DAMAGE_BONUS = [ -2, -2, -2, -2, -2, -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2]
|
||||||
|
|
||||||
export const VEHICLE_SPEED = {
|
export const VEHICLE_SPEED = {
|
||||||
"none": "CTHULHUETERNAL.Label.None",
|
"none": "CTHULHUETERNAL.Label.None",
|
||||||
"slow": "CTHULHUETERNAL.Label.Slow",
|
"slow": "CTHULHUETERNAL.Label.Slow",
|
||||||
@ -258,5 +260,6 @@ export const SYSTEM = {
|
|||||||
VEHICLE_SPEED,
|
VEHICLE_SPEED,
|
||||||
MODIFIER_CHOICES,
|
MODIFIER_CHOICES,
|
||||||
MULTIPLIER_CHOICES,
|
MULTIPLIER_CHOICES,
|
||||||
ASCII
|
ASCII,
|
||||||
|
DAMAGE_BONUS
|
||||||
}
|
}
|
||||||
|
@ -147,6 +147,9 @@ export default class CthulhuEternalRoll extends Roll {
|
|||||||
break
|
break
|
||||||
case "damage":
|
case "damage":
|
||||||
let formula = options.rollItem.system.damage
|
let formula = options.rollItem.system.damage
|
||||||
|
if ( options.rollItem.system.weaponType === "melee" || options.rollItem.system.weaponType === "unarmed") {
|
||||||
|
formula += ` + ${options.rollItem.damageBonus}`
|
||||||
|
}
|
||||||
let damageRoll = new Roll(formula)
|
let damageRoll = new Roll(formula)
|
||||||
await damageRoll.evaluate()
|
await damageRoll.evaluate()
|
||||||
await damageRoll.toMessage({
|
await damageRoll.toMessage({
|
||||||
|
@ -34,6 +34,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.protagonist-hp {
|
||||||
|
gap: 2px;
|
||||||
|
align-items: center;
|
||||||
|
input {
|
||||||
|
flex: none;
|
||||||
|
width: 2rem;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
.damage-bonus {
|
||||||
|
font-size: calc(var(--font-size-standard) * 0.8);
|
||||||
|
}
|
||||||
|
.hp-separator {
|
||||||
|
font-size: calc(var(--font-size-standard) * 1.2);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.protagonist-dv,
|
.protagonist-dv,
|
||||||
.protagonist-dmax {
|
.protagonist-dmax {
|
||||||
.form-fields {
|
.form-fields {
|
||||||
@ -146,50 +165,10 @@
|
|||||||
min-width: 1rem;
|
min-width: 1rem;
|
||||||
max-width: 1rem;
|
max-width: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.protagonist-infos {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 4px;
|
|
||||||
|
|
||||||
label {
|
label {
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.protagonist-hp {
|
|
||||||
display: flex;
|
|
||||||
gap: 2px;
|
|
||||||
align-items: center;
|
|
||||||
.protagonist-hp-value {
|
|
||||||
.form-fields input {
|
|
||||||
flex: none;
|
|
||||||
width: 50px;
|
|
||||||
margin-left: 4px;
|
|
||||||
font-size: calc(var(--font-size-standard) * 1.4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.protagonist-hp-max {
|
|
||||||
clear: both;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin: 3px 0;
|
|
||||||
align-items: center;
|
|
||||||
input {
|
|
||||||
width: 50px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: calc(var(--font-size-standard) * 1.4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.hp-separator {
|
|
||||||
font-size: calc(var(--font-size-standard) * 1.2);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,7 +263,7 @@
|
|||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
label {
|
label {
|
||||||
min-width: 3.0rem;
|
min-width: 3rem;
|
||||||
}
|
}
|
||||||
.feature {
|
.feature {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -9,13 +9,16 @@
|
|||||||
<img class="protagonist-img" src="{{actor.img}}" data-edit="img" data-action="editImage"
|
<img class="protagonist-img" src="{{actor.img}}" data-edit="img" data-action="editImage"
|
||||||
data-tooltip="{{actor.name}}" />
|
data-tooltip="{{actor.name}}" />
|
||||||
</div>
|
</div>
|
||||||
<fieldset>
|
<fieldset class="protagonist-hp">
|
||||||
<legend>{{localize "CTHULHUETERNAL.Label.HP"}}</legend>
|
<legend>{{localize "CTHULHUETERNAL.Label.HP"}}</legend>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{formField systemFields.hp.fields.value value=system.hp.value}}
|
{{formField systemFields.hp.fields.value value=system.hp.value}}
|
||||||
/
|
<span class="hp-separator">/</span>
|
||||||
{{formField systemFields.hp.fields.max value=system.hp.max rootId=partId disabled=true}}
|
{{formField systemFields.hp.fields.max value=system.hp.max rootId=partId disabled=true}}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flexrow ">
|
||||||
|
{{formField systemFields.damageBonus value=system.damageBonus classes="damage-bonus"}}
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user