Compare commits
9 Commits
fvtt-warhe
...
fvtt-warhe
| Author | SHA1 | Date | |
|---|---|---|---|
| e573f5b382 | |||
| ed494e69b9 | |||
| 2813e5a694 | |||
| 09974cd323 | |||
| 6b8710b94c | |||
| 6b7d943649 | |||
| c2a7fbb4b5 | |||
| 36c9945886 | |||
| bfad3d1e5f |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.history/
|
||||
26
lang/en.json
26
lang/en.json
@@ -2,7 +2,8 @@
|
||||
"ACTOR": {
|
||||
"TypeCharacter": "Character",
|
||||
"TypeNpc": "NPC",
|
||||
"TypeMonster": "Monster"
|
||||
"TypeMonster": "Monster",
|
||||
"TypeParty": "Party"
|
||||
},
|
||||
"ITEM": {
|
||||
"TypeWeapon": "Weapon",
|
||||
@@ -53,11 +54,23 @@
|
||||
"WH.conf.beltpouch1": "Beltpouch 1",
|
||||
"WH.conf.beltpouch2": "Beltpouch 2",
|
||||
"WH.conf.beltpouch3": "Beltpouch 3",
|
||||
|
||||
"WH.conf.scrollcase": "Scroll case",
|
||||
"WH.conf.wandcase": "Wand case",
|
||||
"WH.conf.potioncase": "Potion case",
|
||||
"WH.conf.bagholding": "Bag of holding",
|
||||
"WH.conf.quiverholding": "Quiver of holding",
|
||||
"WH.conf.backpackholding": "Backpack of holding",
|
||||
"WH.conf.smallchest": "Small chest",
|
||||
"WH.conf.mediumchest": "Medium chest",
|
||||
"WH.conf.largechest": "Large chest",
|
||||
"WH.conf.hugechest": "Huge chest",
|
||||
"WH.conf.partystorage": "Party chest/storage",
|
||||
|
||||
"WH.conf.unknown": "Unknown",
|
||||
"WH.conf.yes": "Yes",
|
||||
"WH.conf.no": "No",
|
||||
"WH.conf.notapplicable": "Not applicable",
|
||||
"WH.conf.undefined": "Not applicable",
|
||||
|
||||
"WH.ui.level": "Level",
|
||||
"WH.ui.notes": "Notes",
|
||||
@@ -190,7 +203,14 @@
|
||||
"WH.ui.ignoreeffect": "Ignore effect",
|
||||
"WH.ui.raceSkills": "Race skills",
|
||||
"WH.ui.identified": "Identified",
|
||||
|
||||
"WH.ui.isclasssecondary": "Secondary class ?",
|
||||
"WH.ui.secondaryclass": "Super warhero",
|
||||
"WH.ui.meleedamagebonus": "Melee damage bonus",
|
||||
"WH.ui.rangeddamagebonus": "Ranged damage bonus",
|
||||
|
||||
"WH.ui.bodyslots": "Body",
|
||||
"WH.ui.containerslot": "Containers",
|
||||
|
||||
"WH.chat.save": "Save",
|
||||
"WH.chat.mweaponmalus": "Multiple weapons malus ",
|
||||
"WH.chat.diceresult": "Dice result",
|
||||
|
||||
@@ -51,14 +51,17 @@ export class WarheroActorSheet extends ActorSheet {
|
||||
conditions: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getConditions()) ),
|
||||
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
|
||||
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
|
||||
equippedWeapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getEquippedWeapons())),
|
||||
equippedArmors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getEquippedArmors())),
|
||||
equippedShields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getEquippedShields())),
|
||||
powers: this.actor.sortPowers(),
|
||||
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
|
||||
slotEquipments: this.actor.buildEquipmentsSlot(),
|
||||
subActors: duplicate(this.actor.getSubActors()),
|
||||
competency: this.actor.getCompetency(),
|
||||
race: duplicate(race),
|
||||
class: duplicate(this.actor.getClass()),
|
||||
mainClass: this.actor.getMainClass(),
|
||||
secondaryClass: this.actor.getSecondaryClass(),
|
||||
totalMoney: this.actor.computeTotalMoney(),
|
||||
equipments: duplicate(this.actor.getEquipmentsOnly()),
|
||||
//moneys: duplicate(this.actor.getMoneys()),
|
||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
||||
@@ -66,6 +69,12 @@ export class WarheroActorSheet extends ActorSheet {
|
||||
owner: this.document.isOwner,
|
||||
editScore: this.options.editScore,
|
||||
isGM: game.user.isGM
|
||||
}
|
||||
if (this.actor.type == "party") {
|
||||
formData.partySlots = this.actor.buildPartySlots()
|
||||
} else {
|
||||
formData.equipmentContainers = this.actor.buildEquipmentsSlot()
|
||||
formData.bodyContainers = this.actor.buildBodySlot()
|
||||
}
|
||||
// Dynamic patch
|
||||
formData.system.secondary.counterspell.hasmax = false
|
||||
|
||||
@@ -123,6 +123,11 @@ export class WarheroActor extends Actor {
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getEquippedArmors() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'armor' && item.system.slotlocation == 'armor') || []);
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getArmors() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'armor') || []);
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
@@ -147,6 +152,11 @@ export class WarheroActor extends Actor {
|
||||
return schools
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getEquippedShields() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'shield' && item.system.slotlocation == "shield") || []);
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getShields() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'shield') || []);
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
@@ -158,9 +168,18 @@ export class WarheroActor extends Actor {
|
||||
return race[0] ?? [];
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getClass() {
|
||||
let classWH = this.items.filter(item => item.type == 'class')
|
||||
return classWH[0] ?? [];
|
||||
getMainClass() {
|
||||
let classWH = this.items.find(item => item.type == 'class' && !item.system.issecondary)
|
||||
return classWH
|
||||
}
|
||||
getSecondaryClass() {
|
||||
let classWH = this.items.find(item => item.type == 'class' && item.system.issecondary)
|
||||
return classWH
|
||||
}
|
||||
getClasses() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == "class") || []);
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
checkAndPrepareEquipment(item) {
|
||||
@@ -176,29 +195,82 @@ export class WarheroActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
computeTotalMoney() {
|
||||
let nbMoney = 0
|
||||
this.items.forEach(it => {if (it.type == 'money') { nbMoney += it.system.quantity} } )
|
||||
this.items.forEach(it => { if (it.type == 'money') { nbMoney += it.system.quantity } })
|
||||
return nbMoney
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
buildPartySlots() {
|
||||
let containers = {}
|
||||
for (let slotName in game.system.warhero.config.partySlotNames) {
|
||||
let slotDef = game.system.warhero.config.partySlotNames[slotName]
|
||||
containers[slotName] = duplicate(slotDef)
|
||||
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment') )
|
||||
let slotUsed = 0
|
||||
for (let item of containers[slotName].content) {
|
||||
let q = (item.system.quantity) ? item.system.quantity : 1
|
||||
containers[slotName].nbslots += (item.system.providedslot ?? 0) * q
|
||||
if (item.type == "money") {
|
||||
slotUsed += Math.ceil(item.system.quantity / 1000)
|
||||
} else {
|
||||
slotUsed += item.system.slotused * q
|
||||
}
|
||||
}
|
||||
slotUsed = Math.ceil(slotUsed)
|
||||
containers[slotName].slotUsed = slotUsed
|
||||
}
|
||||
return containers
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
buildBodySlot() {
|
||||
let containers = {}
|
||||
for (let slotName in game.system.warhero.config.slotNames) {
|
||||
let slotDef = game.system.warhero.config.slotNames[slotName]
|
||||
if (!slotDef.container) {
|
||||
containers[slotName] = duplicate(slotDef)
|
||||
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment')
|
||||
&& it.system.slotlocation == slotName)
|
||||
let slotUsed = 0
|
||||
for (let item of containers[slotName].content) {
|
||||
let q = (item.system.quantity) ? item.system.quantity : 1
|
||||
containers[slotName].nbslots += (item.system.providedslot ?? 0) * q
|
||||
if (item.type == "money") {
|
||||
slotUsed += Math.ceil(item.system.quantity / 1000)
|
||||
} else {
|
||||
slotUsed += item.system.slotused * q
|
||||
}
|
||||
}
|
||||
slotUsed = Math.ceil(slotUsed)
|
||||
containers[slotName].slotUsed = slotUsed
|
||||
}
|
||||
}
|
||||
return containers
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
buildEquipmentsSlot() {
|
||||
let containers = {}
|
||||
for (let slotName in game.system.warhero.config.slotNames) {
|
||||
let slotDef = game.system.warhero.config.slotNames[slotName]
|
||||
containers[slotName] = duplicate(slotDef)
|
||||
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment')
|
||||
&& it.system.slotlocation == slotName)
|
||||
let slotUsed = 0
|
||||
for (let item of containers[slotName].content) {
|
||||
let q = (item.system.quantity) ? item.system.quantity : 1
|
||||
containers[slotName].nbslots += (item.system.providedslot?? 0) * q
|
||||
if ( item.type == "money") {
|
||||
slotUsed += Math.ceil(item.system.quantity / 1000)
|
||||
} else {
|
||||
slotUsed += item.system.slotused * q
|
||||
if (slotDef.container) {
|
||||
containers[slotName] = duplicate(slotDef)
|
||||
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment')
|
||||
&& it.system.slotlocation == slotName)
|
||||
let slotUsed = 0
|
||||
for (let item of containers[slotName].content) {
|
||||
let q = (item.system.quantity) ? item.system.quantity : 1
|
||||
containers[slotName].nbslots += (item.system.providedslot ?? 0) * q
|
||||
if (item.type == "money") {
|
||||
slotUsed += Math.ceil(item.system.quantity / 1000)
|
||||
} else {
|
||||
slotUsed += item.system.slotused * q
|
||||
}
|
||||
}
|
||||
slotUsed = Math.ceil(slotUsed)
|
||||
containers[slotName].slotUsed = slotUsed
|
||||
}
|
||||
slotUsed = Math.ceil(slotUsed)
|
||||
containers[slotName].slotUsed = slotUsed
|
||||
}
|
||||
return containers
|
||||
}
|
||||
@@ -221,9 +293,25 @@ export class WarheroActor extends Actor {
|
||||
formula += "+" + Math.floor(this.system.statistics.str.value * 1)
|
||||
weapon.damageFormula2Hands = weapon.system.damage2hands + "+" + Math.floor(this.system.statistics.str.value * 1.5)
|
||||
}
|
||||
if (weapon.system.weapontype == "throwing" || weapon.system.weapontype == "shooting") {
|
||||
formula += "+"+this.system.secondary.rangeddamagebonus.value
|
||||
} else if ( weapon.system.weapontype != "special" ) {
|
||||
formula += "+"+this.system.secondary.meleedamagebonus.value
|
||||
if (weapon.damageFormula2Hands) {
|
||||
weapon.damageFormula2Hands += "+"+this.system.secondary.meleedamagebonus.value
|
||||
}
|
||||
}
|
||||
weapon.damageFormula = formula
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getEquippedWeapons() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'weapon' && (item.system.slotlocation == "weapon1" || item.system.slotlocation == "weapon2") ) || []);
|
||||
for (let weapon of comp) {
|
||||
this.prepareWeapon(weapon)
|
||||
}
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getWeapons() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'weapon') || []);
|
||||
for (let weapon of comp) {
|
||||
@@ -254,7 +342,7 @@ export class WarheroActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getNormalSkills() {
|
||||
let comp = this.items.filter(it => it.type == "skill" && !it.system.classskill)
|
||||
let comp = this.items.filter(it => it.type == "skill" && !it.system.classskill && !it.system.raceskill)
|
||||
WarheroUtility.sortArrayObjectsByName(comp)
|
||||
return comp
|
||||
}
|
||||
@@ -317,7 +405,7 @@ export class WarheroActor extends Actor {
|
||||
|
||||
/* ------------------------------------------- */
|
||||
getEquipments() {
|
||||
return this.items.filter(item => item.type == 'shield' || item.type == 'armor' || item.type == "weapon" || item.type == "equipment" || item.type == "potion" || item.type == "poison"|| item.type == "trap" || item.type == "classitem");
|
||||
return this.items.filter(item => item.type == 'shield' || item.type == 'armor' || item.type == "weapon" || item.type == "equipment" || item.type == "potion" || item.type == "poison" || item.type == "trap" || item.type == "classitem");
|
||||
}
|
||||
getCompetencyItems() {
|
||||
return duplicate(this.items.filter(item => item.type == "competency") || [])
|
||||
@@ -420,17 +508,23 @@ export class WarheroActor extends Actor {
|
||||
}
|
||||
getCompetency() {
|
||||
let myRace = this.getRace()
|
||||
let myClass = this.getClass()
|
||||
let myClass1 = this.getMainClass()
|
||||
let myClass2 = this.getSecondaryClass()
|
||||
let competency = { weapons: {}, armors: {}, shields: {} }
|
||||
if (myRace.system) {
|
||||
this.updateCompetency(competency.weapons, myRace.system.weapons, game.system.warhero.config.weaponTypes)
|
||||
this.updateCompetency(competency.armors, myRace.system.armors, game.system.warhero.config.armorTypes)
|
||||
this.updateCompetency(competency.shields, myRace.system.shields, game.system.warhero.config.shieldTypes)
|
||||
}
|
||||
if (myClass.system) {
|
||||
this.updateCompetency(competency.weapons, myClass.system.weapons, game.system.warhero.config.weaponTypes)
|
||||
this.updateCompetency(competency.armors, myClass.system.armors, game.system.warhero.config.armorTypes)
|
||||
this.updateCompetency(competency.shields, myClass.system.shields, game.system.warhero.config.shieldTypes)
|
||||
if (myClass1 && myClass1.system) {
|
||||
this.updateCompetency(competency.weapons, myClass1.system.weapons, game.system.warhero.config.weaponTypes)
|
||||
this.updateCompetency(competency.armors, myClass1.system.armors, game.system.warhero.config.armorTypes)
|
||||
this.updateCompetency(competency.shields, myClass1.system.shields, game.system.warhero.config.shieldTypes)
|
||||
}
|
||||
if (myClass2 && myClass2.system) {
|
||||
this.updateCompetency(competency.weapons, myClass2.system.weapons, game.system.warhero.config.weaponTypes)
|
||||
this.updateCompetency(competency.armors, myClass2.system.armors, game.system.warhero.config.armorTypes)
|
||||
this.updateCompetency(competency.shields, myClass2.system.shields, game.system.warhero.config.shieldTypes)
|
||||
}
|
||||
return competency
|
||||
}
|
||||
@@ -480,7 +574,7 @@ export class WarheroActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async getInitiativeScore(combatId, combatantId) {
|
||||
let roll = new Roll("1d20+"+this.system.attributes.ini.value).roll({async: false})
|
||||
let roll = new Roll("1d20+" + this.system.attributes.ini.value).roll({ async: false })
|
||||
await WarheroUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"))
|
||||
return roll.total
|
||||
}
|
||||
@@ -573,7 +667,7 @@ export class WarheroActor extends Actor {
|
||||
return
|
||||
}
|
||||
newUse = Math.max(newUse, 0)
|
||||
this.updateEmbeddedDocuments('Item', [{ _id: skill.id, 'system.currentuse': newUse }])
|
||||
this.updateEmbeddedDocuments('Item', [{ _id: skill.id, 'system.currentuse': newUse }])
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
@@ -632,7 +726,7 @@ export class WarheroActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
computeDRTotal() {
|
||||
let armors = this.items.filter(it => it.type == "armor")
|
||||
let armors = this.items.filter(it => it.type == "armor" && it.system.slotlocation == 'armor')
|
||||
let dr = 0
|
||||
for (let armor of armors) {
|
||||
dr += armor.system.damagereduction
|
||||
@@ -641,7 +735,7 @@ export class WarheroActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
computeParryBonusTotal() {
|
||||
let shields = this.items.filter(it => it.type == "shield")
|
||||
let shields = this.items.filter(it => it.type == "shield" && it.system.slotlocation == 'shield')
|
||||
let parry = 0
|
||||
for (let shield of shields) {
|
||||
parry += shield.system.parrybonus
|
||||
@@ -663,12 +757,12 @@ export class WarheroActor extends Actor {
|
||||
this.update({ 'system.attributes.mana': mana })
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
incrementUse(rollData) {
|
||||
let stat = duplicate(this.system[rollData.mode][rollData.statKey])
|
||||
stat.nbuse++
|
||||
this.update( { [`system.${rollData.mode}.${rollData.statKey}`]: stat })
|
||||
this.update({ [`system.${rollData.mode}.${rollData.statKey}`]: stat })
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -690,11 +784,10 @@ export class WarheroActor extends Actor {
|
||||
rollData.mode = rollType
|
||||
rollData.statKey = rollKey
|
||||
rollData.stat = stat
|
||||
if (stat && stat.stat)
|
||||
{
|
||||
if (stat && stat.stat) {
|
||||
rollData.statBonus = duplicate(this.system.statistics[stat.stat])
|
||||
}
|
||||
if ( stat.hasuse && stat.nbuse >= stat.maxuse) {
|
||||
if (stat.hasuse && stat.nbuse >= stat.maxuse) {
|
||||
ui.notifications.warn(game.i18n.localize("WH.notif.toomanyuses"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@ export const WARHERO_CONFIG = {
|
||||
medium: {parry: "3", label: "WH.conf.mediumshield"},
|
||||
tower: {parry: "5", label: "WH.conf.towershield"},
|
||||
},
|
||||
|
||||
partySlotNames : {
|
||||
storage: {nbslots: 2000, itemtype:"equipment", label: "WH.conf.partystorage"}
|
||||
},
|
||||
|
||||
slotNames : {
|
||||
head: {nbslots: 1, itemtype:"armor", label: "WH.conf.head"},
|
||||
@@ -31,14 +35,24 @@ export const WARHERO_CONFIG = {
|
||||
ring: {nbslots: 10, itemtype:"equipment",label: "WH.conf.ring"},
|
||||
dress: {nbslots: 1, itemtype:"equipment",label: "WH.conf.dress"},
|
||||
boots: {nbslots: 1, itemtype:"equipment",label: "WH.conf.boots"},
|
||||
belt: {nbslots: 6, itemtype:"equipment",label: "WH.conf.belt"},
|
||||
quiver: {nbslots: 20, itemtype:"equipment",label: "WH.conf.quiver"},
|
||||
armor: {nbslots: 1, itemtype:"armor",label: "WH.conf.armor"},
|
||||
shield: {nbslots: 1, itemtype:"shield",label: "WH.conf.shield"},
|
||||
backpack: {nbslots: 12, itemtype:"equipment",label: "WH.conf.backpack"},
|
||||
beltpouch1: {nbslots: 4, itemtype:"equipment",label: "WH.conf.beltpouch1"},
|
||||
beltpouch2: {nbslots: 4, itemtype:"equipment", label: "WH.conf.beltpouch2"},
|
||||
beltpouch3: {nbslots: 4, itemtype:"equipment", label: "WH.conf.beltpouch3"},
|
||||
belt: {nbslots: 6, itemtype:"equipment", container: true, available: true, parent: undefined, label: "WH.conf.belt"},
|
||||
quiver: {nbslots: 20, itemtype:"equipment",container: true, available: true, parent: undefined, label: "WH.conf.quiver"},
|
||||
backpack: {nbslots: 12, itemtype:"equipment",container: true, available: true, parent: undefined, label: "WH.conf.backpack"},
|
||||
beltpouch1: {nbslots: 4, itemtype:"equipment",container: true, available: true, parent: undefined, label: "WH.conf.beltpouch1"},
|
||||
beltpouch2: {nbslots: 4, itemtype:"equipment", container: true, available: true, parent: undefined, label: "WH.conf.beltpouch2"},
|
||||
beltpouch3: {nbslots: 4, itemtype:"equipment", container: true, available: true, parent: undefined, label: "WH.conf.beltpouch3"},
|
||||
scrollcase: {nbslots: 17, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.scrollcase"},
|
||||
wandcase: {nbslots: 10, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.wandcase"},
|
||||
potioncase: {nbslots: 8, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.potioncase"},
|
||||
bagholding: {nbslots: 30, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.bagholding"},
|
||||
quiverholding: {nbslots: 9999, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.quiverholding"},
|
||||
backpackholding: {nbslots: 90, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.backpackholding"},
|
||||
smallchest: {nbslots: 6, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.smallchest"},
|
||||
mediumchest: {nbslots: 12, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.mediumchest"},
|
||||
largechest: {nbslots: 24, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.largechest"},
|
||||
hugechest: {nbslots: 24, itemtype:"equipment", container: true, available: false, parent: undefined, label: "WH.conf.hugechest"},
|
||||
},
|
||||
|
||||
progressionList: {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import { WarheroActor } from "./warhero-actor.js";
|
||||
import { WarheroItemSheet } from "./warhero-item-sheet.js";
|
||||
import { WarheroActorSheet } from "./warhero-actor-sheet.js";
|
||||
import { WarheroPartySheet } from "./warhero-party-sheet.js";
|
||||
import { WarheroNPCSheet } from "./warhero-npc-sheet.js";
|
||||
import { WarheroMonsterSheet } from "./warhero-monster-sheet.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
@@ -63,6 +64,7 @@ Hooks.once("init", async function () {
|
||||
Actors.registerSheet("fvtt-warhero", WarheroActorSheet, { types: ["character"], makeDefault: true });
|
||||
Actors.registerSheet("fvtt-warhero", WarheroNPCSheet, { types: ["npc"], makeDefault: false });
|
||||
Actors.registerSheet("fvtt-warhero", WarheroMonsterSheet, { types: ["monster"], makeDefault: false });
|
||||
Actors.registerSheet("fvtt-warhero", WarheroPartySheet, { types: ["party"], makeDefault: false });
|
||||
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("fvtt-warhero", WarheroItemSheet, { makeDefault: true });
|
||||
|
||||
57
modules/warhero-party-sheet.js
Normal file
57
modules/warhero-party-sheet.js
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Extend the basic ActorSheet with some very simple modifications
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
import { WarheroActorSheet } from "./warhero-actor-sheet.js";
|
||||
import { WarheroUtility } from "./warhero-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class WarheroPartySheet extends WarheroActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["warhero-rpg", "sheet", "actor"],
|
||||
template: "systems/fvtt-warhero/templates/party-sheet.html",
|
||||
width: 640,
|
||||
height: 720,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||
editScore: true
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
|
||||
const objectData = duplicate(this.object.system)
|
||||
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: this.actor.id,
|
||||
type: this.actor.type,
|
||||
img: this.actor.img,
|
||||
name: this.actor.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
system: objectData,
|
||||
limited: this.object.limited,
|
||||
totalMoney: this.actor.computeTotalMoney(),
|
||||
equipments: duplicate(this.actor.getEquipmentsOnly()),
|
||||
//moneys: duplicate(this.actor.getMoneys()),
|
||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
editScore: this.options.editScore,
|
||||
isGM: game.user.isGM
|
||||
}
|
||||
formData.partySlots = this.actor.buildPartySlots()
|
||||
|
||||
this.formData = formData
|
||||
console.log("PARTY : ", formData, this.object);
|
||||
return formData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -231,6 +231,7 @@ export class WarheroUtility {
|
||||
'systems/fvtt-warhero/templates/partial-item-description.html',
|
||||
'systems/fvtt-warhero/templates/partial-item-common-equipment.html',
|
||||
'systems/fvtt-warhero/templates/partial-actor-equipment.html',
|
||||
'systems/fvtt-warhero/templates/partial-container.html',
|
||||
]
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
||||
@@ -899,11 +899,10 @@ li {
|
||||
#sidebar #sidebar-tabs i{
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
display: inline-block;
|
||||
/*display: inline-block;*/
|
||||
background-position:center;
|
||||
background-size:cover;
|
||||
text-shadow: 1px 1px 0 rgba(0,0,0,0.75);
|
||||
|
||||
}
|
||||
|
||||
.sidebar-tab .directory-list .entity {
|
||||
@@ -916,6 +915,7 @@ li {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.chat-message-header {
|
||||
background: rgba(220, 220, 210, 0.5);
|
||||
font-size: 1.1rem;
|
||||
@@ -930,6 +930,7 @@ li {
|
||||
.chat-message .message-header .whisper-to {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.chat-actor-name {
|
||||
padding: 4px;
|
||||
}
|
||||
@@ -1491,6 +1492,11 @@ li {
|
||||
max-width: 22rem;
|
||||
min-width: 22rem;
|
||||
}
|
||||
.item-name-label-long3 {
|
||||
flex-grow: 2;
|
||||
max-width: 32rem;
|
||||
min-width: 32rem;
|
||||
}
|
||||
.item-name-label-level2 {
|
||||
flex-grow: 2;
|
||||
max-width: 9rem;
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
"styles": [
|
||||
"styles/simple.css"
|
||||
],
|
||||
"version": "10.0.36",
|
||||
"version": "10.0.46",
|
||||
"compatibility": {
|
||||
"minimum": "10",
|
||||
"verified": "10",
|
||||
@@ -115,7 +115,7 @@
|
||||
},
|
||||
"title": "Warhero RPG",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.36.zip",
|
||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.46.zip",
|
||||
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
|
||||
"background": "images/ui/warhero_welcome_page.webp",
|
||||
"id": "fvtt-warhero"
|
||||
|
||||
@@ -3,14 +3,15 @@
|
||||
"types": [
|
||||
"character",
|
||||
"npc",
|
||||
"monster"
|
||||
"monster",
|
||||
"party"
|
||||
],
|
||||
"templates": {
|
||||
"biodata": {
|
||||
"biodata": {
|
||||
"class": "",
|
||||
"age": 0,
|
||||
"size": 3,
|
||||
"size": "medium",
|
||||
"weight": "",
|
||||
"height": "",
|
||||
"hair": "",
|
||||
@@ -61,8 +62,8 @@
|
||||
"style": "edit",
|
||||
"hasmax": true,
|
||||
"isheader": true,
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"max": 30,
|
||||
"value": 30
|
||||
},
|
||||
"knowledge": {
|
||||
"label": "WH.ui.Knowledge",
|
||||
@@ -70,15 +71,16 @@
|
||||
"style": "edit",
|
||||
"hasmax": false,
|
||||
"roll": true,
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"max": 0,
|
||||
"value": 0
|
||||
},
|
||||
"def": {
|
||||
"label": "WH.ui.Defence",
|
||||
"abbrev": "def",
|
||||
"style": "edit",
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"iscombat": true,
|
||||
"max": 12,
|
||||
"value": 12
|
||||
},
|
||||
"txcm": {
|
||||
"label": "WH.ui.Throw2HitM",
|
||||
@@ -86,8 +88,9 @@
|
||||
"istxc": true,
|
||||
"style": "edit",
|
||||
"roll": true,
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"iscombat": true,
|
||||
"max": 0,
|
||||
"value": 0
|
||||
},
|
||||
"txcr": {
|
||||
"label": "WH.ui.Throw2HitR",
|
||||
@@ -95,8 +98,9 @@
|
||||
"istxc": true,
|
||||
"style": "edit",
|
||||
"roll": true,
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"iscombat": true,
|
||||
"max": 0,
|
||||
"value": 0
|
||||
},
|
||||
"mana": {
|
||||
"label": "WH.ui.Mana",
|
||||
@@ -104,37 +108,38 @@
|
||||
"style": "edit",
|
||||
"hasmax": true,
|
||||
"isheader": true,
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"max": 3,
|
||||
"value": 3
|
||||
},
|
||||
"ini": {
|
||||
"label": "WH.ui.Initiative",
|
||||
"abbrev": "ini",
|
||||
"style": "edit",
|
||||
"iscombat": true,
|
||||
"roll": true,
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"max": 0,
|
||||
"value": 0
|
||||
},
|
||||
"movearth": {
|
||||
"label": "WH.ui.Movement",
|
||||
"abbrev": "mov",
|
||||
"style": "edit",
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"max": 6,
|
||||
"value": 6
|
||||
},
|
||||
"movswim": {
|
||||
"label": "WH.ui.MovementSwim",
|
||||
"abbrev": "mov",
|
||||
"style": "edit",
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"max": 0,
|
||||
"value": 0
|
||||
},
|
||||
"movfly": {
|
||||
"label": "WH.ui.MovementFly",
|
||||
"abbrev": "mov",
|
||||
"style": "edit",
|
||||
"max": 1,
|
||||
"value": 1
|
||||
"max": 0,
|
||||
"value": 0
|
||||
}
|
||||
},
|
||||
"secondary": {
|
||||
@@ -148,6 +153,7 @@
|
||||
"malusmultiweapon": {
|
||||
"label": "WH.ui.malusmultiweapon",
|
||||
"abbrev": "malusmultiweapon",
|
||||
"iscombat": true,
|
||||
"style": "edit",
|
||||
"value": 0
|
||||
},
|
||||
@@ -155,6 +161,7 @@
|
||||
"label": "WH.ui.drbonus",
|
||||
"abbrev": "drbonus",
|
||||
"style": "edit",
|
||||
"iscombat": true,
|
||||
"value": 0
|
||||
},
|
||||
"drbonustotal": {
|
||||
@@ -162,12 +169,28 @@
|
||||
"abbrev": "drbonustotal",
|
||||
"disabled": true,
|
||||
"style": "edit",
|
||||
"iscombat": true,
|
||||
"value": 0
|
||||
},
|
||||
"meleedamagebonus": {
|
||||
"label": "WH.ui.meleedamagebonus",
|
||||
"abbrev": "meleedamagebonus",
|
||||
"iscombat": true,
|
||||
"style": "edit",
|
||||
"value": 0
|
||||
},
|
||||
"rangeddamagebonus": {
|
||||
"label": "WH.ui.rangeddamagebonus",
|
||||
"abbrev": "rangeddamagebonus",
|
||||
"iscombat": true,
|
||||
"style": "edit",
|
||||
"value": 0
|
||||
},
|
||||
"parrybonus": {
|
||||
"label": "WH.ui.parrybonus",
|
||||
"abbrev": "parrybonus",
|
||||
"isparrybonus": true,
|
||||
"iscombat": true,
|
||||
"style": "edit",
|
||||
"value": 0
|
||||
},
|
||||
@@ -176,6 +199,7 @@
|
||||
"abbrev": "parrybonustotal",
|
||||
"disabled": true,
|
||||
"style": "edit",
|
||||
"iscombat": true,
|
||||
"roll": true,
|
||||
"value": 0
|
||||
},
|
||||
@@ -212,6 +236,11 @@
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"party": {
|
||||
"templates": [
|
||||
"biodata"
|
||||
]
|
||||
},
|
||||
"character": {
|
||||
"templates": [
|
||||
"biodata",
|
||||
@@ -345,6 +374,7 @@
|
||||
"templates": [
|
||||
"commonclassrace"
|
||||
],
|
||||
"issecondary": false,
|
||||
"description": ""
|
||||
},
|
||||
"race": {
|
||||
|
||||
@@ -27,17 +27,42 @@
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item flexrow list-item" data-item-id="{{class._id}}">
|
||||
<li class="item flexrow list-item " data-item-id="{{mainClass._id}}">
|
||||
<label class="item-field-label-medium">{{localize "WH.ui.class"}}</label>
|
||||
<a class="item-edit"><img class="sheet-competence-img" src="{{class.img}}"></a>
|
||||
<input type="text" class="item-field-label-medium" disabled value="{{class.name}}" data-dtype="String" />
|
||||
{{#if mainClass}}
|
||||
<a class="item-edit"><img class="sheet-competence-img" src="{{mainClass.img}}"></a>
|
||||
<input type="text" class="item-field-label-medium" disabled value="{{mainClass.name}}" data-dtype="String" />
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{else}}
|
||||
<a class="item-edit"><img class="sheet-competence-img" src="icons/svg/mystery-man.svg"></a>
|
||||
{{/if}}
|
||||
</li>
|
||||
<li class="item flexrow list-item " data-item-id="{{secondaryClass._id}}">
|
||||
<label class="item-field-label-medium">{{localize "WH.ui.secondaryclass"}}</label>
|
||||
{{#if secondaryClass}}
|
||||
<a class="item-edit"><img class="sheet-competence-img" src="{{secondaryClass.img}}"></a>
|
||||
<input type="text" class="item-field-label-medium" disabled value="{{secondaryClass.name}}" data-dtype="String" />
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{else}}
|
||||
<a class="item-edit"><img class="sheet-competence-img" src="icons/svg/mystery-man.svg"></a>
|
||||
{{/if}}
|
||||
</li>
|
||||
<li class="item flexrow list-item" >
|
||||
<label class="item-field-label-medium">{{localize "WH.ui.religion"}}</label>
|
||||
<input type="text" class="item-field-label-medium" name="system.biodata.religion" value="{{system.biodata.religion}}" data-dtype="String" />
|
||||
|
||||
<label class="item-field-label-short">{{localize "WH.ui.size"}}</label>
|
||||
<select class="item-field-label-short" type="text" name="system.biodata.size" value="{{system.biodata.size}}" data-dtype="Number">
|
||||
{{#select system.biodata.size}}
|
||||
<option value="small">Small</option>
|
||||
<option value="medium">Medium</option>
|
||||
<option value="large">Large</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -83,56 +108,13 @@
|
||||
<div class="ability-item">
|
||||
<ul>
|
||||
{{#each system.attributes as |attr key|}}
|
||||
{{#if (not attr.iscombat)}}
|
||||
{{#if (not attr.isheader)}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=attr key=key path="attributes" fieldClass="item-field-label-vlong"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<ul class="stat-list alternate-list">
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
<span class="item-name-label-header-long">
|
||||
<h3><label class="items-title-text">{{localize "WH.ui.competency"}}</label></h3>
|
||||
</span>
|
||||
</li>
|
||||
{{#each competency.weapons as |cdata key|}}
|
||||
{{#if cdata}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
|
||||
<span class="item-name-label-long">{{localize "WH.ui.weapons"}} {{localize cdata.label}}</span>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#each competency.shields as |cdata key|}}
|
||||
{{#if cdata}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
|
||||
<span class="item-name-label-long">{{localize "WH.ui.shields"}} {{localize cdata.label}}</span>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#each competency.armors as |cdata key|}}
|
||||
{{#if cdata}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
|
||||
<span class="item-name-label-long">{{localize "WH.ui.armors"}} {{localize cdata.label}}</span>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
{{#each compentencyItems as |comp key|}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{comp._id}}">
|
||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||
src="{{comp.img}}" /></a>
|
||||
<span class="item-name-label-long">{{comp.name}}</span>
|
||||
|
||||
<div class="item-filler"> </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>
|
||||
|
||||
@@ -149,7 +131,9 @@
|
||||
|
||||
|
||||
{{#each system.secondary as |second key|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=second key=key path="secondary" fieldClass="item-field-label-vlong"}}
|
||||
{{#if (not second.iscombat)}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=second key=key path="secondary" fieldClass="item-field-label-vlong"}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
</ul>
|
||||
@@ -184,8 +168,34 @@
|
||||
|
||||
{{!-- Combat Tab --}}
|
||||
<div class="tab combat" data-group="primary" data-tab="combat">
|
||||
|
||||
<div class="flexcol">
|
||||
|
||||
<div class="grid grid2col">
|
||||
<ul class="stat-list alternate-list">
|
||||
{{#with system.attributes.def as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="def" path="attributes" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
{{#with system.attributes.ini as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="ini" path="attributes" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
{{#with system.secondary.meleedamagebonus as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="meleedamagebonus" path="secondary" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
</ul>
|
||||
<ul class="stat-list alternate-list">
|
||||
{{#with system.attributes.txcm as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="txcm" path="attributes" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
{{#with system.attributes.txcr as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="txch" path="attributes" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
{{#with system.secondary.rangeddamagebonus as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="rangeddamagebonus" path="secondary" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ul class="stat-list alternate-list">
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
@@ -199,7 +209,7 @@
|
||||
<label class="short-label">{{localize "WH.ui.Damage"}}</label>
|
||||
</span>
|
||||
</li>
|
||||
{{#each weapons as |weapon key|}}
|
||||
{{#each equippedWeapons 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>
|
||||
@@ -226,6 +236,19 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="grid grid2col">
|
||||
<ul class="stat-list alternate-list">
|
||||
{{#with system.secondary.parrybonus as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="parrybonus" path="secondary" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
</ul>
|
||||
<ul class="stat-list alternate-list">
|
||||
{{#with system.secondary.parrybonustotal as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="parrybonustotal" path="secondary" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ul class="stat-list alternate-list">
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
@@ -239,7 +262,7 @@
|
||||
<label class="short-label">{{localize "WH.ui.parrybonus"}}</label>
|
||||
</span>
|
||||
</li>
|
||||
{{#each shields as |shield key|}}
|
||||
{{#each equippedShields 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>
|
||||
@@ -257,6 +280,19 @@
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="grid grid2col">
|
||||
<ul class="stat-list alternate-list">
|
||||
{{#with system.secondary.drbonus as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="drbonus" path="secondary" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
</ul>
|
||||
<ul class="stat-list alternate-list">
|
||||
{{#with system.secondary.drbonustotal as |stat|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-actor-stat-block.html stat=stat key="drbonustotal" path="secondary" fieldClass="item-field-label-vlong"}}
|
||||
{{/with}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ul class="stat-list alternate-list">
|
||||
@@ -271,7 +307,7 @@
|
||||
<label class="short-label">{{localize "WH.ui.damagereduction"}}</label>
|
||||
</span>
|
||||
</li>
|
||||
{{#each armors as |armor key|}}
|
||||
{{#each equippedArmors as |armor key|}}
|
||||
<li class="item flexrow list-item 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>
|
||||
@@ -290,6 +326,51 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ul class="stat-list alternate-list">
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
<span class="item-name-label-header-long">
|
||||
<h3><label class="items-title-text">{{localize "WH.ui.competency"}}</label></h3>
|
||||
</span>
|
||||
</li>
|
||||
{{#each competency.weapons as |cdata key|}}
|
||||
{{#if cdata}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
|
||||
<span class="item-name-label-long">{{localize "WH.ui.weapons"}} {{localize cdata.label}}</span>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#each competency.shields as |cdata key|}}
|
||||
{{#if cdata}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
|
||||
<span class="item-name-label-long">{{localize "WH.ui.shields"}} {{localize cdata.label}}</span>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#each competency.armors as |cdata key|}}
|
||||
{{#if cdata}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
|
||||
<span class="item-name-label-long">{{localize "WH.ui.armors"}} {{localize cdata.label}}</span>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
{{#each compentencyItems as |comp key|}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{comp._id}}">
|
||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||
src="{{comp.img}}" /></a>
|
||||
<span class="item-name-label-long">{{comp.name}}</span>
|
||||
|
||||
<div class="item-filler"> </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>
|
||||
|
||||
@@ -458,10 +539,10 @@
|
||||
<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">
|
||||
<span class="item-name-label-long3">
|
||||
<a class="power-roll"><i class="fa-solid fa-dice-d20"></i>{{power.name}}</a>
|
||||
</span>
|
||||
<span class="item-name-label">
|
||||
<span class="item-name-label-medium">
|
||||
<a class="power-roll">{{power.system.level}}</a>
|
||||
</span>
|
||||
<div class="item-filler"> </div>
|
||||
@@ -484,54 +565,19 @@
|
||||
<label class="">{{localize "WH.ui.totalmoney"}} : {{totalMoney}}</label>
|
||||
</div>
|
||||
|
||||
{{#each slotEquipments as |slot slotKey|}}
|
||||
<ul class="item-list alternate-list">
|
||||
<li class="item flexrow list-item items-title-bg {{#if (gt slot.slotUsed slot.nbslots)}}items-title-bg-red{{/if}}">
|
||||
<span class="item-name-label-header">
|
||||
<h3><label class="items-title-text">{{localize slot.label}}</label></h3>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.Type"}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-long">
|
||||
<label class="short-label">{{localize "WH.ui.Qty"}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.maxslots"}}: {{slot.nbslots}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.slotsused"}}: {{slot.slotUsed}}</label>
|
||||
</span>
|
||||
<div class="item-filler"> </div>
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-add" data-type="{{itemtype}}" data-slot="{{slotKey}}" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each slot.content as |item itemKey|}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{item._id}}">
|
||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||
src="{{item.img}}" /></a>
|
||||
<span class="item-name-label">{{item.name}}</span>
|
||||
<hr>
|
||||
<h3>{{localize "WH.ui.bodyslots"}} : </h3>
|
||||
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{upperFirst item.type}}</label>
|
||||
</span>
|
||||
|
||||
<span class="item-field-label-long"><label>
|
||||
{{item.system.quantity}}
|
||||
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
|
||||
</label>
|
||||
</span>
|
||||
|
||||
<div class="item-filler"> </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>
|
||||
{{#each bodyContainers as |slot slotKey|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-container.html slot=slot slotKey=slotKey}}
|
||||
{{/each}}
|
||||
|
||||
<hr>
|
||||
<h3>{{localize "WH.ui.containerslot"}} : </h3>
|
||||
|
||||
{{#each equipmentContainers as |slot slotKey|}}
|
||||
{{> systems/fvtt-warhero/templates/partial-container.html slot=slot slotKey=slotKey}}
|
||||
{{/each}}
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -564,19 +610,6 @@
|
||||
</div>
|
||||
<div>
|
||||
<ul>
|
||||
<li class="flexrow item">
|
||||
<label class="generic-label">{{localize "WH.ui.size"}}</label>
|
||||
<select class="competence-base flexrow" type="text" name="system.biodata.size" value="{{system.biodata.size}}" data-dtype="Number">
|
||||
{{#select system.biodata.size}}
|
||||
<option value="1">Tiny</option>
|
||||
<option value="2">Small</option>
|
||||
<option value="3">Medium</option>
|
||||
<option value="4">Large</option>
|
||||
<option value="5">Huge</option>
|
||||
<option value="6">Gargantuan</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
<label class="generic-label">{{localize "WH.ui.gender"}}</label>
|
||||
<input type="text" class="" name="system.biodata.sex" value="{{system.biodata.sex}}" data-dtype="String" />
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
<ul>
|
||||
|
||||
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.isclasssecondary"}}</label>
|
||||
<input type="checkbox" name="system.issecondary" {{checked system.issecondary}}/>
|
||||
</li>
|
||||
|
||||
{{#each system.weapons as |weaponflag key|}}
|
||||
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.weapons"}} {{localize (concat "WH.conf." key)}}</label>
|
||||
<input type="checkbox" class="padd-right status-small-label color-class-common item-field-label-short"
|
||||
|
||||
49
templates/partial-container.html
Normal file
49
templates/partial-container.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<ul class="item-list alternate-list">
|
||||
<li class="item flexrow list-item items-title-bg {{#if (gt slot.slotUsed slot.nbslots)}}items-title-bg-red{{/if}}">
|
||||
<span class="item-name-label-header">
|
||||
<h3><label class="items-title-text">{{localize slot.label}}</label></h3>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.Type"}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-long">
|
||||
<label class="short-label">{{localize "WH.ui.Qty"}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.maxslots"}}: {{slot.nbslots}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.slotsused"}}: {{slot.slotUsed}}</label>
|
||||
</span>
|
||||
<div class="item-filler"> </div>
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-add" data-type="{{itemtype}}" data-slot="{{slotKey}}" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each slot.content as |item itemKey|}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{item._id}}">
|
||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||
src="{{item.img}}" /></a>
|
||||
<span class="item-name-label">{{item.name}}</span>
|
||||
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{upperFirst item.type}}</label>
|
||||
</span>
|
||||
|
||||
<span class="item-field-label-long"><label>
|
||||
{{item.system.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 class="short-label">{{localize (concat "WH.conf." item.system.isidentified)}}</label>
|
||||
</span>
|
||||
|
||||
<div class="item-filler"> </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>
|
||||
@@ -12,8 +12,8 @@
|
||||
</li>
|
||||
|
||||
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.identified"}}</label>
|
||||
<select class="item-field-label-long " type="text" name="system.identified" value="{{system.identified}}" data-dtype="String">
|
||||
{{#select system.identified}}
|
||||
<select class="item-field-label-long " type="text" name="system.isidentified" value="{{system.isidentified}}" data-dtype="String">
|
||||
{{#select system.isidentified}}
|
||||
{{#each config.identifiedState as |type key|}}
|
||||
<option value="{{key}}">{{localize type}}</option>
|
||||
{{/each}}
|
||||
|
||||
100
templates/party-sheet.html
Normal file
100
templates/party-sheet.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="equipment">{{localize "WH.ui.equipment"}}</a>
|
||||
<a class="item" data-tab="biodata">{{localize "WH.ui.biography"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
|
||||
{{!-- Equipement Tab --}}
|
||||
<div class="tab equipment" data-group="primary" data-tab="equipment">
|
||||
|
||||
{{#each partySlots as |slot slotKey|}}
|
||||
<ul class="item-list alternate-list">
|
||||
<li class="item flexrow list-item items-title-bg {{#if (gt slot.slotUsed slot.nbslots)}}items-title-bg-red{{/if}}">
|
||||
<span class="item-name-label-header">
|
||||
<h3><label class="items-title-text">{{localize slot.label}}</label></h3>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.Type"}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-long">
|
||||
<label class="short-label">{{localize "WH.ui.Qty"}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.maxslots"}}: {{slot.nbslots}}</label>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{localize "WH.ui.slotsused"}}: {{slot.slotUsed}}</label>
|
||||
</span>
|
||||
<div class="item-filler"> </div>
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-add" data-type="{{itemtype}}" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each slot.content as |item itemKey|}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{item._id}}">
|
||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||
src="{{item.img}}" /></a>
|
||||
<span class="item-name-label">{{item.name}}</span>
|
||||
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">{{upperFirst item.type}}</label>
|
||||
</span>
|
||||
|
||||
<span class="item-field-label-long"><label>
|
||||
{{item.system.quantity}}
|
||||
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
|
||||
</label>
|
||||
</span>
|
||||
|
||||
<div class="item-filler"> </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>
|
||||
{{/each}}
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
</div>
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab biodata" data-group="primary" data-tab="biodata">
|
||||
<hr>
|
||||
<h3>{{localize "WH.ui.background"}} : </h3>
|
||||
<div class="form-group editor">
|
||||
{{editor description target="system.biodata.description" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
||||
<hr>
|
||||
<h3>{{localize "WH.ui.notes"}} : </h3>
|
||||
<div class="form-group editor">
|
||||
{{editor notes target="system.biodata.notes" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
<hr>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</form>
|
||||
Reference in New Issue
Block a user