Initial Import
This commit is contained in:
parent
7665fb32b5
commit
76ca542cbb
12
lang/en.json
12
lang/en.json
@ -1,3 +1,13 @@
|
||||
{
|
||||
|
||||
"WH.conf.short": "Short",
|
||||
"WH.conf.long": "Long",
|
||||
"WH.conf.twohanded": "Two-Handed",
|
||||
"WH.conf.shooting": "Shooting",
|
||||
"WH.conf.throwing": "Throwing",
|
||||
"WH.conf.lightarmor" : "Light",
|
||||
"WH.conf.mediumarmor": "Medium",
|
||||
"WH.conf.heavyarmor": "Heavy",
|
||||
"WH.conf.lightshield": "Light",
|
||||
"WH.conf.mediumshield": "Medium",
|
||||
"WH.conf.towershield": "Tower"
|
||||
}
|
@ -3,17 +3,17 @@
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class CrucibleActorSheet extends ActorSheet {
|
||||
export class WarheroActorSheet extends ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["fvtt-crucible-rpg", "sheet", "actor"],
|
||||
template: "systems/fvtt-crucible-rpg/templates/actor-sheet.html",
|
||||
classes: ["fvtt-warhero", "sheet", "actor"],
|
||||
template: "systems/fvtt-warhero/templates/actor-sheet.html",
|
||||
width: 960,
|
||||
height: 720,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "skills" }],
|
||||
@ -46,13 +46,10 @@ export class CrucibleActorSheet extends ActorSheet {
|
||||
equippedWeapons: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquippedWeapons()) ),
|
||||
equippedArmor: this.actor.getEquippedArmor(),
|
||||
equippedShield: this.actor.getEquippedShield(),
|
||||
feats: duplicate(this.actor.getFeats()),
|
||||
subActors: duplicate(this.actor.getSubActors()),
|
||||
race: duplicate(this.actor.getRace()),
|
||||
moneys: duplicate(this.actor.getMoneys()),
|
||||
encCapacity: this.actor.getEncumbranceCapacity(),
|
||||
saveRolls: this.actor.getSaveRoll(),
|
||||
conditions: this.actor.getConditions(),
|
||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
||||
containersTree: this.actor.containersTree,
|
||||
@ -91,7 +88,7 @@ export class CrucibleActorSheet extends ActorSheet {
|
||||
// Delete Inventory Item
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item")
|
||||
CrucibleUtility.confirmDelete(this, li)
|
||||
WarheroUtility.confirmDelete(this, li)
|
||||
})
|
||||
html.find('.item-add').click(ev => {
|
||||
let dataType = $(ev.currentTarget).data("type")
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* -------------------------------------------- */
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { CrucibleRollDialog } from "./crucible-roll-dialog.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
import { WarheroRollDialog } from "./warhero-roll-dialog.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const coverBonusTable = { "nocover": 0, "lightcover": 2, "heavycover": 4, "entrenchedcover": 6 };
|
||||
@ -16,7 +16,7 @@ const __subkey2title = {
|
||||
* Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.
|
||||
* @extends {Actor}
|
||||
*/
|
||||
export class CrucibleActor extends Actor {
|
||||
export class WarheroActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
@ -43,7 +43,7 @@ export class CrucibleActor extends Actor {
|
||||
}
|
||||
|
||||
if (data.type == 'character') {
|
||||
const skills = await CrucibleUtility.loadCompendium("fvtt-crucible-rpg.skills");
|
||||
const skills = await WarheroUtility.loadCompendium("fvtt-warhero.skills");
|
||||
data.items = skills.map(i => i.toObject())
|
||||
}
|
||||
if (data.type == 'npc') {
|
||||
@ -113,41 +113,41 @@ export class CrucibleActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
getMoneys() {
|
||||
let comp = this.items.filter(item => item.type == 'money');
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getFeats() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'feat') || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getFeatsWithDie() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'feat' && item.system.isfeatdie) || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getFeatsWithSL() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'feat' && item.system.issl) || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getLore() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'spell') || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getEquippedWeapons() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'weapon' && item.system.equipped) || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getArmors() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'armor') || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getEquippedArmor() {
|
||||
@ -160,7 +160,7 @@ export class CrucibleActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
getShields() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'shield') || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getEquippedShield() {
|
||||
@ -190,13 +190,13 @@ export class CrucibleActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
getConditions() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'condition') || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getWeapons() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'weapon') || []);
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
@ -212,9 +212,9 @@ export class CrucibleActor extends Actor {
|
||||
getSkills() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'skill') || [])
|
||||
for (let skill of comp) {
|
||||
CrucibleUtility.updateSkill(skill)
|
||||
WarheroUtility.updateSkill(skill)
|
||||
}
|
||||
CrucibleUtility.sortArrayObjectsByName(comp)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp
|
||||
}
|
||||
|
||||
@ -273,17 +273,17 @@ export class CrucibleActor extends Actor {
|
||||
return {
|
||||
reflex: {
|
||||
"label": "Reflex Save",
|
||||
"img": "systems/fvtt-crucible-rpg/images/icons/saves/reflex_save.webp",
|
||||
"img": "systems/fvtt-warhero/images/icons/saves/reflex_save.webp",
|
||||
"value": this.system.abilities.agi.value + this.system.abilities.wit.value
|
||||
},
|
||||
fortitude: {
|
||||
"label": "Fortitude Save",
|
||||
"img": "systems/fvtt-crucible-rpg/images/icons/saves/fortitude_save.webp",
|
||||
"img": "systems/fvtt-warhero/images/icons/saves/fortitude_save.webp",
|
||||
"value": this.system.abilities.str.value + this.system.abilities.con.value
|
||||
},
|
||||
willpower: {
|
||||
"label": "Willpower Save",
|
||||
"img": "systems/fvtt-crucible-rpg/images/icons/saves/will_save.webp",
|
||||
"img": "systems/fvtt-warhero/images/icons/saves/will_save.webp",
|
||||
"value": this.system.abilities.int.value + this.system.abilities.cha.value
|
||||
}
|
||||
}
|
||||
@ -309,7 +309,7 @@ export class CrucibleActor extends Actor {
|
||||
// Compute whole enc
|
||||
let enc = 0
|
||||
for (let item of equipments) {
|
||||
//item.data.idrDice = CrucibleUtility.getDiceFromLevel(Number(item.data.idr))
|
||||
//item.data.idrDice = WarheroUtility.getDiceFromLevel(Number(item.data.idr))
|
||||
if (item.system.equipped) {
|
||||
if (item.system.iscontainer) {
|
||||
enc += item.system.contentsEnc
|
||||
@ -343,8 +343,8 @@ export class CrucibleActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async incDecHP(formula) {
|
||||
let dmgRoll = new Roll(formula+"[crucible-orange]").roll({ async: false })
|
||||
await CrucibleUtility.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"))
|
||||
let dmgRoll = new Roll(formula+"[warhero-orange]").roll({ async: false })
|
||||
await WarheroUtility.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"))
|
||||
let hp = duplicate(this.system.secondary.hp)
|
||||
hp.value = Number(hp.value) + Number(dmgRoll.total)
|
||||
this.update({ 'system.secondary.hp': hp })
|
||||
@ -431,7 +431,7 @@ export class CrucibleActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
syncRoll(rollData) {
|
||||
this.lastRollId = rollData.rollId;
|
||||
CrucibleUtility.saveRollData(rollData);
|
||||
WarheroUtility.saveRollData(rollData);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -540,7 +540,7 @@ export class CrucibleActor extends Actor {
|
||||
return
|
||||
}
|
||||
|
||||
let rollData = CrucibleUtility.getBasicRollData()
|
||||
let rollData = WarheroUtility.getBasicRollData()
|
||||
rollData.alias = this.name
|
||||
rollData.actorImg = this.img
|
||||
rollData.actorId = this.id
|
||||
@ -600,7 +600,7 @@ export class CrucibleActor extends Actor {
|
||||
ui.notifications.warn("You are targetting a token with a skill : please use a Weapon instead.")
|
||||
return
|
||||
}
|
||||
CrucibleUtility.rollCrucible(rollData)
|
||||
WarheroUtility.rollWarhero(rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -612,7 +612,7 @@ export class CrucibleActor extends Actor {
|
||||
return
|
||||
}
|
||||
skill = duplicate(skill)
|
||||
CrucibleUtility.updateSkill(skill)
|
||||
WarheroUtility.updateSkill(skill)
|
||||
let abilityKey = skill.system.ability
|
||||
let rollData = this.getCommonRollData(abilityKey)
|
||||
rollData.mode = "skill"
|
||||
@ -634,7 +634,7 @@ export class CrucibleActor extends Actor {
|
||||
let skill = this.items.find(item => item.name.toLowerCase() == weapon.system.skill.toLowerCase())
|
||||
if (skill) {
|
||||
skill = duplicate(skill)
|
||||
CrucibleUtility.updateSkill(skill)
|
||||
WarheroUtility.updateSkill(skill)
|
||||
let abilityKey = skill.system.ability
|
||||
let rollData = this.getCommonRollData(abilityKey)
|
||||
rollData.mode = "weapon"
|
||||
@ -644,8 +644,8 @@ export class CrucibleActor extends Actor {
|
||||
if (!rollData.forceDisadvantage) { // This is an attack, check if disadvantaged
|
||||
rollData.forceDisadvantage = this.isAttackDisadvantage()
|
||||
}
|
||||
/*if (rollData.weapon.system.isranged && rollData.tokensDistance > CrucibleUtility.getWeaponMaxRange(rollData.weapon) ) {
|
||||
ui.notifications.warn(`Your target is out of range of your weapon (max: ${CrucibleUtility.getWeaponMaxRange(rollData.weapon)} - current : ${rollData.tokensDistance})` )
|
||||
/*if (rollData.weapon.system.isranged && rollData.tokensDistance > WarheroUtility.getWeaponMaxRange(rollData.weapon) ) {
|
||||
ui.notifications.warn(`Your target is out of range of your weapon (max: ${WarheroUtility.getWeaponMaxRange(rollData.weapon)} - current : ${rollData.tokensDistance})` )
|
||||
return
|
||||
}*/
|
||||
this.startRoll(rollData)
|
||||
@ -663,7 +663,7 @@ export class CrucibleActor extends Actor {
|
||||
let skill = this.items.find(item => item.name.toLowerCase() == weapon.system.skill.toLowerCase())
|
||||
if (skill) {
|
||||
skill = duplicate(skill)
|
||||
CrucibleUtility.updateSkill(skill)
|
||||
WarheroUtility.updateSkill(skill)
|
||||
let abilityKey = skill.system.ability
|
||||
let rollData = this.getCommonRollData(abilityKey)
|
||||
rollData.defenderTokenId = undefined // Cleanup
|
||||
@ -693,10 +693,10 @@ export class CrucibleActor extends Actor {
|
||||
rollData.mode = "rangeddefense"
|
||||
if ( attackRollData) {
|
||||
rollData.attackRollData = duplicate(attackRollData)
|
||||
rollData.effectiveRange = CrucibleUtility.getWeaponRange(attackRollData.weapon)
|
||||
rollData.effectiveRange = WarheroUtility.getWeaponRange(attackRollData.weapon)
|
||||
rollData.tokensDistance = attackRollData.tokensDistance // QoL copy
|
||||
}
|
||||
rollData.sizeDice = CrucibleUtility.getSizeDice(this.system.biodata.size)
|
||||
rollData.sizeDice = WarheroUtility.getSizeDice(this.system.biodata.size)
|
||||
rollData.distanceBonusDice = 0 //Math.max(0, Math.floor((rollData.tokensDistance - rollData.effectiveRange) + 0.5))
|
||||
rollData.hasCover = "none"
|
||||
rollData.situational = "none"
|
||||
@ -731,36 +731,36 @@ export class CrucibleActor extends Actor {
|
||||
let messages = ["Armor applied"]
|
||||
|
||||
if (rollData) {
|
||||
if (CrucibleUtility.isArmorLight(armor) && CrucibleUtility.isWeaponPenetrating(rollData.attackRollData.weapon)) {
|
||||
if (WarheroUtility.isArmorLight(armor) && WarheroUtility.isWeaponPenetrating(rollData.attackRollData.weapon)) {
|
||||
return { armorIgnored: true, nbSuccess: 0, messages: ["Armor ignored : Penetrating weapons ignore Light Armors."] }
|
||||
}
|
||||
if (CrucibleUtility.isWeaponPenetrating(rollData.attackRollData.weapon)) {
|
||||
if (WarheroUtility.isWeaponPenetrating(rollData.attackRollData.weapon)) {
|
||||
messages.push("Armor reduced by 1 (Penetrating weapon)")
|
||||
reduce = 1
|
||||
}
|
||||
if (CrucibleUtility.isWeaponLight(rollData.attackRollData.weapon)) {
|
||||
if (WarheroUtility.isWeaponLight(rollData.attackRollData.weapon)) {
|
||||
messages.push("Armor with advantage (Light weapon)")
|
||||
advantage = true
|
||||
}
|
||||
if (CrucibleUtility.isWeaponHeavy(rollData.attackRollData.weapon)) {
|
||||
if (WarheroUtility.isWeaponHeavy(rollData.attackRollData.weapon)) {
|
||||
messages.push("Armor with disadvantage (Heavy weapon)")
|
||||
disadvantage = true
|
||||
}
|
||||
if (CrucibleUtility.isWeaponHack(rollData.attackRollData.weapon)) {
|
||||
if (WarheroUtility.isWeaponHack(rollData.attackRollData.weapon)) {
|
||||
messages.push("Armor reduced by 1 (Hack weapon)")
|
||||
reduce = 1
|
||||
}
|
||||
if (CrucibleUtility.isWeaponUndamaging(rollData.attackRollData.weapon)) {
|
||||
if (WarheroUtility.isWeaponUndamaging(rollData.attackRollData.weapon)) {
|
||||
messages.push("Armor multiplied by 2 (Undamaging weapon)")
|
||||
multiply = 2
|
||||
}
|
||||
}
|
||||
let diceColor = armor.system.absorprionroll
|
||||
let armorResult = await CrucibleUtility.getRollTableFromDiceColor(diceColor, false)
|
||||
let armorResult = await WarheroUtility.getRollTableFromDiceColor(diceColor, false)
|
||||
console.log("Armor log", armorResult)
|
||||
let armorValue = Math.max(0, (Number(armorResult.text) + reduce) * multiply)
|
||||
if (advantage || disadvantage) {
|
||||
let armorResult2 = await CrucibleUtility.getRollTableFromDiceColor(diceColor, false)
|
||||
let armorResult2 = await WarheroUtility.getRollTableFromDiceColor(diceColor, false)
|
||||
let armorValue2 = Math.max(0, (Number(armorResult2.text) + reduce) * multiply)
|
||||
if (advantage) {
|
||||
armorValue = (armorValue2 > armorValue) ? armorValue2 : armorValue
|
||||
@ -801,7 +801,7 @@ export class CrucibleActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
async startRoll(rollData) {
|
||||
this.syncRoll(rollData)
|
||||
let rollDialog = await CrucibleRollDialog.create(this, rollData)
|
||||
let rollDialog = await WarheroRollDialog.create(this, rollData)
|
||||
rollDialog.render(true)
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class CrucibleCombat extends Combat {
|
||||
export class WarheroCombat extends Combat {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollInitiative(ids, formula = undefined, messageOptions = {} ) {
|
||||
|
@ -1,19 +1,19 @@
|
||||
/* -------------------------------------------- */
|
||||
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { CrucibleRollDialog } from "./crucible-roll-dialog.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
import { WarheroRollDialog } from "./warhero-roll-dialog.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const __saveFirstToKey = { r: "reflex", f: "fortitude", w: "willpower"}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class CrucibleCommands {
|
||||
export class WarheroCommands {
|
||||
|
||||
static init() {
|
||||
if (!game.system.cruciblerpg.commands) {
|
||||
const crucibleCommands = new CrucibleCommands();
|
||||
crucibleCommands.registerCommand({ path: ["/rtarget"], func: (content, msg, params) => CrucibleCommands.rollTarget(msg, params), descr: "Launch the target roll window" });
|
||||
crucibleCommands.registerCommand({ path: ["/rsave"], func: (content, msg, params) => CrucibleCommands.rollSave(msg, params), descr: "Performs a save roll" });
|
||||
const crucibleCommands = new WarheroCommands();
|
||||
crucibleCommands.registerCommand({ path: ["/rtarget"], func: (content, msg, params) => WarheroCommands.rollTarget(msg, params), descr: "Launch the target roll window" });
|
||||
crucibleCommands.registerCommand({ path: ["/rsave"], func: (content, msg, params) => WarheroCommands.rollSave(msg, params), descr: "Performs a save roll" });
|
||||
game.system.cruciblerpg.commands = crucibleCommands;
|
||||
}
|
||||
}
|
||||
@ -93,7 +93,7 @@ export class CrucibleCommands {
|
||||
if (command && command.func) {
|
||||
const result = command.func(content, msg, params);
|
||||
if (result == false) {
|
||||
CrucibleCommands._chatAnswer(msg, command.descr);
|
||||
WarheroCommands._chatAnswer(msg, command.descr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
export class CrucibleHotbar {
|
||||
export class WarheroHotbar {
|
||||
|
||||
static async addToHotbar(item, slot) {
|
||||
let command = `game.system.cruciblerpg.CrucibleHotbar.rollMacro("${item.name}", "${item.type}");`;
|
||||
let command = `game.system.cruciblerpg.WarheroHotbar.rollMacro("${item.name}", "${item.type}");`;
|
||||
let macro = game.macros.contents.find(m => (m.name === item.name) && (m.command === command));
|
||||
if (!macro) {
|
||||
macro = await Macro.create({
|
||||
|
@ -1,17 +1,17 @@
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
|
||||
/**
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class CrucibleItemSheet extends ItemSheet {
|
||||
export class WarheroItemSheet extends ItemSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["fvtt-crucible-rpg", "sheet", "item"],
|
||||
template: "systems/fvtt-crucible-rpg/templates/item-sheet.html",
|
||||
classes: ["fvtt-warhero", "sheet", "item"],
|
||||
template: "systems/fvtt-warhero/templates/item-sheet.html",
|
||||
dragDrop: [{ dragSelector: null, dropSelector: null }],
|
||||
width: 620,
|
||||
height: 550,
|
||||
@ -50,7 +50,7 @@ export class CrucibleItemSheet extends ItemSheet {
|
||||
async getData() {
|
||||
|
||||
if ( this.object.type == "skill") {
|
||||
CrucibleUtility.updateSkill(this.object)
|
||||
WarheroUtility.updateSkill(this.object)
|
||||
}
|
||||
let objectData = duplicate(this.object.system)
|
||||
|
||||
@ -63,8 +63,8 @@ export class CrucibleItemSheet extends ItemSheet {
|
||||
name: this.object.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
weaponSkills: CrucibleUtility.getWeaponSkills(),
|
||||
shieldSkills: CrucibleUtility.getShieldSkills(),
|
||||
weaponSkills: WarheroUtility.getWeaponSkills(),
|
||||
shieldSkills: WarheroUtility.getShieldSkills(),
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
|
||||
data: itemData,
|
||||
limited: this.object.limited,
|
||||
@ -92,7 +92,7 @@ export class CrucibleItemSheet extends ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
postItem() {
|
||||
let chatData = duplicate(CrucibleUtility.data(this.item));
|
||||
let chatData = duplicate(WarheroUtility.data(this.item));
|
||||
if (this.actor) {
|
||||
chatData.actor = { id: this.actor.id };
|
||||
}
|
||||
@ -107,8 +107,8 @@ export class CrucibleItemSheet extends ItemSheet {
|
||||
payload: chatData,
|
||||
});
|
||||
|
||||
renderTemplate('systems/fvtt-crucible-rpg/templates/post-item.html', chatData).then(html => {
|
||||
let chatOptions = CrucibleUtility.chatDataSetup(html);
|
||||
renderTemplate('systems/fvtt-warhero/templates/post-item.html', chatData).then(html => {
|
||||
let chatOptions = WarheroUtility.chatDataSetup(html);
|
||||
ChatMessage.create(chatOptions)
|
||||
});
|
||||
}
|
||||
@ -159,7 +159,7 @@ export class CrucibleItemSheet extends ItemSheet {
|
||||
/* -------------------------------------------- */
|
||||
get template() {
|
||||
let type = this.item.type;
|
||||
return `systems/fvtt-crucible-rpg/templates/item-${type}-sheet.html`;
|
||||
return `systems/fvtt-warhero/templates/item-${type}-sheet.html`;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -1,19 +1,19 @@
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
|
||||
export const defaultItemImg = {
|
||||
skill: "systems/fvtt-crucible-rpg/images/icons/icon_skill.webp",
|
||||
armor: "systems/fvtt-crucible-rpg/images/icons/icon_armour.webp",
|
||||
weapon: "systems/fvtt-crucible-rpg/images/icons/icon_weapon.webp",
|
||||
equipment: "systems/fvtt-crucible-rpg/images/icons/icon_equipment.webp",
|
||||
race: "systems/fvtt-crucible-rpg/images/icons/icon_race.webp",
|
||||
money: "systems/fvtt-crucible-rpg/images/icons/icon_money.webp",
|
||||
skill: "systems/fvtt-warhero/images/icons/icon_skill.webp",
|
||||
armor: "systems/fvtt-warhero/images/icons/icon_armour.webp",
|
||||
weapon: "systems/fvtt-warhero/images/icons/icon_weapon.webp",
|
||||
equipment: "systems/fvtt-warhero/images/icons/icon_equipment.webp",
|
||||
race: "systems/fvtt-warhero/images/icons/icon_race.webp",
|
||||
money: "systems/fvtt-warhero/images/icons/icon_money.webp",
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class CrucibleItem extends Item {
|
||||
export class WarheroItem extends Item {
|
||||
|
||||
constructor(data, context) {
|
||||
if (!data.img) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Crucible system
|
||||
* Warhero system
|
||||
* Author: Uberwald
|
||||
* Software License: Prop
|
||||
*/
|
||||
@ -8,15 +8,15 @@
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Import Modules
|
||||
import { CrucibleActor } from "./crucible-actor.js";
|
||||
import { CrucibleItemSheet } from "./crucible-item-sheet.js";
|
||||
import { CrucibleActorSheet } from "./crucible-actor-sheet.js";
|
||||
import { CrucibleNPCSheet } from "./crucible-npc-sheet.js";
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { CrucibleCombat } from "./crucible-combat.js";
|
||||
import { CrucibleItem } from "./crucible-item.js";
|
||||
import { CrucibleHotbar } from "./crucible-hotbar.js"
|
||||
import { CrucibleCommands } from "./crucible-commands.js"
|
||||
import { WarheroActor } from "./warhero-actor.js";
|
||||
import { WarheroItemSheet } from "./warhero-item-sheet.js";
|
||||
import { WarheroActorSheet } from "./warhero-actor-sheet.js";
|
||||
import { WarheroNPCSheet } from "./warhero-npc-sheet.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
import { WarheroCombat } from "./warhero-combat.js";
|
||||
import { WarheroItem } from "./warhero-item.js";
|
||||
import { WarheroHotbar } from "./warhero-hotbar.js"
|
||||
import { WarheroCommands } from "./warhero-commands.js"
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
@ -25,16 +25,16 @@ import { CrucibleCommands } from "./crucible-commands.js"
|
||||
/************************************************************************************/
|
||||
Hooks.once("init", async function () {
|
||||
|
||||
console.log(`Initializing Crucible RPG`);
|
||||
console.log(`Initializing Warhero RPG`);
|
||||
|
||||
game.system.cruciblerpg = {
|
||||
CrucibleHotbar,
|
||||
CrucibleCommands
|
||||
WarheroHotbar,
|
||||
WarheroCommands
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// preload handlebars templates
|
||||
CrucibleUtility.preloadHandlebarsTemplates();
|
||||
WarheroUtility.preloadHandlebarsTemplates();
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
@ -44,27 +44,27 @@ Hooks.once("init", async function () {
|
||||
};
|
||||
|
||||
/* -------------------------------------------- */
|
||||
game.socket.on("system.fvtt-crucible-rpg", data => {
|
||||
CrucibleUtility.onSocketMesssage(data)
|
||||
game.socket.on("system.fvtt-warhero", data => {
|
||||
WarheroUtility.onSocketMesssage(data)
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Define custom Entity classes
|
||||
CONFIG.Combat.documentClass = CrucibleCombat
|
||||
CONFIG.Actor.documentClass = CrucibleActor
|
||||
CONFIG.Item.documentClass = CrucibleItem
|
||||
//CONFIG.Token.objectClass = CrucibleToken
|
||||
CONFIG.Combat.documentClass = WarheroCombat
|
||||
CONFIG.Actor.documentClass = WarheroActor
|
||||
CONFIG.Item.documentClass = WarheroItem
|
||||
//CONFIG.Token.objectClass = WarheroToken
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("fvtt-crucible", CrucibleActorSheet, { types: ["character"], makeDefault: true });
|
||||
Actors.registerSheet("fvtt-crucible", CrucibleNPCSheet, { types: ["npc"], makeDefault: false });
|
||||
Actors.registerSheet("fvtt-crucible", WarheroActorSheet, { types: ["character"], makeDefault: true });
|
||||
Actors.registerSheet("fvtt-crucible", WarheroNPCSheet, { types: ["npc"], makeDefault: false });
|
||||
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("fvtt-crucible", CrucibleItemSheet, { makeDefault: true });
|
||||
Items.registerSheet("fvtt-crucible", WarheroItemSheet, { makeDefault: true });
|
||||
|
||||
CrucibleUtility.init()
|
||||
WarheroUtility.init()
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -73,7 +73,7 @@ function welcomeMessage() {
|
||||
user: game.user.id,
|
||||
whisper: [game.user.id],
|
||||
content: `<div id="welcome-message-crucible"><span class="rdd-roll-part">
|
||||
<strong>Welcome to the Crucible RPG.</strong>
|
||||
<strong>Welcome to the Warhero RPG.</strong>
|
||||
` });
|
||||
}
|
||||
|
||||
@ -98,9 +98,9 @@ Hooks.once("ready", function () {
|
||||
}
|
||||
|
||||
welcomeMessage();
|
||||
CrucibleUtility.ready()
|
||||
CrucibleCommands.init()
|
||||
CrucibleHotbar.initDropbar()
|
||||
WarheroUtility.ready()
|
||||
WarheroCommands.init()
|
||||
WarheroHotbar.initDropbar()
|
||||
|
||||
})
|
||||
|
||||
|
@ -3,17 +3,17 @@
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class CrucibleNPCSheet extends ActorSheet {
|
||||
export class WarheroNPCSheet extends ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["crucible-rpg", "sheet", "actor"],
|
||||
template: "systems/fvtt-crucible-rpg/templates/npc-sheet.html",
|
||||
classes: ["warhero-rpg", "sheet", "actor"],
|
||||
template: "systems/fvtt-warhero/templates/npc-sheet.html",
|
||||
width: 640,
|
||||
height: 720,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
|
||||
@ -88,7 +88,7 @@ export class CrucibleNPCSheet extends ActorSheet {
|
||||
// Delete Inventory Item
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item")
|
||||
CrucibleUtility.confirmDelete(this, li)
|
||||
WarheroUtility.confirmDelete(this, li)
|
||||
})
|
||||
html.find('.item-add').click(ev => {
|
||||
let dataType = $(ev.currentTarget).data("type")
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
|
||||
export class CrucibleRollDialog extends Dialog {
|
||||
export class WarheroRollDialog extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async create(actor, rollData) {
|
||||
|
||||
let options = { classes: ["CrucibleDialog"], width: 540, height: 340, 'z-index': 99999 };
|
||||
let html = await renderTemplate('systems/fvtt-crucible-rpg/templates/roll-dialog-generic.html', rollData);
|
||||
let options = { classes: ["WarheroDialog"], width: 540, height: 340, 'z-index': 99999 };
|
||||
let html = await renderTemplate('systems/fvtt-warhero/templates/roll-dialog-generic.html', rollData);
|
||||
|
||||
return new CrucibleRollDialog(actor, rollData, html, options);
|
||||
return new WarheroRollDialog(actor, rollData, html, options);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -39,12 +39,12 @@ export class CrucibleRollDialog extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
roll() {
|
||||
CrucibleUtility.rollCrucible(this.rollData)
|
||||
WarheroUtility.rollWarhero(this.rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async refreshDialog() {
|
||||
const content = await renderTemplate("systems/fvtt-crucible-rpg/templates/roll-dialog-generic.html", this.rollData)
|
||||
const content = await renderTemplate("systems/fvtt-warhero/templates/roll-dialog-generic.html", this.rollData)
|
||||
this.data.content = content
|
||||
this.render(true)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CrucibleUtility } from "./crucible-utility.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class CrucibleToken extends Token {
|
||||
export class WarheroToken extends Token {
|
||||
|
||||
}
|
||||
|
@ -1,32 +1,24 @@
|
||||
/* -------------------------------------------- */
|
||||
import { CrucibleCombat } from "./crucible-combat.js";
|
||||
import { CrucibleCommands } from "./crucible-commands.js";
|
||||
import { WarheroCombat } from "./warhero-combat.js";
|
||||
import { WarheroCommands } from "./warhero-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 }
|
||||
const __skillLevel2Dice = ["0d8", "1d8", "2d8", "3d8", "4d8", '6d8', "8d8", "10d8"]
|
||||
const __color2RollTable = {
|
||||
blue: "Blue Armor Die", black: "Black Armor Die", green: "Green Armor Die", purple: "Purple Armor Die",
|
||||
white: "White Armor Die", red: "Red Armor Die", blackgreen: "Black & Green Armor Dice"
|
||||
}
|
||||
const __size2Dice = [{ nb: 0, dice: "d0" }, { nb: 5, dice: "d8" }, { nb: 3, dice: "d8" }, { nb: 2, dice: "d8" }, { nb: 1, dice: "d8" }, { nb: 1, dice: "d6" }, { nb: 1, noAddFirst: true, dice: "d6" }]
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class CrucibleUtility {
|
||||
export class WarheroUtility {
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async init() {
|
||||
Hooks.on('renderChatLog', (log, html, data) => CrucibleUtility.chatListeners(html));
|
||||
Hooks.on('renderChatLog', (log, html, data) => WarheroUtility.chatListeners(html));
|
||||
/*Hooks.on("dropCanvasData", (canvas, data) => {
|
||||
CrucibleUtility.dropItemOnToken(canvas, data)
|
||||
WarheroUtility.dropItemOnToken(canvas, data)
|
||||
});*/
|
||||
|
||||
this.rollDataStore = {}
|
||||
this.defenderStore = {}
|
||||
|
||||
CrucibleCommands.init();
|
||||
WarheroCommands.init();
|
||||
|
||||
Handlebars.registerHelper('count', function (list) {
|
||||
return list.length;
|
||||
@ -57,7 +49,7 @@ export class CrucibleUtility {
|
||||
|
||||
/*-------------------------------------------- */
|
||||
static gameSettings() {
|
||||
/*game.settings.register("fvtt-crucible-rpg", "dice-color-skill", {
|
||||
/*game.settings.register("fvtt-warhero", "dice-color-skill", {
|
||||
name: "Dice color for skills",
|
||||
hint: "Set the dice color for skills",
|
||||
scope: "world",
|
||||
@ -68,7 +60,7 @@ export class CrucibleUtility {
|
||||
})
|
||||
|
||||
Hooks.on('renderSettingsConfig', (event) => {
|
||||
const element = event.element[0].querySelector(`[name='fvtt-crucible-rpg.dice-color-skill']`)
|
||||
const element = event.element[0].querySelector(`[name='fvtt-warhero.dice-color-skill']`)
|
||||
if (!element) return
|
||||
// Replace placeholder element
|
||||
console.log("Element Found !!!!")
|
||||
@ -78,7 +70,7 @@ export class CrucibleUtility {
|
||||
/*-------------------------------------------- */
|
||||
static addDiceColors() {
|
||||
game.dice3d.addColorset({
|
||||
name: 'crucible-orange',
|
||||
name: 'warhero-orange',
|
||||
category: "crucible",
|
||||
foreground: '#9F8003',
|
||||
background: "#FFA500",
|
||||
@ -86,7 +78,7 @@ export class CrucibleUtility {
|
||||
}, "preferred");
|
||||
|
||||
game.dice3d.addColorset({
|
||||
name: 'crucible-purple',
|
||||
name: 'warhero-purple',
|
||||
category: "crucible",
|
||||
foreground: '#9F8003',
|
||||
background: "#800080",
|
||||
@ -94,7 +86,7 @@ export class CrucibleUtility {
|
||||
}, "preferred");
|
||||
|
||||
game.dice3d.addColorset({
|
||||
name: 'crucible-darkgreen',
|
||||
name: 'warhero-darkgreen',
|
||||
category: "crucible",
|
||||
foreground: '#9F8003',
|
||||
background: "#006400",
|
||||
@ -123,12 +115,12 @@ export class CrucibleUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async ready() {
|
||||
const skills = await CrucibleUtility.loadCompendium("fvtt-crucible-rpg.skills")
|
||||
const skills = await WarheroUtility.loadCompendium("fvtt-warhero.skills")
|
||||
this.skills = skills.map(i => i.toObject())
|
||||
this.weaponSkills = duplicate(this.skills.filter(item => item.system.isweaponskill))
|
||||
this.shieldSkills = duplicate(this.skills.filter(item => item.system.isshieldskill))
|
||||
|
||||
const rollTables = await CrucibleUtility.loadCompendium("fvtt-crucible-rpg.rolltables")
|
||||
const rollTables = await WarheroUtility.loadCompendium("fvtt-warhero.rolltables")
|
||||
this.rollTables = rollTables.map(i => i.toObject())
|
||||
|
||||
this.addDiceColors()
|
||||
@ -143,7 +135,7 @@ export class CrucibleUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async loadCompendium(compendium, filter = item => true) {
|
||||
let compendiumData = await CrucibleUtility.loadCompendiumData(compendium)
|
||||
let compendiumData = await WarheroUtility.loadCompendiumData(compendium)
|
||||
return compendiumData.filter(filter)
|
||||
}
|
||||
|
||||
@ -222,7 +214,7 @@ export class CrucibleUtility {
|
||||
static async getRollTableFromDiceColor(diceColor, displayChat = true) {
|
||||
let rollTableName = __color2RollTable[diceColor]
|
||||
if (rollTableName) {
|
||||
const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
|
||||
const pack = game.packs.get("fvtt-warhero.rolltables")
|
||||
const index = await pack.getIndex()
|
||||
const entry = index.find(e => e.name === rollTableName)
|
||||
let table = await pack.getDocument(entry._id)
|
||||
@ -237,7 +229,7 @@ export class CrucibleUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getCritical(level, weapon) {
|
||||
const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
|
||||
const pack = game.packs.get("fvtt-warhero.rolltables")
|
||||
|
||||
let tableName = "Crit " + level + " (" + this.upperFirst(weapon.system.damage) + ")"
|
||||
const index = await pack.getIndex()
|
||||
@ -255,7 +247,7 @@ export class CrucibleUtility {
|
||||
})
|
||||
html.on("click", '.roll-defense-melee', event => {
|
||||
let rollId = $(event.currentTarget).data("roll-id")
|
||||
let rollData = CrucibleUtility.getRollData(rollId)
|
||||
let rollData = WarheroUtility.getRollData(rollId)
|
||||
rollData.defenseWeaponId = $(event.currentTarget).data("defense-weapon-id")
|
||||
let actor = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||
if (actor && (game.user.isGM || actor.isOwner)) {
|
||||
@ -264,7 +256,7 @@ export class CrucibleUtility {
|
||||
})
|
||||
html.on("click", '.roll-defense-ranged', event => {
|
||||
let rollId = $(event.currentTarget).data("roll-id")
|
||||
let rollData = CrucibleUtility.getRollData(rollId)
|
||||
let rollData = WarheroUtility.getRollData(rollId)
|
||||
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||
if (defender && (game.user.isGM || defender.isOwner)) {
|
||||
defender.rollDefenseRanged(rollData)
|
||||
@ -277,14 +269,14 @@ export class CrucibleUtility {
|
||||
static async preloadHandlebarsTemplates() {
|
||||
|
||||
const templatePaths = [
|
||||
'systems/fvtt-crucible-rpg/templates/editor-notes-gm.html',
|
||||
'systems/fvtt-crucible-rpg/templates/partial-roll-select.html',
|
||||
'systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html',
|
||||
'systems/fvtt-crucible-rpg/templates/partial-actor-status.html',
|
||||
'systems/fvtt-crucible-rpg/templates/partial-options-abilities.html',
|
||||
'systems/fvtt-crucible-rpg/templates/partial-item-nav.html',
|
||||
'systems/fvtt-crucible-rpg/templates/partial-item-description.html',
|
||||
'systems/fvtt-crucible-rpg/templates/partial-actor-equipment.html'
|
||||
'systems/fvtt-warhero/templates/editor-notes-gm.html',
|
||||
'systems/fvtt-warhero/templates/partial-roll-select.html',
|
||||
'systems/fvtt-warhero/templates/partial-actor-ability-block.html',
|
||||
'systems/fvtt-warhero/templates/partial-actor-status.html',
|
||||
'systems/fvtt-warhero/templates/partial-options-abilities.html',
|
||||
'systems/fvtt-warhero/templates/partial-item-nav.html',
|
||||
'systems/fvtt-warhero/templates/partial-item-description.html',
|
||||
'systems/fvtt-warhero/templates/partial-actor-equipment.html'
|
||||
]
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
@ -297,7 +289,7 @@ export class CrucibleUtility {
|
||||
}
|
||||
|
||||
static findChatMessageId(current) {
|
||||
return CrucibleUtility.getChatMessageId(CrucibleUtility.findChatMessage(current));
|
||||
return WarheroUtility.getChatMessageId(WarheroUtility.findChatMessage(current));
|
||||
}
|
||||
|
||||
static getChatMessageId(node) {
|
||||
@ -305,7 +297,7 @@ export class CrucibleUtility {
|
||||
}
|
||||
|
||||
static findChatMessage(current) {
|
||||
return CrucibleUtility.findNodeMatching(current, it => it.classList.contains('chat-message') && it.attributes.getNamedItem('data-message-id'));
|
||||
return WarheroUtility.findNodeMatching(current, it => it.classList.contains('chat-message') && it.attributes.getNamedItem('data-message-id'));
|
||||
}
|
||||
|
||||
static findNodeMatching(current, predicate) {
|
||||
@ -313,7 +305,7 @@ export class CrucibleUtility {
|
||||
if (predicate(current)) {
|
||||
return current;
|
||||
}
|
||||
return CrucibleUtility.findNodeMatching(current.parentElement, predicate);
|
||||
return WarheroUtility.findNodeMatching(current.parentElement, predicate);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
@ -357,7 +349,7 @@ export class CrucibleUtility {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static saveRollData(rollData) {
|
||||
game.socket.emit("system.crucible-rpg", {
|
||||
game.socket.emit("system.warhero-rpg", {
|
||||
name: "msg_update_roll", data: rollData
|
||||
}); // Notify all other clients of the roll
|
||||
this.updateRollData(rollData)
|
||||
@ -380,7 +372,7 @@ export class CrucibleUtility {
|
||||
name: defender.name,
|
||||
alias: defender.name,
|
||||
//user: defender.id,
|
||||
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-request-defense.html`, rollData),
|
||||
content: await renderTemplate(`systems/fvtt-warhero/templates/chat-request-defense.html`, rollData),
|
||||
whisper: [defender.id].concat(ChatMessage.getWhisperRecipients('GM')),
|
||||
})
|
||||
}
|
||||
@ -426,7 +418,7 @@ export class CrucibleUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getFumble(weapon) {
|
||||
const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
|
||||
const pack = game.packs.get("fvtt-warhero.rolltables")
|
||||
const index = await pack.getIndex()
|
||||
let entry
|
||||
|
||||
@ -456,16 +448,16 @@ export class CrucibleUtility {
|
||||
result.damageWeaponFormula = result.defenderDamage + dmgDice
|
||||
result.defenderHPLossValue = await defender.incDecHP("-" + result.damageWeaponFormula)
|
||||
}
|
||||
if (result.fumble || (result.dangerous_fumble && CrucibleUtility.isWeaponDangerous(rollData.attackRollData.weapon))) {
|
||||
if (result.fumble || (result.dangerous_fumble && WarheroUtility.isWeaponDangerous(rollData.attackRollData.weapon))) {
|
||||
result.fumbleDetails = await this.getFumble(rollData.weapon)
|
||||
}
|
||||
if (result.critical_1 || result.critical_2) {
|
||||
let isDeadly = CrucibleUtility.isWeaponDeadly(rollData.attackRollData.weapon)
|
||||
let isDeadly = WarheroUtility.isWeaponDeadly(rollData.attackRollData.weapon)
|
||||
result.critical = await this.getCritical((result.critical_1) ? "I" : "II", rollData.attackRollData.weapon)
|
||||
result.criticalText = result.critical.text
|
||||
}
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-attack-defense-result.html`, rollData)
|
||||
content: await renderTemplate(`systems/fvtt-warhero/templates/chat-attack-defense-result.html`, rollData)
|
||||
})
|
||||
console.log("Results processed", rollData)
|
||||
}
|
||||
@ -490,7 +482,7 @@ export class CrucibleUtility {
|
||||
if (game.user.isGM) {
|
||||
this.processSuccessResult(rollData)
|
||||
} else {
|
||||
game.socket.emit("system.fvtt-crucible-rpg", { msg: "msg_gm_process_attack_defense", data: rollData });
|
||||
game.socket.emit("system.fvtt-warhero", { msg: "msg_gm_process_attack_defense", data: rollData });
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -583,7 +575,7 @@ export class CrucibleUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async rollCrucible(rollData) {
|
||||
static async rollWarhero(rollData) {
|
||||
|
||||
let actor = game.actors.get(rollData.actorId)
|
||||
|
||||
@ -622,9 +614,9 @@ export class CrucibleUtility {
|
||||
|
||||
if (rollData.skill.system.isfeatdie) {
|
||||
rollData.hasFeatDie = true
|
||||
diceFormula += "+ 1d10cs>=5[crucible-purple]"
|
||||
diceFormula += "+ 1d10cs>=5[warhero-purple]"
|
||||
} else {
|
||||
diceFormula += `+ 0d10cs>=5[crucible-purple]`
|
||||
diceFormula += `+ 0d10cs>=5[warhero-purple]`
|
||||
}
|
||||
if (rollData.skill.system.bonusdice != "none") {
|
||||
rollData.hasBonusDice = rollData.skill.system.bonusdice
|
||||
@ -639,10 +631,10 @@ export class CrucibleUtility {
|
||||
// advantage => 8
|
||||
let advFormula = "+ 0d8cs>=5"
|
||||
if (rollData.advantage == "advantage1" || rollData.forceAdvantage) {
|
||||
advFormula = "+ 1d8cs>=5[crucible-darkgreen]"
|
||||
advFormula = "+ 1d8cs>=5[warhero-darkgreen]"
|
||||
}
|
||||
if (rollData.advantage == "advantage2") {
|
||||
advFormula = "+ 2d8cs>=5[crucible-darkgreen]"
|
||||
advFormula = "+ 2d8cs>=5[warhero-darkgreen]"
|
||||
}
|
||||
diceFormula += advFormula
|
||||
|
||||
@ -699,7 +691,7 @@ export class CrucibleUtility {
|
||||
rollData.rollOrder = 1
|
||||
rollData.rollType = (rollData.rollAdvantage == "roll-advantage") ? "Advantage" : "Disadvantage"
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
|
||||
content: await renderTemplate(`systems/fvtt-warhero/templates/chat-generic-result.html`, rollData)
|
||||
})
|
||||
|
||||
rollData.rollOrder = 2
|
||||
@ -709,7 +701,7 @@ export class CrucibleUtility {
|
||||
rollData.roll = myRoll2 // Tmp switch to display the proper results
|
||||
rollData.nbSuccess = myRoll2.total
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
|
||||
content: await renderTemplate(`systems/fvtt-warhero/templates/chat-generic-result.html`, rollData)
|
||||
})
|
||||
rollData.roll = myRoll // Revert the tmp switch
|
||||
rollData.nbSuccess = myRoll.total
|
||||
@ -743,7 +735,7 @@ export class CrucibleUtility {
|
||||
actor.lastRoll = rollData
|
||||
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
|
||||
content: await renderTemplate(`systems/fvtt-warhero/templates/chat-generic-result.html`, rollData)
|
||||
})
|
||||
console.log("Rolldata result", rollData)
|
||||
|
||||
@ -794,7 +786,7 @@ export class CrucibleUtility {
|
||||
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-crucible-rpg", { msg: "msg_gm_chat_message", data: chatGM });
|
||||
game.socket.emit("system.fvtt-warhero", { msg: "msg_gm_chat_message", data: chatGM });
|
||||
}
|
||||
|
||||
|
||||
@ -855,13 +847,13 @@ export class CrucibleUtility {
|
||||
rollMode: game.settings.get("core", "rollMode"),
|
||||
advantage: "none"
|
||||
}
|
||||
CrucibleUtility.updateWithTarget(rollData)
|
||||
WarheroUtility.updateWithTarget(rollData)
|
||||
return rollData
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static updateWithTarget(rollData) {
|
||||
let target = CrucibleUtility.getTarget()
|
||||
let target = WarheroUtility.getTarget()
|
||||
if (target) {
|
||||
rollData.defenderTokenId = target.id
|
||||
}
|
||||
|
178
system.json
178
system.json
@ -23,172 +23,10 @@
|
||||
"packs": [
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Armors",
|
||||
"name": "armor",
|
||||
"path": "packs/armor.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Equipments",
|
||||
"name": "equipment",
|
||||
"path": "packs/equipment.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Shields",
|
||||
"name": "shields",
|
||||
"path": "packs/shields.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Weapons",
|
||||
"name": "weapons",
|
||||
"path": "packs/weapons.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Conditions",
|
||||
"name": "conditions",
|
||||
"path": "packs/conditions.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Currency",
|
||||
"name": "currency",
|
||||
"path": "packs/currency.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Lore - Air",
|
||||
"name": "lore-air",
|
||||
"path": "packs/lore-air.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Lore - Earth",
|
||||
"name": "lore-earth",
|
||||
"path": "packs/lore-earth.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Lore - Fire",
|
||||
"name": "lore-fire",
|
||||
"path": "packs/lore-fire.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Lore - Water",
|
||||
"name": "lore-water",
|
||||
"path": "packs/lore-water.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Lore - Shadow",
|
||||
"name": "lore-shadow",
|
||||
"path": "packs/lore-shadow.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Skills",
|
||||
"name": "skills",
|
||||
"path": "packs/skills.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Feats",
|
||||
"name": "feats",
|
||||
"path": "packs/feats.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Poisons",
|
||||
"name": "poisons",
|
||||
"path": "packs/poisons.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Powers - Class",
|
||||
"name": "classpowers",
|
||||
"path": "packs/classpowers.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Tricks & Traps",
|
||||
"name": "trickstraps",
|
||||
"path": "packs/trickstraps.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Action Tokens",
|
||||
"name": "action-tokens",
|
||||
"path": "packs/action-tokens.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "Item",
|
||||
"label": "Powers - Monsters",
|
||||
"name": "monster-powers",
|
||||
"path": "packs/monster-powers.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "RollTable",
|
||||
"label": "Rolltables",
|
||||
"name": "rolltables",
|
||||
"path": "packs/rolltables.db",
|
||||
"system": "fvtt-crucible-rpg",
|
||||
"label": "Races",
|
||||
"name": "races",
|
||||
"path": "packs/races.db",
|
||||
"system": "fvtt-warhero",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
}
|
||||
@ -206,9 +44,9 @@
|
||||
"maximum": "10"
|
||||
},
|
||||
"title": "Warhero RPG",
|
||||
"manifest": "https://raw.githubusercontent.com/213gaming/Crucible/main/system.json",
|
||||
"download": "https://github.com/213gaming/Crucible/archive/refs/tags/v10.0.23.zip",
|
||||
"url": "https://github.com/213gaming/Crucible",
|
||||
"background": "images/ui/crucible_welcome_page.webp",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
|
||||
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
|
||||
"background": "images/ui/warhero_welcome_page.webp",
|
||||
"id": "fvtt-warhero"
|
||||
}
|
@ -102,66 +102,51 @@
|
||||
}
|
||||
},
|
||||
"Item": {
|
||||
"types": [ "race", "skill", "armor", "shield", "equipment", "weapon", "money" , "feat", "spell", "condition", "poison"],
|
||||
"poison": {
|
||||
"types": [ "race", "weapon", "armor", "shield", "equipment", "money" , "skill", "power", "spell", "condition", "class"],
|
||||
"condition": {
|
||||
"description": ""
|
||||
},
|
||||
"condition": {
|
||||
"advantage": false,
|
||||
"disadvantage": false,
|
||||
"rolladvantage": false,
|
||||
"rolldisadvantage": false,
|
||||
"loosehpround": false,
|
||||
"loohproundvalue": 0,
|
||||
"noadvantage": false,
|
||||
"attackdisadvantage": false,
|
||||
"defensedisadvantage": false,
|
||||
"targetadvantage": false,
|
||||
"noaction": false,
|
||||
"class": {
|
||||
"weapons": {
|
||||
"short": false,
|
||||
"long": false,
|
||||
"twohanded": false,
|
||||
"shotgun": false,
|
||||
"throwing": false
|
||||
},
|
||||
"armors": {
|
||||
"light": false,
|
||||
"medium": false,
|
||||
"heavy": false
|
||||
},
|
||||
"shields": {
|
||||
"light": false,
|
||||
"medium": false,
|
||||
"tower": false
|
||||
},
|
||||
"description": ""
|
||||
},
|
||||
"race": {
|
||||
"description": ""
|
||||
},
|
||||
"feat": {
|
||||
"isfeatdie": false,
|
||||
"issl": false,
|
||||
"sl": 0,
|
||||
"skill": {
|
||||
"description": ""
|
||||
},
|
||||
"skill": {
|
||||
"ability": "",
|
||||
"armorpenalty": false,
|
||||
"isproficient": false,
|
||||
"isweaponskill": false,
|
||||
"isshieldskill": false,
|
||||
"isfeatdie": false,
|
||||
"issl2": false,
|
||||
"islore": false,
|
||||
"skilltype": "",
|
||||
"isinnate": false,
|
||||
"bonusdice": "",
|
||||
"background": 0,
|
||||
"basic": 0,
|
||||
"class": 0,
|
||||
"exp": 0,
|
||||
"explevel": 0,
|
||||
"weapon": {
|
||||
"weapontype": "short",
|
||||
"damage": "1d6",
|
||||
"cost": 0,
|
||||
"equipped": false,
|
||||
"description": ""
|
||||
},
|
||||
"armor": {
|
||||
"armortype": "",
|
||||
"absorprionroll": "",
|
||||
"damagedroll": "",
|
||||
"isproficient": false,
|
||||
"minstr": 0,
|
||||
"skillpenalty": 0,
|
||||
"armortype": "light",
|
||||
"equipped": false,
|
||||
"cost": 0,
|
||||
"description":""
|
||||
},
|
||||
"shield": {
|
||||
"shielddie": "",
|
||||
"skill": "",
|
||||
"shieldtype": "light",
|
||||
"equipped": false,
|
||||
"cost": 0,
|
||||
"description":""
|
||||
@ -176,25 +161,19 @@
|
||||
"containerid": "",
|
||||
"description":""
|
||||
},
|
||||
"power": {
|
||||
"level1": "",
|
||||
"level2": "",
|
||||
"level3": "",
|
||||
"level4_1": "",
|
||||
"level4_2": "",
|
||||
"description": ""
|
||||
},
|
||||
"money" : {
|
||||
"value": 0,
|
||||
"quantity": 0,
|
||||
"description": ""
|
||||
},
|
||||
"weapon": {
|
||||
"isproficient": false,
|
||||
"skill": "",
|
||||
"qualities": "",
|
||||
"flaws": "",
|
||||
"damage": "",
|
||||
"isranged": false,
|
||||
"range": "",
|
||||
"maxrange": "",
|
||||
"minstr": 0,
|
||||
"cost": 0,
|
||||
"equipped": false,
|
||||
"description": ""
|
||||
},
|
||||
"spell":{
|
||||
"lore": "",
|
||||
"circle": 1,
|
||||
|
@ -6,82 +6,34 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-description.html}}
|
||||
{{> systems/fvtt-warhero/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">Type</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.armortype" value="{{data.armortype}}" data-dtype="String">
|
||||
{{#select data.armortype}}
|
||||
<option value="clothes">Clothes</option>
|
||||
<option value="paddedlight">Padded (Light)</option>
|
||||
<option value="leatherlight">Leather/Hide (Light)</option>
|
||||
<option value="leathermedium">Studded Leather (Medium)</option>
|
||||
<option value="chain">Chain (Medium)</option>
|
||||
<option value="scale">Scale (Heavy)</option>
|
||||
<option value="scale">Scale (Heavy)</option>
|
||||
<option value="platemail">Plate Mail (Heavy)</option>
|
||||
<option value="platefull">Full Plate (Heavy)</option>
|
||||
<select class="competence-base flexrow" type="text" name="system.armortype" value="{{system.armortype}}" data-dtype="String">
|
||||
{{#select system.armortype}}
|
||||
{{#each config.armorTypes as |type key|}}
|
||||
<option value="{{key}}">{{localiser type.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Absorption roll</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.absorprionroll" value="{{data.absorprionroll}}" data-dtype="String">
|
||||
{{#select data.absorprionroll}}
|
||||
<option value="none">None</option>
|
||||
<option value="white">White</option>
|
||||
<option value="green">Green</option>
|
||||
<option value="blue">Blue</option>
|
||||
<option value="purple">Purple</option>
|
||||
<option value="red">Red</option>
|
||||
<option value="black">Black</option>
|
||||
<option value="blackgreen">Black+Green</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Damaged roll</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.damagedroll" value="{{data.damagedroll}}" data-dtype="String">
|
||||
{{#select data.damagedroll}}
|
||||
<option value="none">None</option>
|
||||
<option value="white">White</option>
|
||||
<option value="green">Green</option>
|
||||
<option value="blue">Blue</option>
|
||||
<option value="purple">Purple</option>
|
||||
<option value="red">Red</option>
|
||||
<option value="black">Black</option>
|
||||
<option value="blackgreen">Black+Green</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Is proficient ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.isproficient" {{checked data.isproficient}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Minimum strength</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.minstr" value="{{data.minstr}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Skill penalty</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.skillpenalty" value="{{data.skillpenalty}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Equipped ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked data.equipped}}/></label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked system.equipped}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Cost</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{data.cost}}" data-dtype="Number"/>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{system.cost}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||
</div>
|
||||
</header>
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
@ -20,41 +20,6 @@
|
||||
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
<ul>
|
||||
<li class="flexrow"><label class="generic-label">Provides 1 Advantage ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.advantage" {{checked data.advantage}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Provides 1 Disadvantage ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.disadvantage" {{checked data.disadvantage}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Provides Roll Advantage ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.rolladvantage" {{checked data.rolladvantage}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Provides Roll Disadvantage ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.rolldisadvantage" {{checked data.rolldisadvantage}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Loose HP per round ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.loosehpround" {{checked data.loosehpround}}/></label>
|
||||
</li>
|
||||
{{#if data.loosehpround}}
|
||||
<li class="flexrow"><label class="generic-label">Number of HP : </label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.loohproundvalue" value="{{data.loohproundvalue}}" data-dtype="Number"/>
|
||||
</li>
|
||||
{{/if}}
|
||||
<li class="flexrow"><label class="generic-label">No advantage possible ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.noadvantage" {{checked data.noadvantage}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Disadvantage on attack ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.attackdisadvantage" {{checked data.attackdisadvantage}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Disadvantage on defense ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.defensedisadvantage" {{checked data.defensedisadvantage}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Provides advantage to attacker ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.targetadvantage" {{checked data.targetadvantage}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">No action possible ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.noaction" {{checked data.noaction}}/></label>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
@ -6,23 +6,23 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-description.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
|
||||
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
<ul>
|
||||
<li class="flexrow"><label class="generic-label">Equipped ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked data.equipped}}/></label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked system.equipped}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Quantity</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.quantity" value="{{data.quantity}}" data-dtype="Number"/>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Cost</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{data.cost}}" data-dtype="Number"/>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{system.cost}}" data-dtype="Number"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -1,35 +0,0 @@
|
||||
<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-crucible-rpg/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-description.html}}
|
||||
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
<ul>
|
||||
<li class="flexrow"><label class="generic-label">Add feat die ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.isfeatdie" {{checked data.isfeatdie}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Add SL ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.issl" {{checked data.issl}}/></label>
|
||||
</li>
|
||||
|
||||
{{#if data.issl}}
|
||||
<li class="flexrow"><label class="generic-label">SL value</label>
|
||||
<input type="text" class="" name="data.sl" value="{{system.sl}}" data-dtype="Number"/>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
@ -6,20 +6,20 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-description.html}}
|
||||
{{> systems/fvtt-warhero/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="system.quantity" value="{{data.quantity}}" data-dtype="Number"/>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Unit value</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.value" value="{{data.value}}" data-dtype="Number"/>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.value" value="{{system.value}}" data-dtype="Number"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||
</div>
|
||||
</header>
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<label class="generic-label">Description</label>
|
||||
<div class="medium-editor item-text-long-line">
|
||||
{{editor description target="data.description" button=true owner=owner editable=editable}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||
</div>
|
||||
</header>
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<label class="generic-label">Description</label>
|
||||
<div class="medium-editor item-text-long-line">
|
||||
{{editor description target="data.description" button=true owner=owner editable=editable}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -18,33 +18,22 @@
|
||||
|
||||
<div class="tab" data-group="primary">
|
||||
<ul>
|
||||
<li class="flexrow"><label class="generic-label">Shield die</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.shielddie" value="{{data.shielddie}}" data-dtype="String">
|
||||
{{#select data.shielddie}}
|
||||
<option value="d6">d6</option>
|
||||
<option value="d8">d8</option>
|
||||
<option value="d10">d10</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Associated skill</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.skill" value="{{data.skill}}" data-dtype="String">
|
||||
{{#select data.skill}}
|
||||
{{#each shieldSkills as |skill idx|}}
|
||||
<option value="{{skill.name}}">{{skill.name}}</option>
|
||||
<li class="flexrow"><label class="generic-label">Shield typer</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.shieldtype" value="{{system.shieldtype}}" data-dtype="String">
|
||||
{{#select system.shieldtype}}
|
||||
{{#each config.armorTypes as |type key|}}
|
||||
<option value="{{key}}">{{localiser type.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Equipped ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked data.equipped}}/></label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked system.equipped}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Cost</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{data.cost}}" data-dtype="Number"/>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{system.cost}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -6,98 +6,15 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-description.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
|
||||
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
<ul>
|
||||
<li class="flexrow"><label class="generic-label">Ability</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.ability" value="{{data.ability}}" data-dtype="String">
|
||||
{{#select data.ability}}
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-options-abilities.html}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Is Feat Die ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.isfeatdie" {{checked data.isfeatdie}}/></label>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Is SL +2 ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.issl2" {{checked data.issl2}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Subject to Armor Penalty ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.armorpenalty" {{checked data.armorpenalty}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Skill Type</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.skilltype" value="{{data.skilltype}}" data-dtype="string">
|
||||
{{#select data.skilltype}}
|
||||
<option value="simple">Simple</option>
|
||||
<option value="complex">Complex</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Skill Dice</label>
|
||||
<input type="text" class="" name="system.skilldice" value="{{data.skilldice}} (level {{data.level}})" data-dtype="String" disabled/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Is Innate ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.isinnate" {{checked data.isinnate}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Is Lore ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.islore" {{checked data.islore}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Is Weapon Skill ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.isweaponskill" {{checked data.isweaponskill}}/></label>
|
||||
</li>
|
||||
|
||||
<!-- <li class="flexrow"><label class="generic-label">Is Shield Skill ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.isshieldskill" {{checked data.isshieldskill}}/></label>
|
||||
</li> -->
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Bonus dice</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.bonusdice" value="{{data.bonusdice}}" data-dtype="String">
|
||||
{{#select data.bonusdice}}
|
||||
<option value="none">None</option>
|
||||
<option value="1d6">1d6</option>
|
||||
<option value="2d6">2d6</option>
|
||||
<option value="3d6">3d6</option>
|
||||
<option value="4d6">4d6</option>
|
||||
<option value="5d6">5d6</option>
|
||||
<option value="6d6">6d6</option>
|
||||
<option value="7d6">7d6</option>
|
||||
<option value="8d6">8d6</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Background</label>
|
||||
<input type="text" class="" name="system.background" value="{{data.background}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Basic</label>
|
||||
<input type="text" class="" name="system.basic" value="{{data.basic}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Class</label>
|
||||
<input type="text" class="" name="system.class" value="{{data.class}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Exp level</label>
|
||||
<input type="text" class="" name="system.explevel" value="{{data.explevel}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Gained exp (+1 to Exp level at 25)</label>
|
||||
<input type="text" class="" name="system.exp" value="{{data.exp}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -6,12 +6,12 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-description.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
|
||||
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
<ul>
|
||||
|
@ -6,74 +6,38 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-item-description.html}}
|
||||
{{> systems/fvtt-warhero/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">Ability</label>
|
||||
<select class="competence-base flexrow" type="text" name="data.ability" value="{{data.ability}}" data-dtype="String">
|
||||
{{#select data.ability}}
|
||||
{{> systems/fvtt-crucible-rpg/templates/partial-options-abilities.html}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</li> -->
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Is proficient ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.isproficient" {{checked data.isproficient}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Associated skill</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.skill" value="{{data.skill}}" data-dtype="String">
|
||||
{{#select data.skill}}
|
||||
{{#each weaponSkills as |skill idx|}}
|
||||
<option value="{{skill.name}}">{{skill.name}}</option>
|
||||
<li class="flexrow"><label class="generic-label">Type</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.weapontype" value="{{system.weapontype}}" data-dtype="String">
|
||||
{{#select system.weapontype}}
|
||||
{{#each config.weaponTypes as |type key|}}
|
||||
<option value="{{key}}">{{localiser type.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Qualities (comma separated list)</label>
|
||||
<input type="text" class="padd-right" name="system.qualities" value="{{data.qualities}}" data-dtype="String"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Flaws (comma separated list)</label>
|
||||
<input type="text" class="padd-right" name="system.flaws" value="{{data.flaws}}" data-dtype="String"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Damage</label>
|
||||
<input type="text" class="right" name="system.damage" value="{{data.damage}}" data-dtype="String"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Is ranged weapon ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.isranged" {{checked data.isranged}}/></label>
|
||||
</li>
|
||||
{{#if data.isranged}}
|
||||
<li class="flexrow"><label class="generic-label">Effective Range</label>
|
||||
<input type="text" class="right" name="system.range" value="{{data.range}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Max range</label>
|
||||
<input type="text" class="right" name="system.maxrange" value="{{data.maxrange}}" data-dtype="String"/>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Minimum strength</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.minstr" value="{{data.minstr}}" data-dtype="Number"/>
|
||||
<input type="text" class="right" name="system.damage" value="{{system.damage}}" data-dtype="String"/>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Equipped ?</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked data.equipped}}/></label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipped" {{checked system.equipped}}/></label>
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="generic-label">Cost</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{data.cost}}" data-dtype="Number"/>
|
||||
<input type="text" class="input-numeric-short padd-right" name="system.cost" value="{{system.cost}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user