Initiali import

This commit is contained in:
sladecraven 2022-03-13 16:17:04 +01:00
parent 28e16a3a3c
commit 6d1360cbd1
64 changed files with 8481 additions and 1 deletions

View File

@ -1,2 +1,2 @@
# fvtt-imperium5
# fvtt-pegasus-rpg

BIN
fonts/middlesaxonytext.ttf Executable file

Binary file not shown.

BIN
fonts/zag_bold.otf Executable file

Binary file not shown.

BIN
fonts/zag_regular.otf Executable file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

1
images/dice/d10-grey.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 40 100 100" width="64" height="64"><g><g transform="matrix(1.1679092,0,0,1.1679092,-274.931,-137.53749)"><path fill="#AAAAAA" d="M313.653,154.602l-26.488,55.612l24.356,15.89l26.354-15.928 L313.653,154.602z"/><path fill="#AAAAAA" d="M314.9,153.687l24.49,55.919l14.175-4.584l0.915-22.612 L314.9,153.687z"/><path fill="#AAAAAA" d="M312.359,227.393v8.568l40.76-28.762l-13.608,3.825 L312.359,227.393z"/><path fill="#AAAAAA" d="M312.359,153.927l-26.756,55.732l-13.925-5.99l-1.229-22.679 L312.359,153.927z"/><path fill="#AAAAAA" d="M310.517,227.213v8.75l-39.019-30.157l13.513,5.275 L310.517,227.213z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 676 B

1
images/dice/d10black.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 40 100 125" width="64" height="64"><g><g transform="matrix(1.1679092,0,0,1.1679092,-274.931,-137.53749)"><path fill="#000000" d="M313.653,154.602l-26.488,55.612l24.356,15.89l26.354-15.928 L313.653,154.602z"/><path fill="#000000" d="M314.9,153.687l24.49,55.919l14.175-4.584l0.915-22.612 L314.9,153.687z"/><path fill="#000000" d="M312.359,227.393v8.568l40.76-28.762l-13.608,3.825 L312.359,227.393z"/><path fill="#000000" d="M312.359,153.927l-26.756,55.732l-13.925-5.99l-1.229-22.679 L312.359,153.927z"/><path fill="#000000" d="M310.517,227.213v8.75l-39.019-30.157l13.513,5.275 L310.517,227.213z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 676 B

BIN
images/dice/d6_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/dice/d6_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/dice/d6_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/dice/d6_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
images/dice/d6_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
images/dice/d6_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

6
images/icons/.directory Normal file
View File

@ -0,0 +1,6 @@
[Dolphin]
SortRole=creationtime
Timestamp=2021,4,13,9,23,48.267
Version=4
ViewMode=1
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

60
images/icons/locked.svg Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24"
height="24"
viewBox="0 0 74.999964 74.999964"
version="1.1"
id="svg3"
sodipodi:docname="locked.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata9">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs7" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="3840"
inkscape:window-height="2066"
id="namedview5"
showgrid="false"
inkscape:zoom="11.84917"
inkscape:cx="66.242132"
inkscape:cy="3.3681778"
inkscape:window-x="-11"
inkscape:window-y="-11"
inkscape:window-maximized="1"
inkscape:current-layer="svg3"
inkscape:document-rotation="0"
units="px" />
<path
id="Sélection #1"
fill="none"
stroke="#000000"
stroke-width="0.43031"
d="m 17.920882,31.968974 c -0.275398,-1.686814 -0.02152,-6.407314 0.253883,-8.175887 1.613662,-10.314528 8.033886,-24.37275369 20.400992,-23.77462269 11.489274,0.5551 17.423247,13.45579069 19.041212,23.34431269 0.309823,1.919182 0.619646,6.773077 0.322733,8.606197 0,0 4.303099,0 4.303099,0 0,0 0,43.030993 0,43.030993 0,0 -49.485638,0 -49.485638,0 0,0 0,-43.030993 0,-43.030993 0,0 5.163719,0 5.163719,0 z m 36.146031,0 c 0,-7.517513 -1.080078,-14.703688 -5.38748,-21.085184 C 46.23097,7.2562774 43.124132,4.5453244 38.575757,4.4334444 26.699204,4.1451364 21.810883,19.614778 21.793671,29.387115 c 0,0 0,2.581859 0,2.581859 0,0 32.273242,0 32.273242,0 z"
style="fill:#000000;fill-opacity:1;stroke:#1a1a1a;stroke-opacity:1;opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

3
lang/en.json Normal file
View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,354 @@
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
import { Imperium5Utility } from "./imperium5-utility.js";
import { Imperium5RollDialog } from "./imperium5-roll-dialog.js";
/* -------------------------------------------- */
export class PegasusActorSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-pegasus-rpg", "sheet", "actor"],
template: "systems/fvtt-pegasus-rpg/templates/actor-sheet.html",
width: 920,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: true
});
}
/* -------------------------------------------- */
async getData() {
const objectData = PegasusUtility.data(this.object);
let actorData = duplicate(PegasusUtility.templateData(this.object));
let formData = {
title: this.title,
id: objectData.id,
type: objectData.type,
img: objectData.img,
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
data: actorData,
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited,
specs: this.actor.getSpecs( ),
optionsDiceList: PegasusUtility.getOptionsDiceList(),
optionsLevel: PegasusUtility.getOptionsLevel(),
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields()) ),
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
perks: duplicate(this.actor.getPerks()),
abilities: duplicate(this.actor.getAbilities()),
activePerks: duplicate(this.actor.getActivePerks()),
powers: duplicate(this.actor.getPowers()),
subActors: duplicate(this.actor.getSubActors()),
race: duplicate(this.actor.getRace()),
role: duplicate(this.actor.getRole()),
effects: duplicate(this.actor.getEffects()),
moneys: duplicate(this.actor.getMoneys()),
encCapacity: this.actor.getEncumbranceCapacity(),
containersTree: this.actor.containersTree,
encCurrent: this.actor.encCurrent,
encHindrance: this.actor.encHindrance,
options: this.options,
owner: this.document.isOwner,
editScore: this.options.editScore,
isGM: game.user.isGM
}
this.formData = formData;
console.log("PC : ", formData, this.object);
return formData;
}
/* -------------------------------------------- */
async openGenericRoll() {
let rollData = PegasusUtility.getBasicRollData()
rollData.alias = "Dice Pool Roll",
rollData.mode = "generic"
rollData.title = `Dice Pool Roll`
rollData.img = "icons/dice/d12black.svg"
let rollDialog = await PegasusRollDialog.create( this.actor, rollData);
rollDialog.render( true );
}
/* -------------------------------------------- */
async rollIDR( itemId, diceValue) {
let item = this.actor.data.items.get( itemId) ?? {name: "Unknown"}
let myRoll = new Roll(diceValue+"x").roll({ async: false })
await PegasusUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
content: `${this.actor.name} has roll IDR for ${item.name} : ${myRoll.total}`
}
ChatMessage.create(chatData)
}
/* -------------------------------------------- */
/** @override */
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
html.bind("keydown", function(e) { // Ignore Enter in actores sheet
if (e.keyCode === 13) return false;
});
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
const item = this.actor.items.get( itemId );
item.sheet.render(true);
});
// Delete Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
PegasusUtility.confirmDelete(this, li);
});
html.find('.spec-group-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
this.actor.specPowerActivate( itemId)
});
html.find('.spec-group-deactivate').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
this.actor.specPowerDeactivate( itemId)
});
html.find('.equip-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.equipActivate( itemId)
});
html.find('.equip-deactivate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.equipDeactivate( itemId)
});
html.find('.effect-used').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
this.actor.perkEffectUsed( itemId)
});
html.find('.perk-status').change(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
this.actor.updatePerkStatus( itemId, ev.currentTarget.value)
});
html.find('.power-cost-spent').change(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
this.actor.updatePowerSpentCost( itemId, ev.currentTarget.value)
});
html.find('.power-dmg-roll').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.powerDmgRoll( itemId )
})
html.find('.perk-used').change(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
let index = Number($(ev.currentTarget).data("use-index") )
this.actor.updatePerkUsed( itemId, index, ev.currentTarget.checked )
});
html.find('.subactor-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let actorId = li.data("actor-id");
let actor = game.actors.get( actorId );
actor.sheet.render(true);
});
html.find('.subactor-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let actorId = li.data("actor-id");
this.actor.delSubActor(actorId);
});
html.find('.quantity-minus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), -1 );
} );
html.find('.quantity-plus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), +1 );
} );
html.find('.ammo-minus').click(event => {
const li = $(event.currentTarget).parents(".item")
this.actor.incDecAmmo( li.data("item-id"), -1 );
} );
html.find('.ammo-plus').click(event => {
const li = $(event.currentTarget).parents(".item")
this.actor.incDecAmmo( li.data("item-id"), +1 )
} );
html.find('.momentum-minus').click(event => {
this.actor.modifyMomentum( -1 )
} )
html.find('.momentum-plus').click(event => {
this.actor.modifyMomentum( 1 )
} )
html.find('.unarmed-attack').click((event) => {
this.actor.rollUnarmedAttack();
});
html.find('.generic-pool-roll').click((event) => {
this.openGenericRoll()
} );
html.find('.attack-melee').click((event) => {
this.actor.rollPool( 'com');
});
html.find('.attack-ranged').click((event) => {
this.actor.rollPool( 'agi');
});
html.find('.defense-roll').click((event) => {
this.actor.rollPool( 'def', true);
});
html.find('.damage-melee').click((event) => {
this.actor.rollPool( 'str');
});
html.find('.damage-ranged').click((event) => {
this.actor.rollPool( 'per');
});
html.find('.damage-resistance').click((event) => {
this.actor.rollPool( 'phy');
});
html.find('.roll-stat').click((event) => {
const statId = $(event.currentTarget).data("stat-key");
this.actor.rollStat(statId);
});
html.find('.roll-mr').click((event) => {
this.actor.rollMR();
});
html.find('.roll-idr').click((event) => {
const diceValue = $(event.currentTarget).data("dice-value")
const li = $(event.currentTarget).parents(".item")
this.rollIDR( li.data("item-id"), diceValue)
})
html.find('.roll-spec').click((event) => {
const li = $(event.currentTarget).parents(".item");
const specId = li.data("item-id");
this.actor.rollSpec(specId);
});
html.find('.power-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const powerId = li.data("item-id");
this.actor.rollPower(powerId);
});
html.find('.weapon-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weaponId = li.data("item-id");
this.actor.rollWeapon(weaponId);
});
html.find('.armor-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const armorId = li.data("item-id");
this.actor.rollArmor(armorId);
});
html.find('.weapon-damage-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weaponId = li.data("item-id");
this.actor.rollWeapon(weaponId, true);
});
html.find('.weapon-damage').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weapon = this.actor.getOwnedItem(li.data("item-id"));
this.actor.rollDamage(weapon, 'damage');
});
html.find('.lock-unlock-sheet').click((event) => {
this.options.editScore = !this.options.editScore;
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);
});
html.find('.item-equip').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.actor.equipItem( li.data("item-id") );
this.render(true);
});
html.find('.power-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.actor.activatePower( li.data("item-id") );
this.render(true);
});
html.find('.change-worstfear').change(ev => {
this.actor.manageWorstFear( ev.currentTarget.checked )
});
html.find('.change-desires').change(ev => {
this.actor.manageDesires( ev.currentTarget.checked )
});
html.find('.update-field').change(ev => {
const fieldName = $(ev.currentTarget).data("field-name");
let value = Number(ev.currentTarget.value);
this.actor.update( { [`${fieldName}`]: value } );
});
html.find('.perk-active').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.actor.activatePerk( li.data("item-id") );
this.render(true);
});
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {
const position = super.setPosition(options);
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
return position;
}
/* -------------------------------------------- */
async _onDropItem(event, dragData) {
console.log(">>>>>> DROPPED!!!!")
let item = await PegasusUtility.searchItem( dragData)
if (item == undefined) {
item = this.actor.items.get( dragData.data._id )
}
this.actor.preprocessItem( event, item, true )
super._onDropItem(event, dragData)
}
/* -------------------------------------------- */
/** @override */
_updateObject(event, formData) {
// Update the Actor
return this.object.update(formData);
}
}

1303
modules/imperium5-actor.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
import { Imperium5Utility } from "./imperium5pegasus-utility.js";
/* -------------------------------------------- */
export class PegasusCombat extends Combat {
/* -------------------------------------------- */
async rollInitiative(ids, formula = undefined, messageOptions = {} ) {
ids = typeof ids === "string" ? [ids] : ids;
for (let cId = 0; cId < ids.length; cId++) {
const c = this.combatants.get(ids[cId]);
let id = c._id || c.id;
let initBonus = c.actor ? c.actor.getInitiativeScore( this.id, id ) : -1;
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: initBonus } ]);
}
return this;
}
/* -------------------------------------------- */
_onUpdate(changed, options, userId) {
}
/* -------------------------------------------- */
static async checkTurnPosition() {
while (game.combat.turn > 0) {
await game.combat.previousTurn()
}
}
/* -------------------------------------------- */
static async decInitBy10( combatantId, value) {
const combatant = game.combat.combatants.get(combatantId)
let initValue = combatant.initiative + value
await game.combat.setInitiative(combatantId, initValue)
setTimeout( this.checkTurnPosition, 400) // The setInitiative is no more blocking for unknown reason
}
}

View File

@ -0,0 +1,123 @@
/* -------------------------------------------- */
import { Imperium5Utility } from "./imperium5-utility.js";
import { Imperium5RollDialog } from "./imperium5-roll-dialog.js";
/* -------------------------------------------- */
export class PegasusCommands {
static init() {
if (!game.system.pegasus.commands) {
const pegasusCommands = new PegasusCommands();
pegasusCommands.registerCommand({ path: ["/char"], func: (content, msg, params) => pegasusCommands.createChar(msg), descr: "Create a new character" });
pegasusCommands.registerCommand({ path: ["/pool"], func: (content, msg, params) => pegasusCommands.poolRoll(msg), descr: "Generic Roll Window" });
game.system.pegasus.commands = pegasusCommands;
}
}
constructor() {
this.commandsTable = {};
}
/* -------------------------------------------- */
registerCommand(command) {
this._addCommand(this.commandsTable, command.path, '', command);
}
/* -------------------------------------------- */
_addCommand(targetTable, path, fullPath, command) {
if (!this._validateCommand(targetTable, path, command)) {
return;
}
const term = path[0];
fullPath = fullPath + term + ' '
if (path.length == 1) {
command.descr = `<strong>${fullPath}</strong>: ${command.descr}`;
targetTable[term] = command;
}
else {
if (!targetTable[term]) {
targetTable[term] = { subTable: {} };
}
this._addCommand(targetTable[term].subTable, path.slice(1), fullPath, command)
}
}
/* -------------------------------------------- */
_validateCommand(targetTable, path, command) {
if (path.length > 0 && path[0] && command.descr && (path.length != 1 || targetTable[path[0]] == undefined)) {
return true;
}
console.warn("pegasusCommands._validateCommand failed ", targetTable, path, command);
return false;
}
/* -------------------------------------------- */
/* Manage chat commands */
processChatCommand(commandLine, content = '', msg = {}) {
// Setup new message's visibility
let rollMode = game.settings.get("core", "rollMode");
if (["gmroll", "blindroll"].includes(rollMode)) msg["whisper"] = ChatMessage.getWhisperRecipients("GM");
if (rollMode === "blindroll") msg["blind"] = true;
msg["type"] = 0;
let command = commandLine[0].toLowerCase();
let params = commandLine.slice(1);
return this.process(command, params, content, msg);
}
/* -------------------------------------------- */
process(command, params, content, msg) {
return this._processCommand(this.commandsTable, command, params, content, msg);
}
/* -------------------------------------------- */
_processCommand(commandsTable, name, params, content = '', msg = {}, path = "") {
console.log("===> Processing command")
let command = commandsTable[name];
path = path + name + " ";
if (command && command.subTable) {
if (params[0]) {
return this._processCommand(command.subTable, params[0], params.slice(1), content, msg, path)
}
else {
this.help(msg, command.subTable);
return true;
}
}
if (command && command.func) {
const result = command.func(content, msg, params);
if (result == false) {
RdDCommands._chatAnswer(msg, command.descr);
}
return true;
}
return false;
}
/* -------------------------------------------- */
async createChar(msg) {
game.system.pegasus.creator = new PegasusActorCreate();
game.system.pegasus.creator.start();
}
/* -------------------------------------------- */
static _chatAnswer(msg, content) {
msg.whisper = [game.user.id];
msg.content = content;
ChatMessage.create(msg);
}
/* -------------------------------------------- */
async poolRoll( msg) {
let rollData = PegasusUtility.getBasicRollData()
rollData.alias = "Dice Pool Roll",
rollData.mode = "generic"
rollData.title = `Dice Pool Roll`;
let rollDialog = await PegasusRollDialog.create( this, rollData);
rollDialog.render( true );
}
}

View File

