Upgrade
This commit is contained in:
parent
92f8fe4ee8
commit
42af291a7c
1
img/icons/armors/bulwak_armor.svg
Normal file
1
img/icons/armors/bulwak_armor.svg
Normal 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 |
1
img/icons/weapons/usd-1200.svg
Normal file
1
img/icons/weapons/usd-1200.svg
Normal 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 |
1
img/icons/weapons/usd-3200.svg
Normal file
1
img/icons/weapons/usd-3200.svg
Normal 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 |
1
img/icons/weapons/usd-383.svg
Normal file
1
img/icons/weapons/usd-383.svg
Normal 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 |
1
img/icons/weapons/usd-720.svg
Normal file
1
img/icons/weapons/usd-720.svg
Normal 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 |
@ -36,6 +36,11 @@ export class SoSActorSheet extends ActorSheet {
|
||||
if ( a.name > b.name ) 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.geneline = this.actor.data.items.find( item => item.type == 'geneline');
|
||||
data.data.editStatSkill = this.options.editStatSkill;
|
||||
@ -67,7 +72,17 @@ export class SoSActorSheet extends ActorSheet {
|
||||
const item = this.actor.getOwnedItem(li.data("item-id"));
|
||||
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
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
@ -83,6 +98,16 @@ export class SoSActorSheet extends ActorSheet {
|
||||
const skill = this.actor.getOwnedItem(li.data("item-id"));
|
||||
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) => {
|
||||
this.actor.resetDeckFull();
|
||||
this.render(true);
|
||||
@ -124,7 +149,6 @@ export class SoSActorSheet extends ActorSheet {
|
||||
return position;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
_updateObject(event, formData) {
|
||||
|
@ -128,7 +128,25 @@ export class SoSActor extends Actor {
|
||||
computeWound() {
|
||||
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() {
|
||||
// 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 ) {
|
||||
|
||||
@ -163,7 +204,9 @@ export class SoSActor extends Actor {
|
||||
stat: duplicate(this.data.data.stats[statKey]),
|
||||
actor: this,
|
||||
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);
|
||||
new SoSFlipDialog(flipData, html).render(true);
|
||||
@ -175,10 +218,12 @@ export class SoSActor extends Actor {
|
||||
let flipData = {
|
||||
mode: 'skill',
|
||||
statList: duplicate(this.data.data.stats),
|
||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||
skill: duplicate(skill),
|
||||
actor: this,
|
||||
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" }
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
|
||||
|
@ -220,9 +220,9 @@ export class SoSCardDeck {
|
||||
|
||||
// Compute final result and compare
|
||||
if ( flipData.mode == 'stat' ) {
|
||||
flipData.baseScore = flipData.stat.value;
|
||||
flipData.baseScore = flipData.stat.value + flipData.malusConsequence;
|
||||
} 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.magnitude = flipData.finalScore - flipData.tn;
|
||||
|
@ -47,7 +47,7 @@ export class SoSCombat extends Combat {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async nextTurn() {
|
||||
console.log("Goingo to phase !", this.phaseNumber );
|
||||
console.log("Going to phase !", this.phaseNumber );
|
||||
// Get all actions for this phase
|
||||
let phaseIndex = this.phaseNumber - 1;
|
||||
let actionList = [];
|
||||
|
@ -5,12 +5,14 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async create( combatId, combatantId, round, uniqId ) {
|
||||
|
||||
let combat = game.combats.get( combatId);
|
||||
|
||||
let combatActions = {
|
||||
actionsList: await SoSUtility.loadCompendium( 'foundryvtt-shadows-over-sol.combat-actions' ),
|
||||
actionPoints: SoSUtility.fillRange(0, 6),
|
||||
combatId: combatId,
|
||||
combatId: combatId,
|
||||
combatantId: combatantId,
|
||||
combatantsList: combat.data.combatants,
|
||||
uniqId: uniqId,
|
||||
round: round
|
||||
}
|
||||
@ -22,7 +24,7 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
|
||||
//console.log("ACTIONS", combatActions.actionsList );
|
||||
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} );
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -56,6 +58,10 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
let action2 = duplicate(this.combatActions.actionsList[action2Index]);
|
||||
let action1Index = $('#action1').val();
|
||||
let action1 = duplicate(this.combatActions.actionsList[action1Index]);
|
||||
|
||||
let combatant3Id = $('#combatant3').val();
|
||||
let combatant2Id = $('#combatant2').val();
|
||||
let combatant1Id = $('#combatant1').val();
|
||||
|
||||
let msgdata = {
|
||||
combatId: this.combatActions.combatId,
|
||||
@ -63,6 +69,7 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
uniqId: this.combatActions.uniqId,
|
||||
userId: game.userId,
|
||||
phaseArray: [ action1, action2, action3],
|
||||
targetArray: [ combatant1Id, combatant2Id, combatant3Id],
|
||||
remainingAP: ap
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { SoSUtility } from "./sos-utility.js";
|
||||
|
||||
export class SoSFlipDialog extends Dialog {
|
||||
|
||||
@ -11,7 +12,7 @@ export class SoSFlipDialog extends Dialog {
|
||||
},
|
||||
default: 'flip'
|
||||
};
|
||||
super(conf, { classes: ["sosdialog"], width: 800, height: 800 });
|
||||
super(conf, { classes: ["sosdialog"], width: 800 });
|
||||
|
||||
this.flipData = flipData;
|
||||
}
|
||||
@ -21,15 +22,32 @@ export class SoSFlipDialog extends Dialog {
|
||||
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 ) {
|
||||
console.log("UPDATE !!!", flipData);
|
||||
//console.log("UPDATE !!!", flipData);
|
||||
$('.view-deck').remove();
|
||||
$("#view-deck").append(await flipData.actor.cardDeck.getDeckHTML());
|
||||
|
||||
$('.view-edge').remove();
|
||||
$("#view-edge").append(await flipData.actor.cardDeck.getEdgeHTML());
|
||||
|
||||
this.updateScoreBase();
|
||||
|
||||
$('.edge-card').click((event) => {
|
||||
let flipData = duplicate(this.flipData);
|
||||
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) {
|
||||
super.activateListeners(html);
|
||||
@ -64,6 +96,14 @@ export class SoSFlipDialog extends Dialog {
|
||||
// Setup everything 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) => {
|
||||
let flipData = duplicate(this.flipData);
|
||||
flipData.modifier = html.find('#modifier').val();
|
||||
|
@ -2,7 +2,10 @@
|
||||
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() {
|
||||
@ -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-geneline-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'
|
||||
]
|
||||
@ -82,6 +87,23 @@ import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js";
|
||||
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) {
|
||||
let uniqId = event.currentTarget.attributes['data-uniq-id'].value;
|
||||
|
6
packs/gears.db
Normal file
6
packs/gears.db
Normal 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 “Windowmaker” Heavy Pistol is sure to leave you standing and your enemies taking a dirt nap. A long-time favorite of bounty hunters and security forces the Sol system over, this sleek .50 caliber handgun is now available on the open market! Order yours today!</p>\n<p> </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 “Bulwark” Ballistic Suit stops bullets in their tracks. Utilizing Utakar’s proprietary Shell-StopperTM gel technology, the Bulwark hardens upon impact, distributing the kinetic force of the impact throughout the body. Self-sealing gel closes in seconds. Designer pockets fit most common magazines. It is available in black, charcoal, rosewood and navy.</p>\n<p> </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 “Aegis” 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> </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’re on the go, the USD-1200 “Amazon” Light Rifle has beendesigned from the ground up for easy transportation and assembly. With balancing range, magazine capacity and ease of maintenance, the Amazon gets the job done. Satisfaction guaranteed. Some assembly required.</p>\n<p> </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 “Valkyrie” Heavy Rifle is a masterpiece of twenty-third century engi-neering, combined with sleek twenty-second century ascetics. Own the best-designed and best-looking heavy rifle on the market! It comes with two autofire settings and a designer gun case. Remember, Valkyrie means quality.</p>\n<p> </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 “Wasp” Light Pistol is ready to lock and load! Take aim at your favorite shooting range or when your life is in danger. The gun is small enough to fit most holsters or to slip into a purse! It comes with patent-pending rubberized grip and is available in gun barrel gray, matte black, racing stripe red or powder pink. </p>\n<p> </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"}
|
13
system.json
13
system.json
@ -2,11 +2,11 @@
|
||||
"name": "foundryvtt-shadows-over-sol",
|
||||
"title": "Shadows over Sol",
|
||||
"description": "Shadows over Sol for FoundryVTT",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.20",
|
||||
"manifestPlusVersion": "1.0.0",
|
||||
"minimumCoreVersion": "0.7.5",
|
||||
"compatibleCoreVersion": "0.7.9",
|
||||
"templateVersion": 9,
|
||||
"templateVersion": 15,
|
||||
"author": "LeRatierBretonnien",
|
||||
"esmodules": [ "module/sos-main.js" ],
|
||||
"styles": ["styles/simple.css"],
|
||||
@ -31,6 +31,15 @@
|
||||
"path": "./packs/consequences.db",
|
||||
"entity": "Item",
|
||||
"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",
|
||||
|
@ -139,7 +139,8 @@
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"commongear": {
|
||||
"big": 0,
|
||||
@ -154,7 +155,8 @@
|
||||
"description": "",
|
||||
"quantity": 0,
|
||||
"costrating": 0,
|
||||
"defensive": 0
|
||||
"defensive": 0,
|
||||
"containerid": ""
|
||||
}
|
||||
},
|
||||
"consequence": {
|
||||
@ -198,7 +200,10 @@
|
||||
"templates": [ "commongear" ],
|
||||
"area": 0,
|
||||
"autofire": 0,
|
||||
"damage": "",
|
||||
"damage_club": "",
|
||||
"damage_hearth": "",
|
||||
"damage_spade": "",
|
||||
"damage_diamond": "",
|
||||
"hands": 1,
|
||||
"pierce": 0,
|
||||
"range": 0,
|
||||
@ -208,7 +213,9 @@
|
||||
"thrown": false,
|
||||
"reach": false,
|
||||
"shallow": false,
|
||||
"spread": false
|
||||
"spread": false,
|
||||
"category": "",
|
||||
"equiped": false
|
||||
},
|
||||
"armor": {
|
||||
"templates": [ "commongear" ],
|
||||
@ -231,6 +238,7 @@
|
||||
"action": {
|
||||
"type": "",
|
||||
"minap": 0,
|
||||
"targetneeded": false,
|
||||
"description": 0
|
||||
},
|
||||
"injury": {
|
||||
|
@ -115,8 +115,8 @@
|
||||
{{else}}
|
||||
<span class="skill-label"><a>{{skill.name}}</a></span>
|
||||
{{/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-xp" type="text" compname="{{skill.name}}" value="{{skill.data.xp}}" 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" skillname="{{skill.name}}" value="{{skill.data.xp}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/>
|
||||
<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-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
@ -143,8 +143,8 @@
|
||||
{{else}}
|
||||
<span class="skill-label"><a>{{skill.name}}</a></span>
|
||||
{{/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-xp" type="text" compname="{{skill.name}}" value="{{skill.data.xp}}" 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" skillname="{{skill.name}}" value="{{skill.data.xp}}" data-dtype="number" {{#unless @root.data.editStatSkill}}disabled{{/unless}}/>
|
||||
<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-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
@ -163,7 +163,7 @@
|
||||
{{#each data.consequences as |conseq key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{conseq._id}}">
|
||||
<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 conseq.data.severity}}
|
||||
<option value="none">None</option>
|
||||
@ -184,8 +184,51 @@
|
||||
|
||||
{{!-- Gears Tab --}}
|
||||
<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><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>
|
||||
|
||||
|
||||
|
@ -20,19 +20,28 @@
|
||||
<hr>
|
||||
<div class="tab" data-group="primary">
|
||||
<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 action3}}
|
||||
{{#each actionsList as |action key|}}
|
||||
<option value={{key}} {{#if (eq action.name "No Action")}}selected{{/if}}>{{action.name}} (min AP : {{action.data.minap}})</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</select>
|
||||
<label for="categorie generic-label"> 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 class="tab" data-group="primary">
|
||||
<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 action2}}
|
||||
{{#each actionsList as |action key|}}
|
||||
@ -40,18 +49,36 @@
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<label for="categorie generic-label"> 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 class="tab" data-group="primary">
|
||||
<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 action1}}
|
||||
{{#each actionsList as |action key|}}
|
||||
<option value={{key}} {{#if (eq action.name "No Action")}}selected{{/if}}>{{action.name}} (min AP : {{action.data.minap}})</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</select>
|
||||
<label for="categorie generic-label"> 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>
|
||||
|
||||
</section>
|
||||
|
@ -2,25 +2,46 @@
|
||||
|
||||
<h2 class="compdialog" id="statSkillFlip">Flip Dialog !</h2>
|
||||
|
||||
{{#if (eq mode 'stat')}}
|
||||
<h3 class="compdialog" id="flipSubTitle">
|
||||
Stat Only Flip : {{localize stat.label}} ({{stat.value}}, {{stat.cardsuit}})
|
||||
</h3>
|
||||
{{else}}
|
||||
<h3 class="compdialog" id="flipSubTitle">
|
||||
Select Stat
|
||||
<select name="stat" id="statSelect" data-dtype="String">
|
||||
{{#select statList}}
|
||||
{{#each statList as |stat key|}}
|
||||
<option value={{key}}>{{localize stat.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</h3>
|
||||
<h3 class="compdialog" id="flipSubTitle">
|
||||
Skill Flip : {{skill.name}} ({{skill.data.value}})
|
||||
</h3>
|
||||
{{/if}}
|
||||
<div class="grid grid-2col">
|
||||
|
||||
<div class="flex-group-left flexcol skill-column">
|
||||
{{#if (eq mode 'stat')}}
|
||||
<h3 class="skill-label" id="flipSubTitle">
|
||||
Stat Only Flip : {{localize stat.label}} : {{stat.value}} - <img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/{{stat.cardsuit}}.webp"/>
|
||||
</h3>
|
||||
<span>
|
||||
<h3 class="skill-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
|
||||
</span>
|
||||
{{else}}
|
||||
<h3 class="skill-label" id="flipSubTitle">
|
||||
Select Stat
|
||||
<select name="stat" id="statSelect" data-dtype="String">
|
||||
{{#select statList}}
|
||||
{{#each statList as |stat key|}}
|
||||
<option value={{key}}>{{localize stat.label}} : {{stat.value}} - {{stat.cardsuit}} </option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</h3>
|
||||
<span>
|
||||
<h3 class="skill-label" id="flipSubTitle">Skill Flip : {{skill.name}} ({{skill.data.value}}) </h3>
|
||||
<h3 class="skill-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
|
||||
</span>
|
||||
{{/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">
|
||||
<div class="tab" data-group="primary">
|
||||
@ -32,7 +53,7 @@
|
||||
<option value={{key}} {{#if (eq key 10)}}selected{{/if}}>{{numberFormat key decimals=0 sign=false}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<label for="categorie generic-label">Flip Modifier</label>
|
||||
@ -42,18 +63,18 @@
|
||||
<option value={{key}} {{#if (eq key 0)}}selected{{/if}}>{{numberFormat key decimals=0 sign=true}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div id="flexrow">
|
||||
<span class="class-view-deck" id="view-deck"></span>
|
||||
<span class="class-view-edge" id="view-edge"></span>
|
||||
</div>
|
||||
<div id="flexrow">
|
||||
<label class="generic-label"></label>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div id="flexrow">
|
||||
<span class="class-view-deck" id="view-deck"></span>
|
||||
<span class="class-view-edge" id="view-edge"></span>
|
||||
</div>
|
||||
<div id="flexrow">
|
||||
<label class="generic-label"></label>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
@ -29,6 +29,10 @@
|
||||
<label class="generic-label">Minimum Action Point cost</label>
|
||||
<input type="text" name="data.minap" value="{{data.minap}}" data-dtype="Number"/>
|
||||
</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">
|
||||
<label class="generic-label">Description</label>
|
||||
<div class="form-group medium-editor">
|
||||
|
42
templates/item-armor-sheet.html
Normal file
42
templates/item-armor-sheet.html
Normal 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>
|
51
templates/item-commongear-sheet.html
Normal file
51
templates/item-commongear-sheet.html
Normal 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>
|
||||
|
22
templates/item-container-sheet.html
Normal file
22
templates/item-container-sheet.html
Normal 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>
|
17
templates/item-gear-sheet.html
Normal file
17
templates/item-gear-sheet.html
Normal 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>
|
42
templates/item-vehicle-sheet.html
Normal file
42
templates/item-vehicle-sheet.html
Normal 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>
|
90
templates/item-weapon-sheet.html
Normal file
90
templates/item-weapon-sheet.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user