Fix history

This commit is contained in:
LeRatierBretonnien 2024-12-17 09:25:02 +01:00
parent 2ac69e2108
commit 2c29acd56c
32 changed files with 395 additions and 779 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

View File

@ -1,6 +1,7 @@
:root {
--font-size-standard: 0.9rem;
--background-image-base: url("../assets/parchment.jpg");
--background-image-base: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url("../assets/ui/jazzage_background_main.webp");
/*--background-image-base: url("../assets/ui/jazzage_background_main.webp");*/
--font-primary: "Georama";
--font-secondary: "Georama";
--logo-standard: url("../assets/logos/reanimated-ce-logo.webp");
@ -22,7 +23,7 @@
top: -45px;
left: calc(50% - 96px);
}
i.lethalfantasy {
i.fvtt-cthulhu-eternal {
width: 36px;
height: 36px;
background-image: var(--logo-standard);
@ -34,21 +35,17 @@ i.lethalfantasy {
filter: grayscale(1);
transition: 0.3s;
}
.application.dialog.lethalfantasy {
.application.dialog.fvtt-cthulhu-eternal {
font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1);
background-image: var(--background-image-base);
}
.application.dialog.lethalfantasy button:hover {
.application.dialog.fvtt-cthulhu-eternal button:hover {
background: var(--color-dark-6);
}
.application.dialog.lethalfantasy .legend {
.application.dialog.fvtt-cthulhu-eternal .legend {
font-family: var(--font-primary);
}
#tooltip.tooltip-avantages {
max-width: 550px;
text-align: left;
}
.chat-message,
.chat-message.whisper {
font-family: var(--font-primary);
@ -132,12 +129,16 @@ i.lethalfantasy {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
}
.fvtt-cthulhu-eternal .sheet-tabs {
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .protagonist-main {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc {
display: flex;
gap: 10px;
gap: 4px;
flex: 1;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left {
@ -149,7 +150,7 @@ i.lethalfantasy {
display: flex;
justify-content: center;
align-items: center;
padding-bottom: 20px;
padding-bottom: 8px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-left-image .protagonist-img {
height: 140px;
@ -183,7 +184,7 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos {
display: flex;
flex-direction: column;
gap: 10px;
gap: 4px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos label {
min-width: 120px;
@ -196,7 +197,7 @@ i.lethalfantasy {
.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: 10px;
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 {
@ -225,6 +226,7 @@ i.lethalfantasy {
min-width: 650px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics {
background-color: var(--color-light-1);
display: flex;
flex-direction: column;
gap: 5px;
@ -247,89 +249,14 @@ i.lethalfantasy {
flex: none;
width: 70px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience {
display: flex;
align-items: center;
gap: 10px;
margin-left: 10px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input {
display: flex;
width: 70px;
font-size: calc(var(--font-size-standard) * 1.4);
align-items: center;
justify-content: center;
padding: 0 5px 0 5px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input[type="number"] {
text-align: center;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input[type="checkbox"] {
width: 20px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input[type="checkbox"]:checked {
background-color: rgba(0, 0, 0, 0.1);
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input[type="checkbox"]:checked::after {
color: rgba(0, 0, 0, 0.1);
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristic-play {
min-width: 225px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristic-edit {
min-width: 400px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources {
display: flex;
flex-direction: column;
gap: 5px;
flex: 1;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource {
display: flex;
align-items: center;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .rollable:hover,
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .form-group {
flex: 1;
padding-left: 5px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .form-group .form-fields {
flex: none;
width: 70px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .protagonist-resource-edit {
display: flex;
align-items: center;
gap: 10px;
margin-left: 10px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .protagonist-resource-edit input {
display: flex;
width: 70px;
font-size: calc(var(--font-size-standard) * 1.4);
align-items: center;
justify-content: center;
padding: 0 5px 0 5px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .protagonist-resource-edit input[type="number"] {
text-align: center;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .protagonist-resource-edit select {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.5);
text-align: center;
width: 75px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources-play {
min-width: 235px;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources-edit {
min-width: 400px;
.fvtt-cthulhu-eternal .protagonist-biography {
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .protagonist-biography prose-mirror.inactive {
min-height: 40px;
@ -338,6 +265,7 @@ i.lethalfantasy {
min-height: 150px;
}
.fvtt-cthulhu-eternal .tab.protagonist-skills {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
}
@ -348,19 +276,35 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .tab.protagonist-skills .skills {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
gap: 4px;
}
.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill {
display: flex;
align-items: center;
gap: 10px;
gap: 4px;
min-width: 10rem;
max-width: 10rem;
}
.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .rollable:hover,
.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .controls {
min-width: 2rem;
max-width: 2rem;
}
.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .name {
min-width: 8rem;
max-width: 8rem;
}
.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .item-img {
width: 50px;
height: 50px;
margin: 5px 0 0 0;
width: 32px;
height: 32px;
margin: 4px 0 0 0;
}
.fvtt-cthulhu-eternal .tab.protagonist-equipment {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
}
@ -371,12 +315,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
gap: 4px;
}
.fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon {
display: flex;
align-items: center;
gap: 10px;
gap: 4px;
}
.fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .item-img {
width: 50px;
@ -386,12 +330,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .tab.protagonist-equipment .armors {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
gap: 4px;
}
.fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor {
display: flex;
align-items: center;
gap: 10px;
gap: 4px;
}
.fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .item-img {
width: 50px;
@ -401,12 +345,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .tab.protagonist-equipment .gears {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
gap: 4px;
}
.fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear {
display: flex;
align-items: center;
gap: 10px;
gap: 4px;
}
.fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .item-img {
width: 50px;
@ -486,7 +430,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .skill-content .shift-right {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .skill-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .skill-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .skill-content .header img {
@ -571,7 +520,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .injury-content .shift-right {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .injury-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .injury-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .injury-content .header img {
@ -657,12 +611,17 @@ i.lethalfantasy {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .weapon-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .weapon-content .header img {
width: 50px;
height: 50px;
}
.fvtt-cthulhu-eternal .weapon-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .weapon-content label {
flex: 10%;
}
@ -733,7 +692,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .armor-content .shift-right {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .armor-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .armor-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .armor-content .header img {
@ -810,7 +774,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .motivation-content .shift-right {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .motivation-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .motivation-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .motivation-content .header img {
@ -887,7 +856,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .mentaldisorder-content .shift-right {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .mentaldisorder-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .mentaldisorder-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .mentaldisorder-content .header img {
@ -964,7 +938,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .bond-content .shift-right {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .bond-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .bond-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .bond-content .header img {
@ -982,43 +961,13 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .bond-content input[type="checkbox"]:checked::after {
color: rgba(0, 0, 0, 0.1);
}
.fvtt-cthulhu-eternal.fortune img {
border: 0px;
}
.fvtt-cthulhu-eternal.fortune .intro-chat {
border-radius: 20px;
display: flex;
flex-direction: row;
}
.fvtt-cthulhu-eternal.fortune .intro-chat .intro-img {
padding: 5px;
width: 80px;
align-self: center;
}
.fvtt-cthulhu-eternal.fortune .intro-chat .intro-right {
display: flex;
flex-direction: column;
}
.fvtt-cthulhu-eternal.fortune .intro-chat .intro-right .introText {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
width: 210px;
text-align: center;
}
.fvtt-cthulhu-eternal.fortune .button.control,
.fvtt-cthulhu-eternal.fortune .fortune-accepted {
display: flex;
justify-content: center;
align-items: center;
font-size: calc(var(--font-size-standard) * 1.3);
}
.fvtt-cthulhu-eternal.ask-roll {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
font-size: calc(var(--font-size-standard) * 1.1);
}
.fvtt-cthulhu-eternal .gear-content {
font-family: var(--font-primary);
@ -1087,7 +1036,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .gear-content .shift-right {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .gear-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .gear-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .gear-content .header img {
@ -1166,11 +1120,16 @@ i.lethalfantasy {
}
.fvtt-cthulhu-eternal .arcane-content .header {
display: flex;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .arcane-content .header img {
width: 50px;
height: 50px;
}
.fvtt-cthulhu-eternal .arcane-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .arcane-content label {
flex: 10%;
}
@ -1241,7 +1200,12 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .archetype-content .shift-right {
margin-left: 2rem;
}
.fvtt-cthulhu-eternal .archetype-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-cthulhu-eternal .archetype-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-cthulhu-eternal .archetype-content .header img {
@ -1251,54 +1215,38 @@ i.lethalfantasy {
.fvtt-cthulhu-eternal .archetype-content label {
flex: 10%;
}
.application.dialog.lethalfantasy {
.application.dialog.fvtt-cthulhu-eternal {
color: var(--color-dark-1);
background-color: var(--color-light-1);
}
.application.dialog.lethalfantasy input,
.application.dialog.lethalfantasy select {
.application.dialog.fvtt-cthulhu-eternal button {
background-image: none;
background-color: var(--color-dark-6);
color: var(--color-light-1);
}
.application.dialog.fvtt-cthulhu-eternal input,
.application.dialog.fvtt-cthulhu-eternal select {
background-color: rgba(0, 0, 0, 0.1);
border-color: var(--color-dark-6);
color: var(--color-dark-2);
}
.lethalfantasy-roll-dialog fieldset {
.fvtt-cthulhu-eternal-roll-dialog fieldset {
padding: 10px;
background-color: var(--color-light-1);
}
input[name="selectAvantages"] {
border: none;
}
.dialog-aide-gene {
.dialog-modifier {
display: flex;
justify-content: center;
align-items: center;
}
.dialog-aide-gene select {
.dialog-modifier select {
border: none;
background-color: rgba(0, 0, 0, 0.1);
color: var(--color-dark-2);
width: 60px;
text-align: center;
}
.dialog-modificateur {
display: flex;
justify-content: center;
align-items: center;
}
.dialog-modificateur select {
border: none;
background-color: rgba(0, 0, 0, 0.1);
color: var(--color-dark-2);
width: 60px;
text-align: center;
}
.dialog-avantages #selectAvantages {
background-color: inherit;
text-align: center;
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
}
.dialog-damage,
.dialog-resource,
.dialog-save {
.dialog-damage {
display: flex;
justify-content: center;
align-items: center;
@ -1323,6 +1271,7 @@ input[name="selectAvantages"] {
border: 0px;
}
.dice-roll .intro-chat {
color: var(--color-dark-1);
border-radius: 20px;
display: flex;
flex-direction: row;

View File

@ -28,7 +28,8 @@
"WW1": "World War 1",
"WW2": "World War 2",
"ColdWar": "Cold War",
"Victorian": "Victorian"
"Victorian": "Victorian",
"AgeOfSail": "Age of Sail"
},
"Protagonist": {
"FIELDS": {
@ -212,6 +213,9 @@
"community": "Community"
},
"Label": {
"skill": "Skill",
"modifier": "Modifier",
"rollView": "Roll View",
"protagonist": "Protagonist",
"characteristics": "Characteristics",
"description": "Description",
@ -245,6 +249,7 @@
"helplessness": "Helplessness",
"breakingPoint": "Breaking Point",
"willpower": "Willpower",
"totalScore": "Total Score",
"exhausted": "Exhausted"
},
"Edit": "Edit",
@ -254,10 +259,8 @@
"Dialog": {
},
"Roll": {
"resource": "Jet de ressource <br> {resource}",
"damage": "Jet de dégâts <br> {item}",
"attack": "Jet d'attaque <br> {item}",
"roll": "Lancer"
"skill": "Skill",
"roll": "Roll"
},
"Tooltip": {
"sanBP": ">5 SAN lost in one roll, temporary insanity. If SAN less reaches BP = a Disorder unconscious Breaking and AND reset BP."

View File

@ -5,8 +5,8 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
static DEFAULT_OPTIONS = {
classes: ["protagonist"],
position: {
width: 1150,
height: 780,
width: 820,
height: 620,
},
window: {
contentClasses: ["protagonist-content"],
@ -144,20 +144,15 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
* corresponding value from the document's system and performs the roll.
*/
async _onRoll(event, target) {
if (this.isEditMode) return
// Jet de sauvegarde
let elt = event.currentTarget.querySelector("input")
// Jet de ressource
if (!elt) elt = event.currentTarget.querySelector("select")
// Jet de dégâts
if (!elt) elt = event.currentTarget
const rollType = elt.dataset.rollType
let rollTarget
switch (rollType) {
default:
break
const rollType = $(event.currentTarget).data("roll-type")
let item
// Debug : console.log(">>>>", event, target, rollType)
// Deprecated : if (this.isEditMode) return
if (rollType === "skill") {
const li = $(event.currentTarget).parents(".item");
item = this.actor.items.get(li.data("item-id"));
}
await this.document.system.roll(rollType, rollTarget)
await this.document.system.roll(rollType, item)
}
async _onDrop(event) {

View File

@ -16,6 +16,7 @@ export const AVAILABLE_SETTINGS = {
victorian: "CTHULHUETERNAL.Settings.Victorian",
revolution: "CTHULHUETERNAL.Settings.Revolution",
medieval: "CTHULHUETERNAL.Settings.Medieval",
ageofsail: "CTHULHUETERNAL.Settings.AgeOfSail",
classical: "CTHULHUETERNAL.Settings.Classical"
}

View File

@ -22,10 +22,6 @@ export default class CthulhuEternalRoll extends Roll {
return this.options.value
}
get treshold() {
return this.options.treshold
}
get actorId() {
return this.options.actorId
}
@ -46,20 +42,16 @@ export default class CthulhuEternalRoll extends Roll {
return this.options.introTextTooltip
}
get aide() {
return this.options.aide
get help() {
return this.options.help
}
get gene() {
return this.options.gene
}
get modificateur() {
return this.options.modificateur
}
get avantages() {
return this.options.avantages
get modifier() {
return this.options.modifier
}
get resultType() {
@ -90,10 +82,6 @@ export default class CthulhuEternalRoll extends Roll {
return this.options.realDamage
}
get rollAdvantage() {
return this.options.rollAdvantage
}
/**
* Generates introductory text based on the roll type.
*
@ -103,23 +91,11 @@ export default class CthulhuEternalRoll extends Roll {
let text
switch (this.type) {
case ROLL_TYPE.SAVE:
const saveLabel = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.caracteristiques.${this.target}.valeur.label`)
text = game.i18n.format("CTHULHUETERNAL.Roll.save", { save: saveLabel })
case "skill":
const skillLabel = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.caracteristiques.${this.target}.valeur.label`)
text = game.i18n.format("CTHULHUETERNAL.Roll.skill", { skill: "skill" })
text = text.concat("<br>").concat(`Seuil : ${this.treshold}`)
break
case ROLL_TYPE.RESOURCE:
const resourceLabel = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.ressources.${this.target}.valeur.label`)
text = game.i18n.format("CTHULHUETERNAL.Roll.resource", { resource: resourceLabel })
break
case ROLL_TYPE.DAMAGE:
const damageLabel = this.target
text = game.i18n.format("CTHULHUETERNAL.Roll.damage", { item: damageLabel })
break
case ROLL_TYPE.ATTACK:
const attackLabel = this.target
text = game.i18n.format("CTHULHUETERNAL.Roll.attack", { item: attackLabel })
break
}
return text
}
@ -130,9 +106,9 @@ export default class CthulhuEternalRoll extends Roll {
* @returns {string} A formatted string containing the value, help, hindrance, and modifier.
*/
_createIntroTextTooltip() {
let tooltip = game.i18n.format("CTHULHUETERNAL.Tooltip.saveIntroTextTooltip", { value: this.value, aide: this.aide, gene: this.gene, modificateur: this.modificateur })
let tooltip = game.i18n.format("CTHULHUETERNAL.Tooltip.saveIntroTextTooltip", { value: this.value, help: this.help, gene: this.gene, modifier: this.modifier })
if (this.hasTarget) {
tooltip = tooltip.concat(`<br>Cible : ${this.targetName}`)
tooltip = tooltip.concat(`<br>Target : ${this.targetName}`)
}
return tooltip
}
@ -141,29 +117,29 @@ export default class CthulhuEternalRoll extends Roll {
* Prompt the user with a dialog to configure and execute a roll.
*
* @param {Object} options Configuration options for the roll.
* @param {string} options.rollType The type of roll being performed (e.g., RESOURCE, DAMAGE, ATTACK, SAVE).
* @param {string} options.rollValue The initial value or formula for the roll.
* @param {string} options.rollType The type of roll being performed.
* @param {string} options.rollTarget The target of the roll.
* @param {"="|"+"|"++"|"-"|"--"} options.rollAdvantage If there is an avantage (+), a disadvantage (-), a double advantage (++), a double disadvantage (--) or a normal roll (=).
* @param {string} options.actorId The ID of the actor performing the roll.
* @param {string} options.actorName The name of the actor performing the roll.
* @param {string} options.actorImage The image of the actor performing the roll.
* @param {boolean} options.hasTarget Whether the roll has a target.
* @param {Object} options.target The target of the roll, if any.
* @param {Object} options.data Additional data for the roll.
*
* @returns {Promise<Object|null>} The roll result or null if the dialog was cancelled.
*/
static async prompt(options = {}) {
let formula = options.rollValue
// Formula for a resource roll
if (options.rollType === ROLL_TYPE.RESOURCE) {
let ressource = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.ressources.${options.rollTarget}.valeur.label`)
if (formula === "0" || formula === "") {
ui.notifications.warn(game.i18n.format("CTHULHUETERNAL.Warning.plusDeRessource", { ressource: ressource }))
return null
}
let formula = "1d100"
switch (options.rollType) {
case "skill":
console.log(options.rollItem)
options.targetScore = options.rollItem.system.computeScore()
break
case "characteristic":
options.targetScore = options.rollItem.value * 5
break
default:
options.targetScore = 50
break
}
const rollModes = Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
@ -173,94 +149,33 @@ export default class CthulhuEternalRoll extends Roll {
default: "public",
})
const choiceAide = foundry.utils.mergeObject({ 0: "0" }, options.rollValue <= 10 ? { 1: "1" } : { 1: "1", 2: "2" })
const choiceGene = {
0: "0",
"-1": "-1",
"-2": "-2",
"-3": "-3",
"-4": "-4",
"-5": "-5",
"-6": "-6",
"-7": "-7",
"-8": "-8",
"-9": "-9",
const choiceModifier = {
"-10": "-10",
}
const choiceAvantage = { normal: "Normal", avantage: "Avantage", desavantage: "Désavantage", doubleAvantage: "Double avantage", doubleDesavantage: "Double désavantage" }
const choiceModificateur = {
"-20": "-20",
"-40": "-40",
0: "0",
"-1": "-1",
"-2": "-2",
"-3": "-3",
"-4": "-4",
"-5": "-5",
"-6": "-6",
"-7": "-7",
"-8": "-8",
"-9": "-9",
"-10": "-10",
"+10": "+10",
"+20": "+20",
"+40": "+40",
}
let damageDice
let damageDiceMax
let damageDiceFinal
let damageDiceLowered
// Damage roll : check the roll is not above the maximum damage
if (options.rollType === ROLL_TYPE.DAMAGE) {
damageDice = options.rollValue
damageDiceMax = game.actors.get(options.actorId).system.dmax.valeur
damageDiceFinal = CthulhuEternalUtils.maxDamage(damageDice, damageDiceMax)
damageDiceLowered = damageDiceFinal !== damageDice
// Récupération du nom de l'objet si c'est un jet depuis la fiche de l'acteur
// Si c'est via une macro le nom est connu
options.rollTarget = game.actors.get(options.actorId).items.get(options.rollTarget).name
}
if (options.rollType === ROLL_TYPE.ATTACK) {
damageDice = options.rollValue
}
let malus = "0"
let modifier = "0"
let targetMalus = "0"
let targetName
let targetArmor
const displayOpponentMalus = game.settings.get("tenebris", "displayOpponentMalus")
if (options.rollType === ROLL_TYPE.SAVE && options.hasTarget && options.target.document.actor.type === "opponent") {
targetName = options.target.document.actor.name
if (displayOpponentMalus) malus = options.target.document.actor.system.malus.toString()
else targetMalus = options.target.document.actor.system.malus.toString()
}
if (options.rollType === ROLL_TYPE.DAMAGE && options.hasTarget && options.target.document.actor.type === "opponent") {
targetName = options.target.document.actor.name
targetArmor = options.target.document.actor.system.armure.toString()
}
let dialogContext = {
isSave: options.rollType === ROLL_TYPE.SAVE,
isResource: options.rollType === ROLL_TYPE.RESOURCE,
isDamage: options.rollType === ROLL_TYPE.DAMAGE,
isAttack: options.rollType === ROLL_TYPE.ATTACK,
rollType: options.rollType,
rollItem: foundry.utils.duplicate(options.rollItem), // Object only, no class
targetScore: options.targetScore,
rollModes,
fieldRollMode,
choiceAide,
choiceGene,
choiceAvantage,
choiceModificateur,
damageDice,
damageDiceMax,
damageDiceFinal,
damageDiceLowered,
choiceModifier,
formula,
hasTarget: options.hasTarget,
malus,
modifier,
targetName,
targetArmor,
rollAdvantage: this._convertAvantages(options.rollAdvantage),
rangeAdvantage: this._convertRollAdvantageToRange(options.rollAdvantage),
targetArmor
}
const content = await renderTemplate("systems/fvtt-cthulhu-eternal/templates/roll-dialog.hbs", dialogContext)
@ -278,89 +193,21 @@ export default class CthulhuEternalRoll extends Roll {
if (input.name) obj[input.name] = input.value
return obj
}, {})
// Avantages
switch (output.avantages) {
case "1":
output.avantages = "doubleDesavantage"
break
case "2":
output.avantages = "desavantage"
break
case "3":
output.avantages = "normal"
break
case "4":
output.avantages = "avantage"
break
case "5":
output.avantages = "doubleAvantage"
break
}
return output
},
},
],
rejectClose: false, // Click on Close button will not launch an error
render: (event, dialog) => {
const rangeInput = dialog.querySelector('input[name="avantages"]')
if (rangeInput) {
rangeInput.addEventListener("change", (event) => {
event.preventDefault()
event.stopPropagation()
const readOnly = dialog.querySelector('input[name="selectAvantages"]')
readOnly.value = this._convertAvantages(event.target.value)
})
}
},
})
// If the user cancels the dialog, exit
if (rollContext === null) return
let treshold
if (options.rollType === ROLL_TYPE.SAVE) {
const aide = rollContext.aide === "" ? 0 : parseInt(rollContext.aide, 10)
const gene = rollContext.gene === "" ? 0 : parseInt(rollContext.gene, 10)
const modificateur = rollContext.modificateur === "" ? 0 : parseInt(rollContext.modificateur, 10)
if (options.rollType === ROLL_TYPE.SAVE) {
let dice = "1d20"
switch (rollContext.avantages) {
case "avantage":
dice = "2d20kl"
break
case "desavantage":
dice = "2d20kh"
break
case "doubleAvantage":
dice = "3d20kl"
break
case "doubleDesavantage":
dice = "3d20kh"
break
}
formula = `${dice}`
}
treshold = options.rollValue + aide + gene + modificateur
}
// Formula for a damage roll
if (options.rollType === ROLL_TYPE.DAMAGE) {
formula = damageDiceFinal
}
// Formula for an attack roll
if (options.rollType === ROLL_TYPE.ATTACK) {
formula = damageDice
}
const rollData = {
type: options.rollType,
target: options.rollTarget,
value: options.rollValue,
treshold: treshold,
rollType: options.rollType,
rollItem: options.rollItem,
actorId: options.actorId,
actorName: options.actorName,
actorImage: options.actorImage,
@ -372,48 +219,30 @@ export default class CthulhuEternalRoll extends Roll {
...rollContext,
}
// Update target score
rollData.targetScore = options.targetScore + Number(rollData.modifier)
/**
* A hook event that fires before the roll is made.
* @function tenebris.preRoll
* @memberof hookEvents
* @param {Object} options Options for the roll.
* @param {Object} rollData All data related to the roll.
* @returns {boolean} Explicitly return `false` to prevent roll to be made.
*/
if (Hooks.call("tenebris.preRoll", options, rollData) === false) return
if (Hooks.call("fvtt-cthulhu-eternal.preRoll", options, rollData) === false) return
const roll = new this(formula, options.data, rollData)
await roll.evaluate()
let resultType
if (options.rollType === ROLL_TYPE.SAVE) {
resultType = roll.total <= treshold ? "success" : "failure"
} else if (options.rollType === ROLL_TYPE.RESOURCE) {
resultType = roll.total === 1 || roll.total === 2 ? "failure" : "success"
}
let realDamage
if (options.rollType === ROLL_TYPE.DAMAGE) {
realDamage = Math.max(0, roll.total - parseInt(targetArmor, 10))
let resultType = "failure"
if (roll.total <= rollData.targetScore) {
resultType = "success"
}
roll.options.resultType = resultType
roll.options.treshold = treshold
roll.options.introText = roll._createIntroText()
roll.options.introTextTooltip = roll._createIntroTextTooltip()
roll.options.realDamage = realDamage
/**
* A hook event that fires after the roll has been made.
* @function tenebris.Roll
* @memberof hookEvents
* @param {Object} options Options for the roll.
* @param {Object} rollData All data related to the roll.
@param {CthulhuEternalRoll} roll The resulting roll.
* @returns {boolean} Explicitly return `false` to prevent roll to be made.
*/
if (Hooks.call("tenebris.Roll", options, rollData, roll) === false) return
if (Hooks.call("fvtt-cthulhu-eternal.Roll", options, rollData, roll) === false) return
return roll
}
@ -427,14 +256,8 @@ export default class CthulhuEternalRoll extends Roll {
*/
static createTitle(type, target) {
switch (type) {
case ROLL_TYPE.SAVE:
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleSave")} : ${game.i18n.localize(`CTHULHUETERNAL.Manager.${target}`)}`
case ROLL_TYPE.RESOURCE:
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleResource")} : ${game.i18n.localize(`CTHULHUETERNAL.Manager.${target}`)}`
case ROLL_TYPE.DAMAGE:
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleDamage")} : ${target}`
case ROLL_TYPE.ATTACK:
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleAttack")} : ${target}`
case "skill":
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleSkill")}`
default:
return game.i18n.localize("CTHULHUETERNAL.Dialog.titleStandard")
}
@ -457,11 +280,7 @@ export default class CthulhuEternalRoll extends Roll {
* @property {boolean} isGM - Indicates if the user is a Game Master.
* @property {string} formula - The formula used for the roll.
* @property {number} total - The total result of the roll.
* @property {boolean} isSave - Indicates if the roll is a saving throw.
* @property {boolean} isResource - Indicates if the roll is related to a resource.
* @property {boolean} isDamage - Indicates if the roll is for damage.
* @property {boolean} isFailure - Indicates if the roll is a failure.
* @property {Array} avantages - Advantages associated with the roll.
* @property {string} actorId - The ID of the actor performing the roll.
* @property {string} actingCharName - The name of the character performing the roll.
* @property {string} actingCharImg - The image of the character performing the roll.
@ -482,13 +301,12 @@ export default class CthulhuEternalRoll extends Roll {
data: this.data,
diceTotal: this.dice.reduce((t, d) => t + d.total, 0),
isGM: game.user.isGM,
rollItem: this.options.rollItem,
targetScore: this.options.targetScore,
rollType: this.options.rollType,
formula: this.formula,
total: this.total,
isSave: this.isSave,
isResource: this.isResource,
isDamage: this.isDamage,
isFailure: this.isFailure,
avantages: this.avantages,
actorId: this.actorId,
actingCharName: this.actorName,
actingCharImg: this.actorImage,
@ -501,6 +319,7 @@ export default class CthulhuEternalRoll extends Roll {
realDamage: this.realDamage,
isPrivate: isPrivate,
}
console.log(cardData)
cardData.cssClass = cardData.css.join(" ")
cardData.tooltip = isPrivate ? "" : await this.getTooltip()
return cardData
@ -518,12 +337,8 @@ export default class CthulhuEternalRoll extends Roll {
async toMessage(messageData = {}, { rollMode, create = true } = {}) {
super.toMessage(
{
isSave: this.isSave,
isResource: this.isResource,
isDamage: this.isDamage,
isFailure: this.resultType === "failure",
avantages: this.avantages,
introText: this.introText,
introText: this.introText,
introTextTooltip: this.introTextTooltip,
actingCharName: this.actorName,
actingCharImg: this.actorImage,
@ -538,45 +353,4 @@ export default class CthulhuEternalRoll extends Roll {
)
}
// Used in the avantages select and with the rollAdvantage parameter: convert the selected value to the corresponding string
static _convertAvantages(value) {
switch (value) {
case "1":
return game.i18n.localize("CTHULHUETERNAL.Roll.doubleDesavantage")
case "2":
return game.i18n.localize("CTHULHUETERNAL.Roll.desavantage")
case "3":
return game.i18n.localize("CTHULHUETERNAL.Roll.normal")
case "4":
return game.i18n.localize("CTHULHUETERNAL.Roll.avantage")
case "5":
return game.i18n.localize("CTHULHUETERNAL.Roll.doubleAvantage")
case "--":
return game.i18n.localize("CTHULHUETERNAL.Roll.doubleDesavantage")
case "-":
return game.i18n.localize("CTHULHUETERNAL.Roll.desavantage")
case "=":
return game.i18n.localize("CTHULHUETERNAL.Roll.normal")
case "+":
return game.i18n.localize("CTHULHUETERNAL.Roll.avantage")
case "++":
return game.i18n.localize("CTHULHUETERNAL.Roll.doubleAvantage")
}
}
// Used in the rollAdvantage parameter: convert the selected value to the corresponding range value
static _convertRollAdvantageToRange(value) {
switch (value) {
case "--":
return 1
case "-":
return 2
case "=":
return 3
case "+":
return 4
case "++":
return 5
}
}
}

View File

@ -92,27 +92,18 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
await this._roll(rollType, rollTarget, rollValue, opponentTarget, rollAdvantage)
}
/**
* Rolls a dice for a character.
* @param {("save"|"resource|damage")} rollType The type of the roll.
* @param {number} rollTarget The target value for the roll. Which caracteristic or resource. If the roll is a damage roll, this is the id of the item.
* @param {number} rollValue The value of the roll. If the roll is a damage roll, this is the dice to roll.
* @param {Token} opponentTarget The target of the roll : used for save rolls to get the oppponent's malus.
* @param {"="|"+"|"++"|"-"|"--"} rollAdvantage If there is an avantage (+), a disadvantage (-), a double advantage (++), a double disadvantage (--) or a normal roll (=).
* @returns {Promise<null>} - A promise that resolves to null if the roll is cancelled.
/** Main roll function
*/
async _roll(rollType, rollTarget, rollValue, opponentTarget = undefined, rollAdvantage = "=") {
async _roll(rollType, rollItem, opponentTarget = undefined) {
const hasTarget = opponentTarget !== undefined
let roll = await CthulhuEternalRoll.prompt({
rollType,
rollTarget,
rollValue,
rollItem,
actorId: this.parent.id,
actorName: this.parent.name,
actorImage: this.parent.img,
hasTarget,
target: opponentTarget,
rollAdvantage,
target: opponentTarget
})
if (!roll) return null

View File

@ -1,5 +1,5 @@
import { SYSTEM } from "../config/system.mjs"
export default class LethalFantasySkill extends foundry.abstract.TypeDataModel {
export default class CthulhuEternalSkill extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields
const schema = {}
@ -22,10 +22,10 @@ export default class LethalFantasySkill extends foundry.abstract.TypeDataModel {
prepareDerivedData() {
super.prepareDerivedData();
this.skillTotal = this.computeBase();
this.skillTotal = this.computeScore();
}
computeBase() {
computeScore() {
let actor = this.parent?.actor;
if (Number(this.base)) {
return Number(this.base) + this.bonus;

View File

@ -2,13 +2,20 @@
.sheet-common();
.item-sheet-common();
.header {
display: flex;
background-color: var(--color-light-1);
img {
width: 50px;
height: 50px;
}
}
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
label {
flex: 10%;

View File

@ -2,7 +2,13 @@
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@ -2,7 +2,13 @@
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@ -2,7 +2,13 @@
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@ -1,40 +1,8 @@
&.fortune {
img {
border: 0px;
}
.intro-chat {
border-radius: 20px;
display: flex;
flex-direction: row;
.intro-img {
padding: 5px;
width: 80px;
align-self: center;
}
.intro-right {
display: flex;
flex-direction: column;
.introText {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
width: 210px;
text-align: center;
}
}
}
.button.control, .fortune-accepted {
display: flex;
justify-content: center;
align-items: center;
font-size: calc(var(--font-size-standard) * 1.3);
}
}
&.ask-roll {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
font-size: calc(var(--font-size-standard) * 1.1);
}

View File

@ -2,7 +2,13 @@
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@ -1,6 +1,8 @@
:root {
--font-size-standard: 0.9rem;
--background-image-base: url("../assets/parchment.jpg");
--background-image-base: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
url("../assets/ui/jazzage_background_main.webp");
/*--background-image-base: url("../assets/ui/jazzage_background_main.webp");*/
--font-primary: "Georama";
--font-secondary: "Georama";
--logo-standard: url("../assets/logos/reanimated-ce-logo.webp");
@ -26,7 +28,7 @@
left: calc(50% - 96px);
}
i.lethalfantasy {
i.fvtt-cthulhu-eternal {
width: 36px;
height: 36px;
background-image: var(--logo-standard);
@ -39,7 +41,7 @@ i.lethalfantasy {
transition: 0.3s;
}
.application.dialog.lethalfantasy {
.application.dialog.fvtt-cthulhu-eternal {
font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1.0);
background-image: var(--background-image-base);
@ -51,11 +53,6 @@ i.lethalfantasy {
}
}
#tooltip.tooltip-avantages {
max-width: 550px;
text-align: left;
}
.chat-message,
.chat-message.whisper {
font-family: var(--font-primary);

View File

@ -2,7 +2,13 @@
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@ -2,7 +2,13 @@
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@ -2,7 +2,13 @@
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@ -4,12 +4,18 @@
overflow: scroll;
}
.sheet-tabs {
background-color: var(--color-light-1);
}
.protagonist-main {
background-color: var(--color-light-1);
display: flex;
.protagonist-pc {
display: flex;
gap: 10px;
gap: 4px;
flex: 1;
.protagonist-left {
@ -21,7 +27,7 @@
display: flex;
justify-content: center;
align-items: center;
padding-bottom: 20px;
padding-bottom: 8px;
.protagonist-img {
height: 140px;
width: auto;
@ -63,7 +69,7 @@
.protagonist-infos {
display: flex;
flex-direction: column;
gap: 10px;
gap: 4px;
label {
min-width: 120px;
@ -77,7 +83,7 @@
.form-fields input {
flex: none;
width: 50px;
margin-left: 10px;
margin-left: 4px;
font-size: calc(var(--font-size-standard) * 1.4);
}
}
@ -114,6 +120,7 @@
}
.protagonist-characteristics {
background-color: var(--color-light-1);
display: flex;
flex-direction: column;
gap: 5px;
@ -135,32 +142,6 @@
width: 70px;
}
}
.experience {
display: flex;
align-items: center;
gap: 10px;
margin-left: 10px;
input {
display: flex;
width: 70px;
font-size: calc(var(--font-size-standard) * 1.4);
align-items: center;
justify-content: center;
padding: 0 5px 0 5px;
}
input[type="number"] {
text-align: center;
}
input[type="checkbox"] {
width: 20px;
}
input[type="checkbox"]:checked {
background-color: rgba(0, 0, 0, 0.1);
}
input[type="checkbox"]:checked::after {
color: rgba(0, 0, 0, 0.1);
}
}
}
}
@ -172,65 +153,10 @@
min-width: 400px;
}
.protagonist-resources {
display: flex;
flex-direction: column;
gap: 5px;
flex: 1;
.protagonist-resource {
display: flex;
align-items: center;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor:
pointer;
}
.form-group {
flex: 1;
padding-left: 5px;
.form-fields {
flex: none;
width: 70px;
}
}
.protagonist-resource-edit {
display: flex;
align-items: center;
gap: 10px;
margin-left: 10px;
input {
display: flex;
width: 70px;
font-size: calc(var(--font-size-standard) * 1.4);
align-items: center;
justify-content: center;
padding: 0 5px 0 5px;
}
input[type="number"] {
text-align: center;
}
select {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.5);
text-align: center;
width: 75px;
}
}
}
}
.protagonist-resources-play {
min-width: 235px;
}
.protagonist-resources-edit {
min-width: 400px;
}
}
.protagonist-biography {
background-color: var(--color-light-1);
prose-mirror.inactive {
min-height: 40px;
}
@ -240,6 +166,7 @@
}
.tab.protagonist-skills {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
legend {
@ -251,21 +178,37 @@
.skills {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
gap: 4px;
.skill {
display: flex;
align-items: center;
gap: 10px;
gap: 4px;
min-width: 10rem;
max-width: 10rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.controls {
min-width: 2rem;
max-width: 2rem;
}
.name {
min-width: 8rem;
max-width: 8rem;
}
.item-img {
width: 50px;
height: 50px;
margin: 5px 0 0 0;
width: 32px;
height: 32px;
margin: 4px 0 0 0;
}
}
}
}
.tab.protagonist-equipment {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
legend {
@ -277,11 +220,11 @@
.weapons {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
gap: 4px;
.weapon {
display: flex;
align-items: center;
gap: 10px;
gap: 4px;
.item-img {
width: 50px;
height: 50px;
@ -292,11 +235,11 @@
.armors {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
gap: 4px;
.armor {
display: flex;
align-items: center;
gap: 10px;
gap: 4px;
.item-img {
width: 50px;
height: 50px;
@ -307,11 +250,11 @@
.gears {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
gap: 4px;
.gear {
display: flex;
align-items: center;
gap: 10px;
gap: 4px;
.item-img {
width: 50px;
height: 50px;

View File

@ -1,5 +1,12 @@
.application.dialog.lethalfantasy {
.application.dialog.fvtt-cthulhu-eternal {
color: var(--color-dark-1);
background-color: var(--color-light-1);
button {
background-image: none;
background-color: var(--color-dark-6);
color: var(--color-light-1);
}
input,
select {
@ -9,17 +16,14 @@
}
}
.lethalfantasy-roll-dialog {
.fvtt-cthulhu-eternal-roll-dialog {
fieldset {
padding: 10px;
background-color: var(--color-light-1);
}
}
input[name="selectAvantages"] {
border: none;
}
.dialog-aide-gene {
.dialog-modifier {
display: flex;
justify-content: center;
align-items: center;
@ -32,31 +36,8 @@ input[name="selectAvantages"] {
}
}
.dialog-modificateur {
display: flex;
justify-content: center;
align-items: center;
select {
border: none;
background-color: rgba(0, 0, 0, 0.1);
color: var(--color-dark-2);
width: 60px;
text-align: center;
}
}
.dialog-avantages {
#selectAvantages {
background-color: inherit;
text-align: center;
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
}
}
.dialog-damage,
.dialog-resource,
.dialog-save {
.dialog-damage {
display: flex;
justify-content: center;
align-items: center;
@ -82,6 +63,7 @@ input[name="selectAvantages"] {
border: 0px;
}
.intro-chat {
color:var(--color-dark-1);
border-radius: 20px;
display: flex;
flex-direction: row;

View File

@ -2,7 +2,13 @@
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@ -3,13 +3,19 @@
.item-sheet-common();
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;
height: 50px;
}
}
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
label {
flex: 10%;
}

View File

@ -4,7 +4,9 @@
{{formInput fields.name value=source.name}}
</div>
{{formField systemFields.settings value=system.settings localize=true}}
<fieldset>
{{formField systemFields.settings value=system.settings localize=true}}
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>

View File

@ -2,20 +2,23 @@
<div class="header">
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
{{formInput fields.name value=source.name}}
</div>
</div>
<fieldset>
{{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.protection value=system.protection}}
{{formField systemFields.resourceLevel value=system.resourceLevel}}
</fieldset>
{{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.protection value=system.protection}}
{{formField systemFields.resourceLevel value=system.resourceLevel}}
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>
{{formInput
systemFields.description
enriched=description
value=system.description
name="system.description"
toggled="false"
systemFields.description
enriched=description
value=system.description
name="system.description"
toggled="false"
}}
</fieldset>
</section>

View File

@ -2,14 +2,17 @@
<div class="header">
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
{{formInput fields.name value=source.name}}
</div>
</div>
{{formField systemFields.bondType value=system.bondType localize=true}}
{{formField systemFields.value value=system.value}}
<fieldset>
{{formField systemFields.bondType value=system.bondType localize=true}}
{{formField systemFields.value value=system.value}}
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description"
toggled=true}}
</fieldset>
</section>

View File

@ -1,43 +1,18 @@
{{!log 'chat-message' this}}
<div class="{{cssClass}}">
<div class="intro-chat">
{{#if (ne actingCharImg "icons/svg/mystery-man.svg")}}
<div class="intro-img">
<img src="{{actingCharImg}}" data-tooltip="{{actingCharName}}" />
</div>
{{else}}
<div></div>
{{/if}}
<div class="intro-img">
<img src="{{actingCharImg}}" data-tooltip="{{actingCharName}}" />
</div>
<div class="intro-right">
<p class="introText" {{#if isSave}}data-tooltip="{{introTextTooltip}}"{{/if}}>{{{introText}}}
{{#if isSave}}
<br>
{{#if (eq avantages "avantage")}} {{localize "TENEBRIS.Roll.avantage"}}{{/if}}
{{#if (eq avantages "desavantage")}} {{localize "TENEBRIS.Roll.desavantage"}}{{/if}}
{{#if (eq avantages "doubleAvantage")}} {{localize "TENEBRIS.Roll.doubleAvantage"}}{{/if}}
{{#if (eq avantages "doubleDesavantage")}} {{localize "TENEBRIS.Roll.doubleDesavantage"}}{{/if}}
{{#if (eq rollType "skill")}}
<span>{{rollItem.name}} : {{targetScore}}</span>
<span>Modifier : {{modifier}}</span>
{{/if}}
</p>
</div>
</div>
{{#if isSave}}
<div class="result">
{{#if (eq resultType "success")}}
{{#if isPrivate}}?{{else}}{{localize "TENEBRIS.Roll.success"}}{{/if}}
{{else}}
{{#if isPrivate}}?{{else}}{{localize "TENEBRIS.Roll.failure"}}{{/if}}
{{/if}}
</div>
{{/if}}
{{#if isResource}}
<div class="result">
{{#if (eq resultType "success")}}
{{#if isPrivate}}?{{else}}{{localize "TENEBRIS.Roll.success"}}{{/if}}
{{else}}
{{#if isPrivate}}?{{else}}{{localize "TENEBRIS.Roll.failure"}}{{#if isFailure}} ({{localize "TENEBRIS.Roll.resourceLost"}}){{/if}}{{/if}}
{{/if}}
</div>
{{/if}}
{{#if isDamage}}
<div>
{{#if (and isGM hasTarget)}}

View File

@ -2,14 +2,17 @@
<div class="header">
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
{{formInput fields.name value=source.name}}
</div>
{{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.resourceLevel value=system.resourceLevel}}
</div>
<fieldset>
{{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.resourceLevel value=system.resourceLevel}}
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>
{{formInput systemFields.description enriched=description value=system.description name="system.description" toggled=true}}
{{formInput systemFields.description enriched=description value=system.description name="system.description"
toggled=true}}
</fieldset>
</section>

View File

@ -111,7 +111,4 @@
</div>
</fieldset>
<fieldset class="protagonist-resources protagonist-resources-{{ifThen isPlayMode 'play' 'edit'}}">
</fieldset>
</section>

View File

@ -4,10 +4,12 @@
<legend data-tooltip="{{localize "CTHULHUETERNAL.Tooltip.skills"}}" data-tooltip-direction="UP">{{localize "CTHULHUETERNAL.Label.skills"}}</legend>
<div class="skills">
{{#each skills as |item|}}
<div class="skill " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<div class="skill item" 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.description}}}<br><br>{{item.path}}" data-tooltip-direction="UP">{{item.name}}
<span data-tooltip="{{localize 'CTHULHUETERNAL.Label.progressionPossible'}}">{{item.system.skillTotal}}</span>
<div class="name rollable" data-roll-type="skill" data-tooltip="{{{item.description}}}" data-tooltip-direction="UP">{{item.name}}
</div>
<div class="score" >
{{item.system.skillTotal}}
</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>

View File

@ -1,59 +1,20 @@
{{log "roll-dialog" this}}
<div class="tenebris-roll-dialog">
{{#if isSave}}
<div class="fvtt-cthulhu-eternal-roll-dialog">
{{#if (eq rollType "skill")}}
<fieldSet>
<legend>{{localize "TENEBRIS.Label.sauvegarde"}}</legend>
<div class="dialog-save">{{formula}}</div>
<legend>{{localize "CTHULHUETERNAL.Label.skill"}}</legend>
<div class="dialog-skill">{{rollItem.name}} : {{targetScore}}</div>
</fieldSet>
<fieldSet class="dialog-avantages">
<legend>{{localize "TENEBRIS.Roll.avantagesDesavantages"}}</legend>
<input
type="range"
name="avantages"
min="1"
max="5"
value="{{rangeAdvantage}}"
data-tooltip="Double désavantage - Désavantage - Normal - Avantage - Double avantage"
data-tooltip-direction="UP"
data-tooltip-class="tooltip-avantages"
/>
<input id="selectAvantages" name="selectAvantages" readonly value="{{rollAdvantage}}">
</fieldSet>
<div class="dialog-aide-gene">
<fieldSet>
<legend>{{localize "TENEBRIS.Roll.aide"}}</legend>
<select name="aide">
{{selectOptions choiceAide}}
</select>
</fieldSet>
<fieldSet>
<legend>{{localize "TENEBRIS.Roll.gene"}}</legend>
<select name="gene">
{{selectOptions choiceGene}}
</select>
</fieldSet>
</div>
<fieldSet class="dialog-modificateur">
<legend>{{localize "TENEBRIS.Roll.adversite"}}</legend>
<select name="modificateur" {{#if hasTarget}}data-tooltip="Cible : {{targetName}}" data-tooltip-direction="UP"{{/if}}>
{{selectOptions choiceModificateur selected=malus}}
<fieldSet class="dialog-modifier">
<legend>{{localize "CTHULHUETERNAL.Label.modifier"}}</legend>
<select name="modifier" class="roll-skill-modifier">
{{selectOptions choiceModifier selected=modifier}}
</select>
</fieldSet>
{{/if}}
{{#if (or isDamage isAttack)}}
<fieldSet>
<legend>{{localize "TENEBRIS.Label.degats"}}</legend>
<div class="dialog-damage">{{damageDice}} {{#if damageDiceLowered}}limités par les dégâts max à {{damageDiceFinal}} {{/if}}</div>
</fieldSet>
{{/if}}
{{#if isResource}}
<fieldSet>
<legend>{{localize "TENEBRIS.Label.ressource"}}</legend>
<div class="dialog-resource">{{formula}}</div>
</fieldSet>
{{/if}}
<fieldSet>
<legend>{{localize "TENEBRIS.Roll.visibilite"}}</legend>
<legend>{{localize "CTHULHUETERNAL.Label.rollView"}}</legend>
<select name="visibility">
{{selectOptions rollModes selected=visibility}}
</select>

View File

@ -1,25 +1,29 @@
<section>
<div class="header">
<img class="item-img era-icon-color" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
<img class="item-img era-icon-color" src="{{item.img}}" data-edit="img" data-action="editImage"
data-tooltip="{{item.name}}" />
{{formInput fields.name value=source.name}}
</div>
{{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.base value=system.base}}
{{formField systemFields.bonus value=system.bonus}}
{{formField systemFields.diceEvolved value=system.diceEvolved}}
{{#if system.diceEvolved}}
{{formField systemFields.rollFailed value=system.rollFailed}}
{{/if}}
<div class="total flexrow">
<legend>{{localize "CTHULHUETERNAL.Label.total"}}</legend>
{{system.skillTotal}}
</div>
<fieldset>
{{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.base value=system.base}}
{{formField systemFields.bonus value=system.bonus}}
<div class="total flexrow">
<legend>{{localize "CTHULHUETERNAL.Label.totalScore"}}</legend>
{{system.skillTotal}}
</div>
{{formField systemFields.diceEvolved value=system.diceEvolved}}
{{#if system.diceEvolved}}
{{formField systemFields.rollFailed value=system.rollFailed}}
{{/if}}
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description"
toggled=true}}
</fieldset>
</section>

View File

@ -4,22 +4,24 @@
{{formInput fields.name value=source.name}}
</div>
{{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.weaponType value=system.weaponType localize=true}}
{{#if (eq system.weaponType "rangedfirearm")}}
<fieldset>
{{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.weaponType value=system.weaponType localize=true}}
{{#if (eq system.weaponType "rangedfirearm")}}
{{formField systemFields.weaponSubtype value=system.weaponSubtype localize=true}}
{{/if}}
{{/if}}
{{formField systemFields.damage value=system.damage}}
{{formField systemFields.baseRange value=system.baseRange}}
{{formField systemFields.rangeUnit value=system.rangeUnit localize=true}}
{{formField systemFields.lethality value=system.lethality}}
{{formField systemFields.killRadius value=system.killRadius}}
{{formField systemFields.damage value=system.damage}}
{{formField systemFields.baseRange value=system.baseRange}}
{{formField systemFields.rangeUnit value=system.rangeUnit localize=true}}
{{formField systemFields.lethality value=system.lethality}}
{{formField systemFields.killRadius value=system.killRadius}}
{{formField systemFields.armorPiercing value=system.armorPiercing}}
{{formField systemFields.resourceLevel value=system.resourceLevel}}
</fieldset>
{{formField systemFields.armorPiercing value=system.armorPiercing}}
{{formField systemFields.resourceLevel value=system.resourceLevel}}
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>
{{formInput