@ -0,0 +1,509 @@
import { Imperium5Utility } from "./imperium5-utility.js";
/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
export class PegasusItemSheet extends ItemSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-pegasus-rpg", "sheet", "item"],
template: "systems/fvtt-pegasus-rpg/templates/item-sheet.html",
dragDrop: [{ dragSelector: null, dropSelector: null }],
width: 620,
height: 550,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
});
}
/* -------------------------------------------- */
_getHeaderButtons() {
let buttons = super._getHeaderButtons();
// Add "Post to chat" button
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
buttons.unshift(
{
class: "post",
icon: "fas fa-comment",
onclick: ev => { }
})
return buttons
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {
const position = super.setPosition(options);
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
if (this.item.type.includes('weapon')) {
position.width = 640;
}
return position;
}
/* -------------------------------------------- */
async getData() {
const objectData = PegasusUtility.data(this.object);
let itemData = foundry.utils.deepClone(PegasusUtility.templateData(this.object));
let formData = {
title: this.title,
id: this.id,
type: objectData.type,
img: objectData.img,
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
optionsDiceList: PegasusUtility.getOptionsDiceList(),
optionsStatusList: PegasusUtility.getOptionsStatusList(),
data: itemData,
limited: this.object.limited,
options: this.options,
owner: this.document.isOwner,
mr: (this.object.type == 'specialisation'),
isGM: game.user.isGM
}
this.options.editable = !(this.object.data.origin == "embeddedItem");
console.log("ITEM DATA", formData, this);
return formData;
}
/* -------------------------------------------- */
_getHeaderButtons() {
let buttons = super._getHeaderButtons();
buttons.unshift({
class: "post",
icon: "fas fa-comment",
onclick: ev => this.postItem()
});
return buttons
}
/* -------------------------------------------- */
postItem() {
let chatData = duplicate(PegasusUtility.data(this.item));
if (this.actor) {
chatData.actor = { id: this.actor.id };
}
// Don't post any image for the item (which would leave a large gap) if the default image is used
if (chatData.img.includes("/blank.png")) {
chatData.img = null;
}
// JSON object for easy creation
chatData.jsondata = JSON.stringify(
{
compendium: "postedItem",
payload: chatData,
});
renderTemplate('systems/fvtt-pegasus-rpg/templates/post-item.html', chatData).then(html => {
let chatOptions = PegasusUtility.chatDataSetup(html);
ChatMessage.create(chatOptions)
});
}
/* -------------------------------------------- */
async viewSubitem(ev) {
let field = $(ev.currentTarget).data('type');
let idx = Number($(ev.currentTarget).data('index'));
let itemData = this.object.data.data[field][idx];
if (itemData.name != 'None') {
let spec = await Item.create(itemData, { temporary: true });
spec.data.origin = "embeddedItem";
new PegasusItemSheet(spec).render(true);
}
}
/* -------------------------------------------- */
async deleteSubitem(ev) {
let field = $(ev.currentTarget).data('type');
let idx = Number($(ev.currentTarget).data('index'));
let oldArray = this.object.data.data[field];
let itemData = this.object.data.data[field][idx];
if (itemData.name != 'None') {
let newArray = [];
for (var i = 0; i < oldArray.length; i++) {
if (i != idx) {
newArray.push(oldArray[i]);
}
}
this.object.update({ [`data.${field}`]: newArray });
}
}
/* -------------------------------------------- */
async manageSpec() {
let itemData = this.object.data.data.specialisation[0];
if (itemData.name != 'None') {
let spec = await Item.create(itemData, { temporary: true });
spec.data.origin = "embeddedItem";
new PegasusItemSheet(spec).render(true);
}
}
/* -------------------------------------------- */
/** @override */
activateListeners(html) {
super.activateListeners(html);
// 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");
const item = this.object.options.actor.getOwnedItem(li.data("item-id"));
item.sheet.render(true);
});
html.find('.delete-spec').click(ev => {
this.object.update({ "data.specialisation": [{ name: 'None' }] });
});
html.find('.delete-subitem').click(ev => {
this.deleteSubitem(ev);
});
html.find('.stat-choice-flag').click(ev => {
let idx = $(ev.currentTarget).data("stat-idx");
let array = duplicate(this.object.data.data.statincreasechoice);
array[Number(idx)].flag = !array[Number(idx)].flag;
this.object.update({ "data.statincreasechoice": array });
});
// Update Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
let itemType = li.data("item-type");
});
html.find('.view-subitem').click(ev => {
this.viewSubitem(ev);
});
html.find('.view-spec').click(ev => {
this.manageSpec();
});
}
/* -------------------------------------------- */
async addAbility(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
console.log("ABB", event, item, dataItem)
if (event.toElement.className == 'drop-abilities') {
let abilityArray = duplicate(this.object.data.data.abilities);
abilityArray.push(newItem);
await this.object.update({ 'data.abilities': abilityArray });
}
if (event.toElement.className == 'drop-optionnal-abilities') {
let abilityArray = duplicate(this.object.data.data.optionnalabilities);
abilityArray.push(newItem);
await this.object.update({ 'data.optionnalabilities': abilityArray });
}
}
/* -------------------------------------------- */
async addRacePerk(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
if (event.toElement.className == 'drop-race-perk') {
let perkArray = duplicate(this.object.data.data.perks);
perkArray.push(newItem);
await this.object.update({ 'data.perks': perkArray });
}
}
/* -------------------------------------------- */
async addSpecialisation(item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
let specArray = [newItem];
await this.object.update({ 'data.specialisation': specArray });
}
/* -------------------------------------------- */
async addRoleSpecialisation(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
console.log("Add spec", event, newItem);
if (event.toElement.className == 'drop-spec1') {
let specArray = duplicate(this.object.data.data.specialisationsplus1);
specArray.push(newItem);
await this.object.update({ 'data.specialisationsplus1': specArray });
}
if (event.toElement.className == 'drop-spec2') {
let specArray = duplicate(this.object.data.data.specincrease);
specArray.push(newItem);
await this.object.update({ 'data.specincrease': specArray });
}
}
/* -------------------------------------------- */
async addRolePerk(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
console.log("Add spec", event, newItem);
if (event.toElement.className == 'drop-perk2') {
let perkArray = duplicate(this.object.data.data.perks);
perkArray.push(newItem);
await this.object.update({ 'data.perks': perkArray });
}
if (event.toElement.className == 'drop-specialperk1') {
let perkArray = duplicate(this.object.data.data.specialperk);
perkArray.push(newItem);
await this.object.update({ 'data.specialperk': perkArray });
}
}
/* -------------------------------------------- */
async addPower(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
if (event.toElement.className == 'drop-spec-power') {
let powArray = duplicate(this.object.data.data.powers);
powArray.push(newItem);
await this.object.update({ 'data.powers': powArray });
}
}
/* -------------------------------------------- */
async addAbilityPower(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
if (event.toElement.className == 'drop-ability-power') {
let powArray = duplicate(this.object.data.data.powersgained);
powArray.push(newItem);
await this.object.update({ 'data.powersgained': powArray });
}
}
/* -------------------------------------------- */
async addAbilityEffect(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
if (event.toElement.className == 'drop-ability-effect') {
let powArray = duplicate(this.object.data.data.effectsgained);
powArray.push(newItem);
await this.object.update({ 'data.effectsgained': powArray });
}
}
/* -------------------------------------------- */
async addAbilitySpec(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
if (event.toElement.className == 'drop-ability-spec') {
let powArray = duplicate(this.object.data.data.specialisations);
powArray.push(newItem);
await this.object.update({ 'data.specialisations': powArray });
}
}
/* -------------------------------------------- */
async addAbilityWeaponArmor(event, item, dataItem) {
let newItem = duplicate(item.data);
newItem._id = randomID(dataItem.id.length);
if (event.toElement.className == 'drop-ability-weapon') {
let weaponArray = duplicate(this.object.data.data.attackgained);
weaponArray.push(newItem);
await this.object.update({ 'data.attackgained': weaponArray });
}
if (event.toElement.className == 'drop-ability-armor') {
let armorArray = duplicate(this.object.data.data.armorgained);
armorArray.push(newItem);
await this.object.update({ 'data.armorgained': armorArray });
}
}
/* -------------------------------------------- */
async addPerkSpecialisation(event, item, dataItem) {
let newItem = duplicate(item.data);
if (event.toElement.className == 'drop-spec-perk') {
//console.log("PER SPEC", event)
let key = event.toElement.dataset["key"];
if (key == 'affectedspec') {
await this.object.update({ 'data.features.affectedspec.value': newItem.name });
} else {
await this.object.update({ 'data.features.gainspecdice.value': newItem.name });
}
}
}
/* -------------------------------------------- */
async addPerkEffect(event, item, dataItem) {
let newItem = duplicate(item.data)
if (event.toElement.className == 'drop-perk-effect') {
let effectArray = duplicate(this.object.data.data.effectsgained)
effectArray.push(newItem)
await this.object.update({ 'data.effectsgained': effectArray })
}
}
/* -------------------------------------------- */
async addEffectPower(event, item, dataItem) {
let newItem = duplicate(item.data)
if (event.toElement.className == 'drop-power-effect') {
let effectArray = duplicate(this.object.data.data.effectsgained)
effectArray.push(newItem);
await this.object.update({ 'data.effectsgained': effectArray })
}
}
/* -------------------------------------------- */
async addEffectSpec(event, item, dataItem) {
let newItem = duplicate(item.data);
if (event.toElement.className == 'drop-effect-spec') {
let specArray = duplicate(this.object.data.data.recoveryrollspec);
specArray.push(newItem);
await this.object.update({ 'data.recoveryrollspec': specArray });
}
if (event.toElement.className == 'drop-effect-specaffected') {
let specArray = duplicate(this.object.data.data.specaffected);
specArray.push(newItem);
await this.object.update({ 'data.specaffected': specArray });
}
}
/* -------------------------------------------- */
async addEffectItem(event, item, dataItem) {
let newItem = duplicate(item.data);
if (event.toElement.className == 'drop-equipment-effect') {
let effectArray = duplicate(this.object.data.data.effects);
effectArray.push(newItem);
await this.object.update({ 'data.effects': effectArray });
}
}
/* -------------------------------------------- */
async _onDrop(event) {
if (this.object.type == 'weapon' || this.object.type == 'armor' || this.object.type == 'shield'
|| this.object.type == 'equipment') {
let data = event.dataTransfer.getData('text/plain');
if (data) {
let dataItem = JSON.parse(data);
let item = await PegasusUtility.searchItem(dataItem);
if (item.data.type == 'effect') {
return this.addEffectItem(event, item, dataItem);
}
}
}
if (this.object.type == 'power') {
let data = event.dataTransfer.getData('text/plain');
if (data) {
let dataItem = JSON.parse(data);
let item = await PegasusUtility.searchItem(dataItem);
if (item.data.type == 'effect') {
return this.addEffectPower(event, item, dataItem);
}
}
}
if (this.object.type == 'effect') {
let data = event.dataTransfer.getData('text/plain');
if (data) {
let dataItem = JSON.parse(data);
let item = await PegasusUtility.searchItem(dataItem);
if (item.data.type == 'specialisation') {
return this.addEffectSpec(event, item, dataItem);
}
}
}
if (this.object.type == 'race') {
let data = event.dataTransfer.getData('text/plain');
if (data) {
let dataItem = JSON.parse(data);
let item = await PegasusUtility.searchItem(dataItem);
if (item.data.type == 'ability') {
return this.addAbility(event, item, dataItem);
}
if (item.data.type == 'perk') {
return this.addRacePerk(event, item, dataItem);
}
}
}
if (this.object.type == 'perk') {
let data = event.dataTransfer.getData('text/plain')
if (data) {
let dataItem = JSON.parse(data);
let item = await PegasusUtility.searchItem(dataItem)
if (item.data.type == 'specialisation') {
return this.addPerkSpecialisation(event, item, dataItem)
}
if (item.data.type == 'effect') {
return this.addPerkEffect(event, item, dataItem);
}
}
}
if (this.object.type == 'specialisation') {
let data = event.dataTransfer.getData('text/plain');
if (data) {
let dataItem = JSON.parse(data);
let item = await PegasusUtility.searchItem(dataItem);
if (item.data.type == 'power') {
return this.addPower(event, item, dataItem);
}
}
}
if (this.object.type == 'ability') {
let data = event.dataTransfer.getData('text/plain');
if (data) {
let dataItem = JSON.parse(data);
let item = await PegasusUtility.searchItem(dataItem);
if (item.data.type == 'effect') {
return this.addAbilityEffect(event, item, dataItem);
}
if (item.data.type == 'power') {
return this.addAbilityPower(event, item, dataItem);
}
if (item.data.type == 'specialisation') {
return this.addAbilitySpec(event, item, dataItem);
}
if (item.data.type == 'weapon' || item.data.type == 'armor') {
return this.addAbilityWeaponArmor(event, item, dataItem);
}
}
}
if (this.object.type == 'role') {
let data = event.dataTransfer.getData('text/plain');
if (data) {
let dataItem = JSON.parse(data);
let item = await PegasusUtility.searchItem(dataItem);
if (item.data.type == 'specialisation') {
return this.addRoleSpecialisation(event, item, dataItem);
}
if (item.data.type == 'perk') {
return this.addRolePerk(event, item, dataItem);
}
}
}
ui.notifications.warn("This item can not be dropped over another item");
}
/* -------------------------------------------- */
get template() {
let type = this.item.type;
return `systems/fvtt-pegasus-rpg/templates/item-${type}-sheet.html`;
}
/* -------------------------------------------- */
/** @override */
_updateObject(event, formData) {
return this.object.update(formData);
}
}

32
modules/imperium5-item.js Normal file
View File

@ -0,0 +1,32 @@
export const defaultItemImg = {
specialisation: "systems/fvtt-pegasus-rpg/images/icons/icon_spec.webp",
perk: "systems/fvtt-pegasus-rpg/images/icons/icon_perk.webp",
ability: "systems/fvtt-pegasus-rpg/images/icons/icon_raceability.webp",
armor: "systems/fvtt-pegasus-rpg/images/icons/icon_armour.webp",
weapon: "systems/fvtt-pegasus-rpg/images/icons/icon_weapon.webp",
equipment: "systems/fvtt-pegasus-rpg/images/icons/icon_equipment.webp",
effect: "systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp",
race: "systems/fvtt-pegasus-rpg/images/icons/icon_race.webp",
power: "systems/fvtt-pegasus-rpg/images/icons/icon_power.webp",
armour: "systems/fvtt-pegasus-rpg/images/icons/icon_armour.webp",
equipment: "systems/fvtt-pegasus-rpg/images/icons/icon_equipment.webp",
weapon: "systems/fvtt-pegasus-rpg/images/icons/icon_meleeweapon.webp",
shield: "systems/fvtt-pegasus-rpg/images/icons/icon_shield.webp",
money: "systems/fvtt-pegasus-rpg/images/icons/icon_money.webp",
}
/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
export class PegasusItem extends Item {
constructor(data, context) {
if (!data.img) {
data.img = defaultItemImg[data.type];
}
super(data, context);
}
}

128
modules/imperium5-main.js Normal file
View File

@ -0,0 +1,128 @@
/**
* imperium5 system
* Author: Uberwald
* Software License: Prop
*/
/* -------------------------------------------- */
/* -------------------------------------------- */
// Import Modules
import { Imperium5Actor } from "./imperium5-actor.js";
import { Imperium5ItemSheet } from "./imperium5-item-sheet.js";
import { Imperium5ActorSheet } from "./imperium5-actor-sheet.js";
import { Imperium5Utility } from "./imperium5-utility.js";
import { Imperium5Combat } from "./imperium5-combat.js";
import { Imperium5Item } from "./imperium5-item.js";
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
/************************************************************************************/
Hooks.once("init", async function () {
console.log(`Initializing Pegasus RPG`);
/* -------------------------------------------- */
// preload handlebars templates
PegasusUtility.preloadHandlebarsTemplates();
/* -------------------------------------------- */
game.settings.register("fvtt-pegasus-rpg", "dice-max-level", {
name: "Maximum level value for dices lists",
hint: "Se the maximum level value for dices lists",
scope: "world",
config: true,
default: 20,
type: Number
});
/* -------------------------------------------- */
// Set an initiative formula for the system
CONFIG.Combat.initiative = {
formula: "1d6",
decimals: 1
};
/* -------------------------------------------- */
game.socket.on("system.fvtt-pegasus-rpg", data => {
PegasusUtility.onSocketMesssage(data)
});
/* -------------------------------------------- */
// Define custom Entity classes
CONFIG.Combat.documentClass = PegasusCombat
CONFIG.Actor.documentClass = PegasusActor
CONFIG.Item.documentClass = PegasusItem
//CONFIG.Token.objectClass = PegasusToken
game.system.pegasus = { };
/* -------------------------------------------- */
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("fvtt-pegasus", PegasusActorSheet, { types: ["character"], makeDefault: true });
Actors.registerSheet("fvtt-pegasus", PegasusNPCSheet, { types: ["npc"], makeDefault: false });
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("fvtt-pegasus", PegasusItemSheet, { makeDefault: true });
PegasusUtility.init();
});
/* -------------------------------------------- */
function welcomeMessage() {
ChatMessage.create({
user: game.user.id,
whisper: [game.user.id],
content: `<div id="welcome-message-pegasus"><span class="rdd-roll-part">
<strong>Welcome to the Pegasus Engine CORE RPG.</strong>
<br>Created by GMD Online
<p>The Pegasus Engine is a available for free on our website. It is also available as a PDF and in Print format at an affordable price.</p>
<p>This project has been made possible thanks to all the Official GMD Members and Patreon Members that have supported me and as a result made it possible to supply this interface for free.</p>
<p>In return I have made available a fully detailed Compendium for FREE for all members, which can be obtained from the Members page on my website.</p>
<P>You too can become a supporter for future projects and enjoy amazing rewards.
<BR>Sign up Here : https://www.gmdonline.co.uk/gmdmemberspage/</p>
<p>GMD Online, GMD CORE RPG logo are © 2018 CORE Worlds and Game Rules © 2001. Interface © 2021 All rights reserved.</p>
<p>Enjoy and become the hero you were born to be!</p>
` });
}
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
Hooks.once("ready", function () {
PegasusUtility.ready();
// User warning
if (!game.user.isGM && game.user.character == undefined) {
ui.notifications.info("Warning ! No character linked to your user !");
ChatMessage.create({
content: "<b>WARNING</b> The player " + game.user.name + " is not linked to a character !",
user: game.user._id
});
}
// CSS patch for v9
if (game.version) {
let sidebar = document.getElementById("sidebar");
sidebar.style.width = "min-content";
}
welcomeMessage();
});
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
Hooks.on("chatMessage", (html, content, msg) => {
if (content[0] == '/') {
let regExp = /(\S+)/g;
let commands = content.match(regExp);
if (game.system.pegasus.commands.processChatCommand(commands, content, msg)) {
return false;
}
}
return true;
});

