Item structure

This commit is contained in:
sladecraven 2021-04-01 22:35:03 +02:00
parent cc46ce867e
commit e205ca186a
6 changed files with 74 additions and 60 deletions

View File

@ -11,7 +11,7 @@ export class VadentisActorSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["sos", "sheet", "actor"],
classes: ["vadentis", "sheet", "actor"],
template: "systems/foundryvtt-vadentis/templates/actor-sheet.html",
width: 640,
height: 720,
@ -25,8 +25,9 @@ export class VadentisActorSheet extends ActorSheet {
getData() {
let data = super.getData();
this.actor.checkDeck();
data.stats = this.actor.stats;
data.combat = this.actor.combat;
data.magie = this.actor.magie;
return data;
}
@ -128,14 +129,6 @@ export class VadentisActorSheet extends ActorSheet {
}
/* -------------------------------------------- */
async _onDrop(event) {
let toSuper = await SoSUtility.processItemDropEvent(this, event);
if ( toSuper) {
super._onDrop(event);
}
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {

View File

@ -32,12 +32,12 @@ export class VadentisActor extends Actor {
return actor;
}
data.items = [];
/*data.items = [];
let compendiumName = "foundryvtt-vadentis.competences";
if ( compendiumName ) {
let skills = await SoSUtility.loadCompendium(compendiumName);
data.items = data.items.concat( skills );
}
}*/
return super.create(data, options);
}

View File

@ -8,9 +8,9 @@
/* -------------------------------------------- */
// Import Modules
import { VadentisActor } from "./actor.js";
import { VadentisItemSheet } from "./item-sheet.js";
import { VadentisActorSheet } from "./actor-sheet.js";
import { VadentisActor } from "./vadentis-actor.js";
import { VadentisItemSheet } from "./vadentis-item-sheet.js";
import { VadentisActorSheet } from "./vadentis-actor-sheet.js";
import { VadentisUtility } from "./vadentis-utility.js";
import { VadentisCombat } from "./vadentis-combat.js";
@ -48,7 +48,7 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("foundryvtt-vadentis", VadentisActorSheet, { types: ["character"], makeDefault: true });
Actors.registerSheet("foundryvtt-vadentis", VadentisActorSheet, { types: ["personnage"], makeDefault: true });
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("foundryvtt-vadentis", VadentisItemSheet, { makeDefault: true });

View File

@ -9,11 +9,18 @@ export class VadentisUtility extends Entity {
const templatePaths = [
'systems/foundryvtt-vadentis/templates/actor-sheet.html',
'systems/foundryvtt-vadentis/templates/item-sheet.html'
'systems/foundryvtt-vadentis/templates/item-sheet.html',
'systems/foundryvtt-vadentis/templates/score-option-list.html',
'systems/foundryvtt-vadentis/templates/editor-notes-gm.html'
]
return loadTemplates(templatePaths);
}
/* -------------------------------------------- */
static registerChatCallbacks( ) {
}
/* -------------------------------------------- */
static fillRange (start, end) {
return Array(end - start + 1).fill().map((item, index) => start + index);

View File

@ -2,13 +2,13 @@
"name": "foundryvtt-vadentis",
"title": "Vadentis",
"description": "Système Vadentis pour FoundryVTT",
"version": "0.0.1",
"version": "0.0.6",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.9",
"templateVersion": 1,
"templateVersion": 5,
"author": "Uberwald",
"esmodules": [ "module/vadentis-main.js" ],
"esmodules": [ "modules/vadentis-main.js" ],
"styles": ["styles/simple.css"],
"background" : "",
"media": [

View File

@ -1,13 +1,9 @@
{
"Actor": {
"types": ["character"],
"types": ["personnage"],
"templates": {
"common": {
"stats": {
"donnee": {
"label": "Données",
"list": []
},
"experience": {
"total": 0,
"disponibe": 0,
@ -27,17 +23,15 @@
"value": 0,
"max": 0,
"label": "Points d'Adrénaline"
},
}
},
"combat": {
"force": {
"base": 0,
"malus": 0,
"bonus": 0,
"label": "Force"
},
"esquive": {
"value": 0,
"label": "Esquive"
},
"attaque": {
"base": 0,
"malus": 0,
@ -50,6 +44,14 @@
"bonus": 0,
"label": "Défense"
},
"esquive": {
"base": 0,
"malus": 0,
"bonus": 0,
"label": "Esquive"
}
},
"magie": {
"matriseelementaire": {
"base": 0,
"malus": 0,
@ -76,12 +78,36 @@
"age": 0
}
},
"character": {
"personnage": {
"templates": [ "background", "common" ]
}
},
"Item": {
"types": ["competence", "attribut", "technique", "sort", "arme", "tir", "armurebouclier", "equipement" ],
"types": ["competence", "attribut", "technique", "sort", "devotion", "armecc", "tir", "armurebouclier", "equipement", "donnee", "eglise" ],
"templates": {
"sortcommun": {
"xp": 0,
"pe": 0,
"target": "",
"difficulty": 0,
"description": "",
"effect": "",
"critical": "",
"notes": "",
"damage": ""
},
"equipcommun": {
"description": "",
"enc": 0,
"cost": 0
}
},
"donnee": {
"description": ""
},
"eglise": {
"description": ""
},
"attribut": {
"effect": "",
"xp": 0,
@ -95,32 +121,25 @@
"notes": ""
},
"sort": {
"type": "",
"datachurch": "",
"xp": "",
"pe": "",
"target": "",
"difficulty": "",
"description": "",
"effect": "",
"critical": "",
"notes": "",
"damage": ""
"donnee": "",
"templates": [ "sortcommun" ]
},
"devotion": {
"eglise": "",
"templates": [ "sortcommun" ]
},
"competence": {
"xp": "",
"base": "",
"bonus": "",
"malus": "",
"xp": 0,
"base": 0,
"bonus": 0,
"malus": 0,
"description": ""
},
"arme": {
"armecc": {
"type": "",
"damage": "",
"criticaldamage": "",
"description": "",
"enc": 0,
"cost": 0
"templates": [ "equipcommun" ]
},
"tir": {
"type": "",
@ -128,21 +147,16 @@
"criticaldamage": "",
"munition": "",
"distance": "",
"description": "",
"enc": 0,
"cost": 0
"templates": [ "equipcommun" ]
},
"armurebouclier": {
"type": "",
"bonus": "",
"malus": "",
"enc": 0,
"cost": 0
"templates": [ "equipcommun" ]
},
"equipement": {
"description": "",
"enc": 0,
"cost": 0
"templates": [ "equipcommun" ]
}
}
}