This commit is contained in:
sladecraven 2021-02-09 23:32:55 +01:00
parent 92f8fe4ee8
commit 42af291a7c
25 changed files with 587 additions and 62 deletions

View File

@ -0,0 +1 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><radialGradient id="delapouite-abdominal-armor-gradient-0"><stop offset="0%" stop-color="#000" stop-opacity="1"></stop><stop offset="100%" stop-color="#9b9b9b" stop-opacity="1"></stop></radialGradient></defs><rect fill="url(#delapouite-abdominal-armor-gradient-0)" stroke="#000000" stroke-opacity="1" stroke-width="1" height="510" width="510" rx="32" ry="32"></rect><g class="" style="" transform="translate(-5,-11)"><path d="M162 35.75l-94.49 27.1c-12.05 6.3-23.47 23.9-31.01 46.35-6.07 18.2-9.62 38.9-10.93 58.3L136.7 112zm188 .1L375.4 112l111 55.6c-1.3-19.3-4.9-40.2-10.9-58.3-5.7-17.05-13.6-31.35-22.5-40.05-2.7-2.8-5.5-4.9-8.4-6.4zm-172.9 11.5l-25.7 77.45-92.9 46.4 14.08 53.5 88.82 44.4 94.6-15.9 94.6 15.9 88.8-44.4 14.1-53.5-92.8-46.4-25.8-77.35h-10.5l-59.3 73.95-.1 61.1h-18.1l.1-61-59.3-74.15zM78.65 247.7l22.05 83.9 146.2-43.8v-14.7l-88.4 14.7zm354.75 0l-80 40.1-88.4-14.7v14.7l146.3 43.8zm-186.5 58.7l-31.6 9.6-35.1 70.2 66.7-33.3zm18.1 0v46.5l66.9 33.4-35.2-70.3zM191.7 323l-86.4 26 25.3 96.3zm128.6.1l61.1 122.1 25.3-96.2zm-55.3 50l.1 43.2 100.7 37.8-20.4-40.8zm-18.1 0l-80.2 40.1-20.5 40.9L247 416.3zm.1 62.4l-81.6 30.6 81.6 10.2zm18.1 0v40.7l81.7-10.2z" fill="#fff" fill-opacity="1" transform="translate(25.6, 25.6) scale(0.9, 0.9) rotate(0, 256, 256) skewX(0) skewY(0)"></path></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><radialGradient id="skoll-lee-enfield-gradient-0"><stop offset="0%" stop-color="#000" stop-opacity="1"></stop><stop offset="100%" stop-color="#9b9b9b" stop-opacity="1"></stop></radialGradient></defs><rect fill="url(#skoll-lee-enfield-gradient-0)" stroke="#000000" stroke-opacity="1" stroke-width="1" height="510" width="510" rx="32" ry="32"></rect><g class="" style="" transform="translate(-5,-11)"><path d="M465.659 42.63l-16.16 11.83 11.82 15.69-.272.181 6.32 8.559 22.551-17-8-10.68-6.26 4.71-10-13.29zm-29.09 21.48L269.108 183.86c0 .54-.06 1.03-.06 1.54l-2.16 22.78a16 16 0 0 1-6.52 11.46l-41.91 30.5a16 16 0 0 1-22.35-3.52l-4.95-6.8-29.79 21.48c-1.67 1.22-2.011 3.74-.811 6l2.09 3.951a4.9 4.9 0 0 1-.158 5.37l-48 58.71a1.77 1.77 0 0 1-.282.27l-90.699 70.42c-1.84 1.43-1.91 4.46-.15 6.76l40.82 54.179a5.69 5.69 0 0 0 4.41 2.41h.18a3.47 3.47 0 0 0 2.84-1.59l84.43-111.3a4.2 4.2 0 0 0 1.33-4.37s-3.04-16.07-2.32-17.07c0 0 28.7-38.39 28.95-38.58L454.788 88.7l-18.22-24.59zm-183.5 119.82l-54.14 39.39 10.118 13.91 41.91-30.5 2.112-22.8zm20.138 64.25l-38.629 29.6 7.49 15.37a5.14 5.14 0 0 0 4.73 2.87h.25a6 6 0 0 0 4.57-2.45l22.77-30.59a5.63 5.63 0 0 0 1-4.51l-2.18-10.29zm-59.44 45.6l-5.929 4.59a12.81 12.81 0 0 1-16.48 18.16l-2.26 3-2.26 3a20.27 20.27 0 0 0 30.08-14.81 20.1 20.1 0 0 0-3.15-13.94z" fill="#fff" fill-opacity="1" transform="translate(51.2, 51.2) scale(0.8, 0.8) rotate(-15, 256, 256) skewX(0) skewY(0)"></path></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><radialGradient id="skoll-lee-enfield-gradient-0"><stop offset="0%" stop-color="#000" stop-opacity="1"></stop><stop offset="100%" stop-color="#9b9b9b" stop-opacity="1"></stop></radialGradient></defs><rect fill="url(#skoll-lee-enfield-gradient-0)" stroke="#000000" stroke-opacity="1" stroke-width="1" height="510" width="510" rx="32" ry="32"></rect><g class="" style="" transform="translate(-5,-11)"><path d="M465.659 42.63l-16.16 11.83 11.82 15.69-.272.181 6.32 8.559 22.551-17-8-10.68-6.26 4.71-10-13.29zm-29.09 21.48L269.108 183.86c0 .54-.06 1.03-.06 1.54l-2.16 22.78a16 16 0 0 1-6.52 11.46l-41.91 30.5a16 16 0 0 1-22.35-3.52l-4.95-6.8-29.79 21.48c-1.67 1.22-2.011 3.74-.811 6l2.09 3.951a4.9 4.9 0 0 1-.158 5.37l-48 58.71a1.77 1.77 0 0 1-.282.27l-90.699 70.42c-1.84 1.43-1.91 4.46-.15 6.76l40.82 54.179a5.69 5.69 0 0 0 4.41 2.41h.18a3.47 3.47 0 0 0 2.84-1.59l84.43-111.3a4.2 4.2 0 0 0 1.33-4.37s-3.04-16.07-2.32-17.07c0 0 28.7-38.39 28.95-38.58L454.788 88.7l-18.22-24.59zm-183.5 119.82l-54.14 39.39 10.118 13.91 41.91-30.5 2.112-22.8zm20.138 64.25l-38.629 29.6 7.49 15.37a5.14 5.14 0 0 0 4.73 2.87h.25a6 6 0 0 0 4.57-2.45l22.77-30.59a5.63 5.63 0 0 0 1-4.51l-2.18-10.29zm-59.44 45.6l-5.929 4.59a12.81 12.81 0 0 1-16.48 18.16l-2.26 3-2.26 3a20.27 20.27 0 0 0 30.08-14.81 20.1 20.1 0 0 0-3.15-13.94z" fill="#fff" fill-opacity="1" transform="translate(0, 0) scale(1, 1) rotate(-15, 256, 256) skewX(0) skewY(0)"></path></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><radialGradient id="skoll-glock-gradient-0"><stop offset="0%" stop-color="#000" stop-opacity="1"></stop><stop offset="100%" stop-color="#9b9b9b" stop-opacity="1"></stop></radialGradient></defs><rect fill="url(#skoll-glock-gradient-0)" stroke="#000000" stroke-opacity="1" stroke-width="1" height="510" width="510" rx="32" ry="32"></rect><g class="" style="" transform="translate(0,0)"><path d="M55.505 435.172h91.88v-16.518h-91.88zm265.317-173.437v-49.326l16.518-.795v66.639H218.618c2.158-5.162 4.316-11.356 6.442-16.518zM466.385 76.828l14.949 9.405h-14.949zm-387.136.114h15.486v9.291H79.249zm179.982 138.45c.207 9.374 2.468 21.442 10.592 32.458-9.952-2.065-22.712-14.03-30.61-22.444 1.353-3.407 2.602-6.504 3.697-9.219zm-134.558-63.088v-49.553h16.518v49.553zm66.071 0v-49.553h16.518v49.553zm-120.786 0v-49.553h38.198v49.553zm87.75 0v-49.553h16.519v49.553zM96.49 217.488c.413-12.389-14.608-33.335-30.899-33.335-20.977 0-11.593-8.104-1.331-15.33H486V187.9l-254.312 12.285c-4.976 11.625-22.712 56.976-36.39 92.149l4.779 10.324-9.477 1.858c-3.49 9.033-11.5 29.69-14.856 38.414l3.645 9.797-8.26 2.953c-12.388 32.313-17.55 46.456-17.55 46.456H53.44S26 393.216 26 385.216c-.124-43.99 69.292-131.74 70.49-167.728zM223.78 102.75H486v49.553H223.78z" fill="#fff" fill-opacity="1"></path></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><radialGradient id="skoll-colt-m1911-gradient-0"><stop offset="0%" stop-color="#000" stop-opacity="1"></stop><stop offset="100%" stop-color="#9b9b9b" stop-opacity="1"></stop></radialGradient></defs><rect fill="url(#skoll-colt-m1911-gradient-0)" stroke="#000000" stroke-opacity="1" stroke-width="1" height="510" width="510" rx="32" ry="32"></rect><g class="" style="" transform="translate(-5,-11)"><path d="M237.58 213.41a48.65 48.65 0 0 1 2.09-14.63h-17.15a1.45 1.45 0 0 0-1.37 1.37v14.58a15 15 0 0 0 1 6.15c.1 0 .26-.1.38-.1h15.58a59 59 0 0 1-.53-7.37zM145.16 396l-2.07 13.22-106.72-16.69 2.11-13.48 106.06 16.86zm249.29-246.22H86.71c2.08-37 19.18-47 19.18-47h378.27v32.53c-59-2.45-81.32 6.47-89.71 14.47zm89.59.92h.12v27.08h-80v-16.77c4-3.09 20.68-12.82 79.87-10.31zM27.84 361.78l119.12 19s25.79-87.28 36.14-115.79c6.14-16.95 29.91-20.21 41.32-20.21h31.32c16.06 0 29.42-13.69 30.42-30.92l-.2-23.08a7 7 0 0 1 7.2-7h96v-18H83.64c-3.18 4.32-9.37 6.14-21.27 7.24-27.3 2.54-21.28 19.3-21.28 19.3a37.51 37.51 0 0 1 4.56-.29c9.55 0 27.65 2.63 39.74 17.75 14.49 18.08-38.28 94.73-57.55 152zm178.32-161.63a16.16 16.16 0 0 1 16.37-16.37h37.31a16.12 16.12 0 0 1 16.32 16.37v14.58c0 12-9.11 22.05-18.32 22.05h-35.32c-12 0-16.37-9.89-16.37-22.05v-14.58zm-155 151.53a10.23 10.23 0 0 1-1.73-10.49c12.36-30.23 55.41-128.32 70.86-161.48 6.48-13.9 35.77-14.41 52.31-8.65 14.25 5 21.13 14.74 18.4 26.15-5.46 22.81-36.94 120.87-52.6 165.22-1.33 3.78-4.7 6.15-10 7.05a45.81 45.81 0 0 1-7.46.51c-9.91 0-23.26-1.95-33.24-4-19.89-4-32.18-8.82-36.54-14.31zm83-165.32c-14.86 31.91-55 123.3-69 156.95 4.32 2.21 14.25 5.53 28.85 8.26 15.21 2.84 26.29 3.37 30.81 2.88 15.65-44.71 46-139.46 51.14-160.83.26-1.09.87-3.65-5.17-6.64-5.51-2.73-14.08-4.26-22.36-4-8.68.28-13.37 2.4-14.27 3.38zm5.86 18.66a8.3 8.3 0 1 1 8.3 8.3 8.3 8.3 0 0 1-8.31-8.3zm-30.79 124.15a8.3 8.3 0 1 1-8.3-8.3 8.3 8.3 0 0 1 8.28 8.3zM77.99 116l-4.59 15.93a10.15 10.15 0 0 1-2.94-4.2c-.73-2.39-9.62-17.8-19.42-18.59 10.12-4.61 26.94 6.86 26.94 6.86z" fill="#fff" fill-opacity="1" transform="translate(0, 0) scale(1, 1) rotate(-15, 256, 256) skewX(0) skewY(0)"></path></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -36,6 +36,11 @@ export class SoSActorSheet extends ActorSheet {
if ( a.name > b.name ) return 1; if ( a.name > b.name ) return 1;
return -1; return -1;
}); });
data.data.gears = this.actor.data.items.filter( item => item.type == 'gear');
data.data.weapons = this.actor.data.items.filter( item => item.type == 'weapon');
data.data.armors = this.actor.data.items.filter( item => item.type == 'armor');
data.data.totalEncumbrance = SoSUtility.computeEncumbrance(this.actor.data.items);
data.data.subculture = this.actor.data.items.find( item => item.type == 'subculture'); data.data.subculture = this.actor.data.items.find( item => item.type == 'subculture');
data.data.geneline = this.actor.data.items.find( item => item.type == 'geneline'); data.data.geneline = this.actor.data.items.find( item => item.type == 'geneline');
data.data.editStatSkill = this.options.editStatSkill; data.data.editStatSkill = this.options.editStatSkill;
@ -67,6 +72,16 @@ export class SoSActorSheet extends ActorSheet {
const item = this.actor.getOwnedItem(li.data("item-id")); const item = this.actor.getOwnedItem(li.data("item-id"));
item.sheet.render(true); item.sheet.render(true);
}); });
html.find('.item-equip').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const item = this.actor.equipObject( li.data("item-id") );
this.render(true);
});
html.find('.item-worn').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const item = this.actor.wornObject( li.data("item-id") );
this.render(true);
});
// Delete Inventory Item // Delete Inventory Item
html.find('.item-delete').click(ev => { html.find('.item-delete').click(ev => {
@ -83,6 +98,16 @@ export class SoSActorSheet extends ActorSheet {
const skill = this.actor.getOwnedItem(li.data("item-id")); const skill = this.actor.getOwnedItem(li.data("item-id"));
this.actor.rollSkill(skill); this.actor.rollSkill(skill);
}); });
html.find('.skill-value').change((event) => {
let skillName = event.currentTarget.attributes.skillname.value;
//console.log("Competence changed :", skillName);
this.actor.updateSkill(skillName, parseInt(event.target.value));
});
html.find('.skill-xp').change((event) => {
let skillName = event.currentTarget.attributes.skillname.value;
//console.log("Competence changed :", skillName);
this.actor.updateSkillExperience(skillName, parseInt(event.target.value));
});
html.find('.reset-deck-full').click((event) => { html.find('.reset-deck-full').click((event) => {
this.actor.resetDeckFull(); this.actor.resetDeckFull();
this.render(true); this.render(true);
@ -124,7 +149,6 @@ export class SoSActorSheet extends ActorSheet {
return position; return position;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
/** @override */ /** @override */
_updateObject(event, formData) { _updateObject(event, formData) {

View File

@ -129,6 +129,24 @@ export class SoSActor extends Actor {
return Math.ceil( (this.data.data.stats.strength.value + this.data.data.stats.endurance.value) / 2); return Math.ceil( (this.data.data.stats.strength.value + this.data.data.stats.endurance.value) / 2);
} }
/* -------------------------------------------- */
async wornObject( itemID) {
let item = this.getOwnedItem(itemID);
if (item && item.data.data) {
let update = { _id: item._id, "data.worn": !item.data.data.worn };
await this.updateEmbeddedEntity("OwnedItem", update);
}
}
/* -------------------------------------------- */
async equipObject(itemID) {
let item = this.getOwnedItem(itemID);
if (item && item.data.data) {
let update = { _id: item._id, "data.equiped": !item.data.data.equiped };
await this.updateEmbeddedEntity("OwnedItem", update);
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async controlScores() { async controlScores() {
// Defense check // Defense check
@ -155,6 +173,29 @@ export class SoSActor extends Actor {
} }
} }
/* -------------------------------------------- */
async updateSkill(skillName, value) {
let skill = this.data.items.find( item => item.name == skillName);
if (skill) {
const update = { _id: skill._id, 'data.value': value };
const updated = await this.updateEmbeddedEntity("OwnedItem", update); // Updates one EmbeddedEntity
}
}
/* -------------------------------------------- */
async updateSkillExperience(skillName, value) {
let skill = this.data.items.find( item => item.name == skillName);
if (skill) {
const update = { _id: skill._id, 'data.xp': value };
const updated = await this.updateEmbeddedEntity("OwnedItem", update); // Updates one EmbeddedEntity
}
}
/* -------------------------------------------- */
getApplicableConsequences( ) {
let consequences = this.data.items.filter( item => item.type == 'consequence' && item.data.severity != 'none');
return consequences;
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollStat( statKey ) { async rollStat( statKey ) {
@ -163,7 +204,9 @@ export class SoSActor extends Actor {
stat: duplicate(this.data.data.stats[statKey]), stat: duplicate(this.data.data.stats[statKey]),
actor: this, actor: this,
modifierList: SoSUtility.fillRange(-10, +10), modifierList: SoSUtility.fillRange(-10, +10),
tnList: SoSUtility.fillRange(6, 20) tnList: SoSUtility.fillRange(6, 20),
consequencesList: duplicate( this.getApplicableConsequences() ),
malusConsequence: 0
} }
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData); let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
new SoSFlipDialog(flipData, html).render(true); new SoSFlipDialog(flipData, html).render(true);
@ -175,10 +218,12 @@ export class SoSActor extends Actor {
let flipData = { let flipData = {
mode: 'skill', mode: 'skill',
statList: duplicate(this.data.data.stats), statList: duplicate(this.data.data.stats),
consequencesList: duplicate( this.getApplicableConsequences() ),
skill: duplicate(skill), skill: duplicate(skill),
actor: this, actor: this,
modifierList: SoSUtility.fillRange(-10, +10), modifierList: SoSUtility.fillRange(-10, +10),
tnList: SoSUtility.fillRange(6, 20) tnList: SoSUtility.fillRange(6, 20),
malusConsequence: 0
} }
flipData.statList['nostat'] = { label: "No stat (ie defaulting skills)", value: 0, cardsuit: "none" } flipData.statList['nostat'] = { label: "No stat (ie defaulting skills)", value: 0, cardsuit: "none" }
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData); let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);

View File

@ -220,9 +220,9 @@ export class SoSCardDeck {
// Compute final result and compare // Compute final result and compare
if ( flipData.mode == 'stat' ) { if ( flipData.mode == 'stat' ) {
flipData.baseScore = flipData.stat.value; flipData.baseScore = flipData.stat.value + flipData.malusConsequence;
} else if (flipData.mode == 'skill') { } else if (flipData.mode == 'skill') {
flipData.baseScore = Math.floor(flipData.stat.value/2) + flipData.skill.data.value; flipData.baseScore = Math.floor(flipData.stat.value/2) + flipData.skill.data.value + flipData.malusConsequence
} }
flipData.finalScore = flipData.baseScore + flipData.cardTotal + Number(flipData.modifier); flipData.finalScore = flipData.baseScore + flipData.cardTotal + Number(flipData.modifier);
flipData.magnitude = flipData.finalScore - flipData.tn; flipData.magnitude = flipData.finalScore - flipData.tn;

View File

@ -47,7 +47,7 @@ export class SoSCombat extends Combat {
/* -------------------------------------------- */ /* -------------------------------------------- */
async nextTurn() { async nextTurn() {
console.log("Goingo to phase !", this.phaseNumber ); console.log("Going to phase !", this.phaseNumber );
// Get all actions for this phase // Get all actions for this phase
let phaseIndex = this.phaseNumber - 1; let phaseIndex = this.phaseNumber - 1;
let actionList = []; let actionList = [];

View File

@ -5,12 +5,14 @@ export class SoSDialogCombatActions extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async create( combatId, combatantId, round, uniqId ) { static async create( combatId, combatantId, round, uniqId ) {
let combat = game.combats.get( combatId);
let combatActions = { let combatActions = {
actionsList: await SoSUtility.loadCompendium( 'foundryvtt-shadows-over-sol.combat-actions' ), actionsList: await SoSUtility.loadCompendium( 'foundryvtt-shadows-over-sol.combat-actions' ),
actionPoints: SoSUtility.fillRange(0, 6), actionPoints: SoSUtility.fillRange(0, 6),
combatId: combatId, combatId: combatId,
combatantId: combatantId, combatantId: combatantId,
combatantsList: combat.data.combatants,
uniqId: uniqId, uniqId: uniqId,
round: round round: round
} }
@ -22,7 +24,7 @@ export class SoSDialogCombatActions extends Dialog {
//console.log("ACTIONS", combatActions.actionsList ); //console.log("ACTIONS", combatActions.actionsList );
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-combat-actions.html', combatActions); let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-combat-actions.html', combatActions);
return new SoSDialogCombatActions(combatActions, html ); return new SoSDialogCombatActions(combatActions, html , { width: 640, height: 320} );
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -57,12 +59,17 @@ export class SoSDialogCombatActions extends Dialog {
let action1Index = $('#action1').val(); let action1Index = $('#action1').val();
let action1 = duplicate(this.combatActions.actionsList[action1Index]); let action1 = duplicate(this.combatActions.actionsList[action1Index]);
let combatant3Id = $('#combatant3').val();
let combatant2Id = $('#combatant2').val();
let combatant1Id = $('#combatant1').val();
let msgdata = { let msgdata = {
combatId: this.combatActions.combatId, combatId: this.combatActions.combatId,
combatantId: this.combatActions.combatantId, combatantId: this.combatActions.combatantId,
uniqId: this.combatActions.uniqId, uniqId: this.combatActions.uniqId,
userId: game.userId, userId: game.userId,
phaseArray: [ action1, action2, action3], phaseArray: [ action1, action2, action3],
targetArray: [ combatant1Id, combatant2Id, combatant3Id],
remainingAP: ap remainingAP: ap
} }

View File

@ -1,3 +1,4 @@
import { SoSUtility } from "./sos-utility.js";
export class SoSFlipDialog extends Dialog { export class SoSFlipDialog extends Dialog {
@ -11,7 +12,7 @@ export class SoSFlipDialog extends Dialog {
}, },
default: 'flip' default: 'flip'
}; };
super(conf, { classes: ["sosdialog"], width: 800, height: 800 }); super(conf, { classes: ["sosdialog"], width: 800 });
this.flipData = flipData; this.flipData = flipData;
} }
@ -21,15 +22,32 @@ export class SoSFlipDialog extends Dialog {
this.close(); this.close();
} }
/* -------------------------------------------- */
updateScoreBase( ) {
let scoreBase = 0;
if ( this.flipData.mode == 'skill') {
let statKey = $('#statSelect').val();
this.flipData.stat = duplicate( this.flipData.statList[ statKey ] );
scoreBase = Math.floor(this.flipData.statList[ statKey ].value / 2) + this.flipData.skill.data.value;
} else { //Stat mode
let statKey = $('#statSelect').val();
scoreBase = this.flipData.stat.value;
}
scoreBase += this.flipData.malusConsequence;
$('#score-base').text( scoreBase);
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async updateFlip( flipData ) { async updateFlip( flipData ) {
console.log("UPDATE !!!", flipData); //console.log("UPDATE !!!", flipData);
$('.view-deck').remove(); $('.view-deck').remove();
$("#view-deck").append(await flipData.actor.cardDeck.getDeckHTML()); $("#view-deck").append(await flipData.actor.cardDeck.getDeckHTML());
$('.view-edge').remove(); $('.view-edge').remove();
$("#view-edge").append(await flipData.actor.cardDeck.getEdgeHTML()); $("#view-edge").append(await flipData.actor.cardDeck.getEdgeHTML());
this.updateScoreBase();
$('.edge-card').click((event) => { $('.edge-card').click((event) => {
let flipData = duplicate(this.flipData); let flipData = duplicate(this.flipData);
flipData.modifier = $('#modifier').val(); flipData.modifier = $('#modifier').val();
@ -45,6 +63,20 @@ export class SoSFlipDialog extends Dialog {
} }
/* -------------------------------------------- */
updateConsequence(event) {
this.flipData.consequencesSelected = $('#consequenceSelect').val();
let malusConsequence = 0;
for (let consequenceId of this.flipData.consequencesSelected) {
let consequence = this.flipData.consequencesList.find( item => item._id == consequenceId);
console.log(consequence, consequenceId);
malusConsequence += SoSUtility.getConsequenceMalus( consequence.data.severity );
}
$('#consequence-malus').text(malusConsequence);
this.flipData.malusConsequence = malusConsequence;
this.updateScoreBase();
}
/* -------------------------------------------- */ /* -------------------------------------------- */
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
@ -64,6 +96,14 @@ export class SoSFlipDialog extends Dialog {
// Setup everything onload // Setup everything onload
$(function () { onLoad(); }); $(function () { onLoad(); });
html.find('#statSelect').change((event) => {
this.updateFlip(dialog.flipData );
} );
html.find('#consequenceSelect').change((event) => {
this.updateConsequence( event );
} );
html.find('.class-view-deck').click((event) => { html.find('.class-view-deck').click((event) => {
let flipData = duplicate(this.flipData); let flipData = duplicate(this.flipData);
flipData.modifier = html.find('#modifier').val(); flipData.modifier = html.find('#modifier').val();

View File

@ -2,7 +2,10 @@
import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js"; import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
export class SoSUtility { const severity2malus = { "none": 0, "light": -1, "moderate": -2, "severe": -3, "critical": -4};
/* -------------------------------------------- */
export class SoSUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async preloadHandlebarsTemplates() { static async preloadHandlebarsTemplates() {
@ -16,6 +19,8 @@ import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js";
'systems/foundryvtt-shadows-over-sol/templates/item-sheet.html', 'systems/foundryvtt-shadows-over-sol/templates/item-sheet.html',
'systems/foundryvtt-shadows-over-sol/templates/item-geneline-sheet.html', 'systems/foundryvtt-shadows-over-sol/templates/item-geneline-sheet.html',
'systems/foundryvtt-shadows-over-sol/templates/item-subculture-sheet.html', 'systems/foundryvtt-shadows-over-sol/templates/item-subculture-sheet.html',
'systems/foundryvtt-shadows-over-sol/templates/item-weapon-sheet.html',
'systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html',
'systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html' 'systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html'
] ]
@ -82,6 +87,23 @@ import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js";
d.render(true); d.render(true);
} }
/* -------------------------------------------- */
static getConsequenceMalus(severity) {
return severity2malus[severity] ?? 0;
}
/* -------------------------------------------- */
static computeEncumbrance( items) {
let trappings = items.filter( item => item.type == 'gear' || item.type == 'armor' || item.type == 'weapon' );
let sumEnc = 0;
for (let object of trappings) {
if ( (!object.data.worn) && (!object.data.neg) && (!object.data.containerid || object.data.containerid == "") ) {
sumEnc += (object.big > 0) ? object.big : 1;
}
}
return sumEnc;
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static closeAction(event) { static closeAction(event) {
let uniqId = event.currentTarget.attributes['data-uniq-id'].value; let uniqId = event.currentTarget.attributes['data-uniq-id'].value;

6
packs/gears.db Normal file
View File

@ -0,0 +1,6 @@
{"name":"USD-720 Widowmaker Heavy Pistol","permission":{"default":0,"pJLHbu8WlBVyfXG4":3},"type":"weapon","data":{"big":0,"computer":0,"conceal":0,"container":0,"implant":0,"neg":false,"mil":false,"software":0,"worn":false,"description":"<p>The ultimate man-stopper, the USD-720 &ldquo;Windowmaker&rdquo; Heavy Pistol is sure to leave you standing and your enemies taking a dirt&nbsp;nap. A long-time favorite of bounty hunters&nbsp;and security forces the Sol system over, this&nbsp;sleek .50 caliber handgun is now available on&nbsp;the open market! Order yours today!</p>\n<p>&nbsp;</p>","quantity":0,"costrating":6,"defensive":0,"containerid":"","area":0,"autofire":2,"damage_club":"2M","damage_hearth":"10M","damage_spade":"15M","damage_diamond":"5M","hands":1,"pierce":0,"range":10,"reload":1,"shots":10,"stun":false,"thrown":false,"reach":false,"shallow":false,"spread":false,"category":"ballistic","equiped":false},"flags":{},"img":"systems/foundryvtt-shadows-over-sol/img/icons/weapons/usd-720.svg","effects":[],"_id":"CgOBdHEwfFMUbEYk"}
{"name":"USD-IIh Bulwak Ballistic Suite","permission":{"default":0,"pJLHbu8WlBVyfXG4":3},"type":"armor","data":{"big":0,"computer":0,"conceal":0,"container":0,"implant":0,"neg":false,"mil":false,"software":0,"worn":true,"description":"<p>Simply the best in light but durable ballistic protection, the USD-11h &ldquo;Bulwark&rdquo; Ballistic&nbsp;Suit stops bullets in their tracks. Utilizing&nbsp;Utakar&rsquo;s proprietary Shell-StopperTM gel technology, the Bulwark hardens upon impact,&nbsp;distributing the kinetic force of the impact&nbsp;throughout the body. Self-sealing gel closes in&nbsp;seconds. Designer pockets fit most common&nbsp;magazines. It is available in black, charcoal,&nbsp;rosewood and navy.</p>\n<p>&nbsp;</p>","quantity":0,"costrating":5,"defensive":0,"containerid":"","bulky":0,"dr":2,"gel":3,"reflect":0,"str":0,"vac":false},"flags":{},"img":"systems/foundryvtt-shadows-over-sol/img/icons/armors/bulwak_armor.svg","effects":[],"_id":"IzyB0If465nUk2Ws"}
{"name":"USD-24k Aegis Reflect Suit","permission":{"default":0,"pJLHbu8WlBVyfXG4":3},"type":"armor","data":{"big":0,"computer":0,"conceal":0,"container":0,"implant":0,"neg":false,"mil":false,"software":0,"worn":true,"description":"<p>Do lasers threaten to give you health problems by burning holes into your flesh? Then look no further! The USD-24k &ldquo;Aegis&rdquo; Reflect Suit scatters lasers before they can scatter you. Constructed of bleeding-edge materials, the Aegis refracts laser light, leaving the wearer unharmed. This comes with either a frosted or glossy finish.</p>\n<p>&nbsp;</p>","quantity":0,"costrating":6,"defensive":0,"containerid":"","bulky":0,"dr":2,"gel":0,"reflect":3,"str":0,"vac":false},"flags":{},"img":"systems/foundryvtt-shadows-over-sol/img/icons/armors/bulwak_armor.svg","effects":[],"_id":"K6pBGZRiBzPzHHPZ"}
{"name":"USD-1200 Amazon Light Rifle","permission":{"default":0,"pJLHbu8WlBVyfXG4":3},"type":"weapon","data":{"big":0,"computer":0,"conceal":0,"container":0,"implant":0,"neg":false,"mil":false,"software":0,"worn":false,"description":"<p>The rifle you need when you&rsquo;re on the go, the USD-1200 &ldquo;Amazon&rdquo; Light Rifle has beendesigned from the ground up for easy transportation and assembly. With&nbsp; balancing range,&nbsp;magazine capacity and ease of maintenance,&nbsp;the Amazon gets the job done. Satisfaction&nbsp;guaranteed. Some assembly required.</p>\n<p>&nbsp;</p>","quantity":0,"costrating":6,"defensive":0,"containerid":"","area":0,"autofire":2,"damage_club":"3M","damage_hearth":"12M","damage_spade":"18M","damage_diamond":"6M","hands":2,"pierce":0,"range":20,"reload":1,"shots":10,"stun":false,"thrown":false,"reach":false,"shallow":false,"spread":false,"category":"ballistic","equiped":false},"flags":{},"img":"systems/foundryvtt-shadows-over-sol/img/icons/weapons/usd-1200.svg","effects":[],"_id":"NN9iWxPKU9djFfA9"}
{"name":"USD-3200 Valkyrie Heavy Rifle","permission":{"default":0,"pJLHbu8WlBVyfXG4":3},"type":"weapon","data":{"big":0,"computer":0,"conceal":0,"container":0,"implant":0,"neg":false,"mil":false,"software":0,"worn":false,"description":"<p>The USD-3200 &ldquo;Valkyrie&rdquo; Heavy Rifle is&nbsp;a masterpiece of twenty-third century engi-neering, combined with sleek twenty-second&nbsp;century ascetics. Own the best-designed and&nbsp;best-looking heavy rifle on the market! It&nbsp;comes with two autofire settings and a designer&nbsp;gun case. Remember, Valkyrie means quality.</p>\n<p>&nbsp;</p>","quantity":0,"costrating":7,"defensive":0,"containerid":"","area":0,"autofire":2,"damage_club":"3M","damage_hearth":"14M","damage_spade":"21M","damage_diamond":"7M","hands":2,"pierce":0,"range":20,"reload":1,"shots":20,"stun":false,"thrown":false,"reach":false,"shallow":false,"spread":false,"category":"ballistic","equiped":false},"flags":{},"img":"systems/foundryvtt-shadows-over-sol/img/icons/weapons/usd-3200.svg","effects":[],"_id":"O4B0meZMhDgxDXcC"}
{"name":"USD-383 Wasp Light Pistol","permission":{"default":0,"pJLHbu8WlBVyfXG4":3},"type":"weapon","data":{"big":0,"computer":0,"conceal":0,"container":0,"implant":0,"neg":false,"mil":false,"software":0,"worn":false,"description":"<p>A personal protection favorite, the USD-383 &ldquo;Wasp&rdquo; Light Pistol is ready to lock and load! Take aim at your favorite shooting&nbsp; range or when your life is in danger. The gun is&nbsp;small enough to fit most holsters or to slip into&nbsp;a purse! It comes with patent-pending rubberized grip and is available in gun barrel gray,&nbsp;matte black, racing stripe red or powder pink.&nbsp;</p>\n<p>&nbsp;</p>","quantity":0,"costrating":5,"defensive":0,"containerid":"","area":0,"autofire":0,"damage_club":"2M","damage_hearth":"8M","damage_spade":"12M","damage_diamond":"4M","hands":1,"pierce":0,"range":10,"reload":1,"shots":10,"stun":false,"thrown":false,"reach":false,"shallow":false,"spread":false,"category":"ballistic","equiped":false},"flags":{},"img":"systems/foundryvtt-shadows-over-sol/img/icons/weapons/usd-383.svg","effects":[],"_id":"U55o7zC4bKnqpXug"}

View File

@ -2,11 +2,11 @@
"name": "foundryvtt-shadows-over-sol", "name": "foundryvtt-shadows-over-sol",
"title": "Shadows over Sol", "title": "Shadows over Sol",
"description": "Shadows over Sol for FoundryVTT", "description": "Shadows over Sol for FoundryVTT",
"version": "0.0.13", "version": "0.0.20",
"manifestPlusVersion": "1.0.0", "manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.7.5", "minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.9", "compatibleCoreVersion": "0.7.9",
"templateVersion": 9, "templateVersion": 15,
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",
"esmodules": [ "module/sos-main.js" ], "esmodules": [ "module/sos-main.js" ],
"styles": ["styles/simple.css"], "styles": ["styles/simple.css"],
@ -31,6 +31,15 @@
"path": "./packs/consequences.db", "path": "./packs/consequences.db",
"entity": "Item", "entity": "Item",
"tags" : [ "consequence", "Consequences" ] "tags" : [ "consequence", "Consequences" ]
},
{
"name": "gears",
"label": "Gears",
"system": "foundryvtt-shadows-over-sol",
"module": "foundryvtt-shadows-over-sol",
"path": "./packs/gears.db",
"entity": "Item",
"tags" : [ "gear", "weapon", "armor" ]
}, },
{ {
"name": "combat-actions", "name": "combat-actions",

View File

@ -139,7 +139,8 @@
} }
}, },
"Item": { "Item": {
"types": ["gear", "weapon", "armor", "container", "skill", "language", "weakness", "geneline", "subculture", "consequence", "action", "injury", "malady" ], "types": ["gear", "weapon", "armor", "container", "skill", "language", "weakness", "geneline",
"subculture", "consequence", "action", "injury", "malady", "vehicle" ],
"templates": { "templates": {
"commongear": { "commongear": {
"big": 0, "big": 0,
@ -154,7 +155,8 @@
"description": "", "description": "",
"quantity": 0, "quantity": 0,
"costrating": 0, "costrating": 0,
"defensive": 0 "defensive": 0,
"containerid": ""
} }
}, },
"consequence": { "consequence": {
@ -198,7 +200,10 @@
"templates": [ "commongear" ], "templates": [ "commongear" ],
"area": 0, "area": 0,
"autofire": 0, "autofire": 0,
"damage": "", "damage_club": "",
"damage_hearth": "",
"damage_spade": "",
"damage_diamond": "",
"hands": 1, "hands": 1,
"pierce": 0, "pierce": 0,
"range": 0, "range": 0,
@ -208,7 +213,9 @@
"thrown": false, "thrown": false,
"reach": false, "reach": false,
"shallow": false, "shallow": false,
"spread": false "spread": false,
"category": "",
"equiped": false
}, },
"armor": { "armor": {
"templates": [ "commongear" ], "templates": [ "commongear" ],
@ -231,6 +238,7 @@
"action": { "action": {
"type": "", "type": "",
"minap": 0, "minap": 0,
"targetneeded": false,
"description": 0 "description": 0
}, },
"injury": { "injury": {

View File

@ -115,8 +115,8 @@
{{else}} {{else}}
<span class="skill-label"><a>{{skill.name}}</a></span> <span class="skill-label"><a>{{skill.name}}</a></span>
{{/if}} {{/if}}
<input class="skill-value" type="text" compname="{{skill.name}}" value="{{numberFormat skill.data.value decimals=0}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/> <input class="skill-value" type="text" skillname="{{skill.name}}" value="{{numberFormat skill.data.value decimals=0}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/>
<input class="skill-xp" type="text" compname="{{skill.name}}" value="{{skill.data.xp}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/> <input class="skill-xp" type="text" skillname="{{skill.name}}" value="{{skill.data.xp}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/>
<div class="item-controls"> <div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
@ -143,8 +143,8 @@
{{else}} {{else}}
<span class="skill-label"><a>{{skill.name}}</a></span> <span class="skill-label"><a>{{skill.name}}</a></span>
{{/if}} {{/if}}
<input class="skill-value" type="text" compname="{{skill.name}}" value="{{numberFormat skill.data.value decimals=0}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/> <input class="skill-value" type="text" skillname="{{skill.name}}" value="{{numberFormat skill.data.value decimals=0}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/>
<input class="skill-xp" type="text" compname="{{skill.name}}" value="{{skill.data.xp}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/> <input class="skill-xp" type="text" skillname="{{skill.name}}" value="{{skill.data.xp}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/>
<div class="item-controls"> <div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
@ -163,7 +163,7 @@
{{#each data.consequences as |conseq key|}} {{#each data.consequences as |conseq key|}}
<li class="item flexrow list-item" data-item-id="{{conseq._id}}"> <li class="item flexrow list-item" data-item-id="{{conseq._id}}">
<img class="sheet-skill-img" src="{{conseq.img}}"/> <img class="sheet-skill-img" src="{{conseq.img}}"/>
<span class="conseq-label"><a>{{conseq.name}}</a></span> <span class="conseq-label">{{conseq.name}}</span>
<select class="stat-value flexrow consequence-severity" type="text" name="conseq.data.severity" value="{{conseq.data.severity}}" data-dtype="String"> <select class="stat-value flexrow consequence-severity" type="text" name="conseq.data.severity" value="{{conseq.data.severity}}" data-dtype="String">
{{#select conseq.data.severity}} {{#select conseq.data.severity}}
<option value="none">None</option> <option value="none">None</option>
@ -184,8 +184,51 @@
{{!-- Gears Tab --}} {{!-- Gears Tab --}}
<div class="tab gears" data-group="primary" data-tab="gears"> <div class="tab gears" data-group="primary" data-tab="gears">
<div class="flex-group-left flexcol competence-column"> <div>
<h4>Total Encumbrance : {{data.totalEncumbrance}} / {{data.stats.strength.value}}</h4>
</div> </div>
<div><h4>Weapons</h4></div>
<ul class="item-list alternate-list">
{{#each data.weapons as |weapon key|}}
<li class="item flexrow list-item" data-item-id="{{weapon._id}}">
<img class="sheet-skill-img" src="{{weapon.img}}"/>
<span class="conseq-label"><a>{{weapon.name}}</a></span>
<div class="item-controls">
<a class="item-control item-equip" title="Equipped">{{#if weapon.data.equiped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<div><h4>Armors</h4></div>
<ul class="item-list alternate-list">
{{#each data.armors as |armor key|}}
<li class="item flexrow list-item" data-item-id="{{armor._id}}">
<img class="sheet-skill-img" src="{{armor.img}}"/>
<span class="conseq-label"><a>{{armor.name}}</a></span>
<div class="item-controls">
<a class="item-control item-worn" title="Worn">{{#if armor.data.worn}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<div><h4>Equipment/Gears</h4></div>
<ul class="item-list alternate-list">
{{#each data.gears as |gear key|}}
<li class="item flexrow list-item" data-item-id="{{gear._id}}">
<img class="sheet-skill-img" src="{{gear.img}}"/>
<span class="conseq-label"><a>{{gear.name}}</a></span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if armor.data.worn}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div> </div>

View File

@ -20,7 +20,7 @@
<hr> <hr>
<div class="tab" data-group="primary"> <div class="tab" data-group="primary">
<div class="flexrow"> <div class="flexrow">
<label for="categorie generic-label">Action in phase 3 (3 AP) </label> <label for="categorie generic-label">Phase 3 action (3 AP)</label>
<select name="action3" class='action-select' id="action3" data-dtype="number"> <select name="action3" class='action-select' id="action3" data-dtype="number">
{{#select action3}} {{#select action3}}
{{#each actionsList as |action key|}} {{#each actionsList as |action key|}}
@ -28,11 +28,20 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie generic-label">&nbsp;Target (optionnal) </label>
<select name="combatant3" class='action-select' id="combatant3" data-dtype="String">
{{#select combatant3}}
{{#each combatantsList as |combatant key|}}
<option value={{combatant._id}}>{{combatant.actor.data.name}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div> </div>
<div class="tab" data-group="primary"> <div class="tab" data-group="primary">
<div class="flexrow"> <div class="flexrow">
<label for="categorie generic-label">Action in phase 2 (2 AP) : </label> <label for="categorie generic-label">Phase 2 action (2 AP)</label>
<select name="action2" class='action-select' id="action2" data-dtype="number"> <select name="action2" class='action-select' id="action2" data-dtype="number">
{{#select action2}} {{#select action2}}
{{#each actionsList as |action key|}} {{#each actionsList as |action key|}}
@ -40,11 +49,20 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie generic-label">&nbsp;Target (optionnal) </label>
<select name="combatant2" class='action-select' id="combatant2" data-dtype="String">
{{#select combatant2}}
{{#each combatantsList as |combatant key|}}
<option value={{combatant._id}}>{{combatant.actor.data.name}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div> </div>
<div class="tab" data-group="primary"> <div class="tab" data-group="primary">
<div class="flexrow"> <div class="flexrow">
<label for="categorie generic-label">Action in phase 1 (1 AP) : </label> <label for="categorie generic-label">Phase 1 action (1 AP)</label>
<select name="action1" class='action-select' id="action1" data-dtype="number"> <select name="action1" class='action-select' id="action1" data-dtype="number">
{{#select action1}} {{#select action1}}
{{#each actionsList as |action key|}} {{#each actionsList as |action key|}}
@ -52,6 +70,15 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie generic-label">&nbsp;Target (optionnal) </label>
<select name="combatant1" class='action-select' id="combatant1" data-dtype="String">
{{#select combatant1}}
{{#each combatantsList as |combatant key|}}
<option value={{combatant._id}}>{{combatant.actor.data.name}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div> </div>
</section> </section>

View File

@ -2,25 +2,46 @@
<h2 class="compdialog" id="statSkillFlip">Flip Dialog !</h2> <h2 class="compdialog" id="statSkillFlip">Flip Dialog !</h2>
<div class="grid grid-2col">
<div class="flex-group-left flexcol skill-column">
{{#if (eq mode 'stat')}} {{#if (eq mode 'stat')}}
<h3 class="compdialog" id="flipSubTitle"> <h3 class="skill-label" id="flipSubTitle">
Stat Only Flip : {{localize stat.label}} ({{stat.value}}, {{stat.cardsuit}}) Stat Only Flip : {{localize stat.label}} : {{stat.value}} - <img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/{{stat.cardsuit}}.webp"/>
</h3> </h3>
<span>
<h3 class="skill-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
</span>
{{else}} {{else}}
<h3 class="compdialog" id="flipSubTitle"> <h3 class="skill-label" id="flipSubTitle">
Select Stat Select Stat
<select name="stat" id="statSelect" data-dtype="String"> <select name="stat" id="statSelect" data-dtype="String">
{{#select statList}} {{#select statList}}
{{#each statList as |stat key|}} {{#each statList as |stat key|}}
<option value={{key}}>{{localize stat.label}}</option> <option value={{key}}>{{localize stat.label}} : {{stat.value}} - {{stat.cardsuit}} </option>
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
</h3> </h3>
<h3 class="compdialog" id="flipSubTitle"> <span>
Skill Flip : {{skill.name}} ({{skill.data.value}}) <h3 class="skill-label" id="flipSubTitle">Skill Flip : {{skill.name}} ({{skill.data.value}}) </h3>
</h3> <h3 class="skill-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
</span>
{{/if}} {{/if}}
</div>
<div class="flex-group-left flexcol skill-column">
<div class="tab" data-group="primary">
<select name="consequenceSelect" id="consequenceSelect" data-dtype="String" multiple size="5" width="200">
{{#select consequencesList}}
{{#each consequencesList as |consequence key|}}
<option value={{consequence._id}}>{{localize consequence.name}} - {{consequence.data.severity}}</option>
{{/each}}
{{/select}}
</select>
<h3 class="skill-label" id="flipConsequenceMalus">Consequences malus : <span id='consequence-malus'>0</span> </h3>
</div>
</div>
</div>
<section class="sheet-body"> <section class="sheet-body">
<div class="tab" data-group="primary"> <div class="tab" data-group="primary">
@ -44,6 +65,7 @@
{{/select}} {{/select}}
</select> </select>
</div> </div>
</div>
<div id="flexrow"> <div id="flexrow">
<label class="generic-label">Click on deck to flip from deck, or click on the relevant Edge card to flip from it!</label> <label class="generic-label">Click on deck to flip from deck, or click on the relevant Edge card to flip from it!</label>
</div> </div>
@ -54,7 +76,6 @@
<div id="flexrow"> <div id="flexrow">
<label class="generic-label"></label> <label class="generic-label"></label>
</div> </div>
</div>
</section> </section>
</form> </form>

View File

@ -29,6 +29,10 @@
<label class="generic-label">Minimum Action Point cost</label> <label class="generic-label">Minimum Action Point cost</label>
<input type="text" name="data.minap" value="{{data.minap}}" data-dtype="Number"/> <input type="text" name="data.minap" value="{{data.minap}}" data-dtype="Number"/>
</div> </div>
<div class="flexrow">
<label class="generic-label">Target needed ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.targetneeded" {{checked data.targetneeded}}/></label>
</div>
<div class="flexcol"> <div class="flexcol">
<label class="generic-label">Description</label> <label class="generic-label">Description</label>
<div class="form-group medium-editor"> <div class="form-group medium-editor">

View File

@ -0,0 +1,42 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab" data-group="primary">
<div class="flexrow">
<label class="generic-label">Bulky</label>
<input type="text" name="data.bulky" value="{{data.bulky}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">DR</label>
<input type="text" name="data.dr" value="{{data.dr}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Gel</label>
<input type="text" name="data.gel" value="{{data.gel}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Reflect</label>
<input type="text" name="data.reflect" value="{{data.reflect}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Strength Bonus</label>
<input type="text" name="data.str" value="{{data.str}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Is VAC ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.vac" {{checked data.vac}}/></label>
</div>
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
</div>
</section>
</form>

View File

@ -0,0 +1,51 @@
<div class="flexrow">
<label class="generic-label">Big</label>
<input type="text" name="data.big" value="{{data.big}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Cost rating </label>
<input type="text" name="data.costrating" value="{{data.costrating}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Defensive </label>
<input type="text" name="data.defensive" value="{{data.defensive}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Quantity </label>
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Computer</label>
<input type="text" name="data.computer" value="{{data.computer}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Software</label>
<input type="text" name="data.software" value="{{data.software}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Conceal</label>
<input type="text" name="data.conceal" value="{{data.conceal}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Implant</label>
<input type="text" name="data.implant" value="{{data.implant}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Negligeable ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.neg" {{checked data.neg}}/></label>
</div>
<div class="flexrow">
<label class="generic-label">Military ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.mil" {{checked data.mil}}/></label>
</div>
<div class="flexrow">
<label class="generic-label">Worn ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.worn" {{checked data.worn}}/></label>
</div>
<div class="flexcol">
<label class="generic-label">Description</label>
<div class="form-group medium-editor">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</div>

View File

@ -0,0 +1,22 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab" data-group="primary">
<div class="flexrow">
<label class="generic-label">Container</label>
<input type="text" name="data.container" value="{{data.container}}" data-dtype="Number"/>
</div>
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
</div>
</section>
</form>

View File

@ -0,0 +1,17 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab" data-group="primary">
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
</div>
</section>
</form>

View File

@ -0,0 +1,42 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab" data-group="primary">
<div class="flexrow">
<label class="generic-label">Cruise</label>
<input type="text" name="data.cruise" value="{{data.cruise}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Defense</label>
<input type="text" name="data.defense" value="{{data.defense}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">DR</label>
<input type="text" name="data.dr" value="{{data.dr}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Handling</label>
<input type="text" name="data.handling" value="{{data.handling}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Shock</label>
<input type="text" name="data.shock" value="{{data.shock}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Structure</label>
<input type="text" name="data.structure" value="{{data.structure}}" data-dtype="Number"/>
</div>
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
</div>
</section>
</form>

View File

@ -0,0 +1,90 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab" data-group="primary">
<div class="flexrow">
<label class="generic-label">Category</label>
<select class="stat-value flexrow" type="text" name="data.category" value="{{data.category}}" data-dtype="String">
{{#select data.category}}
<option value="ballistic">Ballistic</option>
<option value="laser">Laser</option>
<option value="grenade">Grenade</option>
<option value="melee">Melee</option>
{{/select}}
</select>
</div>
<div class="flexrow">
<label class="generic-label">Damage : </label>
<img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/spade.webp" />
<input type="text" name="data.damage_spade" value="{{data.damage_spade}}" data-dtype="String"/>
<img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/hearth.webp" />
<input type="text" name="data.damage_hearth" value="{{data.damage_hearth}}" data-dtype="String"/>
<img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/diamond.webp" />
<input type="text" name="data.damage_diamond" value="{{data.damage_diamond}}" data-dtype="String"/>
<img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/club.webp" />
<input type="text" name="data.damage_club" value="{{data.damage_club}}" data-dtype="String"/>
</div>
<div class="flexrow">
<label class="generic-label">Range</label>
<input type="text" name="data.range" value="{{data.range}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Area</label>
<input type="text" name="data.area" value="{{data.area}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Shots</label>
<input type="text" name="data.shots" value="{{data.shots}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Autofire</label>
<input type="text" name="data.autofire" value="{{data.autofire}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Hands needed</label>
<input type="text" name="data.hands" value="{{data.hands}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Pierce</label>
<input type="text" name="data.pierce" value="{{data.pierce}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Reload</label>
<input type="text" name="data.reload" value="{{data.reload}}" data-dtype="Number"/>
</div>
<div class="flexrow">
<label class="generic-label">Stun ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.stun" {{checked data.stun}}/></label>
</div>
<div class="flexrow">
<label class="generic-label">Thrown ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.thrown" {{checked data.thrown}}/></label>
</div>
<div class="flexrow">
<label class="generic-label">Reach ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.reach" {{checked data.reach}}/></label>
</div>
<div class="flexrow">
<label class="generic-label">Shallow ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.shallow" {{checked data.shallow}}/></label>
</div>
<div class="flexrow">
<label class="generic-label">Spread ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.spread" {{checked data.spread}}/></label>
</div>
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
</div>
</section>
</form>