View File

@ -0,0 +1,239 @@
import { Imperium5Utility } from "./imperium5-utility.js";
export class PegasusRollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData ) {
let options = { classes: ["PegasusDialog"], width: 620, height: 380, 'z-index': 99999 };
let html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html', rollData);
return new PegasusRollDialog(actor, rollData, html, options );
}
/* -------------------------------------------- */
constructor(actor, rollData, html, options, close = undefined) {
let conf = {
title: (rollData.mode == "skill") ? "Skill" : "Roll",
content: html,
buttons: {
roll: {
icon: '<i class="fas fa-check"></i>',
label: "Roll !",
callback: () => { this.roll() }
},
cancel: {
icon: '<i class="fas fa-times"></i>',
label: "Cancel",
callback: () => { this.close() }
} },
close: close
}
super(conf, options);
this.actor = actor;
this.rollData = rollData;
}
/* -------------------------------------------- */
roll () {
PegasusUtility.rollPegasus( this.rollData )
}
/* -------------------------------------------- */
manageEffects( effectIdx, toggled) {
let effect = this.rollData.effectsList[effectIdx]
if (effect) {
effect.applied = toggled
let level, genre, idVal
if (effect.type == 'hindrance' ) {
level = effect.value
genre = 'positive'
idVal = "#hindranceDicesLevel"
}
if (effect.type == 'effect' ) {
let effectData = effect.effect
level = effectData.data.effectlevel
genre = effectData.data.genre
effectData.data.isUsed = toggled
if (effectData.data.bonusdice) {
idVal = "#bonusDicesLevel"
}
if (effectData.data.reducedicevalue || effectData.data.statdice) {
idVal = "#statDicesLevel"
}
if (effectData.data.otherdice) {
idVal = "#otherDicesLevel"
}
if (effectData.data.hindrance) {
idVal = "#hindranceDicesLevel"
genre = 'positive' // Dynamic fix
}
}
// Now process the dice level update
let newLevel = Number($(idVal).val())
console.log("Ongoing", newLevel, toggled, idVal )
if (toggled) {
if ( genre == 'positive') {
newLevel += Number(level)
}else {
newLevel -= Number(level)
}
}else {
if ( genre == 'positive') {
newLevel -= Number(level)
}else {
newLevel += Number(level)
}
}
newLevel = (newLevel<0) ? 0 : newLevel
$(idVal).val(newLevel)
}
//console.log("Effect", effect, toggled)
this.rollData.statDicesLevel = Number($('#statDicesLevel').val())
this.rollData.specDicesLevel = Number($('#specDicesLevel').val())
this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val())
this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val())
this.rollData.otherDicesLevel = Number($('#otherDicesLevel').val())
}
/* -------------------------------------------- */
manageArmors( armorIdx, toggled) {
let armor = this.rollData.armorsList[armorIdx]
if (armor) {
armor.applied = toggled
if (armor.type == 'other' ) {
if (toggled) {
this.rollData.otherDicesLevel += Number(armor.value)
} else {
this.rollData.otherDicesLevel -= Number(armor.value)
this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel<0) ? 0 : this.rollData.otherDicesLevel
}
$("#otherDicesLevel").val(this.rollData.otherDicesLevel)
}
}
console.log("Armor", armorIdx, toggled)
}
/* -------------------------------------------- */
manageWeapons( weaponIdx, toggled) {
let weapon = this.rollData.weaponsList[weaponIdx]
if (weapon) {
if (toggled) {
this.rollData.weaponName = weapon.weapon.name
} else {
this.rollData.weaponName = undefined
}
weapon.applied = toggled
if (weapon.type == 'damage' || weapon.type == 'enhanced' ) {
if (toggled) {
this.rollData.otherDicesLevel += Number(weapon.value)
} else {
this.rollData.weaponName = undefined
this.rollData.otherDicesLevel -= Number(weapon.value)
this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel<0) ? 0 : this.rollData.otherDicesLevel
}
$("#otherDicesLevel").val(this.rollData.otherDicesLevel)
}
}
console.log("Weapon", weaponIdx, toggled, this.rollData.otherDicesLevel, weapon)
}
/* -------------------------------------------- */
manageEquip( equipIdx, toggled) {
let equip = this.rollData.equipmentsList[equipIdx]
if (equip) {
equip.applied = toggled
let idVal = "#otherDicesLevel" // Default
if (equip.equip.data.bonusdice) {
idVal = "#bonusDicesLevel"
}
if (equip.equip.data.statdice) {
idVal = "#statDicesLevel"
}
if (equip.equip.data.otherdice) {
idVal = "#otherDicesLevel"
}
let newLevel = Number($(idVal).val())
if (toggled) {
newLevel += Number(equip.value)
} else {
newLevel -= Number(equip.value)
}
newLevel = (newLevel <0) ? 0 : newLevel
$(idVal).val(newLevel)
// Then refresh
this.rollData.statDicesLevel = Number($('#statDicesLevel').val())
this.rollData.specDicesLevel = Number($('#specDicesLevel').val())
this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val())
this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val())
this.rollData.otherDicesLevel = Number($('#otherDicesLevel').val())
}
}
/* -------------------------------------------- */
activateListeners(html) {
super.activateListeners(html);
var dialog = this;
function onLoad() {
}
$(function () { onLoad(); });
html.find('#specList').change(async (event) => {
this.rollData.selectedSpec = event.currentTarget.value
let spec = this.rollData.specList.find(item => item._id == this.rollData.selectedSpec)
if ( spec) {
this.rollData.specDiceLevel = spec.data.level
this.rollData.specName = spec.name
$('#specDicesLevel').val(this.rollData.specDiceLevel)
} else {
this.rollData.specName = undefined
$('#specDicesLevel').val(0)
}
const content = await renderTemplate("systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html", this.rollData)
this.data.content = content
this.render(true)
});
html.find('#statDicesLevel').change((event) => {
this.rollData.statDicesLevel = Number(event.currentTarget.value)
});
html.find('#specDicesLevel').change((event) => {
this.rollData.specDicesLevel = Number(event.currentTarget.value)
});
html.find('#bonusDicesLevel').change((event) => {
this.rollData.bonusDicesLevel = Number(event.currentTarget.value)
});
html.find('#hindranceDicesLevel').change((event) => {
this.rollData.hindranceDicesLevel = Number(event.currentTarget.value)
});
html.find('#otherDicesLevel').change((event) => {
this.rollData.otherDicesLevel = Number(event.currentTarget.value)
});
html.find('.effect-clicked').change((event) => {
let toggled = event.currentTarget.checked
let effectIdx = $(event.currentTarget).data("effect-idx")
this.manageEffects( effectIdx, toggled)
});
html.find('.armor-clicked').change((event) => {
let toggled = event.currentTarget.checked
let armorIdx = $(event.currentTarget).data("armor-idx")
this.manageArmors( armorIdx, toggled)
});
html.find('.weapon-clicked').change((event) => {
let toggled = event.currentTarget.checked
let weaponIdx = $(event.currentTarget).data("weapon-idx")
this.manageWeapons( weaponIdx, toggled)
});
html.find('.equip-clicked').change((event) => {
let toggled = event.currentTarget.checked
let equipIdx = $(event.currentTarget).data("equip-idx")
this.manageEquip( equipIdx, toggled)
});
}
}

View File

