Compare commits

..

7 Commits

12 changed files with 86 additions and 44 deletions

View File

@ -112,6 +112,7 @@
--logo-standard: url("../assets/logos/reanimated-ce-logo.webp");
--color-success: darkgreen;
--color-failure: darkred;
--color-warning: darkorange;
--color-critical-success: lightgreen;
--color-critical-failure: lightcoral;
--img-icon-color-filter: brightness(0) saturate(100%) invert(52%) sepia(9%) saturate(2368%) hue-rotate(360deg) brightness(86%) contrast(84%);
@ -381,13 +382,21 @@ i.fvtt-cthulhu-eternal {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .rollable {
min-width: 3rem;
max-width: 3rem;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .char-text {
margin-left: 0.5rem;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .form-group {
flex: 1;
flex: 0;
padding-left: 5px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .form-group .form-fields {
font-size: 1.1rem;
flex: none;
width: 70px;
width: 40px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristic-play {
min-width: 225px;
@ -506,8 +515,8 @@ i.fvtt-cthulhu-eternal {
max-width: 12rem;
}
.fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond .type {
min-width: 4rem;
max-width: 4rem;
min-width: 5rem;
max-width: 5rem;
}
.fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond .level {
min-width: 2rem;
@ -1568,6 +1577,12 @@ i.fvtt-cthulhu-eternal {
width: 60px;
text-align: center;
}
.red-warning {
color: var(--color-failure);
}
.orange-warning {
color: var(--color-warning);
}
.dialog-damage {
display: flex;
justify-content: center;

View File

@ -18,4 +18,12 @@ export default class CthulhuEternalMentalDisorderSheet extends CthulhuEternalIte
template: "systems/fvtt-cthulhu-eternal/templates/mentaldisorder.hbs",
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@ -22,6 +22,8 @@ export default class CthulhuEternalMotivationSheet extends CthulhuEternalItemShe
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@ -5,7 +5,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
static DEFAULT_OPTIONS = {
classes: ["protagonist"],
position: {
width: 848,
width: 860,
height: 620,
},
window: {

View File

@ -90,7 +90,7 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
let unnatural = this.parent.items.find(i => i.type === "skill" && i.name.toLowerCase() === game.i18n.localize("CTHULHUETERNAL.Skill.Unnatural").toLowerCase())
let minus = 0
if (unnatural) {
minus = unnatural.data.skillTotal
minus = unnatural.system.skillTotal
}
let maxSan = Math.max(99 - minus, 0)
if ( this.san.max !== maxSan) {

View File

@ -9,6 +9,7 @@
--logo-standard: url("../assets/logos/reanimated-ce-logo.webp");
--color-success: darkgreen;
--color-failure: darkred;
--color-warning: darkorange;
--color-critical-success: lightgreen;
--color-critical-failure: lightcoral;
--img-icon-color-filter: brightness(0) saturate(100%) invert(52%) sepia(9%) saturate(2368%) hue-rotate(360deg) brightness(86%) contrast(84%);

View File

@ -164,12 +164,20 @@
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.rollable {
min-width: 3rem;
max-width: 3rem;
}
.char-text {
margin-left: 0.5rem;
}
.form-group {
flex: 1;
flex: 0;
padding-left: 5px;
.form-fields {
font-size: 1.1rem;
flex: none;
width: 70px;
width: 40px;
}
}
}
@ -298,8 +306,8 @@
max-width: 12rem;
}
.type {
min-width: 4rem;
max-width: 4rem;
min-width: 5rem;
max-width: 5rem;
}
.level {
min-width: 2rem;

View File

@ -36,6 +36,13 @@
}
}
.red-warning {
color: var(--color-failure);
}
.orange-warning {
color: var(--color-warning);
}
.dialog-damage {
display: flex;

View File

@ -9,30 +9,11 @@
{{formField systemFields.biodata.fields.height value=system.biodata.height name="system.biodata.height" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.eyes value=system.biodata.eyes name="system.biodata.eyes" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.hair value=system.biodata.hair name="system.biodata.hair" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.gender value=system.biodata.gender name="system.biodata.gender" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.home value=system.biodata.home name="system.biodata.home" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.birthplace value=system.biodata.birthplace name="system.biodata.birthplace" localize=true classes="field-label"}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.motivations"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "CTHULHUETERNAL.Tooltip.addMotivation"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createMotivation"></i></a>{{/if}}</legend>
<div class="motivations">
{{#each motivations as |item|}}
{{!log 'armor' this}}
<div class="motivation" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'CTHULHUETERNAL.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'CTHULHUETERNAL.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>

View File

@ -76,47 +76,47 @@
<fieldset class="protagonist-characteristics protagonist-characteristics-{{ifThen isPlayMode 'play' 'edit'}}">
<legend>{{localize "CTHULHUETERNAL.Label.characteristics"}}</legend>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<div class="protagonist-characteristic" >
<label class="rollable" data-roll-type="char" data-char-id="str">{{localize
"CTHULHUETERNAL.Label.strShort"}}</label>
{{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value
rootId=partId disabled=isPlayMode }}
{{mul system.characteristics.str.value 5}}
<label class="char-text">{{mul system.characteristics.str.value 5}}</label>
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<div class="protagonist-characteristic">
<label class="rollable" data-roll-type="char" data-char-id="dex">{{localize
"CTHULHUETERNAL.Label.dexShort"}}</label>
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value
rootId=partId disabled=isPlayMode }}
{{mul system.characteristics.dex.value 5}}
<label class="char-text">{{mul system.characteristics.dex.value 5}}</label>
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<div class="protagonist-characteristic" >
<label class="rollable" data-roll-type="char" data-char-id="con">{{localize
"CTHULHUETERNAL.Label.conShort"}}</label>
{{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value
rootId=partId disabled=isPlayMode }}
{{mul system.characteristics.con.value 5}}
<label class="char-text">{{mul system.characteristics.con.value 5}}</label>
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<div class="protagonist-characteristic" >
<label class="rollable" data-roll-type="char" data-char-id="int">{{localize
"CTHULHUETERNAL.Label.intShort"}}</label>
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value
rootId=partId disabled=isPlayMode }}
{{mul system.characteristics.int.value 5}}
<label class="char-text">{{mul system.characteristics.int.value 5}}</label>
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<div class="protagonist-characteristic" >
<label class="rollable" data-roll-type="char" data-char-id="pow">{{localize
"CTHULHUETERNAL.Label.powShort"}}</label>
{{formField systemFields.characteristics.fields.pow.fields.value value=system.characteristics.pow.value
rootId=partId disabled=isPlayMode }}
{{mul system.characteristics.pow.value 5}}
<label class="char-text">{{mul system.characteristics.pow.value 5}}</label>
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<div class="protagonist-characteristic" >
<label class="rollable" data-roll-type="char" data-char-id="cha">{{localize
"CTHULHUETERNAL.Label.chaShort"}}</label>
{{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value
rootId=partId disabled=isPlayMode }}
{{mul system.characteristics.cha.value 5}}
<label class="char-text">{{mul system.characteristics.cha.value 5}}</label>
</div>
</fieldset>

View File

@ -65,4 +65,24 @@
</div>
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.motivations"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "CTHULHUETERNAL.Tooltip.addMotivation"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createMotivation"></i></a>{{/if}}</legend>
<div class="motivations">
{{#each motivations as |item|}}
{{!log 'armor' this}}
<div class="motivation" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'CTHULHUETERNAL.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'CTHULHUETERNAL.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
</section>

View File

@ -15,10 +15,10 @@
{{/if}}
{{#if isZeroWP}}
<div class="dialog-skill">Zero WP : Automatic failure (ie 0%)</div>
<div class="dialog-skill red-warning">Zero WP : Automatic failure (ie 0%)</div>
{{else}}
{{#if isLowWP}}
<div class="dialog-skill">Low WP : -20%</div>
<div class="dialog-skill orange-warning">Low WP : -20%</div>
{{/if}}
{{/if}}
</fieldSet>