Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
fef3e44941 | |||
15e249e41e | |||
a3b6908a17 | |||
6e5bb5da32 | |||
29ff86f4bd | |||
aa243a7b80 | |||
c061b67bb3 | |||
c6c8622552 | |||
f6104e533c | |||
23b6a41eac | |||
f0c5e7b95d | |||
4b9af6a383 | |||
d94c1a4dce | |||
bef1750231 | |||
1f0506f5c2 | |||
e52b62a314 | |||
9551b2a050 |
@ -6,11 +6,11 @@
|
||||
import { SoSUtility } from "./sos-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class SoSActorSheet extends ActorSheet {
|
||||
export class SoSActorSheet extends foundry.appv1.sheets.ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["sos", "sheet", "actor"],
|
||||
template: "systems/foundryvtt-shadows-over-sol/templates/actor-sheet.html",
|
||||
width: 640,
|
||||
@ -22,8 +22,8 @@ export class SoSActorSheet extends ActorSheet {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getData() {
|
||||
const objectData = SoSUtility.data(this.object);
|
||||
async getData() {
|
||||
const objectData = this.object
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: objectData.id,
|
||||
@ -32,8 +32,11 @@ export class SoSActorSheet extends ActorSheet {
|
||||
name: objectData.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
data: foundry.utils.deepClone(this.object.data),
|
||||
data: foundry.utils.deepClone(this.object.system),
|
||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
||||
history: await TextEditor.enrichHTML(this.object.system.history, {async: true}),
|
||||
notes: await TextEditor.enrichHTML(this.object.system.notes, {async: true}),
|
||||
gmnotes: await TextEditor.enrichHTML(this.object.system.gmnotes, {async: true}),
|
||||
limited: this.object.limited,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner
|
||||
@ -44,52 +47,52 @@ export class SoSActorSheet extends ActorSheet {
|
||||
formData.edgecard = this.actor.getEdgesCard();
|
||||
formData.deckSize = this.actor.getDeckSize();
|
||||
|
||||
formData.skills = this.actor.data.items.filter( item => item.type == 'skill').sort( (a, b) => {
|
||||
formData.skills = this.actor.items.filter( item => item.type == 'skill').sort( (a, b) => {
|
||||
if ( a.name > b.name ) return 1;
|
||||
return -1;
|
||||
});
|
||||
|
||||
|
||||
formData.skill1 = formData.skills.slice(0, Math.ceil(formData.skills.length/2) )
|
||||
formData.skill2 = formData.skills.slice(Math.ceil(formData.skills.length/2), formData.skills.length )
|
||||
formData.consequences = this.actor.data.items.filter( item => item.type == 'consequence').sort( (a, b) => {
|
||||
formData.consequences = this.actor.items.filter( item => item.type == 'consequence').sort( (a, b) => {
|
||||
if ( a.name > b.name ) return 1;
|
||||
return -1;
|
||||
});
|
||||
formData.gears = this.actor.data.items.filter( item => item.type == 'gear').concat( this.actor.data.items.filter( item => item.type == 'container') );
|
||||
formData.gears = this.actor.items.filter( item => item.type == 'gear').concat( this.actor.items.filter( item => item.type == 'container') );
|
||||
|
||||
// Build the gear tree
|
||||
formData.gearsRoot = formData.gears.filter(item => item.data.data.containerid == "");
|
||||
for ( let container of formData.gearsRoot) {
|
||||
formData.gearsRoot = formData.gears.filter(item => item.system.containerid == "");
|
||||
for ( let container of formData.gearsRoot) {
|
||||
if ( container.type == 'container') {
|
||||
container.data.contains = []
|
||||
container.data.containerEnc = 0;
|
||||
container.system.contains = []
|
||||
container.system.containerEnc = 0;
|
||||
for (let gear of formData.gears) {
|
||||
console.log("GEAR", gear, container)
|
||||
if ( gear.data.data.containerid == container.id) {
|
||||
container.data.contains.push( gear )
|
||||
if ( !gear.data.data.neg && !gear.data.data.software ) {
|
||||
container.data.containerEnc += (gear.data.data.big > 0) ? gear.data.data.big : 1;
|
||||
if ( gear.system.containerid == container.id) {
|
||||
container.system.contains.push( gear )
|
||||
if ( !gear.system.neg && !gear.system.software ) {
|
||||
container.system.containerEnc += (gear.system.big > 0) ? gear.system.big : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
formData.weapons = this.actor.data.items.filter( item => item.type == 'weapon');
|
||||
formData.armors = this.actor.data.items.filter( item => item.type == 'armor');
|
||||
formData.totalEncumbrance = SoSUtility.computeEncumbrance(this.actor.data.items);
|
||||
formData.wounds = duplicate(this.actor.data.data.wounds);
|
||||
formData.weapons = this.actor.items.filter( item => item.type == 'weapon');
|
||||
formData.armors = this.actor.items.filter( item => item.type == 'armor');
|
||||
formData.totalEncumbrance = SoSUtility.computeEncumbrance(this.actor.items);
|
||||
formData.wounds = foundry.utils.duplicate(this.actor.system.wounds);
|
||||
formData.isGM = game.user.isGM;
|
||||
formData.currentWounds = this.actor.computeCurrentWounds();
|
||||
formData.totalWounds = this.actor.data.data.scores.wound.value;
|
||||
formData.totalWounds = this.actor.system.scores.wound.value;
|
||||
|
||||
formData.subcultureList = this.actor.data.items.filter( item => item.type == 'subculture');
|
||||
formData.subcultureList = this.actor.items.filter( item => item.type == 'subculture');
|
||||
if ( formData.subculture != "" ) { // background.subculture contains the main subculture ID
|
||||
formData.mainSubculture = formData.subcultureList.find( subc => subc._id == data.data.subculture);
|
||||
formData.mainSubculture = formData.subcultureList.find( subc => subc._id == this.actor.system.subculture);
|
||||
}
|
||||
formData.languageList = this.actor.data.items.filter( item => item.type == 'language');
|
||||
formData.weaknessList = this.actor.data.items.filter( item => item.type == 'weakness');
|
||||
formData.geneline = this.actor.data.items.find( item => item.type == 'geneline');
|
||||
formData.languageList = this.actor.items.filter( item => item.type == 'language');
|
||||
formData.weaknessList = this.actor.items.filter( item => item.type == 'weakness');
|
||||
formData.geneline = this.actor.items.find( item => item.type == 'geneline');
|
||||
formData.editStatSkill = this.options.editStatSkill;
|
||||
|
||||
console.log("stats", formData);
|
||||
@ -122,7 +125,7 @@ export class SoSActorSheet extends ActorSheet {
|
||||
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");
|
||||
@ -157,7 +160,7 @@ export class SoSActorSheet extends ActorSheet {
|
||||
let woundName = event.currentTarget.attributes.woundname.value;
|
||||
//console.log("Competence changed :", skillName);
|
||||
this.actor.updateWound(woundName, parseInt(event.target.value));
|
||||
});
|
||||
});
|
||||
html.find('.reset-deck-full').click((event) => {
|
||||
this.actor.resetDeckFull();
|
||||
this.render(true);
|
||||
@ -178,19 +181,19 @@ export class SoSActorSheet extends ActorSheet {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
const item = this.actor.items.get(li.data("item-id"));
|
||||
let severity = $(event.currentTarget).val();
|
||||
this.actor.updateEmbeddedDocuments( "Item", [ { _id: item.id, 'data.severity': severity} ] );
|
||||
this.actor.updateEmbeddedDocuments( "Item", [ { _id: item.id, 'system.severity': severity} ] );
|
||||
this.render(true);
|
||||
});
|
||||
html.find('.lock-unlock-sheet').click((event) => {
|
||||
this.options.editStatSkill = !this.options.editStatSkill;
|
||||
this.render(true);
|
||||
});
|
||||
});
|
||||
html.find('.item-link a').click((event) => {
|
||||
const itemId = $(event.currentTarget).data("item-id");
|
||||
const item = this.actor.getOwnedItem(itemId);
|
||||
item.sheet.render(true);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -200,7 +203,7 @@ export class SoSActorSheet extends ActorSheet {
|
||||
super._onDrop(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
setPosition(options = {}) {
|
||||
|
234
module/actor.js
234
module/actor.js
@ -14,8 +14,8 @@ export class SoSActor extends Actor {
|
||||
/**
|
||||
* Override the create() function to provide additional SoS functionality.
|
||||
*
|
||||
* This overrided create() function adds initial items
|
||||
* Namely: Basic skills, money,
|
||||
* This overrided create() function adds initial items
|
||||
* Namely: Basic skills, money,
|
||||
*
|
||||
* @param {Object} data Barebones actor data which this function adds onto.
|
||||
* @param {Object} options (Unused) Additional options which customize the creation workflow.
|
||||
@ -61,24 +61,24 @@ export class SoSActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
checkDeck() {
|
||||
if ( !this.cardDeck && this.hasPlayerOwner ) {
|
||||
this.cardDeck = new SoSCardDeck();
|
||||
this.cardDeck.initCardDeck( this, this.data.data.internals.deck );
|
||||
}
|
||||
if ( !this.system.cardDeck && this.hasPlayerOwner ) {
|
||||
this.system.cardDeck = new SoSCardDeck();
|
||||
this.system.cardDeck.initCardDeck( this, this.system.internals.deck );
|
||||
}
|
||||
if ( !this.hasPlayerOwner ) {
|
||||
this.cardDeck = game.system.sos.gmDeck.GMdeck;
|
||||
console.log("DECK : ", this.cardDeck);
|
||||
this.system.cardDeck = game.system.sos.gmDeck.GMdeck;
|
||||
console.log("DECK : ", this.system.cardDeck);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getDeckSize() {
|
||||
return this.cardDeck.getDeckSize();
|
||||
return this.system.cardDeck.getDeckSize();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getEdgesCard( ) {
|
||||
let edgesCard = duplicate(this.cardDeck.data.cardEdge);
|
||||
let edgesCard = foundry.utils.duplicate(this.system.cardDeck.data.cardEdge);
|
||||
for (let edge of edgesCard) {
|
||||
edge.path = `systems/foundryvtt-shadows-over-sol/img/cards/${edge.cardName}.webp`
|
||||
}
|
||||
@ -86,36 +86,36 @@ export class SoSActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
resetDeckFull( ) {
|
||||
this.cardDeck.shuffleDeck();
|
||||
this.cardDeck.drawEdge( this.data.data.scores.edge.value );
|
||||
this.system.cardDeck.shuffleDeck();
|
||||
this.system.cardDeck.drawEdge( this.system.scores.edge.value );
|
||||
this.saveDeck();
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
drawNewEdge( ) {
|
||||
this.cardDeck.drawEdge( 1 );
|
||||
drawNewEdge( ) {
|
||||
this.system.cardDeck.drawEdge( 1 );
|
||||
this.saveDeck();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
discardEdge( cardName ) {
|
||||
this.cardDeck.discardEdge( cardName );
|
||||
discardEdge( cardName ) {
|
||||
this.system.cardDeck.discardEdge( cardName );
|
||||
this.saveDeck();
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
resetDeck( ) {
|
||||
this.cardDeck.resetDeck();
|
||||
this.system.cardDeck.resetDeck();
|
||||
this.saveDeck();
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
saveDeck( ) {
|
||||
let deck = { deck: duplicate(this.cardDeck.data.deck),
|
||||
discard: duplicate(this.cardDeck.data.discard),
|
||||
cardEdge: duplicate(this.cardDeck.data.cardEdge)
|
||||
let deck = { deck: foundry.utils.duplicate(this.system.cardDeck.data.deck),
|
||||
discard: foundry.utils.duplicate(this.system.cardDeck.data.discard),
|
||||
cardEdge: foundry.utils.duplicate(this.system.cardDeck.data.cardEdge)
|
||||
}
|
||||
if ( this.hasPlayerOwner ) {
|
||||
this.update( { 'data.internals.deck': deck });
|
||||
this.update( { 'system.internals.deck': deck });
|
||||
} else {
|
||||
game.settings.set("foundryvtt-shadows-over-sol", "gmDeck", deck );
|
||||
}
|
||||
@ -123,68 +123,68 @@ export class SoSActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getDefense( ) {
|
||||
return this.data.data.scores.defense;
|
||||
}
|
||||
return this.system.scores.defense;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
computeDefense() {
|
||||
return { value: Math.ceil((this.data.data.stats.speed.value + this.data.data.stats.perception.value + this.data.data.stats.dexterity.value) / 2) + this.data.data.scores.defense.bonusmalus,
|
||||
critical: this.data.data.stats.speed.value + this.data.data.stats.perception.value + this.data.data.stats.dexterity.value + this.data.data.scores.defense.bonusmalus
|
||||
return { value: Math.ceil((this.system.stats.speed.value + this.system.stats.perception.value + this.system.stats.dexterity.value) / 2) + this.system.scores.defense.bonusmalus,
|
||||
critical: this.system.stats.speed.value + this.system.stats.perception.value + this.system.stats.dexterity.value + this.system.scores.defense.bonusmalus
|
||||
}
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getEdge( ) {
|
||||
return this.data.data.scores.edge.value;
|
||||
}
|
||||
return this.system.scores.edge.value;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getEncumbrance( ) {
|
||||
return this.data.data.scores.encumbrance.value;
|
||||
}
|
||||
return this.system.scores.encumbrance.value;
|
||||
}
|
||||
computeEncumbrance( ) {
|
||||
return this.data.data.stats.strength.value + this.data.data.scores.encumbrance.bonusmalus;
|
||||
return this.system.stats.strength.value + this.system.scores.encumbrance.bonusmalus;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
computeEdge( ) {
|
||||
return Math.ceil( (this.data.data.stats.intelligence.value + this.data.data.stats.charisma.value) / 2) + this.data.data.scores.edge.bonusmalus;
|
||||
return Math.ceil( (this.system.stats.intelligence.value + this.system.stats.charisma.value) / 2) + this.system.scores.edge.bonusmalus;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getShock( ) {
|
||||
return this.data.data.scores.shock.value;
|
||||
return this.system.scores.shock.value;
|
||||
}
|
||||
computeShock() {
|
||||
return Math.ceil( this.data.data.stats.endurance.value + this.data.data.stats.determination.value + this.data.data.scores.dr.value) + this.data.data.scores.shock.bonusmalus;
|
||||
return Math.ceil( this.system.stats.endurance.value + this.system.stats.determination.value + this.system.scores.dr.value) + this.system.scores.shock.bonusmalus;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getWound( ) {
|
||||
return this.data.data.scores.wound.value;
|
||||
return this.system.scores.wound.value;
|
||||
}
|
||||
computeWound() {
|
||||
return Math.ceil( (this.data.data.stats.strength.value + this.data.data.stats.endurance.value) / 2) + this.data.data.scores.wound.bonusmalus;
|
||||
return Math.ceil( (this.system.stats.strength.value + this.system.stats.endurance.value) / 2) + this.system.scores.wound.bonusmalus;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getSkillExperience( skillName ) {
|
||||
return this.data.items.filter( item => item.type == 'skillexperience' && item.data.skill == skillName);
|
||||
return this.items.filter( item => item.type == 'skillexperience' && item.system.skill == skillName);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async wornObject( itemID) {
|
||||
let item = this.items.get(itemID);
|
||||
if (item && item.data.data) {
|
||||
let update = { _id: item.id, "data.worn": !item.data.data.worn };
|
||||
if (item?.system) {
|
||||
let update = { _id: item.id, "system.worn": !item.system.worn };
|
||||
await this.updateEmbeddedDocuments("Item", [update]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async equipObject(itemID) {
|
||||
let item = this.items.get(itemID)
|
||||
if (item && item.data.data) {
|
||||
let update = { _id: item.id, "data.equiped": !item.data.data.equiped };
|
||||
if (item?.system) {
|
||||
let update = { _id: item.id, "system.equiped": !item.system.equiped };
|
||||
await this.updateEmbeddedDocuments("Item", [update]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async controlScores() {
|
||||
// Defense check
|
||||
@ -198,7 +198,7 @@ export class SoSActor extends Actor {
|
||||
await this.update( {'data.scores.edge.value': this.computeEdge()});
|
||||
}
|
||||
// Encumbrance
|
||||
if ( this.getEncumbrance() != this.data.data.stats.strength.value ) {
|
||||
if ( this.getEncumbrance() != this.system.stats.strength.value ) {
|
||||
await this.update( {'data.scores.encumbrance.value': this.computeEncumbrance() });
|
||||
}
|
||||
// Shock
|
||||
@ -213,31 +213,31 @@ export class SoSActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async updateWound(woundName, value) {
|
||||
let wounds = duplicate(this.data.data.wounds)
|
||||
let wounds = foundry.utils.duplicate(this.system.wounds)
|
||||
wounds[woundName] = value;
|
||||
await this.update( { 'data.wounds': wounds } );
|
||||
await this.update( { 'system.wounds': wounds } );
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async updateSkill(skillName, value) {
|
||||
let skill = this.data.items.find( item => item.name == skillName);
|
||||
let skill = this.items.find( item => item.name == skillName);
|
||||
if (skill) {
|
||||
const update = { _id: skill.id, 'data.value': value };
|
||||
const update = { _id: skill.id, 'system.value': value };
|
||||
const updated = await this.updateEmbeddedDocuments("Item", [ update] ); // Updates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async updateSkillExperience(skillName, value) {
|
||||
let skill = this.data.items.find( item => item.name == skillName);
|
||||
let skill = this.items.find( item => item.name == skillName);
|
||||
if (skill) {
|
||||
const update = { _id: skill.id, 'data.xp': value };
|
||||
const update = { _id: skill.id, 'system.xp': value };
|
||||
const updated = await this.updateEmbeddedDocuments("Item", [update]); // Updates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getApplicableConsequences( ) {
|
||||
let consequences = this.data.items.filter( item => item.type == 'consequence' && item.data.severity != 'none');
|
||||
let consequences = this.items.filter( item => item.type == 'consequence' && item.system.severity != 'none');
|
||||
return consequences;
|
||||
}
|
||||
|
||||
@ -246,31 +246,31 @@ export class SoSActor extends Actor {
|
||||
|
||||
let flipData = {
|
||||
mode: 'stat',
|
||||
stat: duplicate(this.data.data.stats[statKey]),
|
||||
stat: foundry.utils.duplicate(this.system.stats[statKey]),
|
||||
actor: this,
|
||||
modifierList: SoSUtility.fillRange(-10, +10),
|
||||
tnList: SoSUtility.fillRange(6, 20),
|
||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||
weaknessList: this.data.items.filter( item => item.type == 'weakness' ),
|
||||
wounds: duplicate( this.data.data.wounds),
|
||||
consequencesList: foundry.utils.duplicate( this.getApplicableConsequences() ),
|
||||
weaknessList: this.items.filter( item => item.type == 'weakness' ),
|
||||
wounds: foundry.utils.duplicate( this.system.wounds),
|
||||
malusConsequence: 0,
|
||||
bonusConsequence: 0,
|
||||
woundMalus: 0
|
||||
}
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
|
||||
new SoSFlipDialog(flipData, html).render(true);
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollSkill( skill ) {
|
||||
let flipData = {
|
||||
mode: 'skill',
|
||||
statList: duplicate(this.data.data.stats),
|
||||
statList: foundry.utils.duplicate(this.system.stats),
|
||||
selectedStat: 'strength',
|
||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||
wounds: duplicate( this.data.data.wounds),
|
||||
consequencesList: foundry.utils.duplicate( this.getApplicableConsequences() ),
|
||||
wounds: foundry.utils.duplicate( this.system.wounds),
|
||||
skillExperienceList: this.getSkillExperience( skill.name),
|
||||
skill: duplicate(skill),
|
||||
skill: foundry.utils.duplicate(skill),
|
||||
actor: this,
|
||||
modifierList: SoSUtility.fillRange(-10, +10),
|
||||
tnList: SoSUtility.fillRange(6, 20),
|
||||
@ -280,35 +280,35 @@ export class SoSActor extends Actor {
|
||||
bonusSkillXP: 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);
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
|
||||
new SoSFlipDialog(flipData, html).render(true);
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollWeapon( weapon ) {
|
||||
let target = SoSUtility.getTarget();
|
||||
let skill, selectedStatName;
|
||||
if ( weapon.data.data.category == 'ballistic' || weapon.data.data.category == 'laser' ) {
|
||||
skill = this.data.items.find( item => item.name == 'Guns');
|
||||
if ( weapon.system.category == 'ballistic' || weapon.system.category == 'laser' ) {
|
||||
skill = this.items.find( item => item.name == 'Guns');
|
||||
selectedStatName = 'dexterity';
|
||||
} else if ( weapon.data.data.category == 'melee' ) {
|
||||
skill = this.data.items.find( item => item.name == 'Melee');
|
||||
} else if ( weapon.system.category == 'melee' ) {
|
||||
skill = this.items.find( item => item.name == 'Melee');
|
||||
selectedStatName = 'dexterity';
|
||||
} else if ( weapon.data.data.category == 'grenade' ) {
|
||||
skill = this.data.items.find( item => item.name == 'Athletics');
|
||||
} else if ( weapon.system.category == 'grenade' ) {
|
||||
skill = this.items.find( item => item.name == 'Athletics');
|
||||
selectedStatName = 'dexterity';
|
||||
}
|
||||
|
||||
let flipData = {
|
||||
mode: 'weapon',
|
||||
weapon: duplicate(weapon.data),
|
||||
statList: duplicate(this.data.data.stats),
|
||||
weapon: foundry.utils.duplicate(weapon),
|
||||
statList: foundry.utils.duplicate(this.system.stats),
|
||||
target: target,
|
||||
selectedStat: selectedStatName,
|
||||
consequencesList: duplicate( this.getApplicableConsequences() ),
|
||||
consequencesList: foundry.utils.duplicate( this.getApplicableConsequences() ),
|
||||
skillExperienceList: this.getSkillExperience( skill.name),
|
||||
wounds: duplicate( this.data.data.wounds),
|
||||
skill: duplicate(skill),
|
||||
wounds: foundry.utils.duplicate( this.system.wounds),
|
||||
skill: foundry.utils.duplicate(skill),
|
||||
actor: this,
|
||||
modifierList: SoSUtility.fillRange(-10, +10),
|
||||
tnList: SoSUtility.fillRange(6, 20),
|
||||
@ -321,27 +321,27 @@ export class SoSActor extends Actor {
|
||||
console.log(flipData);
|
||||
|
||||
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 foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
|
||||
new SoSFlipDialog(flipData, html).render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async checkDeath( ) {
|
||||
if ( this.data.data.scores.currentwounds.value >= this.data.data.scores.wound.value*2) {
|
||||
if ( this.system.scores.currentwounds.value >= this.system.scores.wound.value*2) {
|
||||
let woundData = {
|
||||
name: this.name,
|
||||
wounds: this.data.data.wounds,
|
||||
currentWounds: this.data.data.scores.currentwounds.value,
|
||||
totalWounds: this.data.data.scores.wound.value
|
||||
name: this.name,
|
||||
wounds: this.system.wounds,
|
||||
currentWounds: this.system.scores.currentwounds.value,
|
||||
totalWounds: this.system.scores.wound.value
|
||||
}
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-character-death.html', woundData );
|
||||
ChatMessage.create( { content: html, whisper: [ChatMessage.getWhisperRecipients(this.name), ChatMessage.getWhisperRecipients("GM") ] } );
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-character-death.html', woundData );
|
||||
ChatMessage.create( { content: html, whisper: ChatMessage.getWhisperRecipients(this.name).concat(ChatMessage.getWhisperRecipients("GM") ) } )
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
computeCurrentWounds( ) {
|
||||
let wounds = this.data.data.wounds;
|
||||
let wounds = this.system.wounds;
|
||||
return wounds.light + (wounds.moderate*2) + (wounds.severe*3) + (wounds.critical*4);
|
||||
}
|
||||
|
||||
@ -349,61 +349,61 @@ export class SoSActor extends Actor {
|
||||
async applyConsequenceWound( severity, consequenceName) {
|
||||
if ( severity == 'none') return; // Nothing !
|
||||
|
||||
let wounds = duplicate(this.data.data.wounds);
|
||||
let wounds = foundry.utils.duplicate(this.system.wounds);
|
||||
if (severity == 'light' ) wounds.light += 1;
|
||||
if (severity == 'moderate' ) wounds.moderate += 1;
|
||||
if (severity == 'severe' ) wounds.severe += 1;
|
||||
if (severity == 'critical' ) wounds.critical += 1;
|
||||
|
||||
let sumWound = wounds.light + (wounds.moderate*2) + (wounds.severe*3) + (wounds.critical*4);
|
||||
let currentWounds = duplicate(this.data.data.scores.currentwounds);
|
||||
let currentWounds = foundry.utils.duplicate(this.system.scores.currentwounds);
|
||||
currentWounds.value = sumWound;
|
||||
await this.update( { 'data.scores.currentwounds': currentWounds, 'data.wounds': wounds } );
|
||||
|
||||
let woundData = {
|
||||
name: this.name,
|
||||
let woundData = {
|
||||
name: this.name,
|
||||
consequenceName: consequenceName,
|
||||
severity: severity,
|
||||
severity: severity,
|
||||
wounds: wounds,
|
||||
currentWounds: sumWound,
|
||||
totalWounds: this.data.data.scores.wound.value
|
||||
totalWounds: this.system.scores.wound.value
|
||||
}
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-consequence.html', woundData );
|
||||
ChatMessage.create( { content: html, whisper: ChatMessage.getWhisperRecipients(this.name).concat(ChatMessage.getWhisperRecipients("GM")) } );
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-consequence.html', woundData );
|
||||
ChatMessage.create( { content: html, whisper: ChatMessage.getWhisperRecipients(this.name).concat(ChatMessage.getWhisperRecipients("GM")) } )
|
||||
|
||||
this.checkDeath();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async addObjectToContainer( itemId, containerId ) {
|
||||
let container = this.data.items.find( item => item.id == containerId && item.type == 'container')
|
||||
let object = this.data.items.find( item => item.id == itemId )
|
||||
let container = this.items.find( item => item.id == containerId && item.type == 'container')
|
||||
let object = this.items.find( item => item.id == itemId )
|
||||
console.log("Found", container, object)
|
||||
if ( container ) {
|
||||
if ( object.type == 'container') {
|
||||
ui.notifications.warn("Only 1 level of container... sorry");
|
||||
return
|
||||
}
|
||||
let alreadyInside = this.data.items.filter( item => item.data.data.containerid && item.data.data.containerid == containerId);
|
||||
if ( alreadyInside.length >= container.data.data.container ) {
|
||||
let alreadyInside = this.items.filter( item => item.system.containerid && item.system.containerid == containerId);
|
||||
if ( alreadyInside.length >= container.system.container ) {
|
||||
ui.notifications.warn("Container is already full !");
|
||||
} else {
|
||||
await this.updateEmbeddedDocuments( "Item", [{ _id: object.id, 'data.containerid':containerId }]);
|
||||
} else {
|
||||
setTimeout(function() { this.updateEmbeddedDocuments( "Item", [{ _id: object.id, 'system.containerid':containerId }])}, 800 )
|
||||
}
|
||||
} else if ( object && object.data.data.containerid) { // remove from container
|
||||
await this.updateEmbeddedDocuments( "Item", [{ _id: object.id, 'data.containerid':"" }]);
|
||||
} else if ( object?.system?.containerid) { // remove from container
|
||||
setTimeout(function() { this.updateEmbeddedDocuments( "Item", [{ _id: object.id, 'system.containerid':"" }])}, 800 )
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async applyWounds( flipData ) {
|
||||
if ( flipData.damageStatus == 'no_damage') {
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-nodamage-taken.html', flipData );
|
||||
ChatMessage.create( { content: html, whisper: [ChatMessage.getWhisperRecipients(this.name), ChatMessage.getWhisperRecipients("GM") ] } );
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-nodamage-taken.html', flipData );
|
||||
ChatMessage.create( { content: html, whisper: ChatMessage.getWhisperRecipients(this.name).concat(ChatMessage.getWhisperRecipients("GM")) } );
|
||||
return;
|
||||
}
|
||||
|
||||
let wounds = duplicate(this.data.data.wounds);
|
||||
let wounds = foundry.utils.duplicate(this.system.wounds);
|
||||
for (let wound of flipData.woundsList ) {
|
||||
if (wound == 'L' ) wounds.light += 1;
|
||||
if (wound == 'M' ) wounds.moderate += 1;
|
||||
@ -412,32 +412,32 @@ export class SoSActor extends Actor {
|
||||
}
|
||||
// Compute total
|
||||
let sumWound = wounds.light + (wounds.moderate*2) + (wounds.severe*3) + (wounds.critical*4);
|
||||
let currentWounds = duplicate(this.data.data.scores.currentwounds);
|
||||
let currentWounds = foundry.utils.duplicate(this.system.scores.currentwounds);
|
||||
currentWounds.value = sumWound;
|
||||
if ( sumWound >= this.data.data.scores.wound.value) {
|
||||
let bleeding = this.data.items.find( item => item.type == 'consequence' && item.name == 'Bleeding');
|
||||
let newSeverity = SoSUtility.increaseConsequenceSeverity( bleeding.data.severity );
|
||||
await this.updateEmbeddedDocuments( "Item", [ { _id: bleeding.id, 'data.severity': newSeverity} ] );
|
||||
if ( sumWound >= this.system.scores.wound.value) {
|
||||
let bleeding = this.items.find( item => item.type == 'consequence' && item.name == 'Bleeding');
|
||||
let newSeverity = SoSUtility.increaseConsequenceSeverity( bleeding.system.severity );
|
||||
await this.updateEmbeddedDocuments( "Item", [ { _id: bleeding.id, 'system.severity': newSeverity} ] );
|
||||
flipData.isBleeding = newSeverity;
|
||||
}
|
||||
// Stun consequence
|
||||
if ( flipData.nbStun > 0) {
|
||||
let stun = this.data.items.find( item => item.type == 'consequence' && item.name == 'Stun');
|
||||
let newSeverity = stun.data.severity;
|
||||
let stun = this.items.find( item => item.type == 'consequence' && item.name == 'Stun');
|
||||
let newSeverity = stun.system.severity;
|
||||
for(let i=0; i<flipData.nbStun; i++) {
|
||||
newSeverity = SoSUtility.increaseConsequenceSeverity( newSeverity );
|
||||
}
|
||||
await this.updateEmbeddedDocuments( "Item", [ { _id: stun.id, 'data.severity': newSeverity} ] );
|
||||
await this.updateEmbeddedDocuments( "Item", [ { _id: stun.id, 'system.severity': newSeverity} ] );
|
||||
flipData.isStun = newSeverity;
|
||||
}
|
||||
await this.update( { 'data.scores.currentwounds': currentWounds, 'data.wounds': wounds } );
|
||||
await this.update( { 'data.scores.currentwounds': currentWounds, 'system.wounds': wounds } );
|
||||
|
||||
flipData.defenderName = this.name;
|
||||
flipData.wounds = wounds;
|
||||
flipData.currentWounds = sumWound;
|
||||
flipData.totalWounds = this.data.data.scores.wound.value;
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-taken.html', flipData );
|
||||
ChatMessage.create( { content: html, whisper: [ChatMessage.getWhisperRecipients(this.name), ChatMessage.getWhisperRecipients("GM") ] } );
|
||||
flipData.totalWounds = this.system.scores.wound.value;
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-taken.html', flipData );
|
||||
ChatMessage.create( { content: html, whisper: ChatMessage.getWhisperRecipients(this.name).concat(ChatMessage.getWhisperRecipients("GM")) } );
|
||||
|
||||
this.checkDeath();
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ import { SoSUtility } from "./sos-utility.js";
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class SoSItemSheet extends ItemSheet {
|
||||
export class SoSItemSheet extends foundry.appv1.sheets.ItemSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["foundryvtt-shadows-over-sol", "sheet", "item"],
|
||||
template: "systems/foundryvtt-shadows-over-sol/templates/item-sheet.html",
|
||||
width: 550,
|
||||
@ -40,10 +40,10 @@ export class SoSItemSheet extends ItemSheet {
|
||||
sheetBody.css("height", bodyHeight);
|
||||
return position;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = SoSUtility.data(this.object);
|
||||
const objectData = this.object
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: objectData.id,
|
||||
@ -52,23 +52,30 @@ export class SoSItemSheet extends ItemSheet {
|
||||
name: objectData.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
data: foundry.utils.deepClone(this.object.data),
|
||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
||||
data: foundry.utils.deepClone(this.object.system),
|
||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.system)),
|
||||
limited: this.object.limited,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner
|
||||
owner: this.document.isOwner,
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
|
||||
};
|
||||
|
||||
formData.isGM = game.user.isGM;
|
||||
formData.isGM = game.user.isGM;
|
||||
if ( objectData.type == 'skillexperience') {
|
||||
formData.skillList = await SoSUtility.loadCompendiumNames("foundryvtt-shadows-over-sol.skills");
|
||||
formData.skillList = await SoSUtility.loadCompendiumNames("foundryvtt-shadows-over-sol.skills")
|
||||
}
|
||||
if ( objectData.type == 'skill' && this.object.options?.actor) {
|
||||
formData.skillExperienceList = this.object.options.actor.getSkillExperience( data.item.name );
|
||||
formData.skillExperienceList = this.object.options.actor.getSkillExperience( objectData.name )
|
||||
}
|
||||
if ( objectData.type == 'geneline') {
|
||||
formData.weakness = await TextEditor.enrichHTML(this.object.system.weakness, {async: true})
|
||||
}
|
||||
if ( objectData.type == 'malady') {
|
||||
formData.notes = await TextEditor.enrichHTML(this.object.system.notes, {async: true})
|
||||
}
|
||||
return formData;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
@ -76,7 +83,7 @@ export class SoSItemSheet extends ItemSheet {
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
@ -88,9 +95,9 @@ export class SoSItemSheet extends ItemSheet {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
this.object.options.actor.deleteOwnedItem( li.data("item-id") ).then( this.render(true));
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
get template()
|
||||
{
|
||||
|
@ -1,24 +0,0 @@
|
||||
html.find('.item .item-name h4').click(event => this._onItemSummary(event));
|
||||
|
||||
/**
|
||||
* Handle toggling of an item from the Actor sheet
|
||||
* @private
|
||||
*/
|
||||
_onItemSummary(event) {
|
||||
event.preventDefault();
|
||||
let li = $(event.currentTarget).parents(".item"),
|
||||
item = this.actor.getOwnedItem(li.data("item-id"));
|
||||
|
||||
// Toggle summary
|
||||
if (item.data.data.description !== undefined && item.data.data.description !== null){
|
||||
if ( li.hasClass("expanded") ) {
|
||||
let summary = li.children(".item-summary");
|
||||
summary.slideUp(200, () => summary.remove());
|
||||
} else {
|
||||
let div = $(`<div class="item-summary">${item.data.data.description}</div>`);
|
||||
li.append(div.hide());
|
||||
div.slideDown(200);
|
||||
}
|
||||
li.toggleClass("expanded");
|
||||
}
|
||||
}
|
@ -5,89 +5,89 @@ const NB_POKER_CARD = 54;
|
||||
const IDX2CARDFAMILY = ['c', 'd', 'h', 's'];
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class SoSCardDeck {
|
||||
export class SoSCardDeck {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
initCardDeck(actor, savedDeck = undefined ) {
|
||||
|
||||
async initCardDeck(actor, savedDeck = undefined) {
|
||||
|
||||
this.data = {};
|
||||
|
||||
|
||||
this.data.deck = [];
|
||||
this.data.discard = [];
|
||||
this.data.cardState = [];
|
||||
this.data.cardEdge = [];
|
||||
this.data.cardEdge = [];
|
||||
|
||||
if ( savedDeck.deck && savedDeck.deck.length > 0 ) {
|
||||
this.data.deck = duplicate(savedDeck.deck);
|
||||
if (savedDeck.deck && savedDeck.deck.length > 0) {
|
||||
this.data.deck = foundry.utils.duplicate(savedDeck.deck);
|
||||
}
|
||||
if ( savedDeck.discard && savedDeck.discard.length > 0 ) {
|
||||
this.data.discard = duplicate(savedDeck.discard);
|
||||
if (savedDeck.discard && savedDeck.discard.length > 0) {
|
||||
this.data.discard = foundry.utils.duplicate(savedDeck.discard);
|
||||
}
|
||||
if ( savedDeck.cardEdge && savedDeck.cardEdge.length > 0 ) {
|
||||
this.data.cardEdge = duplicate(savedDeck.cardEdge);
|
||||
if (savedDeck.cardEdge && savedDeck.cardEdge.length > 0) {
|
||||
this.data.cardEdge = foundry.utils.duplicate(savedDeck.cardEdge);
|
||||
}
|
||||
|
||||
this.data.actor = actor;
|
||||
if ( this.data.deck.length == 0 && this.data.discard.length == 0) {
|
||||
this.shuffleDeck();
|
||||
this.data.actor = actor;
|
||||
if (this.data.deck.length == 0 && this.data.discard.length == 0) {
|
||||
await this.shuffleDeck();
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
shuffleDeck() {
|
||||
async shuffleDeck() {
|
||||
this.cleanCardList();
|
||||
// Randomize deck
|
||||
while (this.data.deck.length != NB_POKER_CARD) {
|
||||
let idx = new Roll("1d54").roll( {async:false} ).total;
|
||||
let idx = Math.floor(Math.random() * 55);
|
||||
if (!this.data.cardState[idx - 1]) {
|
||||
if (idx == 53) { // Red Joker
|
||||
this.data.deck.push( { cardName: 'jr' } );
|
||||
this.data.deck.push({ cardName: 'jr' });
|
||||
} else if (idx == 54) { // Black Joker
|
||||
this.data.deck.push({ cardName: 'jb' });
|
||||
} else {
|
||||
let familyIdx = idx % 4;
|
||||
let cardIdx = String( (idx % 13) + 1);
|
||||
cardIdx = (cardIdx.length < 2) ? "0"+cardIdx: cardIdx;
|
||||
let cardIdx = String((idx % 13) + 1);
|
||||
cardIdx = (cardIdx.length < 2) ? "0" + cardIdx : cardIdx;
|
||||
let cardName = IDX2CARDFAMILY[familyIdx] + cardIdx;
|
||||
this.data.deck.push( { cardName: cardName } );
|
||||
this.data.deck.push({ cardName: cardName });
|
||||
}
|
||||
this.data.cardState[idx - 1] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
resetDeck() {
|
||||
let newdeck = duplicate(this.data.deck).concat( duplicate (this.data.discard) )
|
||||
async resetDeck() {
|
||||
let newdeck = foundry.utils.duplicate(this.data.deck).concat(foundry.utils.duplicate(this.data.discard))
|
||||
this.data.discard = [] // Reinit discard pile
|
||||
this.data.deck = []
|
||||
this.data.deck = []
|
||||
let decklen = newdeck.length
|
||||
let cardState = []
|
||||
for (let i = 0; i <decklen; i++) {
|
||||
for (let i = 0; i < decklen; i++) {
|
||||
cardState[i] = false
|
||||
}
|
||||
// Randomize deck
|
||||
while (this.data.deck.length != decklen) {
|
||||
let idx = new Roll("1d"+decklen).roll({async : false}).total
|
||||
let idx = Math.floor(Math.random() * (decklen + 1));
|
||||
//console.log("Deck stuff", this.data.deck.length, decklen, idx)
|
||||
if (!cardState[idx-1]) {
|
||||
this.data.deck.push( newdeck[idx-1] )
|
||||
if (!cardState[idx - 1]) {
|
||||
this.data.deck.push(newdeck[idx - 1])
|
||||
}
|
||||
cardState[idx-1] = true
|
||||
cardState[idx - 1] = true
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
discardEdge( cardName ) {
|
||||
let newEdge = this.data.cardEdge.filter( card => card.cardName != cardName);
|
||||
this.data.cardEdge = newEdge; // New edge list
|
||||
this.data.discard.push( { cardName: cardName }); // And push in the discard pile
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
drawEdge( edgeNumber = 1 ) {
|
||||
for (let i=0; i<edgeNumber; i++) {
|
||||
this.data.cardEdge.push( this.data.deck.pop() );
|
||||
discardEdge(cardName) {
|
||||
let newEdge = this.data.cardEdge.filter(card => card.cardName != cardName);
|
||||
this.data.cardEdge = newEdge; // New edge list
|
||||
this.data.discard.push({ cardName: cardName }); // And push in the discard pile
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
drawEdge(edgeNumber = 1) {
|
||||
for (let i = 0; i < edgeNumber; i++) {
|
||||
this.data.cardEdge.push(this.data.deck.pop());
|
||||
console.log("DRAW EDGE", this.data.cardEdge);
|
||||
}
|
||||
}
|
||||
@ -104,137 +104,137 @@ export class SoSCardDeck {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getDeckSize() {
|
||||
return this.data.deck.length;
|
||||
return this.data.deck.length;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getCardSuit( cardName ) {
|
||||
if ( cardName[0] == 'c') return 'club';
|
||||
if ( cardName[0] == 'd') return 'diamond';
|
||||
if ( cardName[0] == 'h') return 'hearts';
|
||||
if ( cardName[0] == 's') return 'spade';
|
||||
if ( cardName[0] == 'j') return 'joker';
|
||||
getCardSuit(cardName) {
|
||||
if (cardName[0] == 'c') return 'club';
|
||||
if (cardName[0] == 'd') return 'diamond';
|
||||
if (cardName[0] == 'h') return 'hearts';
|
||||
if (cardName[0] == 's') return 'spade';
|
||||
if (cardName[0] == 'j') return 'joker';
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
drawFromDeck() {
|
||||
drawFromDeck() {
|
||||
let card = this.data.deck.pop();
|
||||
this.data.discard.push( card );
|
||||
this.data.discard.push(card);
|
||||
return card;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getFromEdge( cardName) {
|
||||
let card = this.data.cardEdge.find( card => card.cardName == cardName); // Get the card
|
||||
let newEdge = this.data.cardEdge.filter(card => card.cardName != cardName); // Remove used card
|
||||
getFromEdge(cardName) {
|
||||
let card = this.data.cardEdge.find(card => card.cardName == cardName); // Get the card
|
||||
let newEdge = this.data.cardEdge.filter(card => card.cardName != cardName); // Remove used card
|
||||
this.data.cardEdge = newEdge;
|
||||
return card;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getCardValue( cardName ) {
|
||||
getCardValue(cardName) {
|
||||
console.log(cardName);
|
||||
if (cardName[0] == 'j' ) return 0; // Joker case
|
||||
let parsed = cardName.match( /\w(\d\d)/i );
|
||||
let value = Number( parsed[1] );
|
||||
if ( value > 10 ) value -= 10;
|
||||
if (cardName[0] == 'j') return 0; // Joker case
|
||||
let parsed = cardName.match(/\w(\d\d)/i);
|
||||
let value = Number(parsed[1]);
|
||||
if (value > 10) value -= 10;
|
||||
return value;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
isCardFace(cardName) {
|
||||
if (cardName[0] == 'j' ) return false; // Joker case
|
||||
let parsed = cardName.match( /\w(\d\d)/i );
|
||||
let value = Number( parsed[1] );
|
||||
return (value > 10) ? true : false;
|
||||
if (cardName[0] == 'j') return false; // Joker case
|
||||
let parsed = cardName.match(/\w(\d\d)/i);
|
||||
let value = Number(parsed[1]);
|
||||
return (value > 10);
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
setJoker( flipData ) {
|
||||
setJoker(flipData) {
|
||||
console.log("THIS IS A JOKER !!!!");
|
||||
flipData.cardSlot[0].total = 0;
|
||||
flipData.cardSlot[0].card1Path = `systems/foundryvtt-shadows-over-sol/img/cards/${flipData.cardSlot[0].card1.cardName}.webp`;
|
||||
flipData.cardSlot[0].card1Path = `systems/foundryvtt-shadows-over-sol/img/cards/${flipData.cardSlot[0].card1.cardName}.webp`;
|
||||
flipData.isJoker = true;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
isJoker( cardName) {
|
||||
isJoker(cardName) {
|
||||
return cardName[0] == 'j';
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async doFlipFromDeckOrEdge( flipData ) {
|
||||
flipData.cardSlot = [ { total: 0}];
|
||||
async doFlipFromDeckOrEdge(flipData) {
|
||||
flipData.cardSlot = [{ total: 0 }];
|
||||
flipData.isTrump = false;
|
||||
flipData.isJoker = false;
|
||||
flipData.fullTrump = false;
|
||||
|
||||
if ( flipData.edgeLuck ) {
|
||||
flipData.cardOrigin == "Deck"; // Force Deck
|
||||
if (flipData.edgeLuck) {
|
||||
flipData.cardOrigin = "Deck"; // Force Deck
|
||||
}
|
||||
|
||||
// Select card origin
|
||||
if ( flipData.cardOrigin == "Deck") {
|
||||
if (flipData.cardOrigin == "Deck") {
|
||||
flipData.cardSlot[0].card1 = this.drawFromDeck();
|
||||
} else {
|
||||
flipData.cardSlot[0].card1 = this.getFromEdge( flipData.edgeName );
|
||||
}
|
||||
flipData.cardSlot[0].card1 = this.getFromEdge(flipData.edgeName);
|
||||
}
|
||||
|
||||
let cardsuit = this.getCardSuit(flipData.cardSlot[0].card1.cardName);
|
||||
if ( cardsuit == 'joker' ) {
|
||||
this.setJoker( flipData );
|
||||
if (cardsuit == 'joker') {
|
||||
this.setJoker(flipData);
|
||||
} else {
|
||||
|
||||
//console.log("First card : ", flipData.cardSlot[0].card1);
|
||||
// Face check for first card
|
||||
flipData.cardSlot[0].value1 = this.getCardValue(flipData.cardSlot[0].card1.cardName);
|
||||
flipData.cardSlot[0].isFace1 = this.isCardFace(flipData.cardSlot[0].card1.cardName);
|
||||
flipData.cardSlot[0].card1Path = `systems/foundryvtt-shadows-over-sol/img/cards/${flipData.cardSlot[0].card1.cardName}.webp`;
|
||||
flipData.cardSlot[0].value1 = this.getCardValue(flipData.cardSlot[0].card1.cardName);
|
||||
flipData.cardSlot[0].isFace1 = this.isCardFace(flipData.cardSlot[0].card1.cardName);
|
||||
flipData.cardSlot[0].card1Path = `systems/foundryvtt-shadows-over-sol/img/cards/${flipData.cardSlot[0].card1.cardName}.webp`;
|
||||
flipData.cardSlot[0].card2 = false;
|
||||
if ( flipData.cardSlot[0].isFace1 ) {
|
||||
flipData.cardSlot[0].card2 = this.drawFromDeck();
|
||||
if (flipData.cardSlot[0].isFace1) {
|
||||
flipData.cardSlot[0].card2 = this.drawFromDeck();
|
||||
flipData.isJoker = this.isJoker(flipData.cardSlot[0].card2.cardName);
|
||||
flipData.cardSlot[0].value2 = this.getCardValue(flipData.cardSlot[0].card2.cardName);
|
||||
flipData.cardSlot[0].value2 = this.getCardValue(flipData.cardSlot[0].card2.cardName);
|
||||
flipData.cardSlot[0].isFace2 = this.isCardFace(flipData.cardSlot[0].card2.cardName);
|
||||
flipData.cardSlot[0].card2Path = `systems/foundryvtt-shadows-over-sol/img/cards/${flipData.cardSlot[0].card2.cardName}.webp`;
|
||||
} else {
|
||||
flipData.cardSlot[0].value2 = 0; // Safe init
|
||||
}
|
||||
flipData.cardSlot[0].total = flipData.cardSlot[0].value1 + flipData.cardSlot[0].value2;
|
||||
flipData.cardSlot[0].total = flipData.cardSlot[0].value1 + flipData.cardSlot[0].value2;
|
||||
|
||||
// Trump check
|
||||
flipData.cardSlot[0].cardsuit = cardsuit;
|
||||
if ( !flipData.isJoker && ( cardsuit == flipData.stat.cardsuit || flipData.edgeLuck) ) {
|
||||
flipData.cardSlot[0].cardsuit = cardsuit;
|
||||
if (!flipData.isJoker && (cardsuit == flipData.stat.cardsuit || flipData.edgeLuck)) {
|
||||
// This is a trump !
|
||||
flipData.cardSlot[1] = { total: 0 };
|
||||
flipData.isTrump = true;
|
||||
flipData.cardSlot[1].card1 = this.drawFromDeck();
|
||||
flipData.isJoker = this.isJoker(flipData.cardSlot[1].card1.cardName);
|
||||
flipData.cardSlot[1].card1Path = `systems/foundryvtt-shadows-over-sol/img/cards/${flipData.cardSlot[1].card1.cardName}.webp`;
|
||||
flipData.cardSlot[1].cardsuit = this.getCardSuit(flipData.cardSlot[1].card1.cardName);
|
||||
flipData.cardSlot[1].value1 = this.getCardValue(flipData.cardSlot[1].card1.cardName);
|
||||
flipData.cardSlot[1].isFace1 = this.isCardFace(flipData.cardSlot[1].card1.cardName);
|
||||
if ( !flipData.isJoker && flipData.cardSlot[1].isFace1 ) {
|
||||
flipData.cardSlot[1].card2 = this.drawFromDeck();
|
||||
flipData.cardSlot[1].cardsuit = this.getCardSuit(flipData.cardSlot[1].card1.cardName);
|
||||
flipData.cardSlot[1].value1 = this.getCardValue(flipData.cardSlot[1].card1.cardName);
|
||||
flipData.cardSlot[1].isFace1 = this.isCardFace(flipData.cardSlot[1].card1.cardName);
|
||||
if (!flipData.isJoker && flipData.cardSlot[1].isFace1) {
|
||||
flipData.cardSlot[1].card2 = this.drawFromDeck();
|
||||
flipData.isJoker = this.isJoker(flipData.cardSlot[1].card2.cardName);
|
||||
flipData.cardSlot[1].value2 = this.getCardValue(flipData.cardSlot[1].card2.cardName);
|
||||
flipData.cardSlot[1].isFace2 = this.isCardFace(flipData.cardSlot[1].card2.cardName);
|
||||
flipData.cardSlot[1].value2 = this.getCardValue(flipData.cardSlot[1].card2.cardName);
|
||||
flipData.cardSlot[1].isFace2 = this.isCardFace(flipData.cardSlot[1].card2.cardName);
|
||||
flipData.cardSlot[1].card2Path = `systems/foundryvtt-shadows-over-sol/img/cards/${flipData.cardSlot[1].card2.cardName}.webp`;
|
||||
} else {
|
||||
flipData.cardSlot[1].value2 = 0; // Safe init
|
||||
}
|
||||
if ( flipData.cardSlot[1].cardsuit == cardsuit ) {
|
||||
if (flipData.cardSlot[1].cardsuit == cardsuit) {
|
||||
flipData.fullTrump = true;
|
||||
}
|
||||
flipData.cardSlot[1].total = flipData.cardSlot[1].value1 + flipData.cardSlot[1].value2;
|
||||
flipData.cardSlot[1].total = flipData.cardSlot[1].value1 + flipData.cardSlot[1].value2;
|
||||
}
|
||||
}
|
||||
|
||||
// Card Total
|
||||
flipData.cardTotal = flipData.cardSlot[0].total;
|
||||
flipData.cardSlotIndex = 0;
|
||||
if ( flipData.fullTrump ) {
|
||||
if (flipData.fullTrump) {
|
||||
flipData.cardTotal = flipData.cardSlot[0].total + flipData.cardSlot[1].total;
|
||||
} else if (flipData.isTrump) {
|
||||
if (flipData.cardSlot[0].total > flipData.cardSlot[1].total ) {
|
||||
if (flipData.cardSlot[0].total > flipData.cardSlot[1].total) {
|
||||
flipData.cardSlotIndex = 0;
|
||||
flipData.cardTotal = flipData.cardSlot[0].total;
|
||||
} else {
|
||||
@ -244,66 +244,66 @@ export class SoSCardDeck {
|
||||
}
|
||||
|
||||
// Compute final result and compare
|
||||
if ( flipData.mode == 'stat' || flipData.mode == 'weapon' ) {
|
||||
if (flipData.mode == 'stat' || flipData.mode == 'weapon') {
|
||||
flipData.baseScore = flipData.stat.value + flipData.malusConsequence + flipData.bonusConsequence + flipData.woundMalus;
|
||||
} else if (flipData.mode == 'skill') {
|
||||
flipData.baseScore = Math.floor(flipData.stat.value/2) + flipData.skill.data.value + flipData.malusConsequence + flipData.bonusConsequence + flipData.woundMalus;
|
||||
flipData.baseScore = Math.floor(flipData.stat.value / 2) + flipData.skill.system.value + flipData.malusConsequence + flipData.bonusConsequence + flipData.woundMalus;
|
||||
}
|
||||
flipData.finalScore = flipData.baseScore + flipData.cardTotal + Number(flipData.modifier);
|
||||
flipData.magnitude = flipData.finalScore - flipData.tn;
|
||||
flipData.result = (flipData.magnitude >= 0) ? "Success": "Failure";
|
||||
flipData.result = (flipData.magnitude >= 0) ? "Success" : "Failure";
|
||||
|
||||
//console.log(flipData);
|
||||
this.data.actor.saveDeck();
|
||||
flipData.alias = this.data.actor.name;
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-flip.html', flipData);
|
||||
ChatMessage.create( { content: html });
|
||||
flipData.alias = this.data.actor.name;
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-flip.html', flipData);
|
||||
ChatMessage.create({ content: html });
|
||||
|
||||
if ( flipData.mode == 'weapon' && flipData.magnitude >= 0 && !flipData.isJoker) { // Success
|
||||
this.processWeapon( flipData );
|
||||
if (flipData.mode == 'weapon' && flipData.magnitude >= 0 && !flipData.isJoker) { // Success
|
||||
this.processWeapon(flipData);
|
||||
}
|
||||
|
||||
if (flipData.isJoker) { // Critical mismatch !
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async processWeapon( flipData ) {
|
||||
async processWeapon(flipData) {
|
||||
flipData.damageCardsuit = flipData.cardSlot[flipData.cardSlotIndex].cardsuit;
|
||||
let damageKey = 'damage_'+ flipData.damageCardsuit;
|
||||
flipData.damageString = flipData.weapon.data[damageKey];
|
||||
if (flipData.damageString.includes('Str') ) {
|
||||
let damageRegexp = flipData.damageString.match( /Str([\d])?\+?([\d])?([LMSC])/i );
|
||||
flipData.damageValue = (flipData.actor.data.data.stats.strength.value * Number(damageRegexp[1]?damageRegexp[1]:1)) + Number(damageRegexp[2]?damageRegexp[2]:0);
|
||||
let damageKey = 'damage_' + flipData.damageCardsuit;
|
||||
flipData.damageString = flipData.weapon.system[damageKey];
|
||||
if (flipData.damageString.includes('Str')) {
|
||||
let damageRegexp = flipData.damageString.match(/Str([\d])?\+?([\d])?([LMSC])/i);
|
||||
flipData.damageValue = (flipData.actor.system.stats.strength.value * Number(damageRegexp[1] ? damageRegexp[1] : 1)) + Number(damageRegexp[2] ? damageRegexp[2] : 0);
|
||||
flipData.damageSeverity = damageRegexp[3];
|
||||
} else {
|
||||
let damageRegexp = flipData.damageString.match( /(\d*)([LMSC])/i );
|
||||
let damageRegexp = flipData.damageString.match(/(\d*)([LMSC])/i);
|
||||
flipData.damageValue = damageRegexp[1];
|
||||
flipData.damageSeverity = damageRegexp[2];
|
||||
}
|
||||
|
||||
|
||||
// Now process damage
|
||||
if ( flipData.target) {
|
||||
if ( game.user.isGM ) { // Direct access
|
||||
SoSUtility.applyDamage( flipData );
|
||||
if (flipData.target) {
|
||||
if (game.user.isGM) { // Direct access
|
||||
SoSUtility.applyDamage(flipData);
|
||||
} else {
|
||||
game.socket.emit("system.foundryvtt-shadows-over-sol", {
|
||||
msg: "msg_request_defense", data: flipData } );
|
||||
msg: "msg_request_defense", data: flipData
|
||||
});
|
||||
}
|
||||
} else {
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-only.html', flipData );
|
||||
ChatMessage.create( { content: html });
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-only.html', flipData);
|
||||
ChatMessage.create({ content: html });
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getDeckHTML( ) {
|
||||
getDeckHTML() {
|
||||
return "<a class='view-deck'><img class='flip-card deck-card' src='systems/foundryvtt-shadows-over-sol/img/cards/card_back.webp' /></a>";
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getEdgeHTML( ) {
|
||||
getEdgeHTML() {
|
||||
let html = "";
|
||||
for (let edge of this.data.cardEdge) {
|
||||
html += `<a class='view-edge'><img class='flip-card edge-card' data-edge-card='${edge.cardName}' src='systems/foundryvtt-shadows-over-sol/img/cards/${edge.cardName}.webp' /></a>`
|
||||
@ -311,21 +311,21 @@ export class SoSCardDeck {
|
||||
return html;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getEdgeHTMLForFlip( ) {
|
||||
let html = "";
|
||||
for (let edge of this.data.cardEdge) {
|
||||
html += `<a class='view-edge'><img class='flip-card edge-card' data-edge-card='${edge.cardName}' src='systems/foundryvtt-shadows-over-sol/img/cards/${edge.cardName}.webp' /></a>`
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getDiscardTopHTML( ) {
|
||||
getEdgeHTMLForFlip() {
|
||||
let html = "";
|
||||
console.log( "DISCARD: ", this.data.discard );
|
||||
if ( this.data.discard.length > 0) {
|
||||
let card = this.data.discard[this.data.discard.length-1];
|
||||
for (let edge of this.data.cardEdge) {
|
||||
html += `<a class='view-edge'><img class='flip-card edge-card' data-edge-card='${edge.cardName}' src='systems/foundryvtt-shadows-over-sol/img/cards/${edge.cardName}.webp' /></a>`
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getDiscardTopHTML() {
|
||||
let html = "";
|
||||
console.log("DISCARD: ", this.data.discard);
|
||||
if (this.data.discard.length > 0) {
|
||||
let card = this.data.discard[this.data.discard.length - 1];
|
||||
html = `<img class='view-discard flip-card' src='systems/foundryvtt-shadows-over-sol/img/cards/${card.cardName}.webp' />`;
|
||||
}
|
||||
return html;
|
||||
|
@ -5,26 +5,30 @@ import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class SoSCombat extends Combat {
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
requestActions() {
|
||||
if ( game.user.isGM && !this.actionsRequested) {
|
||||
console.log("REQUEST ACTIONS !!!");
|
||||
if (game.user.isGM && !this.actionsRequested) {
|
||||
console.log("REQUEST ACTIONS !!!")
|
||||
this.actionsRequested = true;
|
||||
this.phaseSetup = {}; // Reset each new round/update
|
||||
for( let combatant of this.combatants) {
|
||||
this.setInitiative(combatant._id, -1 ); // Reset init
|
||||
let uniq = randomID(16);
|
||||
const name = combatant.actor ? combatant.actor.data.name : combatant.name;
|
||||
if ( combatant.players[0]) {
|
||||
for (let combatant of this.combatants) {
|
||||
this.setInitiative(combatant.id, -1); // Reset init
|
||||
let uniq = foundry.utils.randomID(16)
|
||||
const name = combatant.actor ? combatant.actor.name : combatant.name;
|
||||
if (combatant.players && combatant.players[0] ) {
|
||||
// A player controls this combatant -> message !
|
||||
ChatMessage.create( { content: `New round ! Click on the button below to declare the actions of ${name} for round ${this.round} !<br>
|
||||
<a class='chat-card-button' id='button-declare-actions' data-uniq-id='${uniq}' data-combatant-id='${combatant._id}' data-combat-id='${this._id}' data-round='${this.round}'>Declare actions</a>`,
|
||||
whisper: [ combatant.players[0].data._id] } );
|
||||
ChatMessage.create({
|
||||
content: `New round ! Click on the button below to declare the actions of ${name} for round ${this.round} !<br>
|
||||
<a class='chat-card-button' id='button-declare-actions' data-uniq-id='${uniq}' data-combatant-id='${combatant.id}' data-combat-id='${this.id}' data-round='${this.round}'>Declare actions</a>`,
|
||||
whisper: [combatant.players[0].id]
|
||||
});
|
||||
} else {
|
||||
ChatMessage.create( { content: `New round ! Click on the button below to declare the actions of ${name} for round ${this.round} !<br>
|
||||
<a class='chat-card-button' id='button-declare-actions' data-uniq-id='${uniq}' data-combatant-id='${combatant._id}' data-combat-id='${this._id}' data-round='${this.round}'>Declare actions</a>`,
|
||||
whisper: [ ChatMessage.getWhisperRecipients("GM") ] } );
|
||||
ChatMessage.create({
|
||||
content: `New round ! Click on the button below to declare the actions of ${name} for round ${this.round} !<br>
|
||||
<a class='chat-card-button' id='button-declare-actions' data-uniq-id='${uniq}' data-combatant-id='${combatant.id}' data-combat-id='${this.id}' data-round='${this.round}'>Declare actions</a>`,
|
||||
whisper: ChatMessage.getWhisperRecipients("GM"),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -39,56 +43,61 @@ export class SoSCombat extends Combat {
|
||||
/* -------------------------------------------- */
|
||||
gotoNextTurn() {
|
||||
this.phaseNumber -= 1;
|
||||
if ( this.phaseNumber <= 0) {
|
||||
if (this.phaseNumber <= 0) {
|
||||
this.applyConsequences();
|
||||
this.nextRound(); // Auto-switch to next round
|
||||
} else {
|
||||
} else {
|
||||
this.nextTurn();
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async nextTurn() {
|
||||
console.log("Going to phase !", this.phaseNumber );
|
||||
console.log("Going to phase !", this.phaseNumber);
|
||||
// Get all actions for this phase
|
||||
let phaseIndex = this.phaseNumber - 1;
|
||||
let actionList = [];
|
||||
let actionMsg = `<h4>Actions for phase ${this.phaseNumber}</h4>`;
|
||||
for (let combatantId in this.phaseSetup ) {
|
||||
for (let combatantId in this.phaseSetup) {
|
||||
let actionData = this.phaseSetup[combatantId];
|
||||
if ( actionData.phaseArray[phaseIndex].name != 'No Action' ) {
|
||||
let combatant = this.combatants.find( comb => comb._id == actionData.combatantId);
|
||||
const name = combatant.actor ? combatant.actor.data.name : combatant.name;
|
||||
actionList.push( { combatant: combatant,
|
||||
action: actionData.phaseArray[phaseIndex],
|
||||
isDone: false
|
||||
});
|
||||
if (actionData.phaseArray[phaseIndex].name != 'No Action') {
|
||||
let combatant = this.combatants.find(comb => comb._id == actionData.combatantId);
|
||||
const name = combatant.actor ? combatant.actor.name : combatant.name;
|
||||
actionList.push({
|
||||
combatant: combatant,
|
||||
action: actionData.phaseArray[phaseIndex],
|
||||
isDone: false
|
||||
});
|
||||
actionMsg += `<br>${name} is going to : ${actionData.phaseArray[phaseIndex].name}`;
|
||||
}
|
||||
}
|
||||
if ( actionList.length == 0) {
|
||||
if (actionList.length == 0) {
|
||||
actionMsg += "<br>No actions for the phase !";
|
||||
this.gotoNextTurn();
|
||||
}
|
||||
// Display a nice message
|
||||
ChatMessage.create( { content: actionMsg });
|
||||
ChatMessage.create({ content: actionMsg });
|
||||
|
||||
// Now push specific messages
|
||||
for ( let action of actionList) {
|
||||
let uniq = randomID(16);
|
||||
for (let action of actionList) {
|
||||
let uniq = foundry.utils.randomID(16);
|
||||
action.uniqId = uniq; // Easy tracking with chat messages
|
||||
const name = action.combatant.actor ? action.combatant.actor.data.name : action.combatant.name;
|
||||
if ( action.combatant.players[0]) {
|
||||
const name = action.combatant.actor ? action.combatant.actor.name : action.combatant.name;
|
||||
if (action.combatant.players[0]) {
|
||||
// A player controls this combatant -> message !
|
||||
ChatMessage.create( { content: `Phase ${this.phaseNumber} ! ${name} must perform a <strong>${action.action.name}</strong> action.
|
||||
ChatMessage.create({
|
||||
content: `Phase ${this.phaseNumber} ! ${name} must perform a <strong>${action.action.name}</strong> action.
|
||||
When done, click on the button below to close the action.
|
||||
<a class='chat-card-button' id='button-end-action' data-uniq-id='${uniq}' data-combatant-id='${action.combatant._id}' data-combat-id='${this._id}' data-round='${this.round}'>Action is done !</a>`,
|
||||
whisper: [ action.combatant.players[0].data._id] } );
|
||||
<a class='chat-card-button' id='button-end-action' data-uniq-id='${uniq}' data-combatant-id='${action.combatant.id}' data-combat-id='${this.id}' data-round='${this.round}'>Action is done !</a>`,
|
||||
whisper: [action.combatant.players[0].id]
|
||||
});
|
||||
} else {
|
||||
ChatMessage.create( { content: `Phase ${this.phaseNumber} ! ${name} must perform a <strong>${action.action.name}</strong> action.<br>
|
||||
ChatMessage.create({
|
||||
content: `Phase ${this.phaseNumber} ! ${name} must perform a <strong>${action.action.name}</strong> action.<br>
|
||||
When done, click on the button below to close the action.
|
||||
<a class='chat-card-button' id='button-end-action' data-uniq-id='${uniq}' data-combatant-id='${action.combatant._id}' data-combat-id='${this._id}' data-round='${this.round}'>Action is done !</a>`,
|
||||
whisper: [ ChatMessage.getWhisperRecipients("GM") ] } );
|
||||
<a class='chat-card-button' id='button-end-action' data-uniq-id='${uniq}' data-combatant-id='${action.combatant.id}' data-combat-id='${this.id}' data-round='${this.round}'>Action is done !</a>`,
|
||||
whisper: ChatMessage.getWhisperRecipients("GM")
|
||||
});
|
||||
}
|
||||
}
|
||||
// Save for easy access
|
||||
@ -96,28 +105,28 @@ export class SoSCombat extends Combat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
applyConsequences( ) {
|
||||
if (game.user.isGM ) {
|
||||
for( let combatant of this.combatants) {
|
||||
applyConsequences() {
|
||||
if (game.user.isGM) {
|
||||
for (let combatant of this.combatants) {
|
||||
if (!combatant.actor) continue; // Can't check tokens without assigned actors, Maybe print chat message about bleeding happening so that the GM can manually track this?
|
||||
let bleeding = combatant.actor.data.items.find( item => item.type == 'consequence' && item.name == 'Bleeding');
|
||||
combatant.actor.applyConsequenceWound( bleeding.data.severity, "bleeding" );
|
||||
let bleeding = combatant.actor.items.find(item => item.type == 'consequence' && item.name == 'Bleeding');
|
||||
combatant.actor.applyConsequenceWound(bleeding.system.severity, "bleeding");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
closeAction( uniqId) {
|
||||
closeAction(uniqId) {
|
||||
// Delete message !
|
||||
const toDelete = game.messages.filter(it => it.data.content.includes( uniqId ));
|
||||
toDelete.forEach(it => it.delete());
|
||||
const toDelete = game.messages.filter(it => it.content.includes(uniqId));
|
||||
toDelete.forEach(it => it.delete())
|
||||
|
||||
let action = this.currentActions.find( _action => _action.uniqId == uniqId );
|
||||
let action = this.currentActions.find(_action => _action.uniqId == uniqId);
|
||||
if (action) {
|
||||
action.isDone = true;
|
||||
|
||||
let filtered = this.currentActions.filter( _action => action.isDone );
|
||||
if ( filtered.length == this.currentActions.length) { // All actions closed !
|
||||
let filtered = this.currentActions.filter(_action => action.isDone);
|
||||
if (filtered.length == this.currentActions.length) { // All actions closed !
|
||||
console.log("Going next turn !!!");
|
||||
this.gotoNextTurn();
|
||||
}
|
||||
@ -125,22 +134,22 @@ export class SoSCombat extends Combat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getPhaseRank( actionConf) {
|
||||
for (let i=2; i>=0; i--) {
|
||||
getPhaseRank(actionConf) {
|
||||
for (let i = 2; i >= 0; i--) {
|
||||
let action = actionConf.phaseArray[i];
|
||||
if (action.name != "No Action") {
|
||||
return i+1;
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getAPFromActor( actorId ) {
|
||||
for( let combatant of this.combatants) {
|
||||
getAPFromActor(actorId) {
|
||||
for (let combatant of this.combatants) {
|
||||
//console.log(combatant);
|
||||
if ( combatant.actor.data._id == actorId ) {
|
||||
let phase = this.phaseSetup[combatant._id];
|
||||
if (combatant.actor.id == actorId) {
|
||||
let phase = this.phaseSetup[combatant.id];
|
||||
return phase.remainingAP;
|
||||
}
|
||||
}
|
||||
@ -148,42 +157,43 @@ export class SoSCombat extends Combat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
decreaseAPFromActor( actorId ) {
|
||||
for( let combatant of this.combatants) {
|
||||
decreaseAPFromActor(actorId) {
|
||||
for (let combatant of this.combatants) {
|
||||
//console.log(combatant);
|
||||
if ( combatant.actor.data._id == actorId ) {
|
||||
let phase = this.phaseSetup[combatant._id];
|
||||
if (combatant.actor.id == actorId) {
|
||||
let phase = this.phaseSetup[combatant.id];
|
||||
phase.remainingAP -= 1;
|
||||
if ( phase.remainingAP < 0 ) phase.remainingAP = 0;
|
||||
if (phase.remainingAP < 0) phase.remainingAP = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async setupActorActions(actionConf) {
|
||||
console.log("Setting combat for phase : ", actionConf, actionConf.uniqId);
|
||||
|
||||
// Delete message !
|
||||
const toDelete = game.messages.filter(it => it.data.content.includes( actionConf.uniqId ));
|
||||
console.log("MESSAGE : ", toDelete);
|
||||
const toDelete = game.messages.filter(it => it.content.includes(actionConf.uniqId));
|
||||
toDelete.forEach(it => it.delete());
|
||||
|
||||
if ( !this.phaseSetup) this.phaseSetup = {}; // Opportunistic init
|
||||
|
||||
if (!this.phaseSetup) this.phaseSetup = {}; // Opportunistic init
|
||||
|
||||
// Keep track
|
||||
this.phaseSetup[actionConf.combatantId] = actionConf;
|
||||
console.log( this.combatants );
|
||||
console.log(this.combatants);
|
||||
//let combatant = this.combatants.find( comb => comb._id == actionConf.combatantId);
|
||||
await this.setInitiative( actionConf.combatantId, this.getPhaseRank( actionConf ) );
|
||||
await this.setInitiative(actionConf.combatantId, this.getPhaseRank(actionConf));
|
||||
|
||||
let actionsDone = true
|
||||
for( let combatant of this.combatants) {
|
||||
if ( combatant.initiative == -1 ) actionsDone = false;
|
||||
for (let combatant of this.combatants) {
|
||||
if (combatant.initiative == -1) actionsDone = false;
|
||||
}
|
||||
if ( actionsDone ) {
|
||||
if (actionsDone) {
|
||||
this.actionsRequested = false;
|
||||
ChatMessage.create( { content: `Action declaration has been completed ! Now proceeding with actions.`,
|
||||
whisper: [ ChatMessage.getWhisperRecipients("GM") ] } );
|
||||
ChatMessage.create({
|
||||
content: `Action declaration has been completed ! Now proceeding with actions.`,
|
||||
whisper: ChatMessage.getWhisperRecipients("GM")
|
||||
})
|
||||
this.phaseNumber = 3;
|
||||
this.nextTurn();
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
actionPoints: SoSUtility.fillRange(0, 6),
|
||||
combatId: combatId,
|
||||
combatantId: combatantId,
|
||||
combatantsList: combat.data.combatants,
|
||||
combatantsList: combat.combatants,
|
||||
uniqId: uniqId,
|
||||
round: round
|
||||
}
|
||||
@ -53,11 +53,11 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
super.close();
|
||||
|
||||
let action3Index = $('#action3').val();
|
||||
let action3 = duplicate(this.combatActions.actionsList[action3Index]);
|
||||
let action3 = foundry.utils.duplicate(this.combatActions.actionsList[action3Index]);
|
||||
let action2Index = $('#action2').val();
|
||||
let action2 = duplicate(this.combatActions.actionsList[action2Index]);
|
||||
let action2 = foundry.utils.duplicate(this.combatActions.actionsList[action2Index]);
|
||||
let action1Index = $('#action1').val();
|
||||
let action1 = duplicate(this.combatActions.actionsList[action1Index]);
|
||||
let action1 = foundry.utils.duplicate(this.combatActions.actionsList[action1Index]);
|
||||
|
||||
let combatant3Id = $('#combatant3').val();
|
||||
let combatant2Id = $('#combatant2').val();
|
||||
|
@ -29,8 +29,8 @@ export class SoSFlipDialog extends Dialog {
|
||||
let scoreBase = 0;
|
||||
if ( this.flipData.mode == 'skill' || this.flipData.mode == 'weapon' ) {
|
||||
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;
|
||||
this.flipData.stat = foundry.utils.duplicate( this.flipData.statList[ statKey ] );
|
||||
scoreBase = Math.floor(this.flipData.statList[ statKey ].value / 2) + this.flipData.skill.system.value
|
||||
} else { //Stat mode
|
||||
let statKey = $('#statSelect').val();
|
||||
scoreBase = this.flipData.stat.value;
|
||||
@ -52,25 +52,25 @@ export class SoSFlipDialog extends Dialog {
|
||||
async updateFlip( flipData ) {
|
||||
//console.log("UPDATE !!!", flipData);
|
||||
$('.view-deck').remove();
|
||||
$("#view-deck").append(await flipData.actor.cardDeck.getDeckHTML());
|
||||
$("#view-deck").append(await flipData.actor.system.cardDeck.getDeckHTML());
|
||||
|
||||
$('.view-edge').remove();
|
||||
$("#view-edge").append(await flipData.actor.cardDeck.getEdgeHTMLForFlip());
|
||||
$("#view-edge").append(await flipData.actor.system.cardDeck.getEdgeHTMLForFlip());
|
||||
|
||||
this.updateScoreBase();
|
||||
|
||||
$('.edge-card').click((event) => {
|
||||
let flipData = this.flipData;
|
||||
flipData.modifier = $('#modifier').val();
|
||||
flipData.tn = (flipData.target) ? flipData.target.actor.data.data.scores.defense.value : $('#tn').val();
|
||||
flipData.tn = (flipData.target) ? flipData.target.actor.system.scores.defense.value : $('#tn').val();
|
||||
flipData.edgeName = event.currentTarget.attributes['data-edge-card'].value;
|
||||
flipData.edgeLuck = $('#edge-luck').is(":checked");
|
||||
flipData.cardOrigin = "Edge";
|
||||
if ( flipData.mode == 'skill' || flipData.mode == 'weapon') {
|
||||
flipData.stat = duplicate( flipData.statList[ $('#statSelect').val() ] );
|
||||
flipData.stat = foundry.utils.duplicate( flipData.statList[ $('#statSelect').val() ] );
|
||||
}
|
||||
console.log("CLICK:", flipData);
|
||||
this.flipData.actor.cardDeck.doFlipFromDeckOrEdge(flipData);
|
||||
this.flipData.actor.system.cardDeck.doFlipFromDeckOrEdge(flipData);
|
||||
this.onFlipClose();
|
||||
});
|
||||
|
||||
@ -94,7 +94,7 @@ export class SoSFlipDialog extends Dialog {
|
||||
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 );
|
||||
malusConsequence += SoSUtility.getConsequenceMalus( consequence.system.severity );
|
||||
}
|
||||
$('#consequence-malus').text(malusConsequence);
|
||||
this.flipData.malusConsequence = malusConsequence;
|
||||
@ -108,7 +108,7 @@ export class SoSFlipDialog extends Dialog {
|
||||
for (let consequenceId of this.flipData.consequencesSelected) {
|
||||
let consequence = this.flipData.consequencesList.find( item => item._id == consequenceId);
|
||||
console.log(consequence, consequenceId);
|
||||
bonusConsequence += SoSUtility.getConsequenceBonus( consequence.data.severity );
|
||||
bonusConsequence += SoSUtility.getConsequenceBonus( consequence.system.severity );
|
||||
}
|
||||
$('#consequence-bonus').text(bonusConsequence);
|
||||
this.flipData.bonusConsequence = bonusConsequence;
|
||||
@ -161,11 +161,11 @@ export class SoSFlipDialog extends Dialog {
|
||||
flipData.modifier = html.find('#modifier').val();
|
||||
if ( flipData.mode == 'skill' || flipData.mode == 'weapon') {
|
||||
let statKey = $('#statSelect').val();
|
||||
flipData.stat = duplicate( flipData.statList[ statKey ] );
|
||||
flipData.stat = foundry.utils.duplicate( flipData.statList[ statKey ] );
|
||||
}
|
||||
flipData.cardOrigin = "Deck";
|
||||
flipData.tn = (flipData.target) ? flipData.target.actor.data.data.scores.defense.value : $('#tn').val();
|
||||
dialog.flipData.actor.cardDeck.doFlipFromDeckOrEdge(flipData);
|
||||
flipData.tn = (flipData.target) ? flipData.target.actor.system.scores.defense.value : $('#tn').val();
|
||||
dialog.flipData.actor.system.cardDeck.doFlipFromDeckOrEdge(flipData);
|
||||
dialog.onFlipClose();
|
||||
});
|
||||
|
||||
|
@ -35,9 +35,9 @@ export class SoSGMDeck extends Dialog {
|
||||
/* -------------------------------------------- */
|
||||
saveDeck( ) {
|
||||
let deck = {
|
||||
deck: duplicate(this.GMdeck.data.deck),
|
||||
discard: duplicate(this.GMdeck.data.discard),
|
||||
cardEdge: duplicate(this.GMdeck.data.cardEdge)
|
||||
deck: foundry.utils.duplicate(this.GMdeck.data.deck),
|
||||
discard: foundry.utils.duplicate(this.GMdeck.data.discard),
|
||||
cardEdge: foundry.utils.duplicate(this.GMdeck.data.cardEdge)
|
||||
}
|
||||
game.settings.set("foundryvtt-shadows-over-sol", "gmDeck", deck );
|
||||
}
|
||||
@ -60,7 +60,7 @@ export class SoSGMDeck extends Dialog {
|
||||
let cardPath = `systems/foundryvtt-shadows-over-sol/img/cards/${card.cardName}.webp`;
|
||||
let cardData = { card: card, cardPath: cardPath };
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-card.html', cardData );
|
||||
ChatMessage.create( { content: html, whisper: [ ChatMessage.getWhisperRecipients("GM") ] });
|
||||
ChatMessage.create( { content: html, whisper: ChatMessage.getWhisperRecipients("GM") } );
|
||||
//dialog.onFlipClose();
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ import { SoSUtility } from "./sos-utility.js";
|
||||
import { SoSCombat } from "./sos-combat.js";
|
||||
import { gearConverter } from "./gears_convert.js";
|
||||
import { SoSGMDeck } from "./sos-gm-deck.js";
|
||||
import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
@ -36,14 +37,14 @@ Hooks.once("init", async function () {
|
||||
// preload handlebars templates
|
||||
SoSUtility.preloadHandlebarsTemplates();
|
||||
// Create useful storage space
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/gm-deck.html', {} );
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-shadows-over-sol/templates/gm-deck.html', {} );
|
||||
let gmDeck = new SoSGMDeck(html);
|
||||
game.system.sos = {
|
||||
game.system.sos = {
|
||||
gmDeck: gmDeck,
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
// Set an initiative formula for the system
|
||||
CONFIG.Combat.initiative = {
|
||||
formula: "1d3",
|
||||
decimals: 2
|
||||
@ -63,10 +64,10 @@ Hooks.once("init", async function () {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("foundryvtt-shadows-over-sol", SoSActorSheet, { types: ["character"], makeDefault: true });
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("foundryvtt-shadows-over-sol", SoSItemSheet, { makeDefault: true });
|
||||
foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet);
|
||||
foundry.documents.collections.Actors.registerSheet("foundryvtt-shadows-over-sol", SoSActorSheet, { types: ["character"], makeDefault: true });
|
||||
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet);
|
||||
foundry.documents.collections.Items.registerSheet("foundryvtt-shadows-over-sol", SoSItemSheet, { makeDefault: true });
|
||||
|
||||
// Init/registers
|
||||
Hooks.on('renderChatLog', (log, html, data) => {
|
||||
@ -76,7 +77,7 @@ Hooks.once("init", async function () {
|
||||
Hooks.on('updateCombat', (combat, round, diff, id) => {
|
||||
SoSUtility.updateCombat(combat, round, diff, id);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -89,29 +90,6 @@ function welcomeMessage() {
|
||||
` });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Register world usage statistics
|
||||
function registerUsageCount( registerKey ) {
|
||||
if ( game.user.isGM ) {
|
||||
game.settings.register(registerKey, "world-key", {
|
||||
name: "Unique world key",
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: String
|
||||
});
|
||||
|
||||
let worldKey = game.settings.get(registerKey, "world-key")
|
||||
if ( worldKey == undefined || worldKey == "" ) {
|
||||
worldKey = randomID(32)
|
||||
game.settings.set(registerKey, "world-key", worldKey )
|
||||
}
|
||||
// Simple API counter
|
||||
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.data.version}"`
|
||||
$.ajax(regURL)
|
||||
/* -------------------------------------------- */
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
/* -------------------------------------------- */
|
||||
@ -125,8 +103,9 @@ Hooks.once("ready", function () {
|
||||
user: game.user._id
|
||||
});
|
||||
}
|
||||
registerUsageCount("foundryvtt-shadows-over-sol")
|
||||
|
||||
ClassCounter.registerUsageCount()
|
||||
SoSUtility.ready()
|
||||
|
||||
welcomeMessage();
|
||||
|
||||
});
|
||||
|
@ -1,18 +1,18 @@
|
||||
/* -------------------------------------------- */
|
||||
/* -------------------------------------------- */
|
||||
import { SoSCombat } from "./sos-combat.js";
|
||||
import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const severity2malus = { "none": 0, "light": -1, "moderate": -2, "severe": -3, "critical": -4};
|
||||
/* -------------------------------------------- */
|
||||
const severity2bonus = { "none": 0, "light": 1, "moderate": 2, "severe": 3, "critical": 4};
|
||||
/* -------------------------------------------- */
|
||||
const severity2malus = { "none": 0, "light": -1, "moderate": -2, "severe": -3, "critical": -4 };
|
||||
/* -------------------------------------------- */
|
||||
const severity2bonus = { "none": 0, "light": 1, "moderate": 2, "severe": 3, "critical": 4 };
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class SoSUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* -------------------------------------------- */
|
||||
export class SoSUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async preloadHandlebarsTemplates() {
|
||||
|
||||
|
||||
const templatePaths = [
|
||||
'systems/foundryvtt-shadows-over-sol/templates/actor-sheet.html',
|
||||
'systems/foundryvtt-shadows-over-sol/templates/editor-notes-gm.html',
|
||||
@ -27,60 +27,56 @@ export class SoSUtility {
|
||||
|
||||
'systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html'
|
||||
]
|
||||
return loadTemplates(templatePaths);
|
||||
return foundry.applications.handlebars.loadTemplates(templatePaths);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static fillRange (start, end) {
|
||||
static ready() {
|
||||
Handlebars.registerHelper('select', function (selected, options) {
|
||||
const escapedValue = RegExp.escape(Handlebars.escapeExpression(selected));
|
||||
const rgx = new RegExp(' value=[\"\']' + escapedValue + '[\"\']');
|
||||
const html = options.fn(this);
|
||||
return html.replace(rgx, "$& selected");
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static fillRange(start, end) {
|
||||
return Array(end - start + 1).fill().map((item, index) => start + index);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static onSocketMesssage( msg ) {
|
||||
if( !game.user.isGM ) return; // Only GM
|
||||
|
||||
if (msg.name == 'msg_declare_actions' ) {
|
||||
let combat = game.combats.get( msg.data.combatId); // Get the associated combat
|
||||
combat.setupActorActions( msg.data );
|
||||
/* -------------------------------------------- */
|
||||
static onSocketMesssage(msg) {
|
||||
if (!game.user.isGM) return; // Only GM
|
||||
|
||||
if (msg.name == 'msg_declare_actions') {
|
||||
let combat = game.combats.get(msg.data.combatId); // Get the associated combat
|
||||
combat.setupActorActions(msg.data);
|
||||
} else if (msg.name == 'msg_close_action') {
|
||||
game.combat.closeAction( msg.data.uniqId );
|
||||
game.combat.closeAction(msg.data.uniqId);
|
||||
} else if (msg.name == 'msg_request_defense') {
|
||||
SoSUtility.applyDamage( msg.data );
|
||||
SoSUtility.applyDamage(msg.data);
|
||||
} else if (msg.name == 'msg_reaction_cover') {
|
||||
SoSUtility.reactionCover( msg.data.uniqId );
|
||||
SoSUtility.reactionCover(msg.data.uniqId);
|
||||
} else if (msg.name == 'msg_reaction_melee') {
|
||||
SoSUtility.reactionMelee( msg.data.uniqId );
|
||||
SoSUtility.reactionMelee(msg.data.uniqId);
|
||||
} else if (msg.name == 'msg_reaction_hit') {
|
||||
SoSUtility.reactionHit( msg.data.uniqId );
|
||||
SoSUtility.reactionHit(msg.data.uniqId);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static data(it) {
|
||||
if (it instanceof Actor || it instanceof Item || it instanceof Combatant) {
|
||||
return it.data;
|
||||
}
|
||||
return it;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static templateData(it) {
|
||||
return SoSUtility.data(it)?.data ?? {}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async loadCompendiumData(compendium) {
|
||||
const pack = game.packs.get(compendium);
|
||||
return await pack?.getDocuments() ?? [];
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async loadCompendium(compendium, filter = item => true) {
|
||||
let compendiumData = await SoSUtility.loadCompendiumData(compendium);
|
||||
return compendiumData.filter(filter);
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async loadCompendiumNames(compendium) {
|
||||
const pack = game.packs.get(compendium);
|
||||
@ -88,38 +84,21 @@ export class SoSUtility {
|
||||
await pack.getIndex().then(index => competences = index);
|
||||
return competences;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/*static async loadCompendium(compendium, filter = item => true) {
|
||||
let compendiumItems = await SoSUtility.loadCompendiumNames(compendium);
|
||||
|
||||
const pack = game.packs.get(compendium);
|
||||
let list = [];
|
||||
for (let compendiumItem of compendiumItems) {
|
||||
await pack.getEntity(compendiumItem.id).then(it => {
|
||||
const item = it.data;
|
||||
if (filter(item)) {
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
};
|
||||
return list;
|
||||
}*/
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static updateCombat(combat, round, diff, id) {
|
||||
combat.requestActions();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async openDeclareActions( event) {
|
||||
static async openDeclareActions(event) {
|
||||
event.preventDefault();
|
||||
let round = event.currentTarget.attributes['data-round'].value;
|
||||
let combatantId = event.currentTarget.attributes['data-combatant-id'].value;
|
||||
let combatId = event.currentTarget.attributes['data-combat-id'].value;
|
||||
let uniqId = event.currentTarget.attributes['data-uniq-id'].value;
|
||||
let d = await SoSDialogCombatActions.create( combatId, combatantId, round, uniqId );
|
||||
d.render(true);
|
||||
let d = await SoSDialogCombatActions.create(combatId, combatantId, round, uniqId);
|
||||
d.render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -130,13 +109,13 @@ export class SoSUtility {
|
||||
static getConsequenceBonus(severity) {
|
||||
return severity2bonus[severity] ?? 0;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeEncumbrance( items) {
|
||||
let trappings = items.filter( item => item.type == 'gear' || item.type == 'armor' || item.type == 'weapon' );
|
||||
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.software) && (!object.data.implant) && (!object.data.containerid || object.data.containerid == "") ) {
|
||||
if ((!object.system.worn) && (!object.system.neg) && (!object.system.software) && (!object.system.implant) && (!object.system.containerid || object.system.containerid == "")) {
|
||||
sumEnc += (object.big > 0) ? object.big : 1;
|
||||
}
|
||||
}
|
||||
@ -147,48 +126,49 @@ export class SoSUtility {
|
||||
static closeAction(event) {
|
||||
let uniqId = event.currentTarget.attributes['data-uniq-id'].value;
|
||||
|
||||
if ( game.user.isGM ) {
|
||||
game.combat.closeAction( uniqId );
|
||||
if (game.user.isGM) {
|
||||
game.combat.closeAction(uniqId);
|
||||
} else {
|
||||
game.socket.emit("system.foundryvtt-shadows-over-sol", {
|
||||
name: "msg_close_action", data: { uniqId: uniqId} } );
|
||||
name: "msg_close_action", data: { uniqId: uniqId }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async registerChatCallbacks(html) {
|
||||
html.on("click", '#button-declare-actions', event => {
|
||||
SoSUtility.openDeclareActions( event );
|
||||
$(html).on("click", '#button-declare-actions', event => {
|
||||
SoSUtility.openDeclareActions(event);
|
||||
});
|
||||
$(html).on("click", '#button-end-action', event => {
|
||||
SoSUtility.closeAction(event);
|
||||
});
|
||||
html.on("click", '#button-end-action', event => {
|
||||
SoSUtility.closeAction( event );
|
||||
});
|
||||
|
||||
html.on("click", '#button-reaction-cover', event => {
|
||||
$(html).on("click", '#button-reaction-cover', event => {
|
||||
let uniqId = event.currentTarget.attributes['data-uniq-id'].value;
|
||||
if ( game.user.isGM ) {
|
||||
SoSUtility.reactionCover( uniqId );
|
||||
if (game.user.isGM) {
|
||||
SoSUtility.reactionCover(uniqId);
|
||||
} else {
|
||||
game.socket.emit("system.foundryvtt-shadows-over-sol", { name: "msg_reaction_cover", data: { uniqId: uniqId} } );
|
||||
game.socket.emit("system.foundryvtt-shadows-over-sol", { name: "msg_reaction_cover", data: { uniqId: uniqId } });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
html.on("click", '#button-reaction-melee', event => {
|
||||
$(html).on("click", '#button-reaction-melee', event => {
|
||||
let uniqId = event.currentTarget.attributes['data-uniq-id'].value;
|
||||
if ( game.user.isGM ) {
|
||||
SoSUtility.reactionMelee( uniqId );
|
||||
if (game.user.isGM) {
|
||||
SoSUtility.reactionMelee(uniqId);
|
||||
} else {
|
||||
game.socket.emit("system.foundryvtt-shadows-over-sol", { name: "msg_reaction_melee", data: { uniqId: uniqId} } );
|
||||
game.socket.emit("system.foundryvtt-shadows-over-sol", { name: "msg_reaction_melee", data: { uniqId: uniqId } });
|
||||
}
|
||||
});
|
||||
html.on("click", '#button-reaction-hit', event => {
|
||||
});
|
||||
$(html).on("click", '#button-reaction-hit', event => {
|
||||
let uniqId = event.currentTarget.attributes['data-uniq-id'].value;
|
||||
if ( game.user.isGM ) {
|
||||
SoSUtility.reactionHit( uniqId );
|
||||
if (game.user.isGM) {
|
||||
SoSUtility.reactionHit(uniqId);
|
||||
} else {
|
||||
game.socket.emit("system.foundryvtt-shadows-over-sol", { name: "msg_reaction_hit", data: { uniqId: uniqId} } );
|
||||
game.socket.emit("system.foundryvtt-shadows-over-sol", { name: "msg_reaction_hit", data: { uniqId: uniqId } });
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -202,46 +182,46 @@ export class SoSUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static increaseConsequenceSeverity( severity ) {
|
||||
if ( severity == 'none') return 'light';
|
||||
if ( severity == 'light') return 'moderate';
|
||||
if ( severity == 'moderate') return 'severe';
|
||||
if ( severity == 'severe') return 'critical';
|
||||
static increaseConsequenceSeverity(severity) {
|
||||
if (severity == 'none') return 'light';
|
||||
if (severity == 'light') return 'moderate';
|
||||
if (severity == 'moderate') return 'severe';
|
||||
if (severity == 'severe') return 'critical';
|
||||
return 'critical';
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getConsequenceSeverityLevel( severity) {
|
||||
if ( severity == 'none') return 0;
|
||||
if ( severity == 'light') return 1;
|
||||
if ( severity == 'moderate') return 2;
|
||||
if ( severity == 'severe') return 3;
|
||||
if ( severity == 'critical') return 4;
|
||||
static getConsequenceSeverityLevel(severity) {
|
||||
if (severity == 'none') return 0;
|
||||
if (severity == 'light') return 1;
|
||||
if (severity == 'moderate') return 2;
|
||||
if (severity == 'severe') return 3;
|
||||
if (severity == 'critical') return 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static increaseSeverity( severity ) {
|
||||
if ( severity == 'L') return 'M';
|
||||
if ( severity == 'M') return 'S';
|
||||
if ( severity == 'S') return 'C';
|
||||
if ( severity == 'C') return 'F';
|
||||
static increaseSeverity(severity) {
|
||||
if (severity == 'L') return 'M';
|
||||
if (severity == 'M') return 'S';
|
||||
if (severity == 'S') return 'C';
|
||||
if (severity == 'C') return 'F';
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static decreaseSeverity( severity ) {
|
||||
if ( severity == 'C') return 'S';
|
||||
if ( severity == 'S') return 'M';
|
||||
if ( severity == 'M') return 'L';
|
||||
if ( severity == 'L') return 'N';
|
||||
static decreaseSeverity(severity) {
|
||||
if (severity == 'C') return 'S';
|
||||
if (severity == 'S') return 'M';
|
||||
if (severity == 'M') return 'L';
|
||||
if (severity == 'L') return 'N';
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getSeverityLevel( severity) {
|
||||
if ( severity == 'C') return 4;
|
||||
if ( severity == 'S') return 3;
|
||||
if ( severity == 'M') return 2;
|
||||
if ( severity == 'L') return 1;
|
||||
static getSeverityLevel(severity) {
|
||||
if (severity == 'C') return 4;
|
||||
if (severity == 'S') return 3;
|
||||
if (severity == 'M') return 2;
|
||||
if (severity == 'L') return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -252,172 +232,173 @@ export class SoSUtility {
|
||||
let msgTxt = "<p>Are you sure to delete this item ?";
|
||||
let buttons = {
|
||||
delete: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Yes, delete it",
|
||||
callback: () => {
|
||||
console.log("Delete : ", itemId);
|
||||
actorSheet.actor.deleteEmbeddedDocuments("Item", [itemId]);
|
||||
li.slideUp(200, () => actorSheet.render(false));
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
label: "Cancel"
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Yes, delete it",
|
||||
callback: () => {
|
||||
console.log("Delete : ", itemId);
|
||||
actorSheet.actor.deleteEmbeddedDocuments("Item", [itemId]);
|
||||
li.slideUp(200, () => actorSheet.render(false));
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
label: "Cancel"
|
||||
}
|
||||
msgTxt += "</p>";
|
||||
let d = new Dialog({
|
||||
title: "Confirm deletion",
|
||||
content: msgTxt,
|
||||
buttons: buttons,
|
||||
default: "cancel"
|
||||
});
|
||||
d.render(true);
|
||||
}
|
||||
|
||||
msgTxt += "</p>";
|
||||
let d = new Dialog({
|
||||
title: "Confirm deletion",
|
||||
content: msgTxt,
|
||||
buttons: buttons,
|
||||
default: "cancel"
|
||||
});
|
||||
d.render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async applyDamage( flipData ) {
|
||||
static async applyDamage(flipData) {
|
||||
if (!this.registry) this.registry = {};
|
||||
|
||||
if ( flipData.isReaction) { // Check again resut in case of reaction !
|
||||
if (flipData.isReaction) { // Check again resut in case of reaction !
|
||||
flipData.magnitude = flipData.finalScore - flipData.tn; // Update magnitude
|
||||
if ( flipData.magnitude < 0 ) {
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-reaction-result.html', flipData );
|
||||
ChatMessage.create( { content: html });
|
||||
if (flipData.magnitude < 0) {
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-reaction-result.html', flipData);
|
||||
ChatMessage.create({ content: html });
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// DR management
|
||||
let armor = flipData.target.actor.data.items.find( item => item.type == 'armor' && item.data.worn);
|
||||
flipData.armorDR = armor ? armor.data.dr : 0;
|
||||
flipData.armorGel = armor ?armor.data.gel : 0;
|
||||
flipData.armorReflect = armor ? armor.data.reflect : 0;
|
||||
let dr = flipData.target.actor.data.data.scores.dr.value + flipData.armorDR;
|
||||
if (flipData.weapon.data.category == 'ballistic') {
|
||||
dr += flipData.armorGel;
|
||||
let armor = flipData.target.actor.system.items.find(item => item.type == 'armor' && item.system.worn);
|
||||
flipData.armorDR = armor ? armor.system.dr : 0;
|
||||
flipData.armorGel = armor ? armor.system.gel : 0;
|
||||
flipData.armorReflect = armor ? armor.system.reflect : 0;
|
||||
let dr = flipData.target.actor.system.scores.dr.value + flipData.armorDR;
|
||||
if (flipData.weapon.system.category == 'ballistic') {
|
||||
dr += flipData.armorGel;
|
||||
}
|
||||
if (flipData.weapon.data.category == 'laser') {
|
||||
dr += flipData.armorReflect;
|
||||
if (flipData.weapon.system.category == 'laser') {
|
||||
dr += flipData.armorReflect;
|
||||
}
|
||||
|
||||
let shock = flipData.target.actor.data.data.scores.shock.value || 1;
|
||||
let defenseCritical = flipData.target.actor.data.data.scores.defense.critical;
|
||||
let shock = flipData.target.actor.system.scores.shock.value || 1;
|
||||
let defenseCritical = flipData.target.actor.system.scores.defense.critical;
|
||||
flipData.damageStatus = 'apply_damage';
|
||||
|
||||
flipData.targetShock = shock;
|
||||
flipData.targetDR = dr;
|
||||
flipData.targetDR = dr;
|
||||
flipData.targetCritical = defenseCritical;
|
||||
// DR management
|
||||
if ( flipData.damageValue < dr) {
|
||||
if (flipData.damageValue < dr) {
|
||||
if (flipData.damageValue < dr / 2) {
|
||||
flipData.damageStatus = "no_damage";
|
||||
flipData.damageReason = "Damage are lesser than DR/2";
|
||||
} else {
|
||||
flipData.damageSeverity = this.decreaseSeverity(flipData.damageSeverity );
|
||||
if ( flipData.damageSeverity == 'N') {
|
||||
flipData.damageSeverity = this.decreaseSeverity(flipData.damageSeverity);
|
||||
if (flipData.damageSeverity == 'N') {
|
||||
flipData.damageStatus = "no_damage";
|
||||
flipData.damageReason = "Severity decreased to nothing";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Shock management
|
||||
flipData.woundsList = [];
|
||||
flipData.nbStun = 0;
|
||||
if ( flipData.weapon.stun ) { // Stun weapon case
|
||||
if ( flipData.damageValue >= shock ) {
|
||||
if (flipData.weapon.stun) { // Stun weapon case
|
||||
if (flipData.damageValue >= shock) {
|
||||
flipData.nbStun = Math.floor(flipData.damageValue / shock);
|
||||
}
|
||||
} else {
|
||||
if ( flipData.damageValue >= shock ) {
|
||||
if (flipData.damageValue >= shock) {
|
||||
let incSeverity = Math.floor(flipData.damageValue / shock);
|
||||
for (let i=0; i<incSeverity; i++) {
|
||||
if ( flipData.damageSeverity == 'C') {
|
||||
flipData.woundsList.push( flipData.damageSeverity );
|
||||
for (let i = 0; i < incSeverity; i++) {
|
||||
if (flipData.damageSeverity == 'C') {
|
||||
flipData.woundsList.push(flipData.damageSeverity);
|
||||
flipData.damageSeverity = 'L';
|
||||
} else {
|
||||
flipData.nbStun++;
|
||||
flipData.damageSeverity = this.increaseSeverity( flipData.damageSeverity );
|
||||
flipData.damageSeverity = this.increaseSeverity(flipData.damageSeverity);
|
||||
flipData.damageReason = "Severity increased";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
flipData.woundsList.push( flipData.damageSeverity );
|
||||
flipData.woundsList.push(flipData.damageSeverity);
|
||||
flipData.nbWounds = flipData.woundsList.length;
|
||||
|
||||
// Critical management
|
||||
flipData.isCritical = ( flipData.cardTotal >= defenseCritical);
|
||||
flipData.isCritical = (flipData.cardTotal >= defenseCritical);
|
||||
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-target.html', flipData );
|
||||
ChatMessage.create( { content: html });
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-target.html', flipData);
|
||||
ChatMessage.create({ content: html });
|
||||
|
||||
// Is target able to dodge ??
|
||||
let defender = game.actors.get( flipData.target.actor._id);
|
||||
flipData.coverConsequence = defender.data.items.find( item => item.type == 'consequence' && item.name == 'Cover');
|
||||
flipData.APavailable = game.combat.getAPFromActor( defender.data._id );
|
||||
let defender = game.actors.get(flipData.target.actor._id);
|
||||
flipData.coverConsequence = defender.items.find(item => item.type == 'consequence' && item.name == 'Cover');
|
||||
flipData.APavailable = game.combat.getAPFromActor(defender._id);
|
||||
console.log("FLIPDATE : ", flipData);
|
||||
if ( !flipData.isReaction && flipData.APavailable > 0) {
|
||||
if ( (flipData.weapon.data.category == 'melee' ) || ( (flipData.weapon.data.category == 'laser' || flipData.weapon.data.category == 'ballistic') &&
|
||||
flipData.coverConsequence.data.severity != 'none') ) {
|
||||
flipData.coverSeverityLevel = this.getConsequenceSeverityLevel( flipData.coverConsequence.data.severity ) * 2;
|
||||
flipData.coverSeverityFlag = (flipData.coverSeverityLevel > 0);
|
||||
flipData.isMelee = (flipData.weapon.data.category == 'melee' );
|
||||
let melee = defender.data.items.find( item => item.type == 'skill' && item.name == 'Melee');
|
||||
flipData.defenderMelee = melee.data.value;
|
||||
flipData.uniqId = randomID(16);
|
||||
if (!flipData.isReaction && flipData.APavailable > 0) {
|
||||
if ((flipData.weapon.system.category == 'melee') || ((flipData.weapon.system.category == 'laser' || flipData.weapon.system.category == 'ballistic') &&
|
||||
flipData.coverConsequence.system.severity != 'none')) {
|
||||
flipData.coverSeverityLevel = this.getConsequenceSeverityLevel(flipData.coverConsequence.system.severity) * 2;
|
||||
flipData.coverSeverityFlag = (flipData.coverSeverityLevel > 0);
|
||||
flipData.isMelee = (flipData.weapon.system.category == 'melee');
|
||||
let melee = defender.items.find(item => item.type == 'skill' && item.name == 'Melee');
|
||||
flipData.defenderMelee = melee.system.value;
|
||||
flipData.uniqId = foundry.utils.randomID(16);
|
||||
this.registry[flipData.uniqId] = flipData;
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-request-dodge.html', flipData );
|
||||
ChatMessage.create( { content: html, whisper: ChatMessage.getWhisperRecipients(flipData.target.actor.name).concat(ChatMessage.getWhisperRecipients("GM")) } );
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-request-dodge.html', flipData);
|
||||
ChatMessage.create({ content: html, whisper: ChatMessage.getWhisperRecipients(flipData.target.actor.name).concat(ChatMessage.getWhisperRecipients("GM")) });
|
||||
return; // Wait message response
|
||||
}
|
||||
}
|
||||
flipData.isReaction = false;
|
||||
this.takeWounds( flipData);
|
||||
this.takeWounds(flipData);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static reactionCover( uniqId) {
|
||||
/* -------------------------------------------- */
|
||||
static reactionCover(uniqId) {
|
||||
let flipData = this.registry[uniqId];
|
||||
flipData.tn += flipData.coverSeverityLevel;
|
||||
flipData.isReaction = true;
|
||||
game.combat.decreaseAPFromActor( flipData.target.actor._id );
|
||||
SoSUtility.applyDamage( flipData);
|
||||
}
|
||||
game.combat.decreaseAPFromActor(flipData.target.actor._id);
|
||||
SoSUtility.applyDamage(flipData);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static reactionMelee( uniqId) {
|
||||
static reactionMelee(uniqId) {
|
||||
let flipData = this.registry[uniqId];
|
||||
flipData.tn += flipData.defenderMelee;
|
||||
flipData.isReaction = true;
|
||||
game.combat.decreaseAPFromActor( flipData.target.actor._id );
|
||||
SoSUtility.applyDamage( flipData);
|
||||
game.combat.decreaseAPFromActor(flipData.target.actor._id);
|
||||
SoSUtility.applyDamage(flipData);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static reactionHit( uniqId) {
|
||||
static reactionHit(uniqId) {
|
||||
let flipData = this.registry[uniqId];
|
||||
flipData.isReaction = true;
|
||||
SoSUtility.takeWounds( flipData);
|
||||
SoSUtility.takeWounds(flipData);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static takeWounds( flipData ) {
|
||||
let defender = game.actors.get( flipData.target.actor._id);
|
||||
defender.applyWounds( flipData );
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static takeWounds(flipData) {
|
||||
let defender = game.actors.get(flipData.target.actor._id);
|
||||
defender.applyWounds(flipData);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async processItemDropEvent(actorSheet, event) {
|
||||
let dragData = JSON.parse(event.dataTransfer.getData("text/plain"));
|
||||
let dropID = $(event.target).parents(".item").attr("data-item-id"); // Only relevant if container drop
|
||||
let objectID = dragData.id || dragData.data._id;
|
||||
//console.log("drag/drop", dragData, actorSheet.actor._id, dropID, objectID);
|
||||
if (dragData.type == 'Item' && dropID) {
|
||||
actorSheet.actor.addObjectToContainer(objectID, dropID );
|
||||
const item = fromUuidSync(dragData.uuid)
|
||||
let dropId = $(event.target).parents(".item").attr("data-item-id"); // Only relevant if container drop
|
||||
let objectId = item.id
|
||||
console.log("ID", dragData, dropId, objectId)
|
||||
if (dragData.type == 'Item' && dropId) {
|
||||
actorSheet.actor.addObjectToContainer(objectId, dropId);
|
||||
}
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
0
packs/combat-actions/000014.log
Normal file
0
packs/combat-actions/000014.log
Normal file
BIN
packs/combat-actions/000016.ldb
Normal file
BIN
packs/combat-actions/000016.ldb
Normal file
Binary file not shown.
1
packs/combat-actions/CURRENT
Normal file
1
packs/combat-actions/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/combat-actions/LOCK
Normal file
0
packs/combat-actions/LOCK
Normal file
14
packs/combat-actions/LOG
Normal file
14
packs/combat-actions/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.452183 7f8a977fe6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.463328 7f8a977fe6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.463421 7f8a977fe6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.868691 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.872912 7f8a967fc6c0 Level-0 table #15: 15248 bytes OK
|
||||
2025/05/02-18:57:05.879476 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.921712 7f8a967fc6c0 Manual compaction at level-0 from '!items!06L0cwm4CIuCFetU' @ 72057594037927935 : 1 .. '!items!uSQw858IiBrWkeSj' @ 0 : 0; will stop at '!items!uSQw858IiBrWkeSj' @ 60 : 1
|
||||
2025/05/02-18:57:05.921740 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.927062 7f8a967fc6c0 Generated table #16@0: 20 keys, 15248 bytes
|
||||
2025/05/02-18:57:05.927105 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 15248 bytes
|
||||
2025/05/02-18:57:05.933657 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.933830 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.934033 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:05.945373 7f8a967fc6c0 Manual compaction at level-0 from '!items!uSQw858IiBrWkeSj' @ 60 : 1 .. '!items!uSQw858IiBrWkeSj' @ 0 : 0; will stop at (end)
|
13
packs/combat-actions/LOG.old
Normal file
13
packs/combat-actions/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:50.244518 7f20a6a006c0 Recovering log #6
|
||||
2024/05/31-12:37:50.292179 7f20a6a006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:50.292229 7f20a6a006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.325821 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.325873 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.332227 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.355930 7f20a5a006c0 Manual compaction at level-0 from '!items!06L0cwm4CIuCFetU' @ 72057594037927935 : 1 .. '!items!uSQw858IiBrWkeSj' @ 0 : 0; will stop at '!items!uSQw858IiBrWkeSj' @ 20 : 1
|
||||
2024/05/31-12:57:42.355939 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.359540 7f20a5a006c0 Generated table #11@0: 20 keys, 15155 bytes
|
||||
2024/05/31-12:57:42.359578 7f20a5a006c0 Compacted 1@0 + 0@1 files => 15155 bytes
|
||||
2024/05/31-12:57:42.365779 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.365873 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.386374 7f20a5a006c0 Manual compaction at level-0 from '!items!uSQw858IiBrWkeSj' @ 20 : 1 .. '!items!uSQw858IiBrWkeSj' @ 0 : 0; will stop at (end)
|
BIN
packs/combat-actions/MANIFEST-000012
Normal file
BIN
packs/combat-actions/MANIFEST-000012
Normal file
Binary file not shown.
0
packs/consequences/000014.log
Normal file
0
packs/consequences/000014.log
Normal file
BIN
packs/consequences/000016.ldb
Normal file
BIN
packs/consequences/000016.ldb
Normal file
Binary file not shown.
1
packs/consequences/CURRENT
Normal file
1
packs/consequences/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/consequences/LOCK
Normal file
0
packs/consequences/LOCK
Normal file
14
packs/consequences/LOG
Normal file
14
packs/consequences/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.375278 7f8a96ffd6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.386944 7f8a96ffd6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.387036 7f8a96ffd6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.771010 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.774670 7f8a967fc6c0 Level-0 table #15: 7713 bytes OK
|
||||
2025/05/02-18:57:05.780959 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.813724 7f8a967fc6c0 Manual compaction at level-0 from '!items!3GB0NAetYAVHIzmu' @ 72057594037927935 : 1 .. '!items!vHcRT3kQVWPHSz38' @ 0 : 0; will stop at '!items!vHcRT3kQVWPHSz38' @ 39 : 1
|
||||
2025/05/02-18:57:05.813735 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.817581 7f8a967fc6c0 Generated table #16@0: 13 keys, 7713 bytes
|
||||
2025/05/02-18:57:05.817635 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 7713 bytes
|
||||
2025/05/02-18:57:05.824551 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.824661 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.824810 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:05.848004 7f8a967fc6c0 Manual compaction at level-0 from '!items!vHcRT3kQVWPHSz38' @ 39 : 1 .. '!items!vHcRT3kQVWPHSz38' @ 0 : 0; will stop at (end)
|
13
packs/consequences/LOG.old
Normal file
13
packs/consequences/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:49.951711 7f20a74006c0 Recovering log #6
|
||||
2024/05/31-12:37:50.022164 7f20a74006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:50.022219 7f20a74006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.253682 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.253739 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.260074 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.279344 7f20a5a006c0 Manual compaction at level-0 from '!items!3GB0NAetYAVHIzmu' @ 72057594037927935 : 1 .. '!items!vHcRT3kQVWPHSz38' @ 0 : 0; will stop at '!items!vHcRT3kQVWPHSz38' @ 13 : 1
|
||||
2024/05/31-12:57:42.279371 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.282723 7f20a5a006c0 Generated table #11@0: 13 keys, 7666 bytes
|
||||
2024/05/31-12:57:42.282737 7f20a5a006c0 Compacted 1@0 + 0@1 files => 7666 bytes
|
||||
2024/05/31-12:57:42.288596 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.288688 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.318921 7f20a5a006c0 Manual compaction at level-0 from '!items!vHcRT3kQVWPHSz38' @ 13 : 1 .. '!items!vHcRT3kQVWPHSz38' @ 0 : 0; will stop at (end)
|
BIN
packs/consequences/MANIFEST-000012
Normal file
BIN
packs/consequences/MANIFEST-000012
Normal file
Binary file not shown.
0
packs/gears/000014.log
Normal file
0
packs/gears/000014.log
Normal file
BIN
packs/gears/000016.ldb
Normal file
BIN
packs/gears/000016.ldb
Normal file
Binary file not shown.
1
packs/gears/CURRENT
Normal file
1
packs/gears/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/gears/LOCK
Normal file
0
packs/gears/LOCK
Normal file
14
packs/gears/LOG
Normal file
14
packs/gears/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.392224 7f8a9cffa6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.403118 7f8a9cffa6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.403200 7f8a9cffa6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.781173 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.785800 7f8a967fc6c0 Level-0 table #15: 59307 bytes OK
|
||||
2025/05/02-18:57:05.792099 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.824917 7f8a967fc6c0 Manual compaction at level-0 from '!items!1Gj3ATIVykyAQ5fD' @ 72057594037927935 : 1 .. '!items!zMiaz2HLsddO22H3' @ 0 : 0; will stop at '!items!zMiaz2HLsddO22H3' @ 297 : 1
|
||||
2025/05/02-18:57:05.824929 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.829957 7f8a967fc6c0 Generated table #16@0: 99 keys, 59307 bytes
|
||||
2025/05/02-18:57:05.829994 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 59307 bytes
|
||||
2025/05/02-18:57:05.836156 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.836257 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.836406 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:05.848030 7f8a967fc6c0 Manual compaction at level-0 from '!items!zMiaz2HLsddO22H3' @ 297 : 1 .. '!items!zMiaz2HLsddO22H3' @ 0 : 0; will stop at (end)
|
13
packs/gears/LOG.old
Normal file
13
packs/gears/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:50.024957 7f20a6a006c0 Recovering log #6
|
||||
2024/05/31-12:37:50.068244 7f20a6a006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:50.068393 7f20a6a006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.272250 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.272277 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.279124 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.308486 7f20a5a006c0 Manual compaction at level-0 from '!items!1Gj3ATIVykyAQ5fD' @ 72057594037927935 : 1 .. '!items!zMiaz2HLsddO22H3' @ 0 : 0; will stop at '!items!zMiaz2HLsddO22H3' @ 99 : 1
|
||||
2024/05/31-12:57:42.308494 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.312365 7f20a5a006c0 Generated table #11@0: 99 keys, 58930 bytes
|
||||
2024/05/31-12:57:42.312382 7f20a5a006c0 Compacted 1@0 + 0@1 files => 58930 bytes
|
||||
2024/05/31-12:57:42.318551 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.318708 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.318989 7f20a5a006c0 Manual compaction at level-0 from '!items!zMiaz2HLsddO22H3' @ 99 : 1 .. '!items!zMiaz2HLsddO22H3' @ 0 : 0; will stop at (end)
|
BIN
packs/gears/MANIFEST-000012
Normal file
BIN
packs/gears/MANIFEST-000012
Normal file
Binary file not shown.
0
packs/genelines/000014.log
Normal file
0
packs/genelines/000014.log
Normal file
BIN
packs/genelines/000016.ldb
Normal file
BIN
packs/genelines/000016.ldb
Normal file
Binary file not shown.
1
packs/genelines/CURRENT
Normal file
1
packs/genelines/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/genelines/LOCK
Normal file
0
packs/genelines/LOCK
Normal file
14
packs/genelines/LOG
Normal file
14
packs/genelines/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.467305 7f8a97fff6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.477711 7f8a97fff6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.477882 7f8a97fff6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.879741 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.884118 7f8a967fc6c0 Level-0 table #15: 7901 bytes OK
|
||||
2025/05/02-18:57:05.891258 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.934202 7f8a967fc6c0 Manual compaction at level-0 from '!items!3o49zG4Xtc1I29j2' @ 72057594037927935 : 1 .. '!items!vDOAmovqE53dQzlh' @ 0 : 0; will stop at '!items!vDOAmovqE53dQzlh' @ 24 : 1
|
||||
2025/05/02-18:57:05.934218 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.938408 7f8a967fc6c0 Generated table #16@0: 8 keys, 7901 bytes
|
||||
2025/05/02-18:57:05.938450 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 7901 bytes
|
||||
2025/05/02-18:57:05.944795 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.944948 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.945159 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:05.945392 7f8a967fc6c0 Manual compaction at level-0 from '!items!vDOAmovqE53dQzlh' @ 24 : 1 .. '!items!vDOAmovqE53dQzlh' @ 0 : 0; will stop at (end)
|
13
packs/genelines/LOG.old
Normal file
13
packs/genelines/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:50.295525 7f20a7e006c0 Recovering log #6
|
||||
2024/05/31-12:37:50.344755 7f20a7e006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:50.344847 7f20a7e006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.332388 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.332415 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.338850 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.365997 7f20a5a006c0 Manual compaction at level-0 from '!items!3o49zG4Xtc1I29j2' @ 72057594037927935 : 1 .. '!items!vDOAmovqE53dQzlh' @ 0 : 0; will stop at '!items!vDOAmovqE53dQzlh' @ 8 : 1
|
||||
2024/05/31-12:57:42.366005 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.369253 7f20a5a006c0 Generated table #11@0: 8 keys, 7865 bytes
|
||||
2024/05/31-12:57:42.369293 7f20a5a006c0 Compacted 1@0 + 0@1 files => 7865 bytes
|
||||
2024/05/31-12:57:42.376725 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.376841 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.386385 7f20a5a006c0 Manual compaction at level-0 from '!items!vDOAmovqE53dQzlh' @ 8 : 1 .. '!items!vDOAmovqE53dQzlh' @ 0 : 0; will stop at (end)
|
BIN
packs/genelines/MANIFEST-000012
Normal file
BIN
packs/genelines/MANIFEST-000012
Normal file
Binary file not shown.
0
packs/injuries/000014.log
Normal file
0
packs/injuries/000014.log
Normal file
BIN
packs/injuries/000016.ldb
Normal file
BIN
packs/injuries/000016.ldb
Normal file
Binary file not shown.
1
packs/injuries/CURRENT
Normal file
1
packs/injuries/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/injuries/LOCK
Normal file
0
packs/injuries/LOCK
Normal file
14
packs/injuries/LOG
Normal file
14
packs/injuries/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.407811 7f8a977fe6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.418251 7f8a977fe6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.418341 7f8a977fe6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.792307 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.796541 7f8a967fc6c0 Level-0 table #15: 14986 bytes OK
|
||||
2025/05/02-18:57:05.803084 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.836521 7f8a967fc6c0 Manual compaction at level-0 from '!items!2ZUnK7mjIeizobUM' @ 72057594037927935 : 1 .. '!items!xZL7aO0xOOZvB2cs' @ 0 : 0; will stop at '!items!xZL7aO0xOOZvB2cs' @ 159 : 1
|
||||
2025/05/02-18:57:05.836533 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.840280 7f8a967fc6c0 Generated table #16@0: 53 keys, 14986 bytes
|
||||
2025/05/02-18:57:05.840317 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 14986 bytes
|
||||
2025/05/02-18:57:05.847355 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.847537 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.847800 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:05.848050 7f8a967fc6c0 Manual compaction at level-0 from '!items!xZL7aO0xOOZvB2cs' @ 159 : 1 .. '!items!xZL7aO0xOOZvB2cs' @ 0 : 0; will stop at (end)
|
13
packs/injuries/LOG.old
Normal file
13
packs/injuries/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:50.071905 7f20a7e006c0 Recovering log #6
|
||||
2024/05/31-12:37:50.130041 7f20a7e006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:50.130137 7f20a7e006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.260202 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.260227 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.266171 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.288778 7f20a5a006c0 Manual compaction at level-0 from '!items!2ZUnK7mjIeizobUM' @ 72057594037927935 : 1 .. '!items!xZL7aO0xOOZvB2cs' @ 0 : 0; will stop at '!items!xZL7aO0xOOZvB2cs' @ 53 : 1
|
||||
2024/05/31-12:57:42.288786 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.292530 7f20a5a006c0 Generated table #11@0: 53 keys, 14817 bytes
|
||||
2024/05/31-12:57:42.292553 7f20a5a006c0 Compacted 1@0 + 0@1 files => 14817 bytes
|
||||
2024/05/31-12:57:42.298878 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.298975 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.318947 7f20a5a006c0 Manual compaction at level-0 from '!items!xZL7aO0xOOZvB2cs' @ 53 : 1 .. '!items!xZL7aO0xOOZvB2cs' @ 0 : 0; will stop at (end)
|
BIN
packs/injuries/MANIFEST-000012
Normal file
BIN
packs/injuries/MANIFEST-000012
Normal file
Binary file not shown.
0
packs/languages/000014.log
Normal file
0
packs/languages/000014.log
Normal file
BIN
packs/languages/000016.ldb
Normal file
BIN
packs/languages/000016.ldb
Normal file
Binary file not shown.
1
packs/languages/CURRENT
Normal file
1
packs/languages/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/languages/LOCK
Normal file
0
packs/languages/LOCK
Normal file
14
packs/languages/LOG
Normal file
14
packs/languages/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.437502 7f8a96ffd6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.448138 7f8a96ffd6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.448254 7f8a96ffd6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.848203 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.851561 7f8a967fc6c0 Level-0 table #15: 1753 bytes OK
|
||||
2025/05/02-18:57:05.857944 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.891623 7f8a967fc6c0 Manual compaction at level-0 from '!items!0OaXJm1iih3gYI6P' @ 72057594037927935 : 1 .. '!items!xbpEhhdqx4o5KUJA' @ 0 : 0; will stop at '!items!xbpEhhdqx4o5KUJA' @ 45 : 1
|
||||
2025/05/02-18:57:05.891652 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.895427 7f8a967fc6c0 Generated table #16@0: 15 keys, 1753 bytes
|
||||
2025/05/02-18:57:05.895465 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 1753 bytes
|
||||
2025/05/02-18:57:05.901779 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.901906 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.902085 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:05.945325 7f8a967fc6c0 Manual compaction at level-0 from '!items!xbpEhhdqx4o5KUJA' @ 45 : 1 .. '!items!xbpEhhdqx4o5KUJA' @ 0 : 0; will stop at (end)
|
13
packs/languages/LOG.old
Normal file
13
packs/languages/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:50.189585 7f20a74006c0 Recovering log #6
|
||||
2024/05/31-12:37:50.241798 7f20a74006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:50.241887 7f20a74006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.339058 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.339101 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.345459 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.376981 7f20a5a006c0 Manual compaction at level-0 from '!items!0OaXJm1iih3gYI6P' @ 72057594037927935 : 1 .. '!items!xbpEhhdqx4o5KUJA' @ 0 : 0; will stop at '!items!xbpEhhdqx4o5KUJA' @ 15 : 1
|
||||
2024/05/31-12:57:42.376991 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.380150 7f20a5a006c0 Generated table #11@0: 15 keys, 1725 bytes
|
||||
2024/05/31-12:57:42.380181 7f20a5a006c0 Compacted 1@0 + 0@1 files => 1725 bytes
|
||||
2024/05/31-12:57:42.386148 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.386245 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.386396 7f20a5a006c0 Manual compaction at level-0 from '!items!xbpEhhdqx4o5KUJA' @ 15 : 1 .. '!items!xbpEhhdqx4o5KUJA' @ 0 : 0; will stop at (end)
|
BIN
packs/languages/MANIFEST-000012
Normal file
BIN
packs/languages/MANIFEST-000012
Normal file
Binary file not shown.
0
packs/skills/000014.log
Normal file
0
packs/skills/000014.log
Normal file
BIN
packs/skills/000016.ldb
Normal file
BIN
packs/skills/000016.ldb
Normal file
Binary file not shown.
1
packs/skills/CURRENT
Normal file
1
packs/skills/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/skills/LOCK
Normal file
0
packs/skills/LOCK
Normal file
14
packs/skills/LOG
Normal file
14
packs/skills/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.359919 7f8a977fe6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.370657 7f8a977fe6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.370768 7f8a977fe6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.760331 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.764162 7f8a967fc6c0 Level-0 table #15: 11468 bytes OK
|
||||
2025/05/02-18:57:05.770815 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.803292 7f8a967fc6c0 Manual compaction at level-0 from '!items!0xlCQMyGIQJWPBM1' @ 72057594037927935 : 1 .. '!items!ukWyqxOnKGRp7Owm' @ 0 : 0; will stop at '!items!ukWyqxOnKGRp7Owm' @ 75 : 1
|
||||
2025/05/02-18:57:05.803308 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.806927 7f8a967fc6c0 Generated table #16@0: 25 keys, 11468 bytes
|
||||
2025/05/02-18:57:05.806982 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 11468 bytes
|
||||
2025/05/02-18:57:05.813204 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.813374 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.813581 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:05.847979 7f8a967fc6c0 Manual compaction at level-0 from '!items!ukWyqxOnKGRp7Owm' @ 75 : 1 .. '!items!ukWyqxOnKGRp7Owm' @ 0 : 0; will stop at (end)
|
13
packs/skills/LOG.old
Normal file
13
packs/skills/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:49.885012 7f20acc006c0 Recovering log #6
|
||||
2024/05/31-12:37:49.948288 7f20acc006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:49.948350 7f20acc006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.266276 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.266304 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.272138 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.299102 7f20a5a006c0 Manual compaction at level-0 from '!items!0xlCQMyGIQJWPBM1' @ 72057594037927935 : 1 .. '!items!ukWyqxOnKGRp7Owm' @ 0 : 0; will stop at '!items!ukWyqxOnKGRp7Owm' @ 25 : 1
|
||||
2024/05/31-12:57:42.299113 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.302367 7f20a5a006c0 Generated table #11@0: 25 keys, 11402 bytes
|
||||
2024/05/31-12:57:42.302389 7f20a5a006c0 Compacted 1@0 + 0@1 files => 11402 bytes
|
||||
2024/05/31-12:57:42.308292 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.308373 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.318969 7f20a5a006c0 Manual compaction at level-0 from '!items!ukWyqxOnKGRp7Owm' @ 25 : 1 .. '!items!ukWyqxOnKGRp7Owm' @ 0 : 0; will stop at (end)
|
BIN
packs/skills/MANIFEST-000012
Normal file
BIN
packs/skills/MANIFEST-000012
Normal file
Binary file not shown.
0
packs/subcultures/000014.log
Normal file
0
packs/subcultures/000014.log
Normal file
BIN
packs/subcultures/000016.ldb
Normal file
BIN
packs/subcultures/000016.ldb
Normal file
Binary file not shown.
1
packs/subcultures/CURRENT
Normal file
1
packs/subcultures/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/subcultures/LOCK
Normal file
0
packs/subcultures/LOCK
Normal file
14
packs/subcultures/LOG
Normal file
14
packs/subcultures/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.481820 7f8a9cffa6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.493791 7f8a9cffa6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.493880 7f8a9cffa6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.975023 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.978984 7f8a967fc6c0 Level-0 table #15: 4196 bytes OK
|
||||
2025/05/02-18:57:05.985478 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.985708 7f8a967fc6c0 Manual compaction at level-0 from '!items!0xmW2R5sieo5k4d9' @ 72057594037927935 : 1 .. '!items!xaHXF4xCPb598RYA' @ 0 : 0; will stop at '!items!xaHXF4xCPb598RYA' @ 24 : 1
|
||||
2025/05/02-18:57:05.985717 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.989558 7f8a967fc6c0 Generated table #16@0: 8 keys, 4196 bytes
|
||||
2025/05/02-18:57:05.989614 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 4196 bytes
|
||||
2025/05/02-18:57:05.996681 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.996848 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.997033 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:06.017682 7f8a967fc6c0 Manual compaction at level-0 from '!items!xaHXF4xCPb598RYA' @ 24 : 1 .. '!items!xaHXF4xCPb598RYA' @ 0 : 0; will stop at (end)
|
13
packs/subcultures/LOG.old
Normal file
13
packs/subcultures/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:50.347603 7f20acc006c0 Recovering log #6
|
||||
2024/05/31-12:37:50.403306 7f20acc006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:50.403397 7f20acc006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.397507 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.397541 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.403638 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.419891 7f20a5a006c0 Manual compaction at level-0 from '!items!0xmW2R5sieo5k4d9' @ 72057594037927935 : 1 .. '!items!xaHXF4xCPb598RYA' @ 0 : 0; will stop at '!items!xaHXF4xCPb598RYA' @ 8 : 1
|
||||
2024/05/31-12:57:42.419910 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.423850 7f20a5a006c0 Generated table #11@0: 8 keys, 4158 bytes
|
||||
2024/05/31-12:57:42.423886 7f20a5a006c0 Compacted 1@0 + 0@1 files => 4158 bytes
|
||||
2024/05/31-12:57:42.430495 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.430590 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.436970 7f20a5a006c0 Manual compaction at level-0 from '!items!xaHXF4xCPb598RYA' @ 8 : 1 .. '!items!xaHXF4xCPb598RYA' @ 0 : 0; will stop at (end)
|
BIN
packs/subcultures/MANIFEST-000012
Normal file
BIN
packs/subcultures/MANIFEST-000012
Normal file
Binary file not shown.
0
packs/weaknesses/000014.log
Normal file
0
packs/weaknesses/000014.log
Normal file
BIN
packs/weaknesses/000016.ldb
Normal file
BIN
packs/weaknesses/000016.ldb
Normal file
Binary file not shown.
1
packs/weaknesses/CURRENT
Normal file
1
packs/weaknesses/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000012
|
0
packs/weaknesses/LOCK
Normal file
0
packs/weaknesses/LOCK
Normal file
14
packs/weaknesses/LOG
Normal file
14
packs/weaknesses/LOG
Normal file
@ -0,0 +1,14 @@
|
||||
2025/05/02-18:33:12.422912 7f8a97fff6c0 Recovering log #9
|
||||
2025/05/02-18:33:12.433805 7f8a97fff6c0 Delete type=0 #9
|
||||
2025/05/02-18:33:12.433884 7f8a97fff6c0 Delete type=3 #7
|
||||
2025/05/02-18:57:05.858128 7f8a967fc6c0 Level-0 table #15: started
|
||||
2025/05/02-18:57:05.861347 7f8a967fc6c0 Level-0 table #15: 850 bytes OK
|
||||
2025/05/02-18:57:05.868519 7f8a967fc6c0 Delete type=0 #13
|
||||
2025/05/02-18:57:05.902236 7f8a967fc6c0 Manual compaction at level-0 from '!items!FxCIbJm3T44kC0sG' @ 72057594037927935 : 1 .. '!items!VDYXsT8AZ6krv93p' @ 0 : 0; will stop at '!items!VDYXsT8AZ6krv93p' @ 12 : 1
|
||||
2025/05/02-18:57:05.902256 7f8a967fc6c0 Compacting 1@0 + 1@1 files
|
||||
2025/05/02-18:57:05.908428 7f8a967fc6c0 Generated table #16@0: 4 keys, 850 bytes
|
||||
2025/05/02-18:57:05.908475 7f8a967fc6c0 Compacted 1@0 + 1@1 files => 850 bytes
|
||||
2025/05/02-18:57:05.920970 7f8a967fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2025/05/02-18:57:05.921175 7f8a967fc6c0 Delete type=2 #11
|
||||
2025/05/02-18:57:05.921455 7f8a967fc6c0 Delete type=2 #15
|
||||
2025/05/02-18:57:05.945349 7f8a967fc6c0 Manual compaction at level-0 from '!items!VDYXsT8AZ6krv93p' @ 12 : 1 .. '!items!VDYXsT8AZ6krv93p' @ 0 : 0; will stop at (end)
|
13
packs/weaknesses/LOG.old
Normal file
13
packs/weaknesses/LOG.old
Normal file
@ -0,0 +1,13 @@
|
||||
2024/05/31-12:37:50.133633 7f20acc006c0 Recovering log #6
|
||||
2024/05/31-12:37:50.185827 7f20acc006c0 Delete type=0 #6
|
||||
2024/05/31-12:37:50.185917 7f20acc006c0 Delete type=3 #4
|
||||
2024/05/31-12:57:42.319061 7f20a5a006c0 Level-0 table #10: started
|
||||
2024/05/31-12:57:42.319098 7f20a5a006c0 Level-0 table #10: 0 bytes OK
|
||||
2024/05/31-12:57:42.325607 7f20a5a006c0 Delete type=0 #8
|
||||
2024/05/31-12:57:42.345684 7f20a5a006c0 Manual compaction at level-0 from '!items!FxCIbJm3T44kC0sG' @ 72057594037927935 : 1 .. '!items!VDYXsT8AZ6krv93p' @ 0 : 0; will stop at '!items!VDYXsT8AZ6krv93p' @ 4 : 1
|
||||
2024/05/31-12:57:42.345699 7f20a5a006c0 Compacting 1@0 + 0@1 files
|
||||
2024/05/31-12:57:42.349053 7f20a5a006c0 Generated table #11@0: 4 keys, 837 bytes
|
||||
2024/05/31-12:57:42.349088 7f20a5a006c0 Compacted 1@0 + 0@1 files => 837 bytes
|
||||
2024/05/31-12:57:42.355720 7f20a5a006c0 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2024/05/31-12:57:42.355816 7f20a5a006c0 Delete type=2 #5
|
||||
2024/05/31-12:57:42.386362 7f20a5a006c0 Manual compaction at level-0 from '!items!VDYXsT8AZ6krv93p' @ 4 : 1 .. '!items!VDYXsT8AZ6krv93p' @ 0 : 0; will stop at (end)
|
BIN
packs/weaknesses/MANIFEST-000012
Normal file
BIN
packs/weaknesses/MANIFEST-000012
Normal file
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
font-family: "Neuropol";
|
||||
src: url('../fonts/neuropol.ttf') format("truetype");
|
||||
}
|
||||
|
||||
|
||||
:root {
|
||||
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
|
||||
--window-header-title-font-family: Neuropol;
|
||||
@ -36,7 +36,7 @@
|
||||
--actor-label-font-weight: 700;
|
||||
--actor-label-color: #464331c4;
|
||||
|
||||
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
|
||||
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
|
||||
--debug-background-color-red: #ff000054;
|
||||
--debug-background-color-blue: #1d00ff54;
|
||||
--debug-background-color-green: #54ff0054;
|
||||
@ -46,7 +46,6 @@
|
||||
--debug-box-shadow-green: inset 0 0 2px green;
|
||||
}
|
||||
|
||||
/*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/
|
||||
/* Global styles & Font */
|
||||
.window-app {
|
||||
font-family: Garamond;
|
||||
@ -62,7 +61,7 @@
|
||||
} /* For title, sidebar character and scene */
|
||||
|
||||
.sheet nav.sheet-tabs {font-family: "Garamond";} /* For nav and title */
|
||||
.window-app input, .foundryvtt-shadows-over-sol .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
|
||||
.window-app input, .foundryvtt-shadows-over-sol .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue {
|
||||
font-family: "Garamond"; /* For sheet parts */
|
||||
}
|
||||
|
||||
@ -241,7 +240,7 @@ table {border: 1px solid #7a7971;}
|
||||
.card-icon {
|
||||
height: 128px;
|
||||
width: 90px !important;
|
||||
flex-grow: 1;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.card-img {
|
||||
height: 128px;
|
||||
@ -558,7 +557,7 @@ ul, li {
|
||||
box-shadow: inset 0px 0px 1px #00000096;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.125rem;
|
||||
flex: 1 1 5rem;
|
||||
flex: 1 1 5rem;
|
||||
background: rgba(195, 152, 22, 0.5);
|
||||
}
|
||||
|
||||
@ -674,10 +673,10 @@ ul, li {
|
||||
margin-right: 0.25rem;
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
.blessures-title {
|
||||
.blessures-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.alchimie-title {
|
||||
.alchimie-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.blessure-data {
|
||||
@ -724,7 +723,7 @@ ul, li {
|
||||
|
||||
/* ======================================== */
|
||||
.tokenhudext {
|
||||
display: flex;
|
||||
display: flex;
|
||||
flex: 0 !important;
|
||||
font-family: Neuropol;
|
||||
font-weight: 600;
|
||||
@ -826,7 +825,7 @@ ul, li {
|
||||
.sidebar-tab .directory-list .entity {
|
||||
border-top: 1px dashed rgba(0,0,0,0.25);
|
||||
border-bottom: 0 none;
|
||||
padding: 0.25rem 0;
|
||||
padding: 0.25rem 0;
|
||||
}
|
||||
|
||||
.sidebar-tab .directory-list .entity:hover {
|
||||
@ -924,7 +923,7 @@ ul, li {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#hotbar .bar-controls {
|
||||
#hotbar .bar-controls {
|
||||
background: rgba(30, 25, 20, 1);
|
||||
border: 1px solid rgba(72, 46, 28, 1);
|
||||
}
|
||||
@ -976,12 +975,12 @@ ul, li {
|
||||
/* Tooltip text */
|
||||
.tooltip .tooltiptext {
|
||||
text-align: center;
|
||||
|
||||
|
||||
/* Position the tooltip text */
|
||||
top: 20px;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
|
||||
|
||||
/* Fade in tooltip */
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
@ -990,7 +989,7 @@ ul, li {
|
||||
|
||||
.tooltip .ttt-fatigue{
|
||||
width: 360px;
|
||||
|
||||
|
||||
background: rgba(30, 25, 20, 0.9);
|
||||
/*border-image: url(img/ui/bg_control.jpg) 21 repeat;*/
|
||||
border-image-slice: 6 6 6 6 fill;
|
||||
|
75
system.json
75
system.json
@ -1,16 +1,14 @@
|
||||
{
|
||||
"name": "foundryvtt-shadows-over-sol",
|
||||
"id": "foundryvtt-shadows-over-sol",
|
||||
"title": "Shadows over Sol",
|
||||
"description": "Shadows over Sol for FoundryVTT",
|
||||
"author": "LeRatierBretonnien",
|
||||
"authors": [],
|
||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/",
|
||||
"license": "LICENSE.txt",
|
||||
"flags": {},
|
||||
"version": "2.0.6",
|
||||
"minimumCoreVersion": "0.8.0",
|
||||
"compatibleCoreVersion": "9",
|
||||
"scripts": [],
|
||||
"version": "13.0.0",
|
||||
"compatibility": {
|
||||
"minimum": "13",
|
||||
"verified": "13"
|
||||
},
|
||||
"esmodules": [
|
||||
"module/sos-main.js"
|
||||
],
|
||||
@ -21,89 +19,98 @@
|
||||
{
|
||||
"lang": "en",
|
||||
"name": "English",
|
||||
"path": "lang/en.json"
|
||||
"path": "lang/en.json",
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"packs": [
|
||||
{
|
||||
"name": "skills",
|
||||
"label": "Skills",
|
||||
"path": "./packs/skills.db",
|
||||
"path": "packs/skills.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "consequences",
|
||||
"label": "Consequences",
|
||||
"path": "./packs/consequences.db",
|
||||
"path": "packs/consequences.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "gears",
|
||||
"label": "Gears",
|
||||
"path": "./packs/gears.db",
|
||||
"path": "packs/gears.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "injuries",
|
||||
"label": "Injuries",
|
||||
"path": "./packs/injuries.db",
|
||||
"path": "packs/injuries.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "weaknesses",
|
||||
"label": "Weaknesses",
|
||||
"path": "./packs/weaknesses.db",
|
||||
"path": "packs/weaknesses.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "languages",
|
||||
"label": "Languages",
|
||||
"path": "./packs/languages.db",
|
||||
"path": "packs/languages.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "combat-actions",
|
||||
"label": "Combat Actions",
|
||||
"path": "./packs/combat-actions.db",
|
||||
"path": "packs/combat-actions.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "genelines",
|
||||
"label": "Genelines",
|
||||
"path": "./packs/genelines.db",
|
||||
"path": "packs/genelines.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "subcultures",
|
||||
"label": "Subcultures",
|
||||
"path": "./packs/subcultures.db",
|
||||
"path": "packs/subcultures.db",
|
||||
"type": "Item",
|
||||
"system": "foundryvtt-shadows-over-sol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"system": [],
|
||||
"dependencies": [],
|
||||
"socket": true,
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/raw/branch/master/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/archive/foundryvtt-shadows-over-sol-2.0.6.zip",
|
||||
"protected": false,
|
||||
"gridDistance": 5,
|
||||
"gridUnits": "ft"
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/raw/branch/main/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/archive/foundryvtt-shadows-over-sol-13.0.0.zip",
|
||||
"grid": {
|
||||
"distance": 5,
|
||||
"units": "ft"
|
||||
}
|
||||
}
|
@ -5,8 +5,8 @@
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields">
|
||||
<div class="flexrow">
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{data.name}}" />
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@ -37,23 +37,23 @@
|
||||
<span class="stat-label flexrow tooltip tooltip-nobottom" name="statlabel">XP</span>
|
||||
</li>
|
||||
|
||||
{{#each data.data.stats as |stat key|}}
|
||||
{{#each data.stats as |stat key|}}
|
||||
{{#if stat.isLevelUp}}
|
||||
<li class="stat flexrow xp-level-up" data-attribute="{{key}}">
|
||||
<span class="stat-label flexrow tooltip tooltip-nobottom" name="data.stats.{{key}}.label">
|
||||
<span class="stat-label flexrow tooltip tooltip-nobottom" name="system.stats.{{key}}.label">
|
||||
<span class="tooltiptext ttt-xp">
|
||||
{{localize 'STAT.levelUp'}}
|
||||
</span>
|
||||
{{else}}
|
||||
<li class="stat flexrow list-item" data-attribute="{{key}}">
|
||||
{{/if}}
|
||||
<span class="stat-label flexrow tooltip tooltip-nobottom" name="data.stat.{{key}}.label"><a name={{key}}>{{localize stat.label}}</a></span>
|
||||
<select class="stat-value flexrow" type="text" name="data.stats.{{key}}.value" value="{{stat.value}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}}>
|
||||
<span class="stat-label flexrow tooltip tooltip-nobottom" name="system.stat.{{key}}.label"><a name={{key}}>{{localize stat.label}}</a></span>
|
||||
<select class="stat-value flexrow" type="text" name="system.stats.{{key}}.value" value="{{stat.value}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}}>
|
||||
{{#select stat.value}}
|
||||
{{>"systems/foundryvtt-shadows-over-sol/templates/stat-option-list.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<input class="stat-xp flexrow" type="text" name="data.stats.{{key}}.xp" value="{{stat.xp}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}} />
|
||||
<input class="stat-xp flexrow" type="text" name="system.stats.{{key}}.xp" value="{{stat.xp}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}} />
|
||||
<span class="flexrow"><img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/{{stat.cardsuit}}.webp" /></span>
|
||||
</li>
|
||||
{{/each}}
|
||||
@ -66,14 +66,14 @@
|
||||
<span class="generic-label flexrow tooltip tooltip-nobottom" name="statlabel">Value</span>
|
||||
<span class="generic-label flexrow tooltip tooltip-nobottom" name="statlabel">Bonus/Malus</span>
|
||||
</li>
|
||||
{{#each data.data.scores as |score key|}}
|
||||
{{#each data.scores as |score key|}}
|
||||
<li class="stat flexrow list-item" data-attribute="{{key}}">
|
||||
<span class="generic-label flexrow tooltip tooltip-nobottom" name="data.scores.{{key}}.label">{{localize score.label}}</span>
|
||||
<input class="stat-value flexrow" type="text" name="data.scores.{{key}}.value" value="{{score.value}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}} />
|
||||
<span class="generic-label flexrow tooltip tooltip-nobottom" name="system.scores.{{key}}.label">{{localize score.label}}</span>
|
||||
<input class="stat-value flexrow" type="text" name="system.scores.{{key}}.value" value="{{score.value}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}} />
|
||||
{{#if (eq key 'defense')}}
|
||||
<input class="stat-value flexrow" type="text" name="data.scores.{{key}}.critical" value="{{score.critical}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}} />
|
||||
<input class="stat-value flexrow" type="text" name="system.scores.{{key}}.critical" value="{{score.critical}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}} />
|
||||
{{/if}}
|
||||
<input class="stat-value flexrow" type="text" name="data.scores.{{key}}.bonusmalus" value="{{score.bonusmalus}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}} />
|
||||
<input class="stat-value flexrow" type="text" name="system.scores.{{key}}.bonusmalus" value="{{score.bonusmalus}}" data-dtype="Number" {{#unless @root.editStatSkill}}disabled{{/unless}} />
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
@ -116,13 +116,13 @@
|
||||
<div class="flex-group-left flexcol skill-column">
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each skill1 as |skill key|}}
|
||||
{{#if skill.data.isLevelUp}}
|
||||
{{#if skill.system.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{skill.id}}">
|
||||
{{else}}
|
||||
<li class="item flexrow list-item" data-item-id="{{skill.id}}">
|
||||
{{/if}}
|
||||
<img class="sheet-skill-img" src="{{skill.img}}"/>
|
||||
{{#if skill.data.isLevelUp}}
|
||||
{{#if skill.system.isLevelUp}}
|
||||
<span class="skill-label tooltip tooltip-nobottom">
|
||||
<span class="tooltiptext ttt-xp">
|
||||
</span>
|
||||
@ -130,8 +130,8 @@
|
||||
{{else}}
|
||||
<span class="skill-label"><a>{{skill.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="skill-value" type="text" skillname="{{skill.name}}" value="{{numberFormat skill.data.data.value decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="skill-xp" type="text" skillname="{{skill.name}}" value="{{skill.data.data.xp}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="skill-value" type="text" skillname="{{skill.name}}" value="{{numberFormat skill.system.value decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="skill-xp" type="text" skillname="{{skill.name}}" value="{{skill.system.xp}}" data-dtype="number" {{#unless @root.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>
|
||||
@ -144,13 +144,13 @@
|
||||
<div class="flex-group-left flexcol skill-column">
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each skill2 as |skill key|}}
|
||||
{{#if skill.data.isLevelUp}}
|
||||
{{#if skill.system.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{skill.id}}">
|
||||
{{else}}
|
||||
<li class="item flexrow list-item" data-item-id="{{skill.id}}">
|
||||
{{/if}}
|
||||
<img class="sheet-skill-img" src="{{skill.img}}"/>
|
||||
{{#if skill.data.isLevelUp}}
|
||||
{{#if skill.system.isLevelUp}}
|
||||
<span class="skill-label tooltip tooltip-nobottom">
|
||||
<span class="tooltiptext ttt-xp">
|
||||
</span>
|
||||
@ -158,8 +158,8 @@
|
||||
{{else}}
|
||||
<span class="skill-label"><a>{{skill.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="skill-value" type="text" skillname="{{skill.name}}" value="{{numberFormat skill.data.data.value decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="skill-xp" type="text" skillname="{{skill.name}}" value="{{skill.data.data.xp}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="skill-value" type="text" skillname="{{skill.name}}" value="{{numberFormat skill.system.value decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="skill-xp" type="text" skillname="{{skill.name}}" value="{{skill.system.xp}}" data-dtype="number" {{#unless @root.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>
|
||||
@ -182,16 +182,16 @@
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="item flexrow list-item" data-wound-name="light"><h4>Wounds : </h4></li>
|
||||
<li class="item flexrow list-item" data-wound-name="light"><span class="skill-label">Light :</span>
|
||||
<input class="wound-value" type="text" woundname="light" value="{{numberFormat data.data.wounds.light decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="wound-value" type="text" woundname="light" value="{{numberFormat data.wounds.light decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
</li>
|
||||
<li class="item flexrow list-item" data-wound-name="moderate"><span class="skill-label">Moderate :</span>
|
||||
<input class="wound-value" type="text" woundname="moderate" value="{{numberFormat data.data.wounds.moderate decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="wound-value" type="text" woundname="moderate" value="{{numberFormat data.wounds.moderate decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
</li>
|
||||
<li class="item flexrow list-item" data-wound-name="severe"><span class="skill-label">Severe :</span>
|
||||
<input class="wound-value" type="text" woundname="severe" value="{{numberFormat data.data.wounds.severe decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="wound-value" type="text" woundname="severe" value="{{numberFormat data.wounds.severe decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
</li>
|
||||
<li class="item flexrow list-item" data-wound-name="critical"><span class="skill-label">Critical :</span>
|
||||
<input class="wound-value" type="text" woundname="critical" value="{{numberFormat data.data.wounds.critical decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
<input class="wound-value" type="text" woundname="critical" value="{{numberFormat data.wounds.critical decimals=0}}" data-dtype="number" {{#unless @root.editStatSkill}}disabled{{/unless}}/>
|
||||
</li>
|
||||
<li class="item flexrow list-item" data-wound-name="critical"><span class="skill-label">Total :</span>
|
||||
<span class="skill-label">{{data.currentWounds}} / {{data.totalWounds}}</span>
|
||||
@ -204,8 +204,8 @@
|
||||
<li class="item flexrow list-item" data-item-id="{{conseq.id}}">
|
||||
<img class="sheet-skill-img" src="{{conseq.img}}"/>
|
||||
<span class="conseq-label">{{conseq.name}}</span>
|
||||
<select class="consequence-severity" type="text" name="conseq.data.data.severity" value="{{conseq.data.data.severity}}" data-dtype="String">
|
||||
{{#select conseq.data.data.severity}}
|
||||
<select class="consequence-severity" type="text" name="conseq.system.severity" value="{{conseq.system.severity}}" data-dtype="String">
|
||||
{{#select conseq.system.severity}}
|
||||
<option value="none">None</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="moderate">Moderate</option>
|
||||
@ -236,7 +236,7 @@
|
||||
<img class="sheet-skill-img" src="{{weapon.img}}"/>
|
||||
<span class="weapon-label"><a>{{weapon.name}}</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-equip" title="Equipped">{{#if weapon.data.data.equiped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
||||
<a class="item-control item-equip" title="Equipped">{{#if weapon.system.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>
|
||||
@ -248,9 +248,9 @@
|
||||
{{#each 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="armor-label">{{armor.data.name}}</span>
|
||||
<span class="armor-label">{{armor.name}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-worn" title="Worn">{{#if armor.data.data.worn}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
||||
<a class="item-control item-worn" title="Worn">{{#if armor.system.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>
|
||||
@ -262,9 +262,9 @@
|
||||
{{#each gearsRoot 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">{{gear.data.name}}</span>
|
||||
<span class="conseq-label">{{gear.name}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-equip" title="Worn">{{#if gear.data.data.worn}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
||||
<a class="item-control item-equip" title="Worn">{{#if gear.system.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>
|
||||
@ -273,9 +273,9 @@
|
||||
{{#each data.contains as |subgear key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{subgear.id}}">
|
||||
<img class="sheet-skill-img" src="{{subgear.img}}"/>
|
||||
<span class="conseq-label">{{subgear.data.name}}</span>
|
||||
<span class="conseq-label">{{subgear.name}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-equip" title="Worn">{{#if subgear.data.data.worn}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
||||
<a class="item-control item-equip" title="Worn">{{#if subgear.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>
|
||||
@ -292,11 +292,11 @@
|
||||
<ul class="item-list alternate-list">
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label generic-label">Geneline : </label>
|
||||
<label class="description-label generic-label item-link"><a data-item-id="{{data.geneline.id}}">{{data.geneline.name}}</a></label>
|
||||
<label class="description-label generic-label item-link"><a data-item-id="{{system.geneline.id}}">{{data.geneline.name}}</a></label>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label generic-label">Main Subculture :</label>
|
||||
<select class="stat-value flexrow" type="text" name="data.subculture" value="{{data.subculture}}" data-dtype="String">
|
||||
<select class="stat-value flexrow" type="text" name="system.subculture" value="{{system.subculture}}" data-dtype="String">
|
||||
{{#select subculture}}
|
||||
{{#each subcultureList as |subculture key|}}
|
||||
<option value="{{subculture.name}}">{{subculture.name}}</option>
|
||||
@ -306,29 +306,29 @@
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label stat-label">Genre : </label>
|
||||
<input class="description-value flexrow" type="text" name="data.sex" value="{{data.sex}}" data-dtype="String"/>
|
||||
<input class="description-value flexrow" type="text" name="system.sex" value="{{data.sex}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label stat-label">Weight : </label>
|
||||
<input class="description-value flexrow" type="text" name="data.weight" value="{{data.weight}}" data-dtype="String"/>
|
||||
<input class="description-value flexrow" type="text" name="system.weight" value="{{data.weight}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label stat-label">Size : </label>
|
||||
<input class="description-value flexrow" type="text" name="data.taille" value="{{data.taille}}" data-dtype="String"/>
|
||||
<input class="description-value flexrow" type="text" name="system.taille" value="{{data.taille}}" data-dtype="String"/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label stat-label">Hair : </label>
|
||||
<input class="description-value flexrow" type="text" name="data.hair" value="{{data.hair}}" data-dtype="String"/>
|
||||
<input class="description-value flexrow" type="text" name="system.hair" value="{{data.hair}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label stat-label">Eyes : </label>
|
||||
<input class="description-value flexrow" type="text" name="data.eyes" value="{{data.eyes}}" data-dtype="String"/>
|
||||
<input class="description-value flexrow" type="text" name="system.eyes" value="{{data.eyes}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label stat-label">Age : </label>
|
||||
<input class="description-value flexrow" type="text" name="data.age" value="{{data.age}}" data-dtype="String"/>
|
||||
<input class="description-value flexrow" type="text" name="system.age" value="{{data.age}}" data-dtype="String"/>
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
@ -390,12 +390,12 @@
|
||||
<hr>
|
||||
<h3>Biography : </h3>
|
||||
<div class="form-group editor">
|
||||
{{editor content=data.data.history target="data.history" button=true owner=owner editable=editable}}
|
||||
{{editor history target="system.history" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
<hr>
|
||||
<h3>Notes : </h3>
|
||||
<div class="form-group editor">
|
||||
{{editor content=data.data.notes target="data.notes" button=true owner=owner editable=editable}}
|
||||
{{editor notes target="system.notes" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
<hr>
|
||||
{{>"systems/foundryvtt-shadows-over-sol/templates/editor-notes-gm.html"}}
|
||||
|
@ -53,7 +53,7 @@
|
||||
<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>
|
||||
<option value={{combatant._id}}>{{combatant.actor.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
@ -74,7 +74,7 @@
|
||||
<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>
|
||||
<option value={{combatant._id}}>{{combatant.actor.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
|
@ -22,7 +22,7 @@
|
||||
{{/select}}
|
||||
</select>
|
||||
<span>
|
||||
<h3 class="dialog-label" id="flipSubTitle">Skill Flip : {{skill.name}} ({{skill.data.value}}) </h3>
|
||||
<h3 class="dialog-label" id="flipSubTitle">Skill Flip : {{skill.name}} ({{skill.system.value}}) </h3>
|
||||
<h3 class="dialog-label" id="flipSubTitle">Final Score : <span id='score-base'>0</span> </h3>
|
||||
</span>
|
||||
{{/if}}
|
||||
@ -44,7 +44,7 @@
|
||||
<select name="consequenceSelect" id="consequenceSelectMalus" 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>
|
||||
<option value={{consequence._id}}>{{localize consequence.name}} - {{consequence.system.severity}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
@ -56,7 +56,7 @@
|
||||
<select name="consequenceSelect" id="consequenceSelectBonus" 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>
|
||||
<option value={{consequence._id}}>{{localize consequence.name}} - {{consequence.system.severity}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
@ -66,7 +66,7 @@
|
||||
<div class="flexcol">
|
||||
<div class="tab" data-group="primary">
|
||||
{{#each weaknessList as |weakness key|}}
|
||||
<span class="dialog-label">{{localize weakness.name}} - {{weakness.data.category}}</span>
|
||||
<span class="dialog-label">{{localize weakness.name}} - {{weakness.system.category}}</span>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
@ -90,7 +90,7 @@
|
||||
<hr>
|
||||
{{#if target}}
|
||||
<div>
|
||||
<h4>Target : {{target.actor.name}} - Defense : {{target.actor.data.data.scores.defense.value}}/{{target.actor.data.data.scores.defense.critical}}</h4>
|
||||
<h4>Target : {{target.actor.name}} - Defense : {{target.actor.system.scores.defense.value}}/{{target.actor.system.scores.defense.critical}}</h4>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
<div class="flexrow">
|
||||
<label for="categorie" class="dialog-label">Target Number (TN) : </label>
|
||||
{{#if target}}
|
||||
<label for="categorie" class="dialog-label"> {{target.actor.data.data.scores.defense.value}} </label>
|
||||
<label for="categorie" class="dialog-label"> {{target.actor.system.scores.defense.value}} </label>
|
||||
{{else}}
|
||||
<select name="tn" id="tn" data-dtype="number">
|
||||
{{#select tn}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{#if data.isGM}}
|
||||
<h3>GM Notes : </h3>
|
||||
<div class="form-group editor">
|
||||
{{editor content=data.gmnotes target="data.gmnotes" button=true owner=owner editable=editable}}
|
||||
{{editor gmnotes target="system.gmnotes" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Type</label>
|
||||
<div class="form-group small-editor">
|
||||
<select class="stat-value flexrow" type="text" name="data.type" value="{{data.type}}" data-dtype="String">
|
||||
<select class="stat-value flexrow" type="text" name="system.type" value="{{data.type}}" data-dtype="String">
|
||||
{{#select data.type}}
|
||||
<option value="reaction">Reaction</option>
|
||||
<option value="move">Move</option>
|
||||
@ -27,16 +27,16 @@
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<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="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.targetneeded" {{checked data.targetneeded}}/></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}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,42 +1,40 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{#with data}}
|
||||
<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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.vac" {{checked data.vac}}/></label>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
|
||||
</div>
|
||||
|
@ -1,53 +1,51 @@
|
||||
{{#with data}}
|
||||
<div class="flexrow">
|
||||
<label class="generic-label">Big</label>
|
||||
<input type="text" name="data.big" value="{{data.big}}" data-dtype="Number"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.worn" {{checked data.worn}}/></label>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Description</label>
|
||||
<div class="form-group medium-editor">
|
||||
{{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -13,8 +13,8 @@
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Severity</label>
|
||||
<div class="form-group small-editor">
|
||||
<select class="stat-value flexrow" type="text" name="data.severity" value="{{data.data.severity}}" data-dtype="String">
|
||||
{{#select data.data.severity}}
|
||||
<select class="stat-value flexrow" type="text" name="system.severity" value="{{data.severity}}" data-dtype="String">
|
||||
{{#select data.severity}}
|
||||
<option value="none">None</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="moderate">Moderate</option>
|
||||
@ -27,7 +27,7 @@
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Description</label>
|
||||
<div class="form-group medium-editor">
|
||||
{{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
<div class="flexrow">
|
||||
<label class="generic-label">Container</label>
|
||||
<input type="text" name="data.container" value="{{data.data.container}}" data-dtype="Number"/>
|
||||
<input type="text" name="system.container" value="{{data.container}}" data-dtype="Number"/>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
|
||||
</div>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
@ -1,42 +1,40 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{#with data}}
|
||||
|
||||
<div class="tab" data-group="primary">
|
||||
<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}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Experiences</label>
|
||||
<div class="form-group small-editor">
|
||||
<input type="text" name="data.experiences" value="{{data.experiences}}" data-dtype="String"/>
|
||||
<input type="text" name="system.experiences" value="{{data.experiences}}" data-dtype="String"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Edge</label>
|
||||
<div class="form-group small-editor">
|
||||
<input type="text" name="data.edge" value="{{data.edge}}" data-dtype="String"/>
|
||||
<input type="text" name="system.edge" value="{{data.edge}}" data-dtype="String"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Weakness</label>
|
||||
<div class="form-group small-editor">
|
||||
{{editor content=data.weakness target="data.weakness" button=true owner=owner editable=editable}}
|
||||
{{editor weakness target="system.weakness" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
|
@ -1,27 +1,26 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{#with data}}
|
||||
|
||||
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Card</label>
|
||||
<input type="text" name="data.card" value="{{data.card}}" data-dtype="String"/>
|
||||
<input type="text" name="system.card" value="{{data.card}}" data-dtype="String"/>
|
||||
</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}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Description</label>
|
||||
<div class="form-group medium-editor">
|
||||
{{editor content=data.ata.description target="data.description" button=true owner=owner editable=editable}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,33 +1,32 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{#with data}}
|
||||
<div class="flexcol">
|
||||
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Vector</label>
|
||||
<input type="text" name="data.vector" value="{{data.vector}}" data-dtype="String"/>
|
||||
<input type="text" name="system.vector" value="{{data.vector}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Action</label>
|
||||
<input type="text" name="data.action" value="{{data.action}}" data-dtype="String"/>
|
||||
<input type="text" name="system.action" value="{{data.action}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Effect</label>
|
||||
<input type="text" name="data.effect" value="{{data.effect}}" data-dtype="String"/>
|
||||
<input type="text" name="system.effect" value="{{data.effect}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Notes</label>
|
||||
<div class="form-group medium-editor">
|
||||
{{editor content=data.notes target="data.notes" button=true owner=owner editable=editable}}
|
||||
{{editor notes target="system.notes" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/with}}
|
||||
</section>
|
||||
</form>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
<div class="tab" data-group="primary">
|
||||
<ul>
|
||||
<li class="flexrow"><label class="generic-label">Value</label><input type="text" name="data.data.value" value="{{data.data.value}}" data-dtype="Number"/></li>
|
||||
<li class="flexrow"><label class="generic-label">Value</label><input type="text" name="system.value" value="{{data.value}}" data-dtype="Number"/></li>
|
||||
<ul class="stat-list alternate-list">
|
||||
<li class="stat flexrow list-item" data-attribute="{{key}}">
|
||||
<span class="generic-label flexrow tooltip tooltip-nobottom" name="">Experiences list : </span>
|
||||
@ -27,7 +27,7 @@
|
||||
{{/each}}
|
||||
</ul>
|
||||
<label class="generic-label">Description</label>
|
||||
{{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
@ -1,19 +1,19 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{#with data}}
|
||||
<div class="tab" data-group="primary">
|
||||
|
||||
<div class="tab" data-group="primary">
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Type</label>
|
||||
<div class="form-group small-editor">
|
||||
<select class="stat-value flexrow" type="text" name="data.skill" value="{{data.skill}}" data-dtype="String">
|
||||
<select class="stat-value flexrow" type="text" name="system.skill" value="{{data.skill}}" data-dtype="String">
|
||||
{{#select data.skill}}
|
||||
{{#each skillList as |skill key|}}
|
||||
<option value="{{skill.name}}">{{skill.name}}</option>
|
||||
@ -25,11 +25,10 @@
|
||||
<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}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
|
@ -1,30 +1,28 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{#with data}}
|
||||
|
||||
<div class="tab" data-group="primary">
|
||||
<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}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Experiences</label>
|
||||
<div class="form-group small-editor">
|
||||
<input type="text" name="data.experiences" value="{{data.experiences}}" data-dtype="String"/>
|
||||
<input type="text" name="system.experiences" value="{{data.experiences}}" data-dtype="String"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -10,32 +10,30 @@
|
||||
<section class="sheet-body">
|
||||
|
||||
<div class="tab" data-group="primary">
|
||||
{{#with data}}
|
||||
<div class="flexrow">
|
||||
<label class="generic-label">Cruise</label>
|
||||
<input type="text" name="data.cruise" value="{{data.cruise}}" data-dtype="Number"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.structure" value="{{data.structure}}" data-dtype="Number"/>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
|
||||
</div>
|
||||
|
@ -1,20 +1,19 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{#with data}}
|
||||
|
||||
<div class="tab" data-group="primary">
|
||||
<div class="flexcol">
|
||||
<label class="generic-label">Type</label>
|
||||
<div class="form-group small-editor">
|
||||
<select class="stat-value flexrow" type="text" name="data.category" value="{{data.category}}" data-dtype="String">
|
||||
<select class="stat-value flexrow" type="text" name="system.category" value="{{data.category}}" data-dtype="String">
|
||||
{{#select data.category}}
|
||||
<option value="impairment">Impairment</option>
|
||||
<option value="disability">Disablity</option>
|
||||
@ -27,11 +26,10 @@
|
||||
<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}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
|
@ -1,20 +1,19 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{#with data}}
|
||||
|
||||
<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 class="stat-value flexrow" type="text" name="system.category" value="{{data.category}}" data-dtype="String">
|
||||
{{#select data.category}}
|
||||
<option value="ballistic">Ballistic</option>
|
||||
<option value="laser">Laser</option>
|
||||
@ -27,63 +26,62 @@
|
||||
<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"/>
|
||||
<input type="text" name="system.damage_spade" value="{{data.damage_spade}}" data-dtype="String"/>
|
||||
<img class="cardsuit-img" src="systems/foundryvtt-shadows-over-sol/img/cards/hearts.webp" />
|
||||
<input type="text" name="data.damage_hearts" value="{{data.damage_hearts}}" data-dtype="String"/>
|
||||
<input type="text" name="system.damage_hearts" value="{{data.damage_hearts}}" 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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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"/>
|
||||
<input type="text" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.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>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.spread" {{checked data.spread}}/></label>
|
||||
</div>
|
||||
{{/with}}
|
||||
|
||||
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user