@ -0,0 +1,741 @@
/* -------------------------------------------- */
import { Imperium5Combat } from "./imperium5-combat.js";
import { Imperium5Commands } from "./imperium5-commands.js";
/* -------------------------------------------- */
const __level2Dice = ["d0", "d4", "d6", "d8", "d10", "d12"];
const __name2DiceValue = { "0": 0, "d0": 0, "d4": 4, "d6": 6, "d8": 8, "d10": 10, "d12": 12 }
/* -------------------------------------------- */
export class Imperium5Utility {
/* -------------------------------------------- */
static async init() {
Hooks.on('renderChatLog', (log, html, data) => PegasusUtility.chatListeners(html));
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
PegasusUtility.pushInitiativeOptions(html, options);
});
Hooks.on("dropCanvasData", (canvas, data) => {
PegasusUtility.dropItemOnToken(canvas, data)
});
this.rollDataStore = {}
this.defenderStore = {}
this.diceList = [];
this.diceFoundryList = [];
this.optionsDiceList = "";
this.buildDiceLists();
PegasusCommands.init();
Handlebars.registerHelper('count', function (list) {
return list.length;
})
Handlebars.registerHelper('includes', function (array, val) {
return array.includes(val);
})
Handlebars.registerHelper('upper', function (text) {
return text.toUpperCase();
})
Handlebars.registerHelper('lower', function (text) {
return text.toLowerCase()
})
Handlebars.registerHelper('upperFirst', function (text) {
if (typeof text !== 'string') return text
return text.charAt(0).toUpperCase() + text.slice(1)
})
Handlebars.registerHelper('notEmpty', function (list) {
return list.length > 0;
})
Handlebars.registerHelper('mul', function (a, b) {
return parseInt(a) * parseInt(b);
})
}
/* -------------------------------------------- */
static pushInitiativeOptions(html, options) {
console.log('Option pushed....')
options.push({ name: "Apply -10", condition: true, icon: '<i class="fas fa-plus"></i>', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } })
}
/* -------------------------------------------- */
static getSpecs() {
return this.specs;
}
/* -------------------------------------------- */
static async ready() {
const specs = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.specialisations");
this.specs = specs.map(i => i.toObject());
}
/* -------------------------------------------- */
static async addItemDropToActor(actor, item) {
actor.preprocessItem("none", item, false)
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
content: `<div>The item ${item.name} has been dropped on the actor ${actor.name}</div`
}
ChatMessage.create(chatData);
}
/* -------------------------------------------- */
static async dropItemOnToken(canvas, data) {
if (data.type != "Item") {
return
}
const position = canvas.grid.getTopLeft(data.x, data.y)
let x = position[0]
let y = position[1]
const tokensList = [...canvas.tokens.placeables]
for (let token of tokensList) {
if (x >= token.x && x <= (token.x + token.width)
&& y >= token.y && y <= (token.y + token.height)) {
let item = await this.searchItem(data)
if (game.user.isGM || token.actor.isOwner) {
this.addItemDropToActor(token.actor, item)
} else {
game.socket.emit("system.fvtt-pegasus-rpg", { name: "msg_gm_item_drop", data: { actorId: token.actor.id, itemId: item.id, isPack: item.pack } })
}
return
}
}
}
/* -------------------------------------------- */
static async loadCompendiumData(compendium) {
const pack = game.packs.get(compendium);
return await pack?.getDocuments() ?? [];
}
/* -------------------------------------------- */
static async loadCompendium(compendium, filter = item => true) {
let compendiumData = await PegasusUtility.loadCompendiumData(compendium);
return compendiumData.filter(filter);
}
/* -------------------------------------------- */
static buildDiceLists() {
let maxLevel = game.settings.get("fvtt-pegasus-rpg", "dice-max-level");
let diceList = ["0"];
let diceValues = [0];
let diceFoundryList = ["d0"];
let diceLevel = 1;
let concat = "";
let concatFoundry = "";
let optionsDiceList = '<option value="0">0</option>';
let optionsLevel = '<option value="0">0</option>';
for (let i = 1; i <= maxLevel; i++) {
let currentDices = concat + __level2Dice[diceLevel];
diceList.push(currentDices);
diceFoundryList.push(concatFoundry + __level2Dice[diceLevel] + "x");
if (__level2Dice[diceLevel] == "d12") {
concat = concat + "d12 ";
concatFoundry = concatFoundry + "d12x, ";
diceLevel = 1;
} else {
diceLevel++;
}
optionsDiceList += `<option value="${i}">${currentDices}</option>`;
optionsLevel += `<option value="${i}">${i}</option>`;
}
this.diceList = diceList;
this.diceFoundryList = diceFoundryList;
this.optionsDiceList = optionsDiceList;
this.optionsLevel = optionsLevel;
this.optionsStatusList = '<option value="notapplicable">Not applicable</option><option value="health">Health</option><option value="nrg">NRG</option><option value="delirium">Delirium</option>';
}
/* -------------------------------------------- */
static getOptionsStatusList() {
return this.optionsStatusList;
}
/* -------------------------------------------- */
static getOptionsDiceList() {
return this.optionsDiceList;
}
/* -------------------------------------------- */
static getOptionsLevel() {
return this.optionsLevel;
}
/* -------------------------------------------- */
static computeAttackDefense(defenseRollId) {
let defenseRollData = this.getRollData(defenseRollId);
let attackRollData = this.getRollData(defenseRollData.linkedRollId);
let defender = game.actors.get(defenseRollData.actorId);
defender.processDefenseResult(defenseRollData, attackRollData);
}
/* -------------------------------------------- */
static applyDamage(defenseRollId) {
let defenseRollData = this.getRollData(defenseRollId);
let defender = game.actors.get(defenseRollData.actorId);
defender.applyDamageLoss(defenseRollData.finalDamage);
}
/* -------------------------------------------- */
static applyNoDefense(actorId, attackRollId) {
let attackRollData = this.getRollData(attackRollId);
let defender = game.actors.get(actorId);
defender.processNoDefense(attackRollData);
}
/* -------------------------------------------- */
static async chatListeners(html) {
html.on("click", '.chat-create-actor', event => {
game.system.pegasus.creator.processChatEvent(event);
});
html.on("click", '.view-item-from-chat', event => {
game.system.pegasus.creator.openItemView(event)
});
}
/* -------------------------------------------- */
static async preloadHandlebarsTemplates() {
const templatePaths = [
'systems/fvtt-pegasus-rpg/templates/editor-notes-gm.html',
'systems/fvtt-pegasus-rpg/templates/partial-roll-select-effects.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-level.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-range.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-equipment-types.html',
'systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-status.html',
'systems/fvtt-pegasus-rpg/templates/partial-item-nav.html',
'systems/fvtt-pegasus-rpg/templates/partial-item-description.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html'
]
return loadTemplates(templatePaths);
}
/* -------------------------------------------- */
static async getEffectFromCompendium(effectName) {
effectName = effectName.toLowerCase()
let effect = game.items.contents.find(item => item.type == 'effect' && item.name.toLowerCase() == effectName)
if (!effect) {
let effects = await this.loadCompendium('fvtt-pegasus.effect', item => item.name.toLowerCase() == effectName)
let objs = effects.map(i => i.toObject())
effect = objs[0]
} else {
effect = duplicate(effect);
}
console.log("Effect", effect)
return effect
}
/* -------------------------------------------- */
static removeChatMessageId(messageId) {
if (messageId) {
game.messages.get(messageId)?.delete();
}
}
static findChatMessageId(current) {
return PegasusUtility.getChatMessageId(PegasusUtility.findChatMessage(current));
}
static getChatMessageId(node) {
return node?.attributes.getNamedItem('data-message-id')?.value;
}
static findChatMessage(current) {
return PegasusUtility.findNodeMatching(current, it => it.classList.contains('chat-message') && it.attributes.getNamedItem('data-message-id'));
}
static findNodeMatching(current, predicate) {
if (current) {
if (predicate(current)) {
return current;
}
return PegasusUtility.findNodeMatching(current.parentElement, predicate);
}
return undefined;
}
/* -------------------------------------------- */
static templateData(it) {
return PegasusUtility.data(it)?.data ?? {}
}
/* -------------------------------------------- */
static data(it) {
if (it instanceof Actor || it instanceof Item || it instanceof Combatant) {
return it.data;
}
return it;
}
/* -------------------------------------------- */
static getDiceValue(level = 0) {
let diceString = this.diceList[level]
let diceTab = diceString.split(" ")
let diceValue = 0
for (let dice of diceTab) {
diceValue += __name2DiceValue[dice]
}
return diceValue
}
/* -------------------------------------------- */
static getDiceFromLevel(level = 0) {
level = Number(level)
return this.diceList[level];
}
/* -------------------------------------------- */
static getFoundryDiceFromLevel(level = 0) {
level = Number(level)
//console.log(this.diceFoundryList);
return this.diceFoundryList[level];
}
/* -------------------------------------------- */
static createDirectOptionList(min, max) {
let options = {};
for (let i = min; i <= max; i++) {
options[`${i}`] = `${i}`;
}
return options;
}
/* -------------------------------------------- */
static buildListOptions(min, max) {
let options = ""
for (let i = min; i <= max; i++) {
options += `<option value="${i}">${i}</option>`
}
return options;
}
/* -------------------------------------------- */
static getTarget() {
if (game.user.targets && game.user.targets.size == 1) {
for (let target of game.user.targets) {
return target;
}
}
return undefined;
}
/* -------------------------------------------- */
static getDefenseState(actorId) {
return this.defenderStore[actorId];
}
/* -------------------------------------------- */
static async updateDefenseState(defenderId, rollId) {
this.defenderStore[defenderId] = rollId;
if (game.user.character && game.user.character.id == defenderId) {
let defender = game.actors.get(defenderId);
let chatData = {
user: game.user.id,
alias: defender.name,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
content: `<div>${defender.name} is under attack. He must roll a skill/weapon/technique to defend himself or suffer damages (button below).
<button class="chat-card-button apply-nodefense" data-actor-id="${defenderId}" data-roll-id="${rollId}" >No defense</button></div`
};
//console.log("Apply damage chat", chatData );
await ChatMessage.create(chatData);
}
}
/* -------------------------------------------- */
static updateRollData(rollData) {
let id = rollData.rollId;
let oldRollData = this.rollDataStore[id] || {};
let newRollData = mergeObject(oldRollData, rollData);
this.rollDataStore[id] = newRollData;
}
/* -------------------------------------------- */
static saveRollData(rollData) {
game.socket.emit("system.pegasus-rpg", {
name: "msg_update_roll", data: rollData
}); // Notify all other clients of the roll
this.updateRollData(rollData);
}
/* -------------------------------------------- */
static getRollData(id) {
return this.rollDataStore[id];
}
/* -------------------------------------------- */
static async onSocketMesssage(msg) {
console.log("SOCKET MESSAGE", msg.name)
if (msg.name == "msg_update_defense_state") {
this.updateDefenseState(msg.data.defenderId, msg.data.rollId)
}
if (msg.name == "msg_update_roll") {
this.updateRollData(msg.data)
}
if (msg.name == "msg_gm_item_drop" && game.user.isGM) {
let actor = game.actors.get( msg.data.actorId )
let item
if (msg.data.isPack) {
item = await fromUuid("Compendium." + msg.data.isPack + "." + msg.data.itemId)
} else {
item = game.items.get(msg.data.itemId)
}
this.addItemDropToActor( actor, item )
}
}
/* -------------------------------------------- */
static chatDataSetup(content, modeOverride, isRoll = false, forceWhisper) {
let chatData = {
user: game.user.id,
rollMode: modeOverride || game.settings.get("core", "rollMode"),
content: content
};
if (["gmroll", "blindroll"].includes(chatData.rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM").map(u => u.id);
if (chatData.rollMode === "blindroll") chatData["blind"] = true;
else if (chatData.rollMode === "selfroll") chatData["whisper"] = [game.user];
if (forceWhisper) { // Final force !
chatData["speaker"] = ChatMessage.getSpeaker();
chatData["whisper"] = ChatMessage.getWhisperRecipients(forceWhisper);
}
return chatData;
}
/* -------------------------------------------- */
static async loadCompendiumData(compendium) {
const pack = game.packs.get(compendium);
return await pack?.getDocuments() ?? [];
}
/* -------------------------------------------- */
static async loadCompendium(compendium, filter = item => true) {
let compendiumData = await this.loadCompendiumData(compendium);
//console.log("Compendium", compendiumData);
return compendiumData.filter(filter);
}
/* -------------------------------------------- */
static async showDiceSoNice(roll, rollMode) {
if (game.modules.get("dice-so-nice")?.active) {
if (game.dice3d) {
let whisper = null;
let blind = false;
rollMode = rollMode ?? game.settings.get("core", "rollMode");
switch (rollMode) {
case "blindroll": //GM only
blind = true;
case "gmroll": //GM + rolling player
whisper = this.getUsers(user => user.isGM);
break;
case "roll": //everybody
whisper = this.getUsers(user => user.active);
break;
case "selfroll":
whisper = [game.user.id];
break;
}
await game.dice3d.showForRoll(roll, game.user, true, whisper, blind);
}
}
}
/* -------------------------------------------- */
static removeUsedPerkEffects(rollData) {
// De-actived used effects from perks
let toRem = []
for (let effect of rollData.effectsList) {
if (effect.effect.data.perkId && effect.effect.data.isUsed) {
toRem.push(effect.effect._id)
}
}
if (toRem.length > 0) {
let actor = game.actors.get(rollData.actorId)
actor.deleteEmbeddedDocuments('Item', toRem)
}
}
/* -------------------------------------------- */
static async rollPegasus(rollData) {
let dicePool = [{ name: "stat", level: 0, statmod: 0 }, { name: "spec", level: 0 }, { name: "bonus", level: 0 }, { name: "hindrance", level: 0 }, { name: "other", level: 0 }];
if (rollData.stat) {
dicePool[0].level += Number(rollData.stat.value);
dicePool[0].statmod = Number(rollData.stat.mod);
}
if (rollData.statDicesLevel) {
dicePool[0].level = rollData.statDicesLevel;
}
if (rollData.selectedSpec && rollData.selectedSpec != "0") {
rollData.spec = rollData.specList.find(item => item._id == rollData.selectedSpec);
rollData.spec.data.dice = PegasusUtility.getDiceFromLevel(rollData.spec.data.level);
}
if (rollData.spec) {
dicePool[1].level += Number(rollData.spec.data.level);
}
if (rollData.specDicesLevel) {
dicePool[1].level = rollData.specDicesLevel;
}
if (rollData.bonusDicesLevel) {
dicePool[2].level += Number(rollData.bonusDicesLevel);
}
if (rollData.hindranceDicesLevel) {
dicePool[3].level += Number(rollData.hindranceDicesLevel);
}
if (rollData.otherDicesLevel) {
dicePool[4].level += Number(rollData.otherDicesLevel);
}
let diceFormulaTab = [];
for (let diceGroup of dicePool) {
diceFormulaTab.push(this.getFoundryDiceFromLevel(diceGroup.level))
}
let diceFormula = '{' + diceFormulaTab.join(', ') + '}kh';
// Performs roll
let myRoll = rollData.roll;
if (!myRoll) { // New rolls only of no rerolls
myRoll = new Roll(diceFormula).roll({ async: false });
console.log("ROLL : ", diceFormula)
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"));
rollData.roll = myRoll
}
// Final score and keep data
rollData.finalScore = myRoll.total + dicePool[0].statmod;
if (rollData.damages) {
let dmgFormula = this.getFoundryDiceFromLevel(rollData.damages.value)
let dmgRoll = new Roll(dmgFormula).roll({ async: false });
await this.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"));
rollData.dmgResult = dmgRoll.total;
}
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-generic-result.html`, rollData)
});
// Init stuf
if (rollData.isInit) {
let combat = game.combats.get(rollData.combatId)
combat.updateEmbeddedDocuments("Combatant", [{ _id: rollData.combatantId, initiative: rollData.finalScore }]);
}
//this.removeUsedPerkEffects( rollData) // Unused for now
// And save the roll
this.saveRollData(rollData);
}
/* -------------------------------------------- */
static getDamageDice(result) {
if (result < 0) return 0;
return Math.floor(result / 5) + 1;
}
/* ------------------------- ------------------- */
static async updateRoll(rollData) {
let diceResults = rollData.diceResults;
let sortedRoll = [];
for (let i = 0; i < 10; i++) {
sortedRoll[i] = 0;
}
for (let dice of diceResults) {
sortedRoll[dice.result]++;
}
let index = 0;
let bestRoll = 0;
for (let i = 0; i < 10; i++) {
if (sortedRoll[i] > bestRoll) {
bestRoll = sortedRoll[i];
index = i;
}
}
let bestScore = (bestRoll * 10) + index
rollData.bestScore = bestScore
rollData.finalScore = bestScore + rollData.negativeModifier + rollData.positiveModifier
this.saveRollData(rollData)
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-weapons-of-the-gods/templates/chat-generic-result.html`, rollData)
});
}
/* ------------------------- ------------------- */
static async rerollDice(actorId, diceIndex = -1) {
let actor = game.actors.get(actorId);
let rollData = actor.getRollData();
if (diceIndex == -1) {
rollData.hasWillpower = actor.decrementWillpower();
rollData.roll = undefined;
} else {
let myRoll = new Roll("1d6").roll({ async: false });
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"));
console.log("Result: ", myRoll);
rollData.roll.dice[0].results[diceIndex].result = myRoll.total; // Patch
rollData.nbStrongHitUsed++;
}
this.rollFraggedKingdom(rollData);
}
/* -------------------------------------------- */
static getUsers(filter) {
return game.users.filter(filter).map(user => user.data._id);
}
/* -------------------------------------------- */
static getWhisperRecipients(rollMode, name) {
switch (rollMode) {
case "blindroll": return this.getUsers(user => user.isGM);
case "gmroll": return this.getWhisperRecipientsAndGMs(name);
case "selfroll": return [game.user.id];
}
return undefined;
}
/* -------------------------------------------- */
static getWhisperRecipientsAndGMs(name) {
let recep1 = ChatMessage.getWhisperRecipients(name) || [];
return recep1.concat(ChatMessage.getWhisperRecipients('GM'));
}
/* -------------------------------------------- */
static blindMessageToGM(chatOptions) {
let chatGM = duplicate(chatOptions);
chatGM.whisper = this.getUsers(user => user.isGM);
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
console.log("blindMessageToGM", chatGM);
game.socket.emit("system.fvtt-pegasus-rgp", { msg: "msg_gm_chat_message", data: chatGM });
}
/* -------------------------------------------- */
static async searchItem(dataItem) {
let item
if (dataItem.pack) {
item = await fromUuid("Compendium." + dataItem.pack + "." + dataItem.id)
} else {
item = game.items.get(dataItem.id)
}
return item
}
/* -------------------------------------------- */
static split3Columns(data) {
let array = [[], [], []];
if (data == undefined) return array;
let col = 0;
for (let key in data) {
let keyword = data[key];
keyword.key = key; // Self-reference
array[col].push(keyword);
col++;
if (col == 3) col = 0;
}
return array;
}
/* -------------------------------------------- */
static createChatMessage(name, rollMode, chatOptions) {
switch (rollMode) {
case "blindroll": // GM only
if (!game.user.isGM) {
this.blindMessageToGM(chatOptions);
chatOptions.whisper = [game.user.id];
chatOptions.content = "Message only to the GM";
}
else {
chatOptions.whisper = this.getUsers(user => user.isGM);
}
break;
default:
chatOptions.whisper = this.getWhisperRecipients(rollMode, name);
break;
}
chatOptions.alias = chatOptions.alias || name;
ChatMessage.create(chatOptions);
}
/* -------------------------------------------- */
static getBasicRollData() {
let rollData = {
rollId: randomID(16),
rollMode: game.settings.get("core", "rollMode"),
bonusDicesLevel: 0,
hindranceDicesLevel: 0,
otherDicesLevel: 0,
statDicesLevel: 0,
specDicesLevel: 0,
effectsList: [],
armorsList: [],
weaponsList: [],
equipmentsList: [],
optionsDiceList: PegasusUtility.getOptionsDiceList()
}
PegasusUtility.updateWithTarget(rollData)
return rollData
}
/* -------------------------------------------- */
static updateWithTarget(rollData) {
let objectDefender
let target = PegasusUtility.getTarget();
if (target) {
let defenderActor = game.actors.get(target.data.actorId)
objectDefender = PegasusUtility.data(defenderActor)
objectDefender = mergeObject(objectDefender, target.data.actorData)
rollData.defender = objectDefender
rollData.attackerId = this.id
rollData.defenderId = objectDefender._id
defenderActor.addHindrancesList(rollData.effectsList)
}
}
/* -------------------------------------------- */
static createChatWithRollMode(name, chatOptions) {
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
}
/* -------------------------------------------- */
static async confirmDelete(actorSheet, li) {
let itemId = li.data("item-id");
let msgTxt = "<p>Are you sure to remove this Item ?";
let buttons = {
delete: {
icon: '<i class="fas fa-check"></i>',
label: "Yes, remove it",
callback: () => {
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 removal",
content: msgTxt,
buttons: buttons,
default: "cancel"
});
d.render(true);
}
}

1447
styles/simple.css Normal file

File diff suppressed because it is too large Load Diff

60
styles/unused.html Normal file
View File

@ -0,0 +1,60 @@
{{!-- Carac Tab --}}
<div class="tab items" data-group="primary" data-tab="statistics">
<div class="grid grid-2col">
<div class="">
<div class="flexrow">
<span class="generic-label packed-left"><a class="generic-pool-roll"><button class="chat-card-button">Dice Pool</button></a></span>
</div>
</div>
<div class="">
<ul>
<li class="item flexrow list-item" data-key="momentum">
<span class="stat-label flexrow" name="momentum"> <h4>{{data.momentum.label}}</h4> </span>
<input type="text" class="padd-right" name="data.momentum.value" value="{{data.momentum.value}}" data-dtype="Number"/>
<input type="text" class="padd-right" name="data.momentum.max" value="{{data.momentum.max}}" data-dtype="Number"/>
</li>
</ul>
</div>
</div>
</div>
<ul>
<li class="item flexrow list-item" data-key="mr">
<span class="stat-label flexrow" name="mr">
<a class="roll-mr" data-stat-key="{{mr}}"><h4>{{data.mr.label}}</h4></a>
</span>
<select class="carac-base flexrow" type="text" name="data.mr.value" value="{{data.mr.value}}"
data-dtype="Number" >
{{#select data.mr.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<input type="text" class="padd-right input-numeric-short" name="data.mr.mod" value="{{data.mr.mod}}" data-dtype="Number"/>
</li>
</ul>
<li class="item flexrow list-item" data-attr-key="{{key}}">
{{#each data.secondary as |stat2 key|}}
{{#if stat2.iscombat}}
<span class="stat-label" name="{{key}}">
<h4>{{stat2.label}} : </h4>
</span>
<span class="small-label padd-right packed-left">Cur</span><input type="text" class="padd-right update-field input-numeric-short" data-field-name="data.secondary.{{key}}.value" value="{{stat2.value}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left">&nbsp;Max</span><input type="text" class="padd-right update-field input-numeric-short" data-field-name="data.secondary.{{key}}.max" value="{{stat2.max}}" data-dtype="Number"/>
{{/if}}
{{/each}}
</li>
<li class="item flexrow list-item" data-key="momentum">
<span class="stat-label flexrow" name="momentum"><h4>{{data.momentum.label}}:</h4></span>
<span class="small-label padd-right packed-left">Cur</span><input type="text" class="padd-right update-field input-numeric-short" data-field-name="data.momentum.value" value="{{data.momentum.value}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left">&nbsp;Max</span><input type="text" class="padd-right update-field input-numeric-short" data-field-name="data.momentum.max" value="{{data.momentum.max}}" data-dtype="Number"/>
</li>

38
system.json Normal file
View File

@ -0,0 +1,38 @@
{
"author": "Uberwald",
"compatibleCoreVersion": "9",
"description": "Imperium 5 RPG system for FoundryVTT",
"download": "https://www.uberwald.me/data/files/fvtt-imperium5/fvtt-imperium5.zip",
"esmodules": [
"modules/imperium5-main.js"
],
"gridDistance": 5,
"gridUnits": "m",
"languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
}
],
"library": false,
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/data/files/fvtt-imperium5/system.json",
"manifestPlusVersion": "1.0.0",
"media": [],
"minimumCoreVersion": "0.8.0",
"name": "fvtt-imperium5",
"packs": [
],
"primaryTokenAttribute": "secondary.health",
"secondaryTokenAttribute": "secondary.delirium",
"socket": true,
"styles": [
"styles/simple.css"
],
"templateVersion": 1,
"title": "Imperium5 RPG",
"url": "https://www.uberwald.me/data/files/fvtt-imperium5",
"version": "0.0.1",
"background" : "./images/ui/imperium5_welcome_page.webp"
}

424
template.json Normal file
View File

@ -0,0 +1,424 @@
{
"Actor": {
"types": ["character", "npc"],
"templates": {
"biodata": {
"biodata": {
"name": "",
"age": 0,
"size": "",
"weight": "",
"hair": "",
"sex": "",
"eyes": "",
"description": "",
"worstfear": "",
"worstfearactive": false,
"desires": "",
"desiresactive": false,
"preferredhand": "",
"catchphrase": "",
"catchphraseused": false,
"catchphrasetrigger": "",
"charactervalue": 0,
"level": 0,
"threatlevel": 0,
"cdp": 0,
"cdpused": 0,
"notes": "",
"gmnotes": "",
"racename": "",
"rolename": ""
}
},
"core": {
"race": [],
"abilities": [],
"subactors": [],
"statistics": {
"agi":{
"label": "Agility",
"abbrev": "AGI",
"level": 1,
"value": 1,
"mod": 0,
"col": 1
},
"mnd":{
"label": "Mind",
"abbrev": "MND",
"level": 1,
"value": 1,
"col": 1,
"mod": 0
},
"soc":{
"label": "Social",
"abbrev": "SOC",
"level": 1,
"value": 1,
"col": 1,
"mod": 0
},
"str":{
"label": "Strength",
"abbrev": "STR",
"level": 1,
"value": 1,
"col": 1,
"mod": 0
},
"phy":{
"label": "Physique",
"abbrev": "PHY",
"level": 1,
"value": 1,
"col": 1,
"mod": 0
},
"com":{
"label": "Combat",
"abbrev": "COM",
"level": 1,
"value": 1,
"col": 2,
"mod": 0
},
"def":{
"label": "Defence",
"abbrev": "DEF",
"level": 1,
"value": 1,
"col": 2,
"mod": 0
},
"stl":{
"label": "Stealth",
"abbrev": "STL",
"level": 1,
"value": 1,
"col": 2,
"mod": 0
},
"per":{
"label": "Perception",
"abbrev": "PER",
"level": 1,
"value": 1,
"col": 2,
"mod": 0
},
"foc":{
"label": "Focus",
"abbrev": "FOC",
"level": 1,
"value": 1,
"col": 2,
"mod": 0
}
},
"nrg": {
"label": "NRG",
"type": "value",
"absolutemax": 0,
"value": 0,
"max": 0,
"mod": 0,
"activated": 0
},
"mr": {
"label": "MR (Initiative)",
"type": "dice",
"value": 0,
"mod": 0
},
"momentum": {
"label": "Momentum",
"type": "value",
"value": 0,
"max": 0
},
"secondary": {
"health": {
"label": "Health",
"value": 0,
"type": "value",
"ismax": true,
"iscombat": true,
"bonus": 0,
"max": 0
},
"delirium": {
"label": "Delirium",
"value": 0,
"type": "value",
"ismax": true,
"iscombat": true,
"bonus": 0,
"max": 0
},
"stealthhealth": {
"label": "STL Health",
"type": "value",
"value": 0,
"ismax": true,
"bonus": 0,
"max": 0
},
"socialhealth": {
"label": "SOC Health",
"type": "value",
"value": 0,
"ismax": true,
"bonus": 0,
"max": 0
}
},
"combat": {
"bonusdice": 0,
"otherdice": 0,
"hindrancedice": 0,
"stunlevel": 0,
"stunthreshold": 0
}
},
"npccore": {
"npctype": "",
"description": ""
}
},
"character": {
"templates": [ "biodata", "core" ]
},
"npc": {
"templates": [ "npccore" ]
}
},
"Item": {
"types": [ "race", "role", "ability", "specialisation", "perk", "power" , "armor", "shield", "equipment", "weapon", "effect", "money"],
"effect": {
"type": "",
"genre": "",
"effectlevel": 0,
"reducedicevalue": false,
"stataffected": "",
"specaffected": [],
"statdice": false,
"bonusdice": false,
"otherdice": false,
"hindrance" : false,
"resistedby": "",
"recoveryroll": false,
"recoveryrollstat": "",
"recoveryrollspec": [],
"effectstatlevel": false,
"effectstat": "",
"description": ""
},
"race": {
"description": "",
"environment": "",
"society_culture": "",
"outlook": "",
"selectablestats": false,
"statsonlyonce": false,
"numberstats": 0,
"abilities": [],
"optionnalabilities": [],
"nboptionnal": 0,
"perksgained": false,
"perksall": false,
"perksnumber": 0,
"perks": [],
"statistics": ""
},
"role": {
"statincrease1": "",
"statincrease2": "",
"messagespecplus1": "",
"specialisationsplus1": [],
"powers1": [],
"MR": 0,
"specialperk": [],
"specincrease": [],
"perks": [],
"description": ""
},
"ability": {
"affectedstat": "str",
"statmodifier": 1,
"statlevelincrease": 0,
"statusaffected": "",
"statusmodifier": 0,
"powersgained": [],
"specialisations": [],
"effectsgained": [],
"aoe": "",
"affectedcircumstances": "",
"affectedspecialisations": "",
"nrgcost": 0,
"opponenthindrance": 0,
"attackgained": [],
"armorgained": [],
"threatlevel": 0,
"description": ""
},
"specialisation": {
"statistic": "",
"level": 1,
"ispowergroup": false,
"powersource": "",
"powersactivated": false,
"powers": [],
"isthreatlevel": false,
"description": ""
},
"perk": {
"level": 1,
"active": false,
"duration": "",
"isweaver": false,
"effectsgained": [],
"features": {
"nrgcost": {
"label": "NRG cost to use",
"flag": false,
"type": "number",
"isvalid": true,
"value": 0
},
"range": {
"label": "Range",
"flag": false,
"type": "range",
"isvalid": true,
"value": ""
},
"nbtargets": {
"label": "# Targets",
"flag": false,
"type": "string",
"isvalid": true,
"value": ""
},
"bonushealth": {
"label": "Bonus to Health",
"flag": false,
"type": "string",
"isvalid": true,
"value": ""
},
"bonusnrg": {
"label": "Bonus to NRG",
"flag": false,
"type": "string",
"isvalid": true,
"value": ""
},
"bonusdelirium": {
"label": "Bonus to Delirium",
"flag": false,
"type": "string",
"isvalid": true,
"value": ""
}
},
"status": "",
"nbuse": "",
"used1":false,
"used2":false,
"used3":false
},
"power": {
"rollneeded": false,
"statistic": "",
"cost": 0,
"costspent": 0,
"range": "",
"action": "",
"type": "",
"powersource": "",
"effects": "",
"activated": false,
"purchasedeffects": "",
"effectsgained": [],
"dmgroll": false,
"dmgstatistic": "",
"description": ""
},
"armor": {
"statistic": "",
"resistance": "",
"weight": 0,
"cost": 0,
"idr": "",
"equipped": false,
"locationprotected": "",
"effects": [],
"activated": false,
"description":""
},
"shield": {
"deftype": "",
"level": "",
"weight": 0,
"cost": 0,
"idr": "",
"equipped": false,
"effects": [],
"activated": false,
"description":""
},
"equipment": {
"type": "",
"cost": 0,
"weight": 0,
"idr": "",
"quantity": 0,
"equipped": false,
"stataffected": "",
"level": 0,
"statdice": false,
"bonusdice": false,
"otherdice": false,
"effects": [],
"activated": false,
"iscontainer": false,
"containercapacity": 0,
"containerid": "",
"threatlevel": 0,
"description":""
},
"money" : {
"value": 0,
"quantity": 0,
"weight": 0,
"idr":"",
"description": ""
},
"weapon": {
"statistic": "",
"damagestatistic": "",
"damage": "",
"cost": 0,
"weight": 0,
"idr": "",
"range": "",
"maxrange": "",
"ao": "",
"enhanced": false,
"enhancedstat": "",
"enhancedlevel": 0,
"damagetype": "",
"damagetypelevel": 0,
"vehicledamagetype": "",
"vehicledamagetypelevel": 0,
"ammocurrent": 0,
"ammomax": 0,
"equipped": false,
"effects": [],
"activated": false,
"description": ""
}
}
}

879
templates/actor-sheet.html Normal file
View File

@ -0,0 +1,879 @@
<form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}}
<header class="sheet-header">
<div class="header-fields">
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
<div class="flexrow">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="flexcol">
<div class="flexrow">
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 1)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
<li class="item flexrow list-item color-class-pool item-stat-roll" data-attr-key="pool">
<span class="stat-icon">
<img class="stat-icon" src="icons/dice/d12black.svg">
</span>
<span class="stat-label stat-margin" name="pool">
<h4 class="stat-text-white stat-margin"><a class="generic-pool-roll stat-margin" data-stat-key="pool">Dice Pool</a></h4>
</span>
</li>
</ul>
</div>
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 2)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
<li class="item flexrow list-item color-class-mr item-stat-roll" data-attr-key="mr">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/MR.webp">
</span>
<span class="stat-label stat-margin" name="mr">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="mr">MR</a></h4>
</span>
<select class="status-small-label color-class-common" type="text" name="data.mr.value" value="{{data.mr.value}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.mr.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="data.mr.mod" value="{{data.mr.mod}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} />
</li>
</ul>
</div>
<div class="stat-item status-block">
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-status.html}}
</div>
<!--
<label class="status-small-label">Active NRG</label>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
-->
</div>
</div>
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="specs">Specialisations</a>
<a class="item" data-tab="powers">Powers/Abilities</a>
<a class="item" data-tab="equipment">Equipment</a>
<a class="item" data-tab="biodata">Biography</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Combat Tab --}}
<div class="tab fight" data-group="primary" data-tab="combat">
<div class="flexcol">
<div class="flexrow">
<div>
<ul class="stat-item">
<li class="item flexrow list-item color-class-melee"><a class="combat-button attack-melee flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/COM.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Melee Attack</span>
</a>
</li>
<li class="item flexrow list-item color-class-meleedmg"><a class="combat-button damage-melee flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/STR.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Melee/Thrown Damage</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-ranged"><a class="combat-button attack-ranged flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PER.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Ranged Attack</span>
</a>
</li>
<li class="item flexrow list-item color-class-range"><a class="combat-button damage-ranged flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/AGI.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Ranged Damage</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-defence"><a class="combat-button defense-roll flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/DEF.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Defence</span>
</a>
</li>
<li class="item flexrow list-item color-class-dmgres"><a class="combat-button damage-resistance flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PHY.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Damage Resistance</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<span class="generic-label">
<h3>Stun</h3>
</span>
<ul class="stat-list alternate-list">
<li class="item stat flexrow list-item">
<span class="generic-label small-label">Current</span>
<input type="text" class="" name="data.combat.stunlevel" value="{{data.combat.stunlevel}}" data-dtype="Number" />
<span class="generic-label small-label">Threshold</span>
<input type="text" class="" name="data.combat.stunthreshold" value="{{data.combat.stunthreshold}}" data-dtype="Number" />
</li>
</ul>
</div>
</div>
<div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Perks</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Level</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Range</label>
</span>
<span class="item-field-label-short">
<label class="short-label">#Targets</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Status</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Duration</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
</li>
{{#each perks as |perk key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{perk._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{perk.img}}" /></a>
<span class="item-name-label">{{perk.name}}</span>
<span class="item-field-label-short">{{perk.data.level}}</span>
{{#if perk.data.features.range.flag}}
<span class="item-field-label-medium">{{perk.data.features.range.value}}</span>
{{else}}
<span class="item-field-label-medium">&nbsp;-&nbsp;</span>
{{/if}}
{{#if perk.data.features.nbtargets.flag}}
<span class="item-field-label-short">{{perk.data.features.nbtargets.value}}</span>
{{else}}
<span class="item-field-label-short">&nbsp;-&nbsp;</span>
{{/if}}
<span class="item-field-label-long">
<select class="perk-status" type="text" value="{{perk.data.status}}" data-dtype="String">
{{#select perk.data.status}}
<option value="ready">Ready</option>
<option value="activated">Activated</option>
<option value="round2">2 Rounds left</option>
<option value="round1">1 Round left</option>
{{/select}}
</select>
</span>
{{#if (ne perk.data.status "ready")}}
{{#if (eq perk.data.nbuse "next1action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span>
<span class="item-field-label-short ">&nbsp;</span>
<span class="item-field-label-short ">&nbsp;</span>
{{/if}}
{{#if (eq perk.data.nbuse "next2action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span>
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="2" name="perk.data.used2" {{checked perk.data.used2}}/></label></span>
<span class="item-field-label-short ">&nbsp;</span>
{{/if}}
{{#if (eq perk.data.nbuse "next3action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span>
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="2" name="perk.data.used2" {{checked perk.data.used2}}/></label></span>
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="3" name="perk.data.used3" {{checked perk.data.used3}}/></label></span>
{{/if}}
{{else}}
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Effects</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Level</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">P/N</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Stat</label>
</span>
</li>
{{#each effects as |effect key|}}
<li class="item stat flexrow list-item list-item-shadow" data-arme-id="{{effect.id}}" data-item-id="{{effect._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{effect.img}}" /></a>
<span class="item-name-label">{{effect.name}}</span>
<span class="item-field-label-short">{{effect.data.effectlevel}}</span>
<span class="item-field-label-short">{{upperFirst effect.data.type}}</span>
<span class="item-field-label-short">{{upperFirst effect.data.genre}}</span>
<span class="item-field-label-short">{{upper effect.data.stataffected}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Other Tab --}}
<div class="tab items" data-group="primary" data-tab="specs">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Specialisations</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Stat</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Dice</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Powergroup</label>
</span>
</li>
{{#each specs as |spec key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{spec._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{spec.img}}" /></a>
<span class="item-name-label"><a class="roll-spec">{{spec.name}}</a></span>
<span class="item-field-label-short">{{upper spec.data.statistic}}</span>
<span class="item-field-label-short">{{spec.data.dice}}</span>
{{#if spec.data.ispowergroup}}
{{#if spec.data.powersactivated}}
<span class="item-field-label-long"><a class="spec-group-deactivate">Deactivate</a></span>
{{else}}
<span class="item-field-label-long"><a class="spec-group-activate">Activate</a></span>
{{/if}}
{{else}}
<span class="item-field-label-long">&nbsp;-&nbsp;</span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Powers Tab --}}
<div class="tab fight" data-group="primary" data-tab="powers">
<div class="flexcol">
<ul>
<li class="item flexrow list-item" data-key="nrg">
<span class="stat-label flexrow" name="nrg"><h4>{{data.nrg.label}}</h4> </span>
<span class="small-label padd-right packed-left">Activated</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left">&nbsp;Current</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left">&nbsp;Mod</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left">&nbsp;Max</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left"> / {{data.nrg.absolutemax}}</span>
</li>
</ul>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Powers</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Status</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Action</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">DMG Roll</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">NRG Cost</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">NRG Spent</label>
</span>
</li>
{{#each powers as |power key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{power._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{power.img}}" /></a>
<span class="item-name-label">
{{#if power.data.rollneeded}}
<a class="power-roll">{{power.name}}</a>
{{else}}
{{power.name}}
{{/if}}
</span>
<span class="item-field-label-medium">{{upperFirst power.data.type}}</span>
<span class="item-field-label-short"><label class="short-label">
{{#if power.data.activated}}
Activated
{{else}}
&nbsp;-&nbsp;
{{/if}}
</label>
</span>
<span class="item-field-label-medium">{{upperFirst power.data.action}}</span>
<span class="item-field-label-medium"><a class="power-dmg-roll">
{{#if power.data.dmgroll}}
{{upper power.data.dmgstatistic}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</a></span>
<span class="item-field-label-medium">{{power.data.cost}}</span>
<span class="item-field-label-medium">
<input type="text" class="padd-right input-numeric-short power-cost-spent" value="{{power.data.costspent}}" data-dtype="Number"/>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control power-activate" title="Activated">{{#if power.data.activated}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Abilities</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Stat</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Stat Modifier</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Affected status</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Status Modifier</label>
</span>
</li>
{{#each abilities as |ability key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{ability._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{ability.img}}" /></a>
<span class="item-name-label">{{ability.name}}</span>
<span class="item-field-label-long">{{upper ability.data.affectedstat}}</span>
<span class="item-field-label-medium">{{ability.data.statmodifier}}</span>
<span class="item-field-label-medium">{{upperFirst ability.data.statusaffected}}</span>
<span class="item-field-label-medium">{{ability.data.statusmodifier}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Equipement Tab --}}
<div class="tab equipment" data-group="primary" data-tab="equipment">
<div class="flexrow">
<h3>Encumbrance</h3>
<span class="small-label">Current : {{encCurrent}}</span>
<span class="small-label">Capacity : {{encCapacity}}</span>
<span class="small-label">Hindrance : {{encHindrance}}</span>
</div>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Money</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Qty</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
</li>
{{#each moneys as |money key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{money.img}}" /></a>
<span class="item-name-label">{{money.name}}</span>
<span class="item-field-label-long"><label>
{{money.data.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>
<span class="item-field-label-medium">
<label>{{money.data.weight}}</label>
</span>
<span class="item-field-label-medium">
{{#if money.data.idrDice}}
<a class="roll-idr" data-dice-value="{{money.data.idrDice}}">{{money.data.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Weapons</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Attack</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Damage</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Ammo</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
</li>
{{#each weapons as |weapon key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{weapon.img}}"/></a>
<span class="item-name-label">{{weapon.name}}</span>
<span class="item-field-label-short"><label>{{upper weapon.data.statistic}}</label></span>
<span class="item-field-label-short"><label>{{upper weapon.data.damagestatistic}}</label></span>
<span class="item-field-label-short"><label>{{weapon.data.damageDice}}</label></span>
{{#if (gt weapon.data.ammomax 0)}}
<span class="item-field-label-long"><label>{{weapon.data.ammocurrent}}/{{weapon.data.ammomax}}
(<a class="ammo-minus plus-minus-button"> -</a>/<a class="ammo-plus plus-minus-button">+</a>)
</label></span>
{{else}}
<span class="item-field-label-long"><label>-</label>
</span>
{{/if}}
<span class="item-field-label-medium">
{{#if (count weapon.data.effects)}}
{{#if weapon.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short"><label>{{weapon.data.weight}}</label></span>
<span class="item-field-label-medium">
{{#if weapon.data.idrDice}}
<a class="roll-idr" data-dice-value="{{weapon.data.idrDice}}">{{weapon.data.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if weapon.data.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Armors</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Stat</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG RES</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Loc</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
</li>
{{#each armors as |armor key|}}
<li class="item list-item flexrow list-item-shadow" data-item-id="{{armor._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{armor.img}}" /></a>
<span class="item-name-label">{{armor.name}}</span>
<span class="item-field-label-short">{{upper armor.data.statistic}}</span>
<span class="item-field-label-short">{{armor.data.resistanceDice}}</span>
<span class="item-field-label-medium">{{armor.data.locationprotected}}</span>
<span class="item-field-label-medium">
{{#if (count armor.data.effects)}}
{{#if armor.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">{{armor.data.weight}}</span>
<span class="item-field-label-medium">
{{#if armor.data.idrDice}}
<a class="roll-idr" data-dice-value="{{armor.data.idrDice}}">{{armor.data.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if armor.data.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Shields</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Dice</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
</li>
{{#each shields as |shield key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{shield._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{shield.img}}" /></a>
<span class="item-name-label">{{shield.name}}</span>
<span class="item-field-label-short">{{shield.data.levelDice}}</span>
<span class="item-field-label-medium">
{{#if (count shield.data.effects)}}
{{#if shield.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">{{shield.data.weight}}</span>
<span class="item-field-label-medium">
{{#if shield.data.idrDice}}
<a class="roll-idr" data-dice-value="{{shield.data.idrDice}}">{{shield.data.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if shield.data.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Equipment</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Quantity</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
</li>
{{#each containersTree as |equip key|}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html equip=equip level=1}}
<ul class="item-list list-item-shadow2 list-item-margin1">
{{#each equip.data.contents as |subgear key|}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html equip=subgear level=2}}
{{/each}}
</ul>
{{/each}}
</ul>
<hr>
</div>
{{!-- Biography Tab --}}
<div class="tab biodata" data-group="primary" data-tab="biodata">
<div class="grid grid-2col">
<div>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="generic-label">Origin</label>
<input type="text" class="" name="data.biodata.origin" value="{{data.biodata.origin}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Age</label>
<input type="text" class="" name="data.biodata.age" value="{{data.biodata.age}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Height</label>
<input type="text" class="" name="data.biodata.size" value="{{data.biodata.size}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Eyes</label>
<input type="text" class="" name="data.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Hair</label>
<input type="text" class="" name="data.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li>
</ul>
</div>
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Weight</label>
<input type="text" class="" name="data.biodata.weight" value="{{data.biodata.weight}}"
data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Sex</label>
<input type="text" class="" name="data.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Preferred Hand</label>
<input type="text" class="" name="data.biodata.preferredhand" value="{{data.biodata.preferredhand}}" data-dtype="String" />
</li>
<li class="flexrow item" data-item-id="{{race._id}}">
<label class="generic-label">Race</label>
<a class="item-edit"><img class="stat-icon" src="{{race.img}}"></a>
<input type="text" class="" name="data.biodata.racename" value="{{race.name}}" disabled data-dtype="String" />
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
<li class="flexrow item" data-item-id="{{role._id}}">
<label class="generic-label">Role</label>
<a class="item-edit"><img class="stat-icon" src="{{role.img}}"></a>
<input type="text" class="" name="data.biodata.rolename" value="{{role.name}}" disabled data-dtype="String" />
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
</ul>
</div>
</div>
<h3 class="items-title-bg">Psychology : </h3>
<ul>
<li class="flexrow">
<label class="short-label">Worst Fear </label>
<input type="text" class="" name="data.biodata.worstfear" value="{{data.biodata.worstfear}}" data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-worstfear" name="data.biodata.worstfearactive" {{checked data.biodata.worstfearactive}}/> Active ?</label>
</li>
<li class="flexrow">
<label class="short-label">Desires </label>
<input type="text" class="" name="data.biodata.desires" value="{{data.biodata.desires}}" data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-desires" name="data.biodata.desiresactive" {{checked data.biodata.desiresactive}}/> Active ?</label>
</li>
</ul>
<h3>Catchphrase : </h3>
<ul>
<li class="flexrow">
<label class="short-label">Catchphrase </label>
<input type="text" class="" name="data.biodata.catchphrase" value="{{data.biodata.catchphrase}}"
data-dtype="String" />
</li>
<li class="flexrow">
<label class="short-label">Catchphrase Trigger : </label>
<input type="text" class="" name="data.biodata.catchphrasetrigger" value="{{data.biodata.catchphrasetrigger}}"
data-dtype="String" />
</li>
<li class="flexrow">
<label class="short-label">Catchphrase used </label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.biodata.catchphraseused" {{checked data.biodata.catchphraseused}}/></label>
</li>
</ul>
<h3 class="items-title-bg">Development : </h3>
<ul>
<li class="flexrow">
<label class="short-label">Character Value : </label>
<input type="text" class="" name="data.biodata.charactervalue" value="{{data.biodata.charactervalue}}"
data-dtype="String" />
</li>
<li class="flexrow">
<label class="short-label">Character Development Points Total (CDP total) : </label>
<input type="text" class="" name="data.biodata.cdp" value="{{data.biodata.cdp}}"
data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Hero Level : </label>
<input type="text" class="" name="data.biodata.level" value="{{data.biodata.level}}"
data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Hero Levels Remaining : </label>
<input type="text" class="" name="data.biodata.cdpused" value="{{data.biodata.cdpused}}"
data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Threat Level : </label>
<input type="text" class="" name="data.biodata.threatlevel" value="{{data.biodata.threatlevel}}"
data-dtype="Number" />
</li>
</ul>
<hr>
<h3>Background : </h3>
<div class="form-group editor">
{{editor content=data.biodata.description target="data.biodata.description" button=true owner=owner
editable=editable}}
</div>
<hr>
<h3>Notes : </h3>
<div class="form-group editor">
{{editor content=data.biodata.notes target="data.biodata.notes" button=true owner=owner editable=editable}}
</div>
<hr>
</article>
</div>
</section>
</form>

View File

@ -0,0 +1,143 @@
<div class="chat-message-header">
<img class="actor-icon" src="{{img}}" alt="{{alias}}" />
<h4 class=chat-actor-name>{{name}}</h4>
</div>
<hr>
<div class="flexcol">
{{#if (eq step "select-race")}}
<div>Select a race from the list below</div>
<table class="table-create-actor">
{{#each races as |race index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{race._id}}">{{race.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{race._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-race-optionnal")}}
<div>The selected Race has some optionnal abilities. Select one ability by clicking the relevant button below<br>
Remaining abilities to select : {{nboptionnal}}
</div>
<table class="table-create-actor">
{{#each optionnalabilities as |ability index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{ability._id}}">{{ability.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{ability._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-race-stats")}}
<div>Select Stats to gain +1 modifier : <br>
Remaining stats to select : {{numberstats}}
</div>
<table class="table-create-actor">
{{#each stats as |stat key|}}
{{#if @root.statsonlyonce}}
{{#if stat.used}}
{{else}}
<tr>
<td>{{stat.label}} ({{stat.abbrev}})</td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-stat-key="{{key}}" >Select it !</a></td>
</tr>
{{/if}}
{{else}}
<tr>
<td>{{stat.label}} ({{stat.abbrev}})</td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-stat-key="{{key}}" >Select it !</a></td>
</tr>
{{/if}}
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-race-perks")}}
<div>Now select {{nbraceperks}} Perk(s) for your character
</div>
<table class="table-create-actor">
{{#each raceperks as |perk index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{perk._id}}">{{perk.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{perk._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role")}}
<div>Now select a Role for your character.
</div>
<table class="table-create-actor">
{{#each roles as |role index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{role._id}}">{{role.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{role._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role-start-spec")}}
<div>Choose 1 Specialisation at +1DT :
</div>
<table class="table-create-actor">
{{#each rolestartspec as |spec index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{spec._id}}">{{spec.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{spec._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role-stat")}}
<div>Choose 1 Stat at +1DT :
</div>
<table class="table-create-actor">
{{#each rolestats as |rolestat key|}}
<tr>
<td>{{rolestat.label}}</td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-stat-key="{{rolestat.abbrev}}">Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role-spec")}}
<div>Now select a specialisation at +{{dt}}DT.
</div>
<table class="table-create-actor">
{{#each rolespec as |spec index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{spec._id}}">{{spec.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{spec._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role-perk")}}
<div>Now select a Perk.
</div>
<table class="table-create-actor">
{{#each roleperks as |perk index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{perk._id}}">{{perk.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{perk._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "character-end")}}
<div>Follow the next steps from the rulebook page 50 !. You can now spend 150 CDPs to customise your character.
</div>
{{/if}}
</div>

View File

@ -0,0 +1,7 @@
<div class="post-item" data-transfer="{{transfer}}">
<h3><b>{{name}}</b></h3>
{{#if img}}
<img class="chat-img" src="{{img}}" title="{{name}}" />
{{/if}}
<div>Effect {{name}} has ben used and removed from the available effects.</div>
</div>

View File

@ -0,0 +1,54 @@
<div class="chat-message-header">
{{#if actorImg}}
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
{{/if}}
<h4 class=chat-actor-name>{{alias}}</h4>
</div>
<hr>
{{#if img}}
<div >
<img class="chat-icon" src="{{img}}" alt="{{name}}" />
</div>
{{/if}}
<div class="flexcol">
</div>
<div>
<ul>
{{#if power}}
<li>Power : {{power.name}}</li>
{{/if}}
{{#if isDamage}}
<li>Weapon Damage Dice : {{weapon.data.damageDice}}</li>
{{/if}}
{{#if isResistance}}
<li>Armor Resistance Dice : {{armor.data.resistanceDice}}</li>
{{/if}}
{{#if stat}}
<li>Statistic : {{stat.label}}</li>
{{/if}}
{{#if spec}}
<li>Specialisation : {{spec.name}}</li>
{{/if}}
{{#if weaponName}}
<li>Weapon : {{weaponName}}</li>
{{/if}}
{{#if isResistance}}
<li><strong>Defense Result : {{finalScore}}</strong>
{{else}}
{{#if isDamage}}
<li><strong>Damages : {{finalScore}}</strong>
{{else}}
<li><strong>Final Result : {{finalScore}}</strong>
{{/if}}
{{/if}}
</ul>
</div>
</div>

View File

@ -0,0 +1,15 @@
<div class="chat-message-header">
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
<h4 class=chat-actor-name>{{defenderName}}</h4>
</div>
<hr>
<div>
<ul>
<li>{{defenderName}} suffer damages from {{attackerName}} !</li>
<li>Damages (inc. armor+weapon) : {{finalDamage}}</li>
<li><button class="chat-card-button reduce-damage-chi" data-actor-id="{{actorId}}" data-roll-id="{{rollId}}" >Oppose damage roll with Chi</button></li>
<li><button class="chat-card-button apply-damage" data-actor-id="{{actorId}}" data-roll-id="{{rollId}}" >Apply damage</button></li>
</ul>
</div>

View File

@ -0,0 +1,11 @@
<div class="chat-message-header">
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
<h4 class=chat-actor-name>{{defenderName}}</h4>
</div>
<hr>
<div >
{{defenderName}} wins the opposition against {{attackerName}} !
</div>
</div>

View File

@ -0,0 +1,7 @@
<div class="post-item" data-transfer="{{transfer}}">
<h3><b>{{name}}</b></h3>
{{#if img}}
<img class="chat-img" src="{{img}}" title="{{name}}" />
{{/if}}
<div>{{name}} has Just Deactivated the Perk: {{perk.name}}, make sure to manually delete all Effects provided by this Perk from Targets.</div>
</div>

View File

@ -0,0 +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}}
</div>
{{/if}}

View File

@ -0,0 +1,152 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Affected stat</label>
<select class="competence-base flexrow" type="text" name="data.affectedstat" value="{{data.affectedstat}}" data-dtype="String">
{{#select data.affectedstat}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Stat modifier</label>
<input type="text" class="padd-right" name="data.statmodifier" value="{{data.statmodifier}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Affected status</label>
<select class="competence-base flexrow" type="text" name="data.statusaffected" value="{{data.statusaffected}}" data-dtype="String">
{{#select data.statusaffected}}
{{{optionsStatusList}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Status modifier</label>
<input type="text" class="padd-right" name="data.statusmodifier" value="{{data.statusmodifier}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Effects Gained</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-effect"><label>Drop Effects here !</label></div>
</li>
{{#each data.effectsgained as |effect idx|}}
<li class="flexrow">
<label name="data.effectsgained[{{idx}}].name"><a class="view-subitem" data-type="effectsgained" data-index="{{idx}}">{{effect.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="effectsgained" data-index="{{idx}}" title="Delete Effect"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Power Gained</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-power"><label>Drop Powers here !</label></div>
</li>
{{#each data.powersgained as |power idx|}}
<li class="flexrow">
<label name="data.powersgained[{{idx}}].name"><a class="view-subitem" data-type="powersgained" data-index="{{idx}}">{{power.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="powersgained" data-index="{{idx}}" title="Delete Power"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Specialisation Gained</label>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-spec"><label>Drop Specialisations here !</label></div>
</li>
{{#each data.specialisations as |spec idx|}}
<li class="flexrow">
<label name="data.specialisations[{{idx}}].name"><a class="view-subitem" data-type="specialisations" data-index="{{idx}}">{{spec.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specialisations" data-index="{{idx}}" title="Delete Specialisation"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
</li>
<!--
<li class="flexrow"><label class="generic-label">AoE</label>
<input type="text" class="padd-right" name="data.aoe" value="{{data.aoe}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">Affected Circumstances</label>
<input type="text" class="padd-right" name="data.affectedcircumstances" value="{{data.affectedcircumstances}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">NRG Cost</label>
<input type="text" class="padd-right" name="data.nrgcost" value="{{data.nrgcost}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Opponents Gain Hindrance Dice</label>
<select class="competence-base flexrow" type="text" name="data.opponenthindrance" value="{{data.opponenthindrance}}" data-dtype="Number">
{{#select data.opponenthindrance}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
-->
<li class="flexrow"><label class="generic-label">Threat Level Value</label>
<input type="text" class="input-numeric-short padd-right" name="data.threatlevel" value="{{data.threatlevel}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Attacks Gained</label>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-weapon"><label>Drop Weapons here !</label></div>
</li>
{{#each data.attackgained as |weapon idx|}}
<li class="flexrow">
<label name="data.specialisations[{{idx}}].name"><a class="view-subitem" data-type="attackgained" data-index="{{idx}}">{{weapon.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="attackgained" data-index="{{idx}}" title="Delete Weapon"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
</li>
<li class="flexrow"><label class="generic-label">Armors Gained</label>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-ability-armor"><label>Drop Armors here !</label></div>
</li>
{{#each data.armorgained as |armor idx|}}
<li class="flexrow">
<label name="data.specialisations[{{idx}}].name"><a class="view-subitem" data-type="armorgained" data-index="{{idx}}">{{armor.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="armorgained" data-index="{{idx}}" title="Delete Armor"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,63 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Related Statistic</label>
<select class="competence-base flexrow" type="text" name="data.statistic" value="{{data.statistic}}" data-dtype="String">
{{#select data.statistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">DMG RES Other Dice</label>
<select class="competence-base flexrow" type="text" name="data.resistance" value="{{data.resistance}}" data-dtype="Number">
{{#select data.resistance}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Location Protected</label>
<input type="text" class="" name="data.locationprotected" value="{{data.locationprotected}}" data-dtype="String"/>
</li>
{{> systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html}}
<li class="flexrow"><label class="generic-label">Equipped ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipped" {{checked data.equipped}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Weight</label>
<input type="text" class="input-numeric-short padd-right" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Cost</label>
<input type="text" class="input-numeric-short padd-right" name="data.cost" value="{{data.cost}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">IDR</label>
<select class="competence-base flexrow" type="text" name="data.idr" value="{{data.idr}}" data-dtype="String">
{{#select data.idr}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
</ul>
</div>
</div>
</section>
</form>

View File

@ -0,0 +1,149 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname">
<input name="name" type="text" value="{{name}}" placeholder="Name"/>
</h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Type</label>
<select class="competence-base flexrow" type="text" name="data.type" value="{{data.type}}" data-dtype="String">
{{#select data.type}}
<option value="mental">Mental</option>
<option value="physical">Physical</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Positive/Negative</label>
<select class="competence-base flexrow" type="text" name="data.genre" value="{{data.genre}}" data-dtype="String">
{{#select data.genre}}
<option value="positive">Positive</option>
<option value="negative">Negative</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">'Effect Level is a Stat?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.effectstatlevel" {{checked data.effectstatlevel}}/></label>
</li>
{{#if data.effectstatlevel}}
<li class="flexrow"><label class="generic-label">Stat to use for Effect Level</label>
<select class="competence-base flexrow" type="text" name="data.effectstat" value="{{data.effectstat}}" data-dtype="String">
{{#select data.effectstat}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=true all=false}}
{{/select}}
</select>
</li>
{{else}}
<li class="flexrow"><label class="generic-label">Effect Level</label>
<input type="text" class="input-numeric-short padd-right" name="data.effectlevel" value="{{data.effectlevel}}" data-dtype="Number"/>
</li>
{{/if}}
<li class="flexrow"> <label class="generic-label">Affected Specialisations </label></li>
<li class="flexrow">
<ul class="ul-level1">
<li class="flexrow"><div class="drop-effect-specaffected"><label>Drop Specialisations here !</label></div>
</li>
{{#each data.specaffected as |spec idx|}}
<li class="flexrow">
<label name="data.specaffected[{{idx}}].name"><a class="view-subitem" data-type="specaffected" data-index="{{idx}}">{{spec.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specaffected" data-index="{{idx}}" title="Delete Spec"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Affected Stat</label>
<select class="competence-base flexrow" type="text" name="data.stataffected" value="{{data.stataffected}}" data-dtype="String">
{{#select data.stataffected}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=true all=true}}
{{/select}}
</select>
</li>
{{#if (eq data.genre "positive")}}
<li class="flexrow"><label class="generic-label">Choose one :</label></li>
<li class="flexrow"><label class="generic-label">Stat Dice ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.statdice" {{checked data.statdice}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Bonus Dice ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.bonusdice" {{checked data.bonusdice}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Other Dice ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.otherdice" {{checked data.otherdice}}/></label>
</li>
{{else}}
<li class="flexrow"><label class="generic-label">Reduce Dice Value ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.reducedicevalue" {{checked data.reducedicevalue}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Hindrance ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.hindrance" {{checked data.hindrance}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Resisted By</label>
<select class="competence-base flexrow" type="text" name="data.resistedby" value="{{data.resistedby}}" data-dtype="String">
{{#select data.resistedby}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=false all=false}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Recovery Roll ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.recoveryroll" {{checked data.recoveryroll}}/></label>
</li>
{{#if data.recoveryroll}}
<li class="flexrow"><label class="generic-label">Recovery Stat</label>
<select class="competence-base flexrow" type="text" name="data.recoveryrollstat" value="{{data.recoveryrollstat}}" data-dtype="String">
{{#select data.recoveryrollstat}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=false all=false}}
{{/select}}
</select>
</li>
<li class="flexrow">
<ul class="ul-level1">
<li class="flexrow">
<label class="generic-label">Recovery Specialisations </label>
</li>
<li class="flexrow"><div class="drop-effect-spec"><label>Drop Specialisations here !</label></div>
</li>
{{#each data.recoveryrollspec as |spec idx|}}
<li class="flexrow">
<label name="data.recoveryrollspec[{{idx}}].name"><a class="view-subitem" data-type="recoveryrollspec" data-index="{{idx}}">{{spec.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="recoveryrollspec" data-index="{{idx}}" title="Delete Spec"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
{{/if}}
{{/if}}
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,86 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Type</label>
<select class="competence-base flexrow" type="text" name="data.type" value="{{data.type}}" data-dtype="String">
{{#select data.type}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-equipment-types.html}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Related Statistic</label>
<select class="competence-base flexrow" type="text" name="data.stataffected" value="{{data.stataffected}}" data-dtype="String">
{{#select data.stataffected}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=true}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Level</label>
<input type="text" class="input-numeric-short padd-right" name="data.level" value="{{data.level}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Stat Dice ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.statdice" {{checked data.statdice}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Bonus Dice ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.bonusdice" {{checked data.bonusdice}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Other Dice ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.otherdice" {{checked data.otherdice}}/></label>
</li>
{{> systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html}}
<li class="flexrow"><label class="generic-label">Equipped ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipped" {{checked data.equipped}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Quantity</label>
<input type="text" class="input-numeric-short padd-right" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Weight</label>
<input type="text" class="input-numeric-short padd-right" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Is a container ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.iscontainer" {{checked data.iscontainer}}/></label>
</li>
{{#if data.iscontainer}}
<li class="flexrow"><label class="generic-label">Container capacity</label>
<input type="text" class="input-numeric-short padd-right" name="data.containercapacity" value="{{data.containercapacity}}" data-dtype="Number"/>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">Threat Level Value</label>
<input type="text" class="input-numeric-short padd-right" name="data.threatlevel" value="{{data.threatlevel}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Cost</label>
<input type="text" class="input-numeric-short padd-right" name="data.cost" value="{{data.cost}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">IDR</label>
<select class="competence-base flexrow" type="text" name="data.idr" value="{{data.idr}}" data-dtype="String">
{{#select data.idr}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,33 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Quantity</label>
<input type="text" class="input-numeric-short padd-right" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Weight</label>
<input type="text" class="input-numeric-short padd-right" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">IDR</label>
<select class="competence-base flexrow" type="text" name="data.idr" value="{{data.idr}}" data-dtype="String">
{{#select data.idr}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,112 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Level</label>
<input type="text" class="input-numeric-short padd-right" name="data.level" value="{{data.level}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Perk Status</label>
<select class="competence-base flexrow" type="text" name="data.status" value="{{data.status}}" data-dtype="String">
{{#select data.status}}
<option value="ready">Ready</option>
<option value="activated">Activated</option>
<option value="round2">2 Rounds left</option>
<option value="round1">1 Round left</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Number of use during activation</label>
<select class="competence-base flexrow" type="text" name="data.nbuse" value="{{data.nbuse}}" data-dtype="String">
{{#select data.nbuse}}
<option value="perkduration">For Duration of Perk</option>
<option value="next1action">Next 1 Stated Action</option>
<option value="next2action">Next 2 Stated Action</option>
<option value="next3action">Next 3 Stated Action</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Is Weaver Perk?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.isweaver" {{checked data.isweaver}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Effects Gained</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-perk-effect"><label>Drop Effects here !</label></div>
</li>
{{#each data.effectsgained as |effect idx|}}
<li class="flexrow">
<label name="data.effectsgained[{{idx}}].name"><a class="view-subitem" data-type="effectsgained" data-index="{{idx}}">{{effect.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="effectsgained" data-index="{{idx}}" title="Delete Effect"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
{{#each data.features as |feature key|}}
{{#if feature.isvalid}}
<li class="flexrow">
<label class="generic-label">{{feature.label}} ? </label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.features.{{key}}.flag" {{checked feature.flag}}/></label>
</li>
{{#if feature.flag}}
<ul class="ul-level1">
<li class="flexrow"><label class="generic-label">{{feature.label}}</label>
{{#if (eq feature.type "statdice")}}
<select class="competence-base flexrow" type="text" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="String">
{{#select feature.value}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true}}
{{/select}}
</select>
{{/if}}
{{#if (eq feature.type "range")}}
<select class="competence-base flexrow" type="text" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="String">
{{#select feature.value}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-range.html notapplicable=true}}
{{/select}}
</select>
{{/if}}
{{#if (eq feature.type "number")}}
<input type="text" class="padd-right" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="Number"/>
{{/if}}
{{#if (eq feature.type "string")}}
<input type="text" class="padd-right" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="String"/>
{{/if}}
{{#if (eq feature.type "dropspec")}}
<ul class="ul-level1">
<li class="flexrow"><div class="drop-spec-perk" data-key={{key}}><label>Drop Specialisation here !</label></div>
</li>
<input type="text" class="padd-right" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="String"/>
</ul>
{{/if}}
{{#if (eq feature.type "text")}}
<div class="small-editor item-text-long-line">
{{editor content=features.value target="data.features.{{key}}.value" button=true owner=owner editable=editable}}
</div>
{{/if}}
</li>
</ul>
{{/if}}
{{/if}}
{{/each}}
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,136 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab description" data-group="primary" data-tab="description">
<div class="medium-editor item-text-long-line">
<label class="generic-label">Description</label>
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
<div class="medium-editor item-text-long-line">
<label class="generic-label">Available Effects</label>
{{editor content=data.effects target="data.effects" button=true owner=owner editable=editable}}
</div>
<div class="medium-editor item-text-long-line">
<label class="generic-label">Purchased Effects</label>
{{editor content=data.purchasedeffects target="data.purchasedeffects" button=true owner=owner
editable=editable}}
</div>
</div>
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Roll Needed ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.rollneeded" {{checked
data.rollneeded}} /></label>
</li>
{{#if data.rollneeded}}
<li class="flexrow"><label class="generic-label">Related Statistic (only if roll is needed)</label>
<select class="competence-base flexrow" type="text" name="data.statistic" value="{{data.statistic}}"
data-dtype="String">
{{#select data.statistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html}}
{{/select}}
</select>
</li>
{{/if}}
<li class="flexrow">
<label class="generic-label">Activated ? </label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.activated" {{checked
data.activated}} /></label>
</li>
<li class="flexrow"><label class="generic-label">NRG Cost</label>
<input type="text" class="input-numeric-short padd-right" name="data.cost" value="{{data.cost}}"
data-dtype="Number" />
</li>
<li class="flexrow"><label class="generic-label">NRG Spent</label>
<input type="text" class="input-numeric-short padd-right" name="data.costspent" value="{{data.costspent}}"
data-dtype="Number" />
</li>
<li class="flexrow"><label class="generic-label">Range</label>
<select class="competence-base flexrow" type="text" name="data.range" value="{{data.range}}"
data-dtype="String">
{{#select data.range}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-range.html notapplicable=true}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Action</label>
<select class="competence-base flexrow" type="text" name="data.action" value="{{data.action}}"
data-dtype="String">
{{#select data.action}}
<option value="soft">Soft</option>
<option value="hard">Hard</option>
<option value="full">Full</option>
<option value="reactive">Reactive</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Type</label>
<select class="competence-base flexrow" type="text" name="data.type" value="{{data.type}}"
data-dtype="String">
{{#select data.type}}
<option value="instant">Instant</option>
<option value="active">Active</option>
<option value="permanent">Permanent</option>
<option value="reactive">Reactive</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Power Source</label>
<input type="text" class="padd-right" name="data.powersource" value="{{data.powersource}}"
data-dtype="String" />
</li>
<li class="flexrow">
<label class="generic-label">DMG Roll Needed ? </label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.dmgroll" {{checked
data.dmgroll}} /></label>
</li>
{{#if data.dmgroll}}
<li class="flexrow"><label class="generic-label">Related DMG Statistic </label>
<select class="competence-base flexrow" type="text" name="data.dmgstatistic" value="{{data.dmgstatistic}}"
data-dtype="String">
{{#select data.dmgstatistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html}}
{{/select}}
</select>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">Effects Gained</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow">
<div class="drop-power-effect"><label>Drop Effects here !</label></div>
</li>
{{#each data.effectsgained as |effect idx|}}
<li class="flexrow">
<label name="data.effectsgained[{{idx}}].name"><a class="view-subitem" data-type="effectsgained"
data-index="{{idx}}">{{effect.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="effectsgained" data-index="{{idx}}"
title="Delete Effect"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,134 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab details" data-group="primary" data-tab="description">
<label class="generic-label">Description</label>
<div class="medium-editor item-text-long-line">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
<label class="generic-label">Environment</label>
<div class="medium-editor item-text-long-line">
{{editor content=data.environment target="data.environment" button=true owner=owner editable=editable}}
</div>
<label class="generic-label">Society/Culture</label>
<div class="medium-editor item-text-long-line">
{{editor content=data.society_culture target="data.society_culture" button=true owner=owner editable=editable}}
</div>
<label class="generic-label">Outlook</label>
<div class="medium-editor item-text-long-line">
{{editor content=data.outlook target="data.outlook" button=true owner=owner editable=editable}}
</div>
</div>
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Abilities</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
<div class="drop-abilities"><label>Drop Abilities here !</label></div>
</li>
{{#each data.abilities as |ability idx|}}
<li class="flexrow">
<label name="data.abilities[{{idx}}].name"><a class="view-subitem" data-type="abilities"
data-index="{{idx}}">{{ability.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="abilities" data-index="{{idx}}"
title="Delete Ability"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</ul>
<ul>
<li class="flexrow"><label class="generic-label">Selectable Stats ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.selectablestats" {{checked
data.selectablestats}} /></label>
</li>
{{#if data.selectablestats}}
<li class="flexrow"><label class="generic-label">Select 1 stat only once?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.statsonlyonce" {{checked
data.statsonlyonce}} /></label>
</li>
<li class="flexrow"><label class="generic-label">Number of selectable stats</label>
<input type="text" class="input-numeric-short padd-right" name="data.numberstats" value="{{data.numberstats}}"
data-dtype="Number" />
</li>
{{/if}}
</ul>
<ul>
<li class="flexrow"><label class="generic-label">Number of Optionnal Abilities</label>
<input type="text" class="input-numeric-short padd-right" name="data.nboptionnal" value="{{data.nboptionnal}}"
data-dtype="Number" />
</li>
<li class="flexrow"><label class="generic-label">Optionnal Abilities</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
<div class="drop-optionnal-abilities"><label>Drop Abilities here !</label></div>
</li>
{{#each data.optionnalabilities as |ability idx|}}
<li class="flexrow">
<label name="data.optionnalabilities[{{idx}}].name"><a class="view-subitem" data-type="optionnalabilities"
data-index="{{idx}}">{{ability.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="optionnalabilities" data-index="{{idx}}"
title="Delete Ability"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</ul>
<ul>
<li class="flexrow"><label class="generic-label">Perks Gained ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.perksgained" {{checked
data.perksgained}} /></label>
</li>
{{#if data.perksgained}}
<li class="flexrow"><label class="generic-label">Choose in all available perks?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.perksall" {{checked
data.perksall}} /></label>
</li>
<li class="flexrow"><label class="generic-label">Number of perks to gain</label>
<input type="text" class="input-numeric-short padd-right" name="data.perksnumber" value="{{data.perksnumber}}"
data-dtype="Number" />
</li>
{{#if data.perksall}}
{{else}}
<ul class="ul-level1">
<li class="flexrow">
<div class="drop-race-perk"><label>Drop Perks here !</label></div>
</li>
{{#each data.perks as |perk idx|}}
<li class="flexrow">
<label name="data.perks[{{idx}}].name"><a class="view-subitem" data-type="perks"
data-index="{{idx}}">{{perk.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="perks" data-index="{{idx}}"
title="Delete Perk"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{/if}}
{{/if}}
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,114 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname">
<input name="name" type="text" value="{{name}}" placeholder="Name"/>
</h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Stat increase 1</label>
<select class="competence-base flexrow" type="text" name="data.statincrease1" value="{{data.statincrease1}}" data-dtype="String">
{{#select data.statincrease1}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Stat increase 2</label>
<select class="competence-base flexrow" type="text" name="data.statincrease2" value="{{data.statincrease2}}" data-dtype="String">
{{#select data.statincrease2}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="generic-label">Starting Specialisation at +1 DT (Two to be selected)</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
<label class="generic-label">Starting Specialisations : </label>
</li>
<li class="flexrow">
<input type="text" class="padd-right" name="data.messagespecplus1" value="{{data.messagespecplus1}}" data-dtype="String"/>
</li>
<li class="flexrow"><div class="drop-spec1"><label>Drop Specialisations here !</label></div>
</li>
{{#each data.specialisationsplus1 as |spec idx|}}
<li class="flexrow">
<label name="data.specialisationsplus1[{{idx}}].name"><a class="view-subitem" data-type="specialisationsplus1" data-index="{{idx}}">{{spec.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specialisationsplus1" data-index="{{idx}}" title="Delete Spec"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<li class="flexrow">
<label class="generic-label">Role Perk</label>
</li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-specialperk1"><label>Drop Perks here !</label></div>
</li>
{{#each data.specialperk as |perk idx|}}
<li class="flexrow">
<label name="data.specialperk[{{idx}}].name"><a class="view-subitem" data-type="specialperk" data-index="{{idx}}">{{perk.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specialperk" data-index="{{idx}}" title="Delete Perk"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Statistic increase (Choose 2 at +1 DT)</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
{{#each data.statincreasechoice as |stat idx|}}
<label name="statchoice{{idx}}">{{stat.name}}</label>
<label class="attribute-value checkbox"><input type="checkbox" class="stat-choice-flag" data-stat-idx="{{idx}}" {{checked stat.flag}}/></label>
{{/each}}
</li>
</ul>
<li class="flexrow"><label class="generic-label">Available specialisations (Choose 1 at +2 DT, Choose 2 at +1 DT)</label>
</li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-spec2"><label>Drop Specialisations here !</label></div>
</li>
{{#each data.specincrease as |spec idx|}}
<li class="flexrow">
<label name="data.specincrease[{{idx}}].name"><a class="view-subitem" data-type="specincrease" data-index="{{idx}}">{{spec.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specincrease" data-index="{{idx}}" title="Delete Spec"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Available perks (Choose 2)</label>
</li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-perk2"><label>Drop Perks here !</label></div>
</li>
{{#each data.perks as |perk idx|}}
<li class="flexrow">
<label name="data.perk[{{idx}}].name"><a class="view-subitem" data-type="perks" data-index="{{idx}}">{{perk.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="perks" data-index="{{idx}}" title="Delete Perk"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,55 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Defense Type</label>
<select class="competence-base flexrow" type="text" name="data.deftype" value="{{data.deftype}}" data-dtype="String">
{{#select data.deftype}}
<option value="dodge">Dodge</option>
<option value="block">Block</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Dice Level</label>
<select class="competence-base flexrow" type="text" name="data.level" value="{{data.level}}" data-dtype="Number">
{{#select data.level}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-level.html}}
{{/select}}
</select>
</li>
{{> systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html}}
<li class="flexrow"><label class="generic-label">Equipped ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipped" {{checked data.equipped}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Weight</label>
<input type="text" class="input-numeric-short padd-right" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Cost</label>
<input type="text" class="input-numeric-short padd-right" name="data.cost" value="{{data.cost}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">IDR</label>
<select class="competence-base flexrow" type="text" name="data.idr" value="{{data.idr}}" data-dtype="String">
{{#select data.idr}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,62 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Related Statistic</label>
<select class="competence-base flexrow" type="text" name="data.statistic" value="{{data.statistic}}" data-dtype="String">
{{#select data.statistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Level</label>
<select class="competence-base flexrow" type="text" name="data.level" value="{{data.level}}" data-dtype="Number">
{{#select data.level}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Is Power Group ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.ispowergroup" {{checked data.ispowergroup}}/></label>
</li>
{{#if data.ispowergroup}}
<li class="flexrow"><label class="generic-label">Available Power sources</label>
<input type="text" class="" name="data.powersource" value="{{data.powersource}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">Available Powers</label>
</li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-spec-power"><label>Drop Powers here !</label></div>
</li>
{{#each data.powers as |power idx|}}
<li class="flexrow">
<label name="data.powers[{{idx}}].name"><a class="view-subitem" data-type="powers" data-index="{{idx}}">{{power.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="powers" data-index="{{idx}}" title="Delete Power"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">Use for Threat Level ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.isthreatlevel" {{checked data.isthreatlevel}}/></label>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,145 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Related Attack Statistic</label>
<select class="competence-base flexrow" type="text" name="data.statistic" value="{{data.statistic}}" data-dtype="String">
{{#select data.statistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false special=true}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Related DMG Statistic</label>
<select class="competence-base flexrow" type="text" name="data.damagestatistic" value="{{data.damagestatistic}}" data-dtype="String">
{{#select data.damagestatistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false special=true}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Damage (Other Dice pool)</label>
<select class="competence-base flexrow" type="text" name="data.damage" value="{{data.damage}}" data-dtype="String">
{{#select data.damage}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Optimal Range</label>
<select class="competence-base flexrow" type="text" name="data.range" value="{{data.range}}" data-dtype="String">
{{#select data.range}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-range.html notapplicable=true}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Max Range</label>
<input type="text" class="" name="data.maxrange" value="{{data.maxrange}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">AoE</label>
<select class="competence-base flexrow" type="text" name="data.aoe" value="{{data.aoe}}" data-dtype="String">
{{#select data.aoe}}
<option value="none">None</option>
<option value="tz">TZ</option>
<option value="close">Close</option>
<option value="medium">Medium</option>
<option value="long">Long</option>
<option value="extreme">Extreme</option>
<option value="special">Special</option>
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Damage Type</label>
<select class="competence-base flexrow" type="text" name="data.damagetype" value="{{data.damagetype}}" data-dtype="String">
{{#select data.damagetype}}
<option value="none">None</option>
<option value="slashing">Slashing</option>
<option value="crushing">Crushing</option>
<option value="piercing">Piercing</option>
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Damage Type Level</label>
<input type="text" class="input-numeric-short padd-right" name="data.damagetypelevel" value="{{data.damagetypelevel}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Vehicle Damage Type</label>
<select class="competence-base flexrow" type="text" name="data.vehicledamagetype" value="{{data.vehicledamagetype}}" data-dtype="String">
{{#select data.vehicledamagetype}}
<option value="none">None</option>
<option value="emp">EMP</option>
<option value="thermal">Thermal</option>
<option value="kinetic">Kinetic</option>
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
{{> systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html}}
<li class="flexrow"><label class="generic-label">Vehicle Damage Type Level</label>
<input type="text" class="input-numeric-short padd-right" name="data.vehicledamagetypelevel" value="{{data.vehicledamagetypelevel}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Ammo - Current</label>
<input type="text" class="input-numeric-short padd-right" name="data.ammocurrent" value="{{data.ammocurrent}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Ammo - Max</label>
<input type="text" class="input-numeric-short padd-right" name="data.ammomax" value="{{data.ammomax}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Equipped ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipped" {{checked data.equipped}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Enhanced ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.enhanced" {{checked data.enhanced}}/></label>
</li>
{{#if data.enhanced}}
<li class="flexrow"><label class="generic-label">Enhanced Attack Statistic</label>
<select class="competence-base flexrow" type="text" name="data.enhancedstat" value="{{data.enhancedstat}}" data-dtype="String">
{{#select data.enhancedstat}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false special=false}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Enhance Level</label>
<input type="text" class="input-numeric-short padd-right" name="data.enhancedlevel" value="{{data.enhancedlevel}}" data-dtype="Number"/>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">Weight</label>
<input type="text" class="input-numeric-short padd-right" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Cost</label>
<input type="text" class="input-numeric-short padd-right" name="data.cost" value="{{data.cost}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">IDR</label>
<select class="competence-base flexrow" type="text" name="data.idr" value="{{data.idr}}" data-dtype="String">
{{#select data.idr}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
</ul>
</div>
</section>
</form>

184
templates/npc-sheet.html Normal file
View File

@ -0,0 +1,184 @@
<form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}}
<header class="sheet-header">
<div class="header-fields">
<div class="flexrow">
<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>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="attribute">Main</a>
<a class="item" data-tab="defence">Defence/Weapons</a>
<a class="item" data-tab="equipment">Equipment</a>
<a class="item" data-tab="notes">Notes</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Carac Tab --}}
<div class="tab items" data-group="primary" data-tab="attribute">
<span><a class="lock-unlock-sheet"><img class="small-button-container"
src="systems/fvtt-fragged-kingdom/images/icons/{{#if editScore}}unlocked.svg{{else}}locked.svg{{/if}}" alt="Unlocked/Locked"
>{{#if editScore}}Unlocked{{else}}Locked{{/if}}</a>
</span>
<div class="grid grid-2col">
<div class="">
<span class="generic-label"><h3>Type</h3>
<select class="competence-base flexrow" type="text" name="data.npctype" value="{{data.npctype}}" data-dtype="String" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.npctype}}
<option value="henchman">Henchman</option>
<option value="drone">Troop</option>
{{/select}}
</select> </span>
<button class="npc-skill-roll">Generic Skill roll</button>
<div>
<span class="generic-label"><h3>Traits List</h3></span>
<ul>
{{#each traits as |trait key|}}
<li class="item flexrow list-item" data-item-id="{{trait.id}}">
<img class="sheet-competence-img" src="{{trait.img}}"/>
<span class="competence-label">{{trait.name}}</span>
<span class="competence-label">{{trait.data.data.type}}</span>
<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>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
<div class="">
<span class="generic-label"><h3>Stats & Numbers</h3></span>
<ul>
{{#each data.spec as |spec key|}}
<li class="item flexrow list-item stack-left" data-attr-key="{{key}}">
<span class="stat-label padd-right npc-stat-label" name="{{key}}">{{spec.label}}</span>
<input type="text" class="input-numeric-short padd-right" name="data.spec.{{key}}.value" value="{{spec.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}/>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Defence Tab --}}
<div class="tab defence" data-group="primary" data-tab="defence">
<div class="flexcol">
<div class="">
{{#each data.fight as |fight key|}}
<ul>
<li class="item flexrow list-item stack-left">
<span class="stat-label padd-right"><strong>{{fight.label}}</strong></span>
<input type="text" class="input-numeric-short padd-right" name="data.fight.{{key}}.value" value="{{fight.value}}" data-dtype="Number"/>
</li>
{{#each fight.derivated as |derivated keydev|}}
<li class="item flexrow list-item">
<span class="stat-label flexrow ">{{derivated.label}}</span>
<input type="text" class="input-numeric-short padd-right" name="data.fight.{{key}}.derivated.{{keydev}}.value" value="{{derivated.value}}" data-dtype="Number"/>
</li>
{{/each}}
</ul>
{{/each}}
</div>
<span class="generic-label"><h3>Weapons</h3></span>
<ul class="stat-list alternate-list">
{{#each weapons as |weapon key|}}
<li class="item stat flexrow list-item" data-arme-id="{{weapon.id}}" data-item-id="{{weapon.id}}">
<img class="sheet-competence-img" src="{{weapon.img}}"/>
<span class="stat-label">{{weapon.name}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if weapon.data.data.equipped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
<li class="item stat flexrow list-item stats-table" data-armure-id="{{weapon.id}}" data-item-id="{{weapon.id}}">
{{#each weapon.data.data.weaponstats as |weaponstat statkey|}}
<ul>
<li class="item stat flexrow list-item" data-item-id="{{weapon.id}}" data-stat-id={{statkey}}><span class="stat-label weapon-label"><a name="{{weapon.name}}">Attack with {{weaponstat.name}}</a></span>
</li>
<li>{{> "systems/fvtt-fragged-kingdom/templates/weapon-stats-section.html" stats=weaponstat.data.statstotal isfinal=false header=true}}
</li>
</ul>
{{/each}}
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Traits Tab --}}
<div class="tab traits" data-group="primary" data-tab="traits">
</div>
{{!-- Features Tab --}}
<div class="tab equipment" data-group="primary" data-tab="equipment">
<div class="flexcol">
<div><h4>Equipment</h4></div>
<ul class="item-list alternate-list">
<li class="item flexrow list-item">
<span class="equipement-label">Name</span>
<span class="equipement-label">Type</span>
<div class="item-controls">
<span class="equipement-label">&nbsp;</span>
<span class="equipement-label">&nbsp;</span>
<span class="equipement-label">&nbsp;</span>
</div>
</li>
{{#each equipments as |equip key|}}
<li class="item flexrow list-item" data-item-id="{{equip.id}}">
<img class="sheet-competence-img" src="{{equip.img}}"/>
<span class="equipement-label">{{equip.name}}</span>
<span class="equipement-label">{{equip.type}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if equip.data.data.equipped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Notes Tab --}}
<div class="tab notes" data-group="primary" data-tab="notes">
<article class="flexcol">
<h3>Description : </h3>
<div class="form-group editor">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
<hr>
<h3>Notes : </h3>
<div class="form-group editor">
{{editor content=data.notes target="data.notes" button=true owner=owner editable=editable}}
</div>
<hr>
{{>"systems/fvtt-fragged-kingdom/templates/editor-notes-gm.html"}}
</article>
</div>
</section>
</form>

View File

@ -0,0 +1,49 @@
<li class="item flexrow list-item list-item-shadow" data-item-id="{{equip._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{equip.img}}" /></a>
{{#if (eq level 1)}}
<span class="item-name-label">{{equip.name}}</span>
{{else}}
<span class="item-name-label-level2">{{equip.name}}</span>
{{/if}}
<span class="item-field-label-long"><label>
{{equip.data.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>
<span class="item-field-label-medium">
{{#if (count equip.data.effects)}}
{{#if equip.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">
{{#if equip.data.iscontainer}}
{{equip.data.contentsEnc}}
{{else}}
{{mul equip.data.weight equip.data.quantity}}
{{/if}}
</span>
<span class="item-field-label-medium">
{{#if equip.data.idrDice}}
<a class="roll-idr" data-dice-value="{{equip.data.idrDice}}">{{equip.data.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
{{#if (eq level 1)}}
<a class="item-control item-equip" title="Worn">{{#if equip.data.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
{{/if}}
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>

View File

@ -0,0 +1,16 @@
<li class="item flexrow list-item color-class-{{lower stat.abbrev}} item-stat-roll" data-attr-key="{{key}}">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/{{stat.abbrev}}.webp">
</span>
<span class="stat-label stat-margin" name="{{key}}">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="{{key}}">{{stat.abbrev}}</a></h4>
</span>
<select class="status-small-label color-class-common" type="text" name="data.statistics.{{key}}.value" value="{{stat.value}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="data.statistics.{{key}}.mod" value="{{stat.mod}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} />
</li>

View File

@ -0,0 +1,70 @@
<ul class="status-block">
<li class="item flexrow">
<span class="stat-label status-small-label status-col-name"><label class="status-small-label"><strong>Status</strong></label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Cur</label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Mod</label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Max</label></span>
</li>
{{#each data.secondary as |stat2 key|}}
<li class="item flexrow " data-attr-key="{{key}}">
<span class="stat-label flexrow status-col-name" name="{{key}}">
<label class="status-small-label"><strong>{{stat2.label}}</strong><br>
{{#if (eq key "health")}}
(KOV -{{stat2.max}})
{{/if}}
{{#if (eq key "delirium")}}
(MV -{{stat2.max}})
{{/if}}
</label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="data.secondary.{{key}}.value" value="{{stat2.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.secondary.{{key}}.bonus" value="{{stat2.bonus}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.secondary.{{key}}.max" value="{{stat2.max}}" data-dtype="Number"/>
</li>
{{/each}}
<li class="item flexrow " data-key="nrg">
<span class="stat-label flexrow status-col-name" name="nrg">
<label class="status-small-label"><strong>{{data.nrg.label}}</strong></label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/>
<span class="small-label status-small-label"> /{{data.nrg.absolutemax}}</span>
</li>
<li class="item flexrow " data-key="nrg">
<span class="stat-label flexrow status-col-name" name="activated-nrg">
<label class="status-small-label"><strong>Activated NRG</strong><br>
</span>
<span class="stat-label flexrow status-col-name" name="activated-nrg">
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
</span>
<!--<span class="stat-label flexrow status-col-name" name="momentum">
<label class="status-small-label flexrow"><strong>
<a class="stat-icon lock-unlock-sheet">{{#if editScore}}Lock{{else}}Unlock{{/if}}</a>
</strong></label>-->
</span>
</li>
<li class="item flexrow " data-key="momentum">
<span class="stat-label flexrow status-col-name" name="momentum">
<label class="status-small-label"><strong>Momentum</strong></label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.value" value="{{data.momentum.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.max" value="{{data.momentum.max}}" data-dtype="Number"/>
<span>
<a class="momentum-plus plus-minus-button">+</a>
<a class="momentum-minus plus-minus-button">-</a>
</span>
</li>
<!--<li class="item flexrow list-item" data-key="lock-unlock">
<span class="stat-label flexrow status-col-name" name="momentum">
<a class="stat-icon lock-unlock-sheet"><img class="small-button-container"
src="systems/fvtt-pegasus-rpg/images/icons/{{#if editStatSkill}}unlocked.svg{{else}}locked.svg{{/if}}" alt="lock/unlock"
></a>
</span>-->
</li>
</ul>
<!-- <span class="small-label padd-right packed-left">Act</span>
<input type="text" class="padd-right" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
-->

View File

@ -0,0 +1,16 @@
<li class="flexrow"><label class="generic-label">Effects</label>
</li>
<li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-equipment-effect"><label>Drop Effects here !</label></div>
</li>
{{#each data.effects as |effect idx|}}
<li class="flexrow">
<label name="data.effects[{{idx}}].name"><a class="view-subitem" data-type="effects" data-index="{{idx}}">{{effect.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="effects" data-index="{{idx}}" title="Delete Effect"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>

View File

@ -0,0 +1,8 @@
<div class="tab description" data-group="primary" data-tab="description">
<div>
<label class="generic-label">Description</label>
<div class="medium-editor item-text-long-line">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</div>
</div>

View File

@ -0,0 +1,5 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="description">Description</a>
<a class="item" data-tab="details">Details</a>
</nav>

View File

@ -0,0 +1,13 @@
<option value="camping">Camping & Survival</option>
<option value="communication">Communication & Information</option>
<option value="equestrian">Equestrian</option>
<option value="spy">Law/Security/Spy/Thief</option>
<option value="medical">Medical</option>
<option value="tools">Tools</option>
<option value="weaponaccess">Weapons accessories</option>
<option value="wizard">Wizards materials</option>
<option value="mount">Mounts</option>
<option value="vehicle">Vehicles</option>
<option value="clothing">Clothing</option>
<option value="ammo">Ammo</option>
<option value="misc">Misc</option>

View File

@ -0,0 +1,14 @@
{{#if notapplicable}}
<option value="notapplicable">Not applicable</option>
{{/if}}
<option value="0">0</option>
<option value="1">d4</option>
<option value="2">d6</option>
<option value="3">d8</option>
<option value="4">d10</option>
<option value="5">d12</option>
<option value="6">d12 d4</option>
<option value="7">d12 d6</option>
<option value="8">d12 d8</option>
<option value="9">d12 d10</option>
<option value="10">d12 d12</option>

View File

@ -0,0 +1,15 @@
{{#if notapplicable}}
<option value="notapplicable">Not applicable</option>
{{/if}}
<option value="touch">Self Only</option>
<option value="touchself">Touch/Self</option>
<option value="tz">Threat Zone</option>
<option value="close">Close</option>
<option value="medium">Medium</option>
<option value="long">Long</option>
<option value="extreme">Extreme</option>
<option value="sight">Line of Sight</option>
<option value="tz_close">TZ/Close</option>
<option value="close_medium">Close/Medium</option>
<option value="medium_long">Medium/Long</option>
<option value="long_extreme">Long/Extreme</option>

View File

@ -0,0 +1,22 @@
{{#if notapplicable}}
<option value="notapplicable">Not applicable</option>
{{/if}}
{{#if all}}
<option value="all">All</option>
{{/if}}
{{#if all}}
<option value="special">Special</option>
{{/if}}
<option value="agi">AGI</option>
<option value="mnd">MND</option>
<option value="soc">SOC</option>
<option value="str">STR</option>
<option value="phy">PHY</option>
<option value="com">COM</option>
<option value="def">DEF</option>
<option value="stl">STL</option>
<option value="per">PER</option>
<option value="foc">FOC</option>
{{#if mr}}
<option value="mr">MR</option>
{{/if}}

View File

@ -0,0 +1,102 @@
{{#if (notEmpty effectsList)}}
<label>Effects&Hindrances</label>
<ul>
{{#each effectsList as |effect idx|}}
{{#if effect.effect.data.hindrance}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
<label class="generic-label">Target Hindrance : {{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
</li>
{{else}}
{{#if (eq type "hindrance")}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
<label class="generic-label">Target Hindrance : {{effect.label}} ({{effect.value}})</label>
</li>
{{else}}
{{#if (count effect.effect.data.specaffected)}}
{{#each effect.effect.data.specaffected as |spec idx|}}
{{#if (eq @root.specName spec.name)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{/if}}
{{/each}}
{{else}}
{{#if (eq @root.statKey effect.effect.data.stataffected)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{else}}
{{#if (eq effect.effect.data.stataffected "all")}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/each}}
</ul>
{{/if}}
{{#if (notEmpty armorsList)}}
<label>Armors&Shields</label>
<ul>
{{#each armorsList as |armor idx|}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="armor-clicked" id="armor-{{idx}}" data-armor-idx="{{idx}}" {{checked armor.applied}}/></label>
<label class="generic-label padd-right">{{armor.label}} ({{armor.value}})</label>
</li>
{{/each}}
</ul>
{{/if}}
{{#if (notEmpty weaponsList)}}
<label>Weapons</label>
<ul>
{{#each weaponsList as |weapon idx|}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="weapon-clicked" id="weapon-{{idx}}" data-weapon-idx="{{idx}}" {{checked weapon.applied}}/></label>
<label class="generic-label padd-right">{{weapon.label}}</label>
</li>
{{/each}}
</ul>
{{/if}}
{{#if (notEmpty equipmentsList)}}
<label>Items</label>
<ul>
{{#each equipmentsList as |equip idx|}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="equip-clicked" id="equip-{{idx}}" data-equip-idx="{{idx}}" {{checked equip.applied}}/></label>
<label class="generic-label padd-right">{{equip.label}} ({{equip.value}})</label>
</li>
{{/each}}
</ul>
{{/if}}

8
templates/post-item.html Normal file
View File

@ -0,0 +1,8 @@
<div class="post-item" data-transfer="{{transfer}}">
<h3><b>{{name}}</b></h3>
{{#if img}}
<img class="chat-img" src="{{img}}" title="{{name}}" />
{{/if}}
<h4><b>Description : </b></h4>
<p class="card-content">{{{data.description}}}</p>
</div>

View File

@ -0,0 +1,88 @@
<form class="skill-roll-dialog">
<header class="roll-dialog-header">
{{#if img}}
<img class="actor-icon" src="{{img}}" data-edit="img" title="{{name}}" />
{{/if}}
<h1 class="dialog-roll-title roll-dialog-header">{{title}}</h1>
</header>
<div class="grid grid-2col">
<div class="flexcol">
<div class="flexrow">
<span class="roll-dialog-label" >Stat Dice : </span>
<select class="roll-dialog-label" id="statDicesLevel" type="text" name="statDicesLevel" value="{{statDicesLevel}}" data-dtype="Number"
{{#if statKey}}disabled{{/if}}>
{{#select statDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;+&nbsp;{{statMod}}</span>
</div>
{{#if specList}}
<div class="flexrow">
<span class="roll-dialog-label" >Spec : </span>
<select class="roll-dialog-label" id="specList" type="text" name="selectedSpec" value="{{selectedSpec}}" data-dtype="String">
{{#select selectedSpec}}
<option value="0">None</option>
{{#each specList as |spec idx|}}
<option value="{{spec._id}}">{{spec.name}}</option>
{{/each}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label" >Spec Dice : </span>
<select class="roll-dialog-label" id="specDicesLevel" type="text" name="specDicesLevel" value="{{specDicesLevel}}" data-dtype="Number"
{{#if specList}}disabled{{/if}}>
{{#select specDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label" >Bonus Dice : </span>
<select class="roll-dialog-label" id="bonusDicesLevel" type="text" name="bonusDicesLevel" value="{{bonusDicesLevel}}" data-dtype="Number">
{{#select bonusDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label" >Hindrance Dice :</span>
<select class="roll-dialog-label" id="hindranceDicesLevel" type="text" name="hindranceDicesLevel" value="{{hindranceDicesLevel}}" data-dtype="Number">
{{#select hindranceDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label" >Other Dice :</span>
<select class="roll-dialog-label" id="otherDicesLevel" type="text" name="otherDicesLevel" value="{{otherDicesLevel}}" data-dtype="Number">
{{#select otherDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
</div>
<div>
{{> systems/fvtt-pegasus-rpg/templates/partial-roll-select-effects.html}}
</div>
</div>
</form>