Compare commits

...

30 Commits

Author SHA1 Message Date
c0b67a86dd Sync templates 2023-03-31 09:53:01 +02:00
ae18d23630 Sync templates 2023-03-31 09:52:44 +02:00
80ec2e4e66 Fix translation 2023-03-30 18:04:03 +02:00
b5a7e79b17 Fix translation 2023-03-30 16:26:15 +02:00
538addd2c7 Fix size 2023-03-30 08:42:54 +02:00
9d8bd75348 Fix size 2023-03-30 07:48:12 +02:00
c97a39fe47 Update release 2023-03-28 09:20:20 +02:00
0be7e8a3b5 Update release 2023-03-28 08:14:14 +02:00
a032f177fa Update release 2023-03-28 08:12:57 +02:00
4f2cef924b Removbe packs 2023-03-27 19:09:40 +02:00
6148f73888 ALl items list 2023-03-26 08:57:44 +02:00
2e4b018834 New combat features 2023-03-24 13:40:20 +01:00
fb3d0dfd7f New combat features 2023-03-24 13:29:53 +01:00
e573f5b382 New combat features 2023-03-24 13:29:19 +01:00
ed494e69b9 Fix DR/Parry bonuses 2023-03-22 13:38:49 +01:00
2813e5a694 some re-org 2023-03-20 21:01:00 +01:00
09974cd323 Fix inventory 2023-03-19 23:13:46 +01:00
6b8710b94c Fix inventory 2023-03-19 23:13:24 +01:00
6b7d943649 New slots 2023-03-10 18:32:42 +01:00
c2a7fbb4b5 New slots 2023-03-10 18:32:13 +01:00
36c9945886 Update 2023-03-09 17:35:09 +01:00
bfad3d1e5f Update 2023-03-09 13:53:19 +01:00
7827e07e1c Minot fixes 2023-03-04 17:34:18 +01:00
3a8ad674bd Add new items 2023-02-27 22:04:03 +01:00
c8f7c7c1e5 Money 2023-02-21 17:53:00 +01:00
d922d77736 Minor changes 2023-02-20 18:38:00 +01:00
7137de0983 Minor changes 2023-02-20 10:16:17 +01:00
46b129cf81 Various fixes 2023-02-18 23:19:10 +01:00
fc9a878f3a Enhance sheets 2023-02-14 15:45:59 +01:00
db8cf30e06 Enhance translation keys 2023-02-14 13:46:59 +01:00
54 changed files with 1860 additions and 778 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.history/

View File

@ -1,2 +1,4 @@
# fvtt-pegasus-rpg
# fvtt-warhero

View File

@ -1,4 +1,29 @@
{
"ACTOR": {
"TypeCharacter": "Character",
"TypeNpc": "NPC",
"TypeMonster": "Monster",
"TypeParty": "Party"
},
"ITEM": {
"TypeWeapon": "Weapon",
"TypeEquipment": "Equipment",
"TypeRace": "Race",
"TypeArmor": "Armor",
"TypeShield": "Shield",
"TypeSkill": "Skill",
"TypePower": "Power",
"TypeLanguage": "Language",
"TypeCondition": "Condition",
"TypeClass": "Class",
"TypeMoney": "Money",
"TypePotion": "Potion",
"TypePoison": "Poison",
"TypeTrap": "Trap",
"TypeClassitem": "Class item",
"TypeCompetency": "Competency"
},
"WH.conf.short": "Short",
"WH.conf.long": "Long",
"WH.conf.twohanded": "Two-Handed",
@ -29,6 +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",
@ -44,6 +86,9 @@
"WH.ui.Strength": "Strength",
"WH.ui.Instinct": "Instinct",
"WH.ui.Dexterity": "Dexterity",
"WH.ui.savestr": "Str Save",
"WH.ui.savedex": "Dex Save",
"WH.ui.savemin": "Mind Save",
"WH.ui.Mind": "Mind",
"WH.ui.Type": "Type",
"WH.ui.HitPoints": "Hit Points",
@ -76,6 +121,7 @@
"WH.ui.classSkills": "Class Skills",
"WH.ui.skills": "Skills based on level",
"WH.ui.isclassskill": "Class skill ?",
"WH.ui.israceskill": "Race skill ?",
"WH.ui.unlimited": "Unlimited use ?",
"WH.ui.currentuse": "Current use",
"WH.ui.maxuse": "Max use",
@ -85,7 +131,108 @@
"WH.ui.conditions": "Conditions",
"WH.ui.effect": "Effect",
"WH.ui.main": "Main",
"WH.ui.combat": "Combat",
"WH.ui.skillstab": "Skills&Effects",
"WH.ui.powers": "Powers",
"WH.ui.equipment": "Equipment",
"WH.ui.biography": "Biography",
"WH.ui.race": "Race",
"WH.ui.class": "Class",
"WH.ui.religion": "Religion",
"WH.ui.origin": "Origin",
"WH.ui.age": "Age",
"WH.ui.height": "Height",
"WH.ui.eyes": "Eyes",
"WH.ui.hair": "Hair",
"WH.ui.preferredhand": "Preferred Hand",
"WH.ui.size": "Size",
"WH.ui.gender": "Gender",
"WH.ui.background": "Background",
"WH.ui.type": "Type",
"WH.ui.description": "Description",
"WH.ui.rawroll": "Raw Roll Formula (ex: 1d20+@statistics.str.value)",
"WH.ui.rawdamage": "Raw Damage Formula (ex: 1d6+(@statistics.str.value/2))",
"WH.ui.damage": "Damage",
"WH.ui.2hdamage": "2 Hands Damage",
"WH.ui.slotlocation": "Slot location",
"WH.ui.quantity": "Quantity",
"WH.ui.cost": "Cost",
"WH.ui.details": "Details",
"WH.ui.magicschool": "Magic School",
"WH.ui.providedslot": "Provided slot",
"WH.ui.skilllevelacquired": "Acquired at level",
"WH.ui.totalmoney": "Total money owned",
"WH.ui.preparetime": "Time to prepare",
"WH.ui.durationrounds": "Duration in rounds",
"WH.ui.application": "Application",
"WH.ui.savesdc": "Saves DC",
"WH.ui.savetype": "Save type",
"WH.ui.Touch": "Touch",
"WH.ui.Ingestion": "Ingestion",
"WH.ui.Weapon": "Weapon",
"WH.ui.halfdamage": "Half-damage",
"WH.ui.ignore": "Ignore effect",
"WH.ui.dcfind": "DC to find",
"WH.ui.dcdisable": "DC to disable",
"WH.ui.throwtohit": "Throw to hit",
"WH.ui.mandatoryfor": "Mandatory for",
"WH.ui.generic": "Generic",
"WH.ui.bless": "Bless",
"WH.ui.spell": "Spell",
"WH.ui.poison": "Poison",
"WH.ui.disease": "Disease",
"WH.ui.curse": "Curse",
"WH.ui.permanent": "Permanent",
"WH.ui.temporary": "Temporary",
"WH.ui.begin": "Begin",
"WH.ui.specialduration": "Special duration",
"WH.ui.infinite": "Infinite",
"WH.uiwithineor": "Within end of round",
"WH.ui.beginr": "Beginning of round",
"WH.ui.nextr": "Next round",
"WH.ui.nextcombat": "Next combat",
"WH.ui.untilendcombat": "Until end of combat",
"WH.ui.beginturn": "Beginning of turn",
"WH.ui.endturn": "End of turn",
"WH.ui.durationvalue": "Duration value",
"WH.ui.durationunit": "Duration unit",
"WH.ui.dcsave": "DC save",
"WH.ui.incubationtime": "Incubation time",
"WH.ui.diseaseduration": "Disease duration",
"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.notapplicable": "Not applicable",
"WH.ui.chargedaily": "Daily",
"WH.ui.chargelimited": "Limited",
"WH.ui.magiccharge": "Magic charges",
"WH.ui.chargevalue": "Charge value",
"WH.ui.allitems": "All items",
"WH.ui.small": "Small",
"WH.ui.medium": "Medium",
"WH.ui.large": "Large",
"WH.ui.conditiontype": "Condition type",
"WH.ui.duration": "Duration",
"WH.ui.bodyslots": "Body",
"WH.ui.containerslot": "Containers",
"WH.chat.save": "Save"
"WH.chat.save": "Save",
"WH.chat.mweaponmalus": "Multiple weapons malus ",
"WH.chat.diceresult": "Dice result",
"WH.chat.result": "Result",
"WH.chat.parysuccess": "Parry success !",
"WH.chat.paryfailed": "Parry failed !",
"WH.chat.rollformula": "Roll Formula",
"WH.chat.useshield":"Use shield ?",
"WH.chat.power": "Power",
"WH.chat.powerlevel": "Power Level",
"WH.notif.skillmaxuse": "Maximum skill usage reach - Use is not allowed",
"WH.notif.toomanyuses": "Maximum use reach - Roll is not allowed"
}

236
lang/it.json Normal file
View File

@ -0,0 +1,236 @@
{
"ACTOR": {
"TypeCharacter": "PG",
"TypeNpc": "PNG",
"TypeMonster": "Mostro",
"TypeParty": "Gruppo"
},
"ITEM": {
"TypeWeapon": "Arma",
"TypeEquipment": "Equipaggiamento",
"TypeRace": "Razza",
"TypeArmor": "Armatura",
"TypeShield": "Scudo",
"TypeSkill": "Abilità",
"TypePower": "Potere",
"TypeLanguage": "Lingua",
"TypeCondition": "Status",
"TypeClass": "Classe",
"TypeMoney": "Mo",
"TypePotion": "Pozione",
"TypePoison": "Veleno",
"TypeTrap": "Trappola",
"TypeClassitem": "Classe",
"TypeCompetency": "Competenza"
},
"WH.conf.short": "Corte",
"WH.conf.long": "Lunghe",
"WH.conf.twohanded": "A due mani",
"WH.conf.shooting": "Da Tiro",
"WH.conf.throwing": "Da Lancio",
"WH.conf.lightarmor" : "Leggera",
"WH.conf.mediumarmor": "Media",
"WH.conf.heavyarmor": "Pesante",
"WH.conf.lightshield": "Leggero",
"WH.conf.mediumshield": "Medio",
"WH.conf.towershield": "Torre",
"WH.conf.polearm": "In asta",
"WH.conf.special": "Speciale",
"WH.conf.head": "Testa",
"WH.conf.cloak": "Mantello",
"WH.conf.weapon1": "Arma 1",
"WH.conf.weapon2": "Arma 2",
"WH.conf.gloves": "Guanti",
"WH.conf.dress": "Vestito",
"WH.conf.boots": "Stivali",
"WH.conf.ring": "Anelli",
"WH.conf.belt": "Cintura",
"WH.conf.quiver": "Faretra",
"WH.conf.armor": "Armatura",
"WH.conf.shield": "Scudo",
"WH.conf.backpack": "Zaino",
"WH.conf.beltpouch1": "Borsa da cintura 1",
"WH.conf.beltpouch2": "Borsa da cintura 2",
"WH.conf.beltpouch3": "Borsa da cintura 3",
"WH.conf.scrollcase": "Contenitore per mappe o pergamene",
"WH.conf.wandcase": "Porta bacchette",
"WH.conf.potioncase": "Porta pozioni",
"WH.conf.bagholding": "Borsa conservante",
"WH.conf.quiverholding": "Faretra conservante",
"WH.conf.backpackholding": "Zaino conservante",
"WH.conf.smallchest": "Scrigno piccolo",
"WH.conf.mediumchest": "Scrigno medio",
"WH.conf.largechest": "Scrigno grande",
"WH.conf.hugechest": "Scrigno enorme",
"WH.conf.partystorage": "Scrigno di gruppo",
"WH.conf.unknown": "Non sai se è magico",
"WH.conf.yes": "Identificato",
"WH.conf.no": "Non identificato",
"WH.conf.notapplicable": "Non applicabile",
"WH.conf.undefined": "Not applicable",
"WH.ui.level": "Livello",
"WH.ui.notes": "Note",
"WH.ui.hpprog": "Progressione PF",
"WH.ui.lan": "Lingue",
"WH.ui.attrbonus": "Attributo",
"WH.ui.weapons": "Armi",
"WH.ui.armors": "Armature",
"WH.ui.shields": "Scudi",
"WH.ui.weapon": "Arma",
"WH.ui.Strength": "Fisico",
"WH.ui.Instinct": "Istinto",
"WH.ui.Dexterity": "Istinto",
"WH.ui.savestr": "Ts Fisico",
"WH.ui.savedex": "Ts Istinto",
"WH.ui.savemin": "Ts Mente",
"WH.ui.Mind": "Mente",
"WH.ui.Type": "Tipo",
"WH.ui.HitPoints": "Punti ferita",
"WH.ui.Defence": "Difesa",
"WH.ui.Throw2HitM": "Txc (corpo a corpo)",
"WH.ui.Throw2HitR": "Txc (distanza)",
"WH.ui.Mana": "Mana",
"WH.ui.Initiative": "Iniziativa",
"WH.ui.Movement": "Movimento (Terra)",
"WH.ui.MovementSwim": "Movimento (Nuoto)",
"WH.ui.MovementFly": "Movimento (Volare)",
"WH.ui.power": "Potere",
"WH.ui.Qty": "Quantitá",
"WH.ui.maxslots": "Max slots",
"WH.ui.slotsused": "Slots usati",
"WH.ui.Damage": "Danni",
"WH.ui.parrybonus": "Bonus a parata",
"WH.ui.damagereduction": "Riduzione danno",
"WH.ui.save": "Salva",
"WH.ui.XP": "PE",
"WH.ui.xphp": "Progressione PF",
"WH.ui.Knowledge": "Conoscenze",
"WH.ui.malusmultiweapon": "Malus nell uso di due armi",
"WH.ui.drbonus": "Bonus RD",
"WH.ui.parrybonustotal": "Bonus Parata totale",
"WH.ui.drbonustotal": "Bonus RD totale",
"WH.ui.counterspell": "Contropotere",
"WH.ui.createitem": "Bonus ai tiri percentuali",
"WH.ui.classSkills": "Abilitá di classe",
"WH.ui.skills": "Abilitá Aggiuntiva",
"WH.ui.isclassskill": "Abilità di classe?",
"WH.ui.israceskill": "Abilità di razza?",
"WH.ui.unlimited": "Usi illimitati?",
"WH.ui.currentuse": "Numero di usi",
"WH.ui.maxuse": "Usi Massimi",
"WH.ui.languages": "Lingue",
"WH.ui.languagesbonus": "Bonus a linguaggi conosciuti (men/2)",
"WH.ui.competency": "Competenze",
"WH.ui.conditions": "Condizione",
"WH.ui.effect": "Effetto",
"WH.ui.main": "Principale",
"WH.ui.combat": "Combattimento",
"WH.ui.skillstab": "Abilità ed effetti",
"WH.ui.powers": "Poteri",
"WH.ui.equipment": "Equipaggiamento",
"WH.ui.biography": "Biografia",
"WH.ui.race": "Razza",
"WH.ui.class": "Classe",
"WH.ui.religion": "Fede",
"WH.ui.origin": "Origine",
"WH.ui.age": "Età",
"WH.ui.height": "Altezza",
"WH.ui.eyes": "Occhi",
"WH.ui.hair": "Capelli",
"WH.ui.preferredhand": "Mano preferita",
"WH.ui.size": "Taglia",
"WH.ui.gender": "Genere",
"WH.ui.background": "Storia",
"WH.ui.type": "Tipo",
"WH.ui.description": "Descrizione",
"WH.ui.rawroll": "Formula del dado (es: 1d20+@statistics.str.value)",
"WH.ui.rawdamage": "Formula danni (ex: 1d6+(@statistics.str.value/2))",
"WH.ui.damage": "Danno",
"WH.ui.2hdamage": "Danno a 2 mani",
"WH.ui.slotlocation": "Posizione dello slot",
"WH.ui.quantity": "Quantità",
"WH.ui.cost": "Costo",
"WH.ui.details": "Dettagli",
"WH.ui.magicschool": "Scuola di magia",
"WH.ui.providedslot": "Slot forniti",
"WH.ui.skilllevelacquired": "Acquisito a livello",
"WH.ui.totalmoney": "Total monete guadagnate",
"WH.ui.preparetime": "Tempo di preparazione",
"WH.ui.durationrounds": "Durata (in round)",
"WH.ui.application": "Tipo di applicazione",
"WH.ui.savesdc": "CD TS",
"WH.ui.savetype": "Tipo del tiro salvezza",
"WH.ui.Touch": "Tocco",
"WH.ui.Ingestion": "Ingestione",
"WH.ui.Weapon": "Arma",
"WH.ui.halfdamage": "Dimezza",
"WH.ui.ignore": "Nega",
"WH.ui.dcfind": "CD per trovare",
"WH.ui.dcdisable": "CD per disattivare ",
"WH.ui.throwtohit": "Tiro per colpire",
"WH.ui.mandatoryfor": "Obbligatorio per",
"WH.ui.generic": "Generico",
"WH.ui.bless": "Benedizione",
"WH.ui.spell": "Incantesimo (Potere)",
"WH.ui.poison": "Veleno",
"WH.ui.disease": "Malattia",
"WH.ui.curse": "Maledizione",
"WH.ui.permanent": "Permanente",
"WH.ui.temporary": "Temporanea",
"WH.ui.begin": "Inizio",
"WH.ui.specialduration": "Durata speciale",
"WH.ui.infinite": "Infinita",
"WH.uiwithineor": "Entro la fine del round",
"WH.ui.beginr": "All' inizio del prossimo round",
"WH.ui.nextr": "Prossimo round",
"WH.ui.nextcombat": "Al prossimo combattimento",
"WH.ui.untilendcombat": "Fino alla fine del combattimento",
"WH.ui.beginturn": "Inizio del turno",
"WH.ui.endturn": "Fine del turno",
"WH.ui.durationvalue": "Durata",
"WH.ui.durationunit": "Durata (unità di misura)",
"WH.ui.dcsave": "CD",
"WH.ui.incubationtime": "Tempo di incubazione",
"WH.ui.diseaseduration": "Durata malattia",
"WH.ui.ignoreeffect": "Ignora effetto",
"WH.ui.raceSkills": "Abilità di razza",
"WH.ui.identified": "Identificato",
"WH.ui.isclasssecondary": "Classe secondaria?",
"WH.ui.secondaryclass": "Super warhero",
"WH.ui.meleedamagebonus": "Bonus ai danni in corpo a corpo",
"WH.ui.rangeddamagebonus": "Bonus ai danni a distanza",
"WH.ui.notapplicable": "Non applicabile",
"WH.ui.chargedaily": "Al giorno",
"WH.ui.chargelimited": "Limitate",
"WH.ui.magiccharge": "Cariche magiche",
"WH.ui.chargevalue": "Valore delle cariche",
"WH.ui.allitems": "Tutti gli oggetti",
"WH.ui.small": "Piccola",
"WH.ui.medium": "Media",
"WH.ui.large": "Grande",
"WH.ui.bodyslots": "Corpo",
"WH.ui.containerslot": "Contenitori",
"WH.chat.save": "Salva",
"WH.chat.mweaponmalus": "Malus attacchi con più armi",
"WH.chat.diceresult": "Risultato del dado",
"WH.chat.result": "Risultato",
"WH.chat.parysuccess": "Parato con successo !",
"WH.chat.paryfailed": "Parata fallita !",
"WH.chat.rollformula": "Formula del dado",
"WH.chat.useshield":"Usare scudo?",
"WH.chat.power": "Potere",
"WH.chat.powerlevel": "Livello di potere",
"WH.notif.skillmaxuse": "Usi massimi raggiunti",
"WH.notif.toomanyuses": "Usi massimi raggiunti"
}

View File

@ -42,20 +42,27 @@ export class WarheroActorSheet extends ActorSheet {
cssClass: this.isEditable ? "editable" : "locked",
system: objectData,
limited: this.object.limited,
compentencyItems:this.actor.getCompetencyItems( ),
skills: this.actor.getNormalSkills( ),
raceSkills: this.actor.getRaceSkills( ),
classSkills: this.actor.getClassSkills( ),
languages: this.actor.getLanguages( ),
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
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(),
allItems: this.actor.getAllItems(),
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}),
@ -63,7 +70,16 @@ 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
// Race mngt
if ( race && race.name) {
formData.hpprogression = game.system.warhero.config.progressionList[race.system.hpprogresion]
}
@ -99,7 +115,8 @@ export class WarheroActorSheet extends ActorSheet {
})
html.find('.item-add').click(ev => {
let dataType = $(ev.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
let slotKey = $(ev.currentTarget).data("slot")
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType, system: { slotlocation: slotKey} }], { renderSheet: true })
})
html.find('.equip-activate').click(ev => {
@ -133,6 +150,15 @@ export class WarheroActorSheet extends ActorSheet {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), +1 );
} );
html.find('.skill-use-minus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecSkillUse( li.data("item-id"), -1 );
} );
html.find('.skill-use-plus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecSkillUse( li.data("item-id"), +1 );
} );
html.find('.ammo-minus').click(event => {
const li = $(event.currentTarget).parents(".item")

View File

@ -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)
@ -135,7 +140,7 @@ export class WarheroActor extends Actor {
}
sortPowers() {
let schools = {}
for(let power of this.items) {
for (let power of this.items) {
if (power.type == "power") {
power = duplicate(power)
let school = schools[power.system.magicschool] || []
@ -146,7 +151,17 @@ export class WarheroActor extends Actor {
}
return schools
}
getAllItems() {
let comp = duplicate(this.items || []);
WarheroUtility.sortArrayObjectsByName(comp)
return comp;
}
/* -------------------------------------------- */
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 +173,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) {
@ -174,22 +198,87 @@ export class WarheroActor extends Actor {
return listItem
}
/* -------------------------------------------- */
buildEquipmentsSlot() {
computeTotalMoney() {
let nbMoney = 0
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.slotNames) {
let slotDef = game.system.warhero.config.slotNames[slotName]
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 == 'weapon' || it.type == 'armor' || it.type == 'shield'||it.type == 'equipment')
&& it.system.slotlocation == slotName )
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) {
slotUsed += item.system.slotused * ((item.system.quantity) ? item.system.quantity : 1)
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]
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
}
/* -------------------------------------------- */
getConditions() {
let comp = duplicate(this.items.filter(item => item.type == 'condition') || []);
@ -203,15 +292,31 @@ export class WarheroActor extends Actor {
formula += "+" + this.system.statistics.str.value
}
if (weapon.system.weapontype == "twohanded") {
formula += "+" + Math.floor(this.system.statistics.str.value*1.5)
formula += "+" + Math.floor(this.system.statistics.str.value * 1.5)
}
if (weapon.system.weapontype == "polearm") {
formula += "+" + Math.floor(this.system.statistics.str.value*1)
weapon.damageFormula2Hands = weapon.system.damage2hands + "+" + Math.floor(this.system.statistics.str.value*1.5)
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) {
@ -242,7 +347,12 @@ 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
}
getRaceSkills() {
let comp = this.items.filter(it => it.type == "skill" && it.system.raceskill)
WarheroUtility.sortArrayObjectsByName(comp)
return comp
}
@ -300,7 +410,10 @@ export class WarheroActor extends Actor {
/* ------------------------------------------- */
getEquipments() {
return this.items.filter(item => item.type == 'shield' || item.type == 'armor' || item.type == "weapon" || item.type == "equipment");
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") || [])
}
/* ------------------------------------------- */
getEquipmentsOnly() {
@ -382,7 +495,7 @@ export class WarheroActor extends Actor {
/* -------------------------------------------- */
async incDecHP(formula) {
let dmgRoll = new Roll(formula+"[warhero-orange]").roll({ async: false })
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)
@ -390,24 +503,33 @@ export class WarheroActor extends Actor {
return Number(dmgRoll.total)
}
/* -------------------------------------------- */
updateCompetency(competency, obj) {
for(let key in obj) {
updateCompetency(competency, obj, labelTab) {
for (let key in obj) {
if (obj[key]) {
competency[key] = true
//console.log("Parsing", key) //game.system.warhero.config.weaponTypes[key].label)
competency[key] = { enabled: true, label: labelTab[key].label }
}
}
}
getCompetency() {
let myRace = this.getRace()
let myClass = this.getClass()
let competency = { weapons: {}, armors: {}, shields: {}}
if ( myRace.system && myClass.system) {
this.updateCompetency(competency.weapons, myRace.system.weapons)
this.updateCompetency(competency.armors, myRace.system.armors)
this.updateCompetency(competency.shields, myRace.system.shields)
this.updateCompetency(competency.weapons, myClass.system.weapons)
this.updateCompetency(competency.armors, myClass.system.armors)
this.updateCompetency(competency.shields, myClass.system.shields)
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 (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
}
@ -456,12 +578,10 @@ export class WarheroActor extends Actor {
}
}
/* -------------------------------------------- */
getInitiativeScore(combatId, combatantId) {
if (this.type == 'character') {
this.rollMR(true, combatId, combatantId)
}
console.log("Init required !!!!")
return -1;
async getInitiativeScore(combatId, combatantId) {
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
}
/* -------------------------------------------- */
@ -542,7 +662,19 @@ export class WarheroActor extends Actor {
}
}
}
/* -------------------------------------------- */
async incDecSkillUse(skillId, value) {
let skill = this.items.get(skillId)
if (skill) {
let newUse = skill.system.currentuse + value
if (newUse > skill.system.maxuse) {
ui.notifications.warn(game.i18n.localize("WH.notif.skillmaxuse"))
return
}
newUse = Math.max(newUse, 0)
this.updateEmbeddedDocuments('Item', [{ _id: skill.id, 'system.currentuse': newUse }])
}
}
/* -------------------------------------------- */
async incDecQuantity(objetId, incDec = 0) {
let objetQ = this.items.get(objetId)
@ -595,39 +727,49 @@ export class WarheroActor extends Actor {
/* -------------------------------------------- */
setLevel() {
let xp = this.system.secondary.xp.value
this.system.secondary.xp.level = 1 + Math.floor(xp/10)
this.system.secondary.xp.level = 1 + Math.floor(xp / 10)
}
/* -------------------------------------------- */
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
}
this.system.secondary.drbonustotal.value = this.system.secondary.drbonus.value + dr
this.system.secondary.drbonustotal.value = this.system.secondary.drbonus.value + dr
}
/* -------------------------------------------- */
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
}
this.system.secondary.parrybonustotal.value = this.system.secondary.parrybonus.value + parry
this.system.secondary.parrybonustotal.value = this.system.secondary.parrybonus.value + parry
}
/* -------------------------------------------- */
computeBonusLanguages() {
this.system.secondary.nblanguage.value = Math.floor(this.system.statistics.min.value / 2)
}
/* -------------------------------------------- */
spentMana( mana) {
if ( Number(mana) > this.system.attributes.mana.value) {
spentMana(spentValue) {
let mana = duplicate(this.system.attributes.mana)
if (Number(spentValue) > mana.value) {
ui.notifications.warn("Not enough Mana points !")
return false
}
this.update({'system.attributes.mana.value': this.system.attributes.mana.value-mana})
mana.value -= Number(spentValue)
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 })
}
/* -------------------------------------------- */
getCommonRollData() {
let rollData = WarheroUtility.getBasicRollData()
@ -645,8 +787,16 @@ export class WarheroActor extends Actor {
let stat = duplicate(this.system[rollType][rollKey])
let rollData = this.getCommonRollData()
rollData.mode = rollType
rollData.statKey = rollKey
rollData.stat = stat
if ( rollKey == "parrybonustotal") {
if (stat && stat.stat) {
rollData.statBonus = duplicate(this.system.statistics[stat.stat])
}
if (stat.hasuse && stat.nbuse >= stat.maxuse) {
ui.notifications.warn(game.i18n.localize("WH.notif.toomanyuses"))
return
}
if (rollKey == "parrybonustotal") {
WarheroUtility.rollParry(rollData)
return
}
@ -660,7 +810,7 @@ export class WarheroActor extends Actor {
rollData.stat = stat
this.startRoll(rollData)
}
/* -------------------------------------------- */
rollWeapon(weaponId) {
let weapon = this.items.get(weaponId)
@ -668,12 +818,12 @@ export class WarheroActor extends Actor {
weapon = duplicate(weapon)
let rollData = this.getCommonRollData()
rollData.mode = "weapon"
if (weapon.system.weapontype ==="shooting" || weapon.system.weapontype ==="throwing") {
if (weapon.system.weapontype === "shooting" || weapon.system.weapontype === "throwing") {
rollData.stat = duplicate(this.system.attributes.txcr)
} else {
rollData.stat = duplicate(this.system.attributes.txcm)
}
rollData.usemWeaponMalus =
rollData.usemWeaponMalus = false
rollData.mWeaponMalus = this.system.secondary.malusmultiweapon.value
rollData.weapon = weapon
rollData.img = weapon.img
@ -702,13 +852,13 @@ export class WarheroActor extends Actor {
let rollData = this.getCommonRollData()
rollData.mode = "power"
rollData.power = power
rollData.powerLevel = power.system.level
rollData.powerLevel = Number(power.system.level)
rollData.img = power.img
rollData.hasBM = false
this.startRoll(rollData)
}
}
/* -------------------------------------------- */
async startRoll(rollData) {
this.syncRoll(rollData)

View File

@ -9,7 +9,7 @@ export class WarheroCombat extends Combat {
for (let cId = 0; cId < ids.length; cId++) {
const c = this.combatants.get(ids[cId]);
let id = c._id || c.id;
let initBonus = c.actor ? c.actor.getInitiativeScore( this.id, id ) : -1;
let initBonus = c.actor ? await c.actor.getInitiativeScore( this.id, id ) : -1;
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: initBonus } ]);
}

View File

@ -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,20 +35,77 @@ 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: {
"high": "High (+6HP/Lvl)",
"medium": "Medium (+4HP/Lvl)",
"low": "Low (+2 HP/Lvl)"
},
poisonApplication: {
touch: "WH.ui.Touch",
ingestion: "WH.ui.Ingestion",
weapon: "WH.ui.Weapon"
},
saveType: {
halfdmg: "WH.ui.halfdamage",
ignore: "WH.ui.ignoreeffect"
},
conditionType : {
generic: "WH.ui.generic",
bless: "WH.ui.bless",
spell: "WH.ui.spell",
disease: "WH.ui.disease",
poison: "WH.ui.poison",
curse: "WH.u,i.curse"
},
conditionDuration: {
permanent: "WH.ui.permanent",
temporary: "WH.ui.temporary"
},
conditionSpecialDuration : {
infinite: "WH.ui.infinite",
withineor: "WH.uiwithineor",
beginr: "WH.ui.beginr",
nextr: "WH.ui.nextr",
nextcombat: "WH.ui.nextcombat",
untilendcombat: "WH.ui.untilendcombat",
beginturn: "WH.ui.beginturn",
endturn: "WH.ui.endturn"
},
magicCharge: {
notapplicable: "WH.ui.notapplicable",
chargedaily: "WH.ui.chargedaily",
chargelimited: "WH.ui.chargelimited",
},
identifiedState: {
unknown: "WH.conf.unknown",
yes:"WH.conf.yes",
no:"WH.conf.no",
notapplicable:"WH.conf.notapplicable"
}
}

View File

@ -69,12 +69,6 @@ export class WarheroItemSheet extends ItemSheet {
owner: this.document.isOwner,
isGM: game.user.isGM
}
if ( this.object.type == "power") {
formData.level1 = await TextEditor.enrichHTML(this.object.system.level1, {async: true})
formData.level2 = await TextEditor.enrichHTML(this.object.system.level2, {async: true})
formData.level3 = await TextEditor.enrichHTML(this.object.system.level3, {async: true})
formData.level4 = await TextEditor.enrichHTML(this.object.system.level4, {async: true})
}
this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this);
return formData;
@ -130,11 +124,6 @@ export class WarheroItemSheet extends ItemSheet {
const item = this.object.options.actor.getOwnedItem(li.data("item-id"));
item.sheet.render(true);
});
html.find('.delete-spec').click(ev => {
this.object.update({ "data.specialisation": [{ name: 'None' }] });
});
html.find('.delete-subitem').click(ev => {
this.deleteSubitem(ev);
});
@ -145,15 +134,6 @@ export class WarheroItemSheet extends ItemSheet {
let itemId = li.data("item-id");
let itemType = li.data("item-type");
});
html.find('.view-subitem').click(ev => {
this.viewSubitem(ev);
});
html.find('.view-spec').click(ev => {
this.manageSpec();
});
}

View File

@ -11,6 +11,7 @@ export const defaultItemImg = {
money: "systems/fvtt-warhero/images/icons/two-coins.svg",
power: "systems/fvtt-warhero/images/icons/magia.webp",
condition: "systems/fvtt-warhero/images/icons/stordenti.webp",
language: "systems/fvtt-warhero/images/icons/linguaggi.webp"
}
/**

View File

@ -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";
@ -56,7 +57,6 @@ Hooks.once("init", async function () {
CONFIG.Combat.documentClass = WarheroCombat
CONFIG.Actor.documentClass = WarheroActor
CONFIG.Item.documentClass = WarheroItem
//CONFIG.Token.objectClass = WarheroToken
/* -------------------------------------------- */
// Register sheet application classes
@ -64,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 });
@ -71,16 +72,6 @@ Hooks.once("init", async function () {
WarheroUtility.init()
});
/* -------------------------------------------- */
function welcomeMessage() {
ChatMessage.create({
user: game.user.id,
whisper: [game.user.id],
content: `<div id="welcome-message-crucible"><span class="rdd-roll-part">
<strong>Welcome to the Warhero RPG.</strong>
` });
}
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
@ -89,29 +80,15 @@ Hooks.once("ready", function () {
// User warning
if (!game.user.isGM && game.user.character == undefined) {
ui.notifications.info("Warning ! No character linked to your user !");
/*ChatMessage.create({
content: "<b>WARNING</b> The player " + game.user.name + " is not linked to a character !",
user: game.user._id
});*/
}
// CSS patch for v9
if (game.version) {
let sidebar = document.getElementById("sidebar");
sidebar.style.width = "min-content";
}
welcomeMessage();
WarheroUtility.ready()
WarheroCommands.init()
WarheroHotbar.initDropbar()
})
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
Hooks.on("chatMessage", (html, content, msg) => {
/*Hooks.on("chatMessage", (html, content, msg) => {
if (content[0] == '/') {
let regExp = /(\S+)/g;
let commands = content.match(regExp);
@ -120,5 +97,5 @@ Hooks.on("chatMessage", (html, content, msg) => {
}
}
return true;
});
});*/

View 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;
}
}

View File

@ -19,7 +19,16 @@ export class WarheroUtility {
this.defenderStore = {}
WarheroCommands.init();
Handlebars.registerHelper('concat', function () {
var outStr = '';
for (var arg in arguments) {
if (typeof arguments[arg] != 'object') {
outStr += arguments[arg];
}
}
return outStr;
});
Handlebars.registerHelper('count', function (list) {
return list.length;
})
@ -216,14 +225,13 @@ export class WarheroUtility {
const templatePaths = [
'systems/fvtt-warhero/templates/editor-notes-gm.html',
'systems/fvtt-warhero/templates/partial-roll-select.html',
'systems/fvtt-warhero/templates/partial-actor-stat-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-item-common-equipment.html',
'systems/fvtt-warhero/templates/partial-actor-equipment.html',
'systems/fvtt-warhero/templates/partial-container.html',
]
return loadTemplates(templatePaths);
}
@ -545,7 +553,7 @@ export class WarheroUtility {
let actor = game.actors.get(rollData.actorId)
if (rollData.mode == "power") {
let manaCost = Array.from(rollData.powerLevel)[0]
let manaCost = rollData.powerLevel
if (actor.spentMana(manaCost)) {
let powerKey = "level" + rollData.powerLevel
rollData.powerText = rollData.power.system[powerKey]
@ -577,7 +585,7 @@ export class WarheroUtility {
}
let diceFormula
if (rollData.weapon.system.weapontype == "special") {
if (rollData.weapon && rollData.weapon.system.weapontype == "special") {
diceFormula = rollData.weapon.system.rollformula
} else {
// ability/save/size => 0
@ -585,6 +593,9 @@ export class WarheroUtility {
if (rollData.stat) {
diceFormula += "+" + rollData.stat.value
}
if (rollData.statBonus) {
diceFormula += "+" + rollData.statBonus.value
}
}
if (rollData.usemWeaponMalus) {
diceFormula += "+" + rollData.mWeaponMalus
@ -608,6 +619,10 @@ export class WarheroUtility {
rollData.isCriticalFailure = true
}
if ( rollData.stat.hasuse ) {
actor.incrementUse(rollData)
}
let msg = await this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-warhero/templates/chat-generic-result.html`, rollData)
})

View File

@ -876,16 +876,35 @@ li {
/* background: rgb(105,85,65) url("../images/ui/texture_feuille_perso_onglets.webp") no-repeat right bottom;*/
#sidebar.collapsed {
height: 470px !important;
}
#sidebar-tabs > .collapsed,
#chat-controls .chat-control-icon {
color: rgba(220, 220, 220, 0.75);
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.75);
}
#sidebar-tabs {
flex: 0 0 28px;
box-sizing: border-box;
margin: 0 0 3px;
border-bottom: 1px solid rgba(0,0,0,0);
box-shadow: inset 0 0 2rem rgba(0,0,0,0.5);
}
#sidebar-tabs > .item.active {
border: 1px solid rgba(114,98,72,1);
background: rgba(30, 25, 20, 0.75);
box-shadow: 0 0 6px inset rgba(114,98,72,1);
}
#sidebar #sidebar-tabs i{
width: 23px;
height: 23px;
/*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 {
border-top: 1px dashed rgba(0, 0, 0, 0.25);
border-bottom: 0 none;
@ -896,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;
@ -910,6 +930,7 @@ li {
.chat-message .message-header .whisper-to {
font-size: 0.9rem;
}
.chat-actor-name {
padding: 4px;
}
@ -1028,21 +1049,6 @@ li {
box-shadow: inset 0 0 2rem rgba(0, 0, 0, 0.5);
}
#sidebar-tabs > .item.active {
border: 1px solid rgba(114, 98, 72, 1);
background: rgba(30, 25, 20, 0.75);
box-shadow: 0 0 6px inset rgba(114, 98, 72, 1);
}
#sidebar #sidebar-tabs i {
width: 25px;
height: 25px;
display: inline-block;
background-position: center;
background-size: cover;
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.75);
}
/*--------------------------------------------------------------------------*/
/* Control, Tool, hotbar & navigation */
@ -1486,11 +1492,22 @@ 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;
min-width: 9rem;
}
.item-field-label-2rem {
flex-grow: 1;
margin-top: 4px;
max-width: 1.2rem;
min-width: 1.2rem;
}
.item-field-label-short {
flex-grow: 1;
margin-top: 4px;
@ -1526,7 +1543,7 @@ li {
}
.alternate-list {
margin-top: 4px;
fong2ex-wrap: nowrap;
flex-wrap: nowrap;
}
.item-filler {
flex-grow: 6;
@ -1550,4 +1567,8 @@ form .notes {
}
a.content-link, a.inline-roll {
color: #222;
}
.journal-page-header,
.journal-page-content {
color: #222;
}

View File

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

View File

@ -10,7 +10,7 @@
"modules/warhero-main.js",
"modules/import-global.js"
],
"gridDistance": 5,
"gridDistance": 1,
"gridUnits": "m",
"languages": [
{
@ -18,90 +18,22 @@
"name": "English",
"path": "lang/en.json",
"flags": {}
},
{
"lang": "it",
"name": "English",
"path": "lang/it.json",
"flags": {}
}
],
"license": "LICENSE.txt",
"packs": [
{
"type": "Item",
"label": "Races",
"name": "races",
"path": "packs/races.db",
"system": "fvtt-warhero",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Shields",
"name": "shields",
"path": "packs/shields.db",
"system": "fvtt-warhero",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Wepons",
"name": "weapons",
"path": "packs/weapons.db",
"system": "fvtt-warhero",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Ammunitions",
"name": "ammunitions",
"path": "packs/ammunitions.db",
"system": "fvtt-warhero",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Armors",
"name": "armors",
"path": "packs/armors.db",
"system": "fvtt-warhero",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Classes",
"name": "classes",
"path": "packs/classes.db",
"system": "fvtt-warhero",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Equipments",
"name": "equipments",
"path": "packs/equipments.db",
"system": "fvtt-warhero",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Powers",
"name": "powers",
"path": "packs/powers.db",
"system": "fvtt-warhero",
"private": false,
"flags": {}
}
],
"primaryTokenAttribute": "attributes.hp",
"secondaryTokenAttribute": "attributes.mana",
"socket": true,
"styles": [
"styles/simple.css"
],
"version": "10.0.25",
"version": "10.0.54",
"compatibility": {
"minimum": "10",
"verified": "10",
@ -109,8 +41,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.25.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-warhero/archive/fvtt-warhero-10.0.54.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
"background": "images/ui/warhero_welcome_page.webp",
"id": "fvtt-warhero"
}

View File

@ -3,14 +3,15 @@
"types": [
"character",
"npc",
"monster"
"monster",
"party"
],
"templates": {
"biodata": {
"biodata": {
"class": "",
"age": 0,
"size": 0,
"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,36 +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",
"max": 1,
"value": 1
"iscombat": true,
"roll": true,
"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": {
@ -147,6 +153,7 @@
"malusmultiweapon": {
"label": "WH.ui.malusmultiweapon",
"abbrev": "malusmultiweapon",
"iscombat": true,
"style": "edit",
"value": 0
},
@ -154,6 +161,7 @@
"label": "WH.ui.drbonus",
"abbrev": "drbonus",
"style": "edit",
"iscombat": true,
"value": 0
},
"drbonustotal": {
@ -161,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
},
@ -175,16 +199,22 @@
"abbrev": "parrybonustotal",
"disabled": true,
"style": "edit",
"iscombat": true,
"roll": true,
"value": 0
},
"counterspell": {
"label": "WH.ui.counterspell",
"stat": "min",
"abbrev": "counterspell",
"style": "edit",
"hasmax": true,
"hasmax": false,
"roll": true,
"max": 1,
"value": 0
"value": 0,
"hasuse": true,
"nbuse": 0,
"maxuse": 0
},
"createitem": {
"label": "WH.ui.createitem",
@ -206,6 +236,11 @@
"description": ""
}
},
"party": {
"templates": [
"biodata"
]
},
"character": {
"templates": [
"biodata",
@ -236,7 +271,13 @@
"power",
"language",
"condition",
"class"
"class",
"money",
"potion",
"poison",
"trap",
"classitem",
"competency"
],
"templates": {
"commonclassrace": {
@ -260,14 +301,80 @@
}
}
},
"competency": {
"description": ""
},
"potion": {
"cost": 0,
"quantity": 1,
"slotused": 1,
"slotlocation": "backpack",
"isidentified": "unknown",
"alchemycost": "",
"preparetime": "",
"durationround": 0,
"description": ""
},
"poison": {
"cost": 0,
"quantity": 1,
"slotused": 1,
"slotlocation": "backpack",
"isidentified": "unknown",
"application": "",
"preparecost": "",
"preparetime": "",
"damageroll": "",
"durationround": 0,
"savesdc": 0,
"savetype": "",
"description": ""
},
"trap": {
"cost": 0,
"quantity": 1,
"slotused": 1,
"slotlocation": "backpack",
"isidentified": "unknown",
"dcfind": 0,
"dcdisable": 0,
"throwtohit": 0,
"damageroll": "",
"description": ""
},
"classitem": {
"cost": 0,
"quantity": 1,
"slotused": 1,
"slotlocation": "backpack",
"isidentified": "unknown",
"class": "",
"mandatoryfor": "",
"description": ""
},
"money": {
"quantity": 0,
"slotlocation": "backpack",
"description": ""
},
"condition": {
"conditiontype": "",
"duration": "",
"begin": "",
"specialduration": "",
"durationvalue": 0,
"durationunit": "",
"shortdescription": "",
"dcsave": 0,
"incubationtime": "",
"diseaseduration": "",
"description": ""
},
"class": {
"templates": [
"commonclassrace"
],
"issecondary": false,
"description": ""
},
"race": {
@ -286,8 +393,10 @@
"description": ""
},
"skill": {
"raceskill": false,
"classskill": false,
"unlimited": false,
"acquiredatlevel": 0,
"currentuse": 0,
"maxuse": 0,
"description": ""
@ -303,6 +412,9 @@
"quantity": 1,
"slotused": 1,
"slotlocation": "weapon1",
"isidentified": "unknown",
"magiccharge": "notapplicable",
"chargevalue": 0,
"description": ""
},
"armor": {
@ -313,6 +425,9 @@
"quantity": 1,
"slotused": 1,
"slotlocation": "armor",
"isidentified": "unknown",
"magiccharge": "notapplicable",
"chargevalue": 0,
"description": ""
},
"shield": {
@ -323,6 +438,9 @@
"quantity": 1,
"slotused": 1,
"slotlocation": "shield",
"isidentified": "unknown",
"magiccharge": "notapplicable",
"chargevalue": 0,
"description": ""
},
"equipment": {
@ -332,6 +450,10 @@
"equipped": false,
"slotused": 1,
"slotlocation": "backpack",
"providedslot": 0,
"isidentified": "unknown",
"magiccharge": "notapplicable",
"chargevalue": 0,
"description": ""
},
"power": {

View File

@ -20,24 +20,53 @@
<div class="ability-item">
<ul>
<li class="item flexrow list-item " data-item-id="{{race._id}}">
<label class="item-field-label-medium">Race</label>
<label class="item-field-label-medium">{{localize "WH.ui.race"}}</label>
{{#if race}}
<a class="item-edit"><img class="sheet-competence-img" src="{{race.img}}"></a>
<input type="text" class="item-field-label-medium" disabled value="{{race.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="{{class._id}}">
<label class="item-field-label-medium">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" />
<li class="item flexrow list-item " data-item-id="{{mainClass._id}}">
<label class="item-field-label-medium">{{localize "WH.ui.class"}}</label>
{{#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">Religion</label>
<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" />
&nbsp;&nbsp;
<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="String">
{{#select system.biodata.size}}
<option value="small">{{localize "WH.ui.small"}}</option>
<option value="medium">{{localize "WH.ui.medium"}}</option>
<option value="large">{{localize "WH.ui.large"}}</option>
{{/select}}
</select>
</li>
</ul>
</div>
@ -64,18 +93,18 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="main">Main</a>
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="skill">Skills&Effects</a>
<a class="item" data-tab="power">Powers</a>
<a class="item" data-tab="equipment">Equipment</a>
<a class="item" data-tab="biodata">Biography</a>
<a class="item" data-tab="main">{{localize "WH.ui.main"}}</a>
<a class="item" data-tab="combat">{{localize "WH.ui.combat"}}</a>
<a class="item" data-tab="skill">{{localize "WH.ui.skillstab"}}</a>
<a class="item" data-tab="power">{{localize "WH.ui.powers"}}</a>
<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">
{{!-- Skills Tab --}}
{{!-- Main Tab --}}
<div class="tab main" data-group="primary" data-tab="main">
<div class="flexrow">
@ -83,42 +112,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 |flag key|}}
{{#if flag}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
<span class="item-name-label-long">{{localize "WH.ui.weapons"}} {{key}}</span>
</li>
{{/if}}
{{/each}}
{{#each competency.shields as |flag key|}}
{{#if flag}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
<span class="item-name-label-long">{{localize "WH.ui.shields"}} {{key}}</span>
</li>
{{/if}}
{{/each}}
{{#each competency.armors as |flag key|}}
{{#if flag}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
<span class="item-name-label-long">{{localize "WH.ui.armors"}} {{key}}</span>
</li>
{{/if}}
{{/each}}
</ul>
</div>
</div>
@ -135,7 +135,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>
@ -170,13 +172,39 @@
{{!-- 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">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Weapons</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.weapons"}}</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -185,13 +213,13 @@
<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>
<span class="item-name-label-long"><a class="roll-weapon"><i class="fa-solid fa-dice-d20"></i>{{weapon.name}}</a></span>
<span class="item-field-label-medium">{{weapon.system.weapontype}}</span>
<span class="item-field-label-medium">{{localize (concat "WH.conf." weapon.system.weapontype)}}</span>
{{#if (eq system.weapontype "special")}}
<span class="item-field-label-medium"><a class="roll-damage"><i class="fa-solid fa-dice-d20"></i>{{weapon.system.damageformula}}</a></span>
@ -212,11 +240,24 @@
</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">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Shields</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.shields"}}</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -225,7 +266,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>
@ -243,12 +284,25 @@
{{/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">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Armors</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.armors"}}</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -257,7 +311,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>
@ -276,6 +330,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">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
@ -283,6 +382,44 @@
<div class="tab skill" data-group="primary" data-tab="skill">
<div class="flexcol">
<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.raceSkills"}}</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">{{localize "WH.ui.currentuse"}}</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">{{localize "WH.ui.maxuse"}}</label>
</span>
</li>
{{#each raceSkills as |skill key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{skill._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{skill.img}}" /></a>
<span class="item-name-label-long">{{skill.name}}</a></span>
{{#if skill.system.unlimited}}
<span class="item-field-label-medium">N/A</span>
<span class="item-field-label-medium">N/A</span>
{{else}}
<span class="item-field-label-medium">{{skill.system.currentuse}}
(<a class="skill-use-minus plus-minus-button">&nbsp;-</a>/<a class="skill-use-plus plus-minus-button">+</a>)
</span>
<span class="item-field-label-medium">{{skill.system.maxuse}}</span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
@ -306,7 +443,9 @@
<span class="item-field-label-medium">N/A</span>
<span class="item-field-label-medium">N/A</span>
{{else}}
<span class="item-field-label-medium">{{skill.system.currentuse}}</span>
<span class="item-field-label-medium">{{skill.system.currentuse}}
(<a class="skill-use-minus plus-minus-button">&nbsp;-</a>/<a class="skill-use-plus plus-minus-button">+</a>)
</span>
<span class="item-field-label-medium">{{skill.system.maxuse}}</span>
{{/if}}
@ -404,10 +543,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">&nbsp;</div>
@ -426,54 +565,23 @@
{{!-- Equipement Tab --}}
<div class="tab equipment" data-group="primary" data-tab="equipment">
{{#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">&nbsp;</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>
<div class="flexrow">
<label class="">{{localize "WH.ui.totalmoney"}} : {{totalMoney}}</label>
</div>
<span class="item-field-label-medium">
<label class="short-label">{{upperFirst item.type}}</label>
</span>
<hr>
<h3>{{localize "WH.ui.bodyslots"}} : </h3>
<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">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{#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>
@ -485,29 +593,21 @@
<div>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="generic-label">Origin</label>
<input type="text" class="" name="system.biodata.origin" value="{{data.biodata.origin}}"
<label class="generic-label">{{localize "WH.ui.origin"}}</label>
<input type="text" class="" name="system.biodata.origin" value="{{system.biodata.origin}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Age</label>
<input type="text" class="" name="system.biodata.age" value="{{data.biodata.age}}" data-dtype="String" />
<label class="generic-label">{{localize "WH.ui.age"}}</label>
<input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Height</label>
<input type="text" class="" name="system.biodata.height" value="{{data.biodata.height}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Eyes</label>
<input type="text" class="" name="system.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Hair</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
<label class="generic-label">{{localize "WH.ui.height"}}</label>
<input type="text" class="" name="system.biodata.height" value="{{system.biodata.height}}" data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Preferred Hand</label>
<input type="text" class="" name="system.biodata.preferredhand" value="{{data.biodata.preferredhand}}"
<label class="generic-label">{{localize "WH.ui.preferredhand"}}</label>
<input type="text" class="" name="system.biodata.preferredhand" value="{{system.biodata.preferredhand}}"
data-dtype="String" />
</li>
</ul>
@ -515,21 +615,16 @@
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Size</label>
<select class="competence-base flexrow" type="text" name="system.biodata.size" value="{{data.biodata.size}}" data-dtype="Number">
{{#select data.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>
<label class="generic-label">{{localize "WH.ui.gender"}}</label>
<input type="text" class="" name="system.biodata.sex" value="{{system.biodata.sex}}" data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Sex</label>
<input type="text" class="" name="system.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" />
<li class="item flexrow">
<label class="generic-label">{{localize "WH.ui.eyes"}}</label>
<input type="text" class="" name="system.biodata.eyes" value="{{system.biodata.eyes}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">{{localize "WH.ui.hair"}}</label>
<input type="text" class="" name="system.biodata.hair" value="{{system.biodata.hair}}" data-dtype="String" />
</li>
</ul>
</div>
@ -537,18 +632,47 @@
<hr>
<h3>Background : </h3>
<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>Notes : </h3>
<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>
{{#if isGM}}
<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.allitems"}}</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">{{localize "WH.ui.type"}}</label>
</span>
</li>
{{#each allItems as |item key|}}
<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-long">{{item.name}}</span>
<span class="item-field-label-medium">{{upperFirst item.type}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{/if}}
</div>
</section>

View File

@ -1,75 +0,0 @@
<div class="chat-message-header">
{{#if actorImg}}
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
{{/if}}
<h4 class=chat-actor-name>{{alias}}</h4>
</div>
<hr>
{{#if img}}
<div >
<img class="chat-icon" src="{{img}}" alt="{{name}}" />
</div>
{{/if}}
<div class="flexcol">
</div>
<div>
<ul>
<li><strong>Fight result !</strong></li>
{{#if successDetails.fumbleDetails}}
<li>Fumble ! : {{successDetails.fumbleDetails.data.text}} </li>
{{/if}}
{{#if armorResult}}
<li>Armor initial result : {{armorResult.rawArmor}}</li>
{{#each armorResult.messages as |message idx|}}
<li>{{message}}</li>
{{/each}}
{{/if}}
{{#if successDetails.hack_vs_shields}}
<li>Hack weapon : check shield !</li>
{{/if}}
{{#if successDetails.entangle}}
<li>Entangle weapon : attacker can entangle !</li>
{{/if}}
{{#if successDetails.knockback}}
<li>Knockback weapon : check knockback !</li>
{{/if}}
{{#if successDetails.hack_armors}}
<li>Hack weapon : check armor damage !</li>
{{/if}}
{{#if successDetails.penetrating_impale}}
<li>Penetrating weapon : apply the Impale condition !</li>
{{/if}}
{{#if (or successDetails.critical_1 successDetails.critical_2)}}
<li>Critical {{#if successDetails.critical_1}} 1 {{else}} 2 {{/if}} : {{successDetails.criticalText}} </li>
{{/if}}
{{#if successDetails.attackerHPLossValue}}
<li>Attacker has lost HP : {{successDetails.attackerHPLossValue}} HP </li>
{{/if}}
{{#if successDetails.defenderHPLossValue}}
<li>Defender has lost HP : {{successDetails.defenderHPLossValue}} HP </li>
{{/if}}
<li>Success details : {{successDetails.result}} </li>
<li><strong>Final successes</strong> {{sumSuccess}} </li>
<!-- <button class="chat-card-button reroll-level-remaining" data-roll-id="{{rollId}}">Reroll</button> -->
</ul>
</div>
</div>

View File

@ -31,18 +31,18 @@
{{/if}}
{{#if usemWeaponMalus}}
<li>Multiple weapons malus : {{mWeaponMalus}}</li>
<li>{{localize "WH.chat.mweaponmalus"}}: {{mWeaponMalus}}</li>
{{/if}}
{{#if diceFormula}}
<li>Formula : {{diceFormula}}</li>
{{#if isCriticalSuccess}}
<li><span class="crit-success">Dice result : {{diceResult}}</span></li>
<li><span class="crit-success">{{localize "WH.chat.diceresult"}} : {{diceResult}}</span></li>
{{else}}
{{#if isCriticalFailure}}
<li><span class="crit-failure">Dice result : {{diceResult}}</span></li>
<li><span class="crit-failure">{{localize "WH.chat.diceresult"}} : {{diceResult}}</span></li>
{{else}}
<li>Dice result : <span>{{diceResult}}</span></li>
<li>{{localize "WH.chat.diceresult"}} : <span>{{diceResult}}</span></li>
{{/if}}
{{/if}}
{{/if}}
@ -53,7 +53,7 @@
<li>{{localize "WH.ui.level"}} : {{power.system.level}}</li>
<li>{{{powerText}}}</li>
{{else}}
<li><strong>Result : {{roll.total}} </strong></li>
<li><strong>{{localize "WH.chat.result"}} : {{roll.total}} </strong></li>
{{/if}}
</ul>

View File

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

View File

@ -20,19 +20,19 @@
<li>Formula : {{diceFormula}}</li>
{{#if isCriticalSuccess}}
<li><span class="crit-success">Dice result : {{diceResult}}</span></li>
<li><span class="crit-success">{{localize "WH.chat.diceresult"}} : {{diceResult}}</span></li>
{{else}}
{{#if isCriticalFailure}}
<li><span class="crit-failure">Dice result : {{diceResult}}</span></li>
<li><span class="crit-failure">{{localize "WH.chat.diceresult"}} : {{diceResult}}</span></li>
{{else}}
<li>Dice result : <span>{{diceResult}}</span></li>
<li>{{localize "WH.chat.diceresult"}} : <span>{{diceResult}}</span></li>
{{/if}}
{{/if}}
{{#if isSuccess}}
<li><strong>Parry success ! </strong></li>
<li><strong>{{localize "WH.chat.parysuccess"}} </strong></li>
{{else}}
<li><strong>Parry failed ! </strong></li>
<li><strong>{{localize "WH.chat.paryfailed"}} </strong></li>
{{/if}}
</ul>
</div>

View File

@ -1,46 +0,0 @@
<div class="chat-message-header">
{{#if actorImg}}
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
{{/if}}
<h4 class=chat-actor-name>{{alias}}</h4>
</div>
<hr>
{{#if img}}
<div>
<img class="chat-icon" src="{{img}}" alt="{{name}}" />
</div>
{{/if}}
<div class="flexcol">
</div>
<div>
{{#if isRangedAttack}}
<div>{{defender.name}} is under Ranged attack. He must roll a Target Roll to defend himself.</div>
{{else}}
<div>{{defender.name}} is under Melee attack. He must roll a Defense Roll to defend himself.</div>
{{/if}}
<ul>
{{#if isRangedAttack}}
<li>
<button class="chat-card-button roll-defense-ranged" data-roll-id="{{@root.rollId}}">Roll Target !</button>
</li>
{{else}}
<li>
{{#each defenderWeapons as |weapon idx|}}
<button class="chat-card-button roll-defense-melee" data-defense-weapon-id="{{weapon._id}}"
data-roll-id="{{@root.rollId}}">{{weapon.name}}</button>
{{/each}}
</li>
{{/if}}
</ul>
<!-- <button class="chat-card-button reroll-level-remaining" data-roll-id="{{rollId}}">Reroll</button> -->
</ul>
</div>
</div>

View File

@ -18,7 +18,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="item-field-label-medium ">Type</label>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.type"}}</label>
<select class="item-field-label-medium" type="text" name="system.armortype" value="{{system.armortype}}" data-dtype="String">
{{#select system.armortype}}
{{#each config.armorTypes as |type key|}}
@ -28,7 +28,7 @@
</select>
</li>
<li class="flexrow"><label class="item-field-label-medium ">Damage reduction</label>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.damagereduction"}}</label>
<input type="text" class="item-field-label-medium " name="system.damagereduction" value="{{system.damagereduction}}" data-dtype="Number"/>
</li>

View File

@ -12,8 +12,8 @@
<div class="tab details" data-group="primary" data-tab="description">
<label class="generic-label">Description</label>
<div class="medium-editor item-text-long-line">
<label class="generic-label">{{localize "WH.ui.description"}}</label>
<div class="editor item-text-long-line">
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
</div>
@ -21,8 +21,12 @@
<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"}} {{key}}</label>
<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"
name="system.weapons.{{key}}" {{checked weaponflag}}/>
@ -30,7 +34,7 @@
{{/each}}
{{#each system.armors as |armorflag key|}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.armors"}} {{key}}</label>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.armors"}} {{localize (concat "WH.conf." key "armor")}}</label>
<input type="checkbox" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.armors.{{key}}" {{checked armorflag}}/>
@ -38,7 +42,7 @@
{{/each}}
{{#each system.shields as |shieldflag key|}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.shields"}} {{key}}</label>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.shields"}} {{localize (concat "WH.conf." key "shield")}}</label>
<input type="checkbox" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.shields.{{key}}" {{checked shieldflag}}/>

View File

@ -0,0 +1,32 @@
<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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.class"}}</label>
<input type="text" class="item-field-label-medium " name="system.class" value="{{system.class}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.mandatoryfor"}}</label>
<input type="text" class="item-field-label-long2 " name="system.mandatoryfor" value="{{system.mandatoryfor}}" data-dtype="String"/>
</li>
{{> systems/fvtt-warhero/templates/partial-item-common-equipment.html}}
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,24 @@
<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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
</ul>
</div>
</section>
</form>

View File

@ -16,6 +16,63 @@
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.conditiontype"}}</label>
<select class="item-field-label-medium " type="text" name="system.conditiontype" value="{{system.conditiontype}}" data-dtype="String">
{{#select system.conditiontype}}
{{#each config.conditionType as |type key|}}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.duration"}}</label>
<select class="item-field-label-medium " type="text" name="system.duration" value="{{system.duration}}" data-dtype="String">
{{#select system.duration}}
{{#each config.conditionDuration as |type key|}}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.begin"}}</label>
<input type="text" class="item-field-label-long" name="system.begin" value="{{system.begin}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.specialduration"}}</label>
<select class="item-field-label-medium " type="text" name="system.specialduration" value="{{system.specialduration}}" data-dtype="String">
{{#select system.specialduration}}
{{#each config.conditionSpecialDuration as |type key|}}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.durationvalue"}}</label>
<input type="text" class="item-field-label-short" name="system.durationvalue" value="{{system.durationvalue}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.durationunit"}}</label>
<input type="text" class="item-field-label-long" name="system.durationunit" value="{{system.durationunit}}" data-dtype="String"/>
</li>
{{#if (eq conditiontype "disease")}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.dcsave"}}</label>
<input type="text" class="item-field-label-short" name="system.dcsave" value="{{system.dcsave}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.incubationtime"}}</label>
<input type="text" class="item-field-label-long" name="system.incubationtime" value="{{system.incubationtime}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.diseaseduration"}}</label>
<input type="text" class="item-field-label-long" name="system.diseaseduration" value="{{system.diseaseduration}}" data-dtype="String"/>
</li>
{{/if}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.effect"}}</label>
<input type="text" class="item-field-label-long" name="system.shortdescription" value="{{system.shortdescription}}" data-dtype="String"/>
</li>

View File

@ -16,6 +16,10 @@
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.providedslot"}}</label>
<input type="text" class="item-field-label-medium " name="system.providedslot" value="{{system.providedslot}}" data-dtype="Number"/>
</li>
{{> systems/fvtt-warhero/templates/partial-item-common-equipment.html}}
</ul>

View File

@ -0,0 +1,24 @@
<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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,37 @@
<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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.quantity"}}</label>
<input type="text" class="item-field-label-long" name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.slotlocation"}}</label>
<select class="item-field-label-long " type="text" name="system.slotlocation" value="{{system.slotlocation}}" data-dtype="String">
{{#select system.slotlocation}}
{{#each config.slotNames as |type key|}}
<option value="{{key}}">{{localize type.label}}</option>
{{/each}}
{{/select}}
</select>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,64 @@
<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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.application"}}</label>
<select class="item-field-label-medium " type="text" name="system.application" value="{{system.application}}" data-dtype="String">
{{#select system.application}}
{{#each config.poisonApplication as |type key|}}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.cost"}}</label>
<input type="text" class="item-field-label-medium " name="system.preparecost" value="{{system.preparecost}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.preparetime"}}</label>
<input type="text" class="item-field-label-medium " name="system.preparetime" value="{{system.preparetime}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.damage"}}</label>
<input type="text" class="item-field-label-medium " name="system.damageroll" value="{{system.damageroll}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.durationrounds"}}</label>
<input type="text" class="item-field-label-short " name="system.durationround" value="{{system.durationround}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.savesdc"}}</label>
<input type="text" class="item-field-label-short " name="system.savesdc" value="{{system.savesdc}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.savetype"}}</label>
<select class="item-field-label-long " type="text" name="system.savetype" value="{{system.savetype}}" data-dtype="String">
{{#select system.savetype}}
{{#each config.saveType as |type key|}}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select>
</li>
{{> systems/fvtt-warhero/templates/partial-item-common-equipment.html}}
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,36 @@
<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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.cost"}}</label>
<input type="text" class="item-field-label-medium " name="system.alchemycost" value="{{system.alchemycost}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.preparetime"}}</label>
<input type="text" class="item-field-label-medium " name="system.preparetime" value="{{system.preparetime}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.durationrounds"}}</label>
<input type="text" class="item-field-label-medium " name="system.durationround" value="{{system.durationround}}" data-dtype="Number"/>
</li>
{{> systems/fvtt-warhero/templates/partial-item-common-equipment.html}}
</ul>
</div>
</section>
</form>

View File

@ -10,13 +10,7 @@
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="tab details" data-group="primary" data-tab="description">
<label class="generic-label">Description</label>
<div class="medium-editor item-text-long-line">
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
</div>
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
@ -64,7 +58,7 @@
</li>
{{#each system.weapons as |weaponflag key|}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.weapons"}} {{key}}</label>
<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"
name="system.weapons.{{key}}" {{checked weaponflag}}/>
@ -72,7 +66,7 @@
{{/each}}
{{#each system.armors as |armorflag key|}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.armors"}} {{key}}</label>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.armors"}} {{localize (concat "WH.conf." key "armor")}}</label>
<input type="checkbox" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.armors.{{key}}" {{checked armorflag}}/>
@ -80,7 +74,7 @@
{{/each}}
{{#each system.shields as |shieldflag key|}}
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.shields"}} {{key}}</label>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.shields"}} {{localize (concat "WH.conf." key "shield")}}</label>
<input type="checkbox" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.shields.{{key}}" {{checked shieldflag}}/>

View File

@ -18,7 +18,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="item-field-label-medium ">Shield type</label>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.type"}}</label>
<select class="item-field-label-long " type="text" name="system.shieldtype" value="{{system.shieldtype}}" data-dtype="String">
{{#select system.shieldtype}}
{{#each config.armorTypes as |type key|}}
@ -28,7 +28,7 @@
</select>
</li>
<li class="flexrow"><label class="item-field-label-medium ">Parry Bonus</label>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.parrybonus"}}</label>
<input type="text" class="item-field-label-medium " name="system.parrybonus" value="{{system.parrybonus}}" data-dtype="Number"/>
</li>

View File

@ -15,6 +15,10 @@
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.israceskill"}}</label>
<input type="checkbox" name="system.raceskill" {{checked system.raceskill}}/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.isclassskill"}}</label>
<input type="checkbox" name="system.classskill" {{checked system.classskill}}/>
</li>
@ -23,6 +27,10 @@
<input type="checkbox" name="system.unlimited" {{checked system.unlimited}}/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.skilllevelacquired"}}</label>
<input type="text" class="item-field-label-medium " name="system.acquiredatlevel" value="{{system.acquiredatlevel}}" data-dtype="Number"/>
</li>
{{#if system.unlimited}}
{{else}}

View File

@ -1,49 +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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> 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">Lore</label>
<select class="competence-base flexrow" type="text" name="system.lore" value="{{data.lore}}" data-dtype="String">
{{#select data.lore}}
<option value="earth">Earth</option>
<option value="air">Air</option>
<option value="fire">Fire</option>
<option value="water">Water</option>
<option value="shadow">Shadow</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Circle</label>
<select class="competence-base flexrow" type="text" name="system.circle" value="{{data.circle}}" data-dtype="Number">
{{#select data.circle}}
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Range</label>
<input type="text" class="" name="system.range" value="{{data.range}}" data-dtype="String"/>
</li>
</ul>
</div>
</section>
</form>

View File

@ -0,0 +1,40 @@
<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-warhero/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.dcfind"}}</label>
<input type="text" class="item-field-label-short " name="system.dcfind" value="{{system.dcfind}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.dcdisable"}}</label>
<input type="text" class="item-field-label-short " name="system.dcdisable" value="{{system.dcdisable}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.throwtohit"}}</label>
<input type="text" class="item-field-label-medium " name="system.throwtohit" value="{{system.throwtohit}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.damage"}}</label>
<input type="text" class="item-field-label-medium " name="system.damageroll" value="{{system.damageroll}}" data-dtype="String"/>
</li>
{{> systems/fvtt-warhero/templates/partial-item-common-equipment.html}}
</ul>
</div>
</section>
</form>

View File

@ -18,7 +18,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="item-field-label-long ">Type</label>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.type"}}</label>
<select class="item-field-label-medium " type="text" name="system.weapontype" value="{{system.weapontype}}" data-dtype="String">
{{#select system.weapontype}}
{{#each config.weaponTypes as |type key|}}
@ -29,20 +29,20 @@
</li>
{{#if (eq system.weapontype "special")}}
<li class="flexrow"><label class="item-field-label-vlong2 ">Raw Roll Formula (ex: 1d20+@statistics.str.value)</label>
<li class="flexrow"><label class="item-field-label-vlong2 ">{{localize "WH.ui.rawroll"}}</label>
<input type="text" class="item-field-label-long " name="system.rollformula" value="{{system.rollformula}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="item-field-label-vlong2 ">Raw Damage Formula (ex: 1d6+(@statistics.str.value/2))</label>
<li class="flexrow"><label class="item-field-label-vlong2 ">{{localize "WH.ui.rawdamage"}}</label>
<input type="text" class="item-field-label-long " name="system.damageformula" value="{{system.damageformula}}" data-dtype="String"/>
</li>
{{else}}
<li class="flexrow"><label class="item-field-label-long ">Damage</label>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.damage"}}</label>
<input type="text" class="item-field-label-medium " name="system.damage" value="{{system.damage}}" data-dtype="String"/>
</li>
{{/if}}
{{#if (eq system.weapontype "polearm")}}
<li class="flexrow"><label class="item-field-label-long ">Damage 2 arms</label>
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.2hdamage"}}</label>
<input type="text" class="item-field-label-medium " name="system.damage2hands" value="{{system.damage2hands}}" data-dtype="String"/>
</li>
{{/if}}

View File

@ -64,12 +64,12 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="main">Main</a>
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="skill">Skills&Effects</a>
<a class="item" data-tab="power">Powers</a>
<a class="item" data-tab="equipment">Equipment</a>
<a class="item" data-tab="biodata">Biography</a>
<a class="item" data-tab="main">{{localize "WH.ui.main"}}</a>
<a class="item" data-tab="combat">{{localize "WH.ui.combat"}}</a>
<a class="item" data-tab="skill">{{localize "WH.ui.skillstab"}}</a>
<a class="item" data-tab="power">{{localize "WH.ui.powers"}}</a>
<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 --}}
@ -176,7 +176,7 @@
<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">Weapons</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.weapons"}}</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -192,8 +192,16 @@
<span class="item-name-label-long"><a class="roll-weapon"><i class="fa-solid fa-dice-d20"></i>{{weapon.name}}</a></span>
<span class="item-field-label-medium">{{weapon.system.weapontype}}</span>
{{#if (eq system.weapontype "special")}}
<span class="item-field-label-medium"><a class="roll-damage"><i class="fa-solid fa-dice-d20"></i>{{weapon.system.damageformula}}</a></span>
{{else}}
<span class="item-field-label-medium"><a class="roll-damage"><i class="fa-solid fa-dice-d20"></i>{{weapon.damageFormula}}</a></span>
{{/if}}
{{#if (eq system.weapontype "polearm")}}
<span class="item-field-label-medium"><a class="roll-damage-2hands"><i class="fa-solid fa-dice-d20"></i>{{weapon.damageFormula2Hands}}</a></span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
@ -208,7 +216,7 @@
<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">Shields</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.shields"}}</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -240,7 +248,7 @@
<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">Armors</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.armors"}}</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -477,28 +485,20 @@
<div>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="generic-label">Origin</label>
<label class="generic-label">{{localize "WH.ui.origin"}}</label>
<input type="text" class="" name="system.biodata.origin" value="{{data.biodata.origin}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Age</label>
<label class="generic-label">{{localize "WH.ui.age"}}</label>
<input type="text" class="" name="system.biodata.age" value="{{data.biodata.age}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Height</label>
<label class="generic-label">{{localize "WH.ui.height"}}</label>
<input type="text" class="" name="system.biodata.height" value="{{data.biodata.height}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Eyes</label>
<input type="text" class="" name="system.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Hair</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Preferred Hand</label>
<label class="generic-label">{{localize "WH.ui.preferredhand"}}</label>
<input type="text" class="" name="system.biodata.preferredhand" value="{{data.biodata.preferredhand}}"
data-dtype="String" />
</li>
@ -507,7 +507,7 @@
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Size</label>
<label class="generic-label">{{localize "WH.ui.size"}}</label>
<select class="competence-base flexrow" type="text" name="system.biodata.size" value="{{data.biodata.size}}" data-dtype="Number">
{{#select data.biodata.size}}
<option value="1">Tiny</option>
@ -520,22 +520,30 @@
</select>
</li>
<li class="flexrow item">
<label class="generic-label">Sex</label>
<label class="generic-label">{{localize "WH.ui.gender"}}</label>
<input type="text" class="" name="system.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">{{localize "WH.ui.eyes"}}</label>
<input type="text" class="" name="system.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">{{localize "WH.ui.hair"}}</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li>
</ul>
</div>
</div>
<hr>
<h3>Background : </h3>
<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>Notes : </h3>
<h3>{{localize "WH.ui.notes"}} : </h3>
<div class="form-group editor">
{{editor notes target="system.biodata.notes" button=true owner=owner editable=editable}}
</div>

View File

@ -64,12 +64,12 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="main">Main</a>
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="skill">Skills&Effects</a>
<a class="item" data-tab="power">Powers</a>
<a class="item" data-tab="equipment">Equipment</a>
<a class="item" data-tab="biodata">Biography</a>
<a class="item" data-tab="main">{{localize "WH.ui.main"}}</a>
<a class="item" data-tab="combat">{{localize "WH.ui.combat"}}</a>
<a class="item" data-tab="skill">{{localize "WH.ui.skillstab"}}</a>
<a class="item" data-tab="power">{{localize "WH.ui.powers"}}</a>
<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 --}}
@ -176,7 +176,7 @@
<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">Weapons</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.weapons"}}</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -192,8 +192,16 @@
<span class="item-name-label-long"><a class="roll-weapon"><i class="fa-solid fa-dice-d20"></i>{{weapon.name}}</a></span>
<span class="item-field-label-medium">{{weapon.system.weapontype}}</span>
{{#if (eq system.weapontype "special")}}
<span class="item-field-label-medium"><a class="roll-damage"><i class="fa-solid fa-dice-d20"></i>{{weapon.system.damageformula}}</a></span>
{{else}}
<span class="item-field-label-medium"><a class="roll-damage"><i class="fa-solid fa-dice-d20"></i>{{weapon.damageFormula}}</a></span>
{{/if}}
{{#if (eq system.weapontype "polearm")}}
<span class="item-field-label-medium"><a class="roll-damage-2hands"><i class="fa-solid fa-dice-d20"></i>{{weapon.damageFormula2Hands}}</a></span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
@ -208,7 +216,7 @@
<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">Shields</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.shields"}}</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -240,7 +248,7 @@
<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">Armors</label></h3>
<h3><label class="items-title-text">{{localize "WH.ui.armors"}}</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">{{localize "WH.ui.Type"}}</label>
@ -378,6 +386,7 @@
</div>
</div>
{{!-- Powers Tab --}}
<div class="tab power" data-group="primary" data-tab="power">
@ -476,28 +485,20 @@
<div>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="generic-label">Origin</label>
<label class="generic-label">{{localize "WH.ui.origin"}}</label>
<input type="text" class="" name="system.biodata.origin" value="{{data.biodata.origin}}"
data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Age</label>
<label class="generic-label">{{localize "WH.ui.age"}}</label>
<input type="text" class="" name="system.biodata.age" value="{{data.biodata.age}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Height</label>
<label class="generic-label">{{localize "WH.ui.height"}}</label>
<input type="text" class="" name="system.biodata.height" value="{{data.biodata.height}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Eyes</label>
<input type="text" class="" name="system.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Hair</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Preferred Hand</label>
<label class="generic-label">{{localize "WH.ui.preferredhand"}}</label>
<input type="text" class="" name="system.biodata.preferredhand" value="{{data.biodata.preferredhand}}"
data-dtype="String" />
</li>
@ -506,7 +507,7 @@
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Size</label>
<label class="generic-label">{{localize "WH.ui.size"}}</label>
<select class="competence-base flexrow" type="text" name="system.biodata.size" value="{{data.biodata.size}}" data-dtype="Number">
{{#select data.biodata.size}}
<option value="1">Tiny</option>
@ -519,22 +520,30 @@
</select>
</li>
<li class="flexrow item">
<label class="generic-label">Sex</label>
<label class="generic-label">{{localize "WH.ui.gender"}}</label>
<input type="text" class="" name="system.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">{{localize "WH.ui.eyes"}}</label>
<input type="text" class="" name="system.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">{{localize "WH.ui.hair"}}</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li>
</ul>
</div>
</div>
<hr>
<h3>Background : </h3>
<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>Notes : </h3>
<h3>{{localize "WH.ui.notes"}} : </h3>
<div class="form-group editor">
{{editor notes target="system.biodata.notes" button=true owner=owner editable=editable}}
</div>

View File

@ -31,14 +31,20 @@
{{#if hasmax}}
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.max" value="{{stat.max}}" data-dtype="Number"/>
{{/if}}
{{#if hasuse}}
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.nbuse" value="{{stat.nbuse}}" data-dtype="Number"/>
<label class="item-field-label-2rem">&nbsp;/&nbsp;</label>
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.maxuse" value="{{stat.maxuse}}" data-dtype="Number"/>
{{/if}}
{{/if}}
{{#if hassave}}
<span class="item-field-label-short" name="{{key}}">
<h4 class="item-field-label-short">
<span class="item-field-label-medium" name="{{key}}">
<h4 class="item-field-label-medium">
<i class="fa-solid fa-dice-d20"></i>
<a class="roll-save stat-margin" data-type="{{path}}" data-key="{{key}}">
{{localize "WH.ui.save"}}
{{localize (concat "WH.ui.save" key)}}
</a>
</h4>
</span>

View File

@ -0,0 +1,53 @@
<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">&nbsp;</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">
{{#if item.system.isidentified}}
<label class="short-label">{{localize (concat "WH.conf." item.system.isidentified)}}</label>
{{else}}
<label class="short-label">{{localize (concat "WH.conf." item.system.notapplicable)}}</label>
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>

View File

@ -1,7 +1,7 @@
<li class="flexrow"><label class="item-field-label-medium ">Slots used</label>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.slotsused"}}</label>
<input type="text" class="item-field-label-medium " name="system.slotused" value="{{system.slotused}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-medium ">Slot location</label>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.slotlocation"}}</label>
<select class="item-field-label-long " type="text" name="system.slotlocation" value="{{system.slotlocation}}" data-dtype="String">
{{#select system.slotlocation}}
{{#each config.slotNames as |type key|}}
@ -10,9 +10,35 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-medium ">Quantity</label>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.identified"}}</label>
<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}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.magiccharge"}}</label>
<select class="item-field-label-long " type="text" name="system.magiccharge" value="{{system.magiccharge}}" data-dtype="String">
{{#select system.magiccharge}}
{{#each config.magicCharge as |type key|}}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.chargevalue"}}</label>
<input type="text" class="item-field-label-medium " name="system.chargevalue" value="{{system.chargevalue}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.quantity"}}</label>
<input type="text" class="item-field-label-medium " name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="item-field-label-medium">Cost</label>
<input type="text" class="item-field-label-medium " name="system.cost" value="{{system.cost}}" data-dtype="Number"/>
</li>
</li>
<li class="flexrow"><label class="item-field-label-medium">{{localize "WH.ui.cost"}}</label>
<input type="text" class="item-field-label-medium " name="system.cost" value="{{system.cost}}" data-dtype="Number"/>
</li>

View File

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

View File

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

View File

@ -1,7 +0,0 @@
<option value="agi">Agility</option>
<option value="str">Strength</option>
<option value="dex">Dexterity</option>
<option value="con">Constitution</option>
<option value="int">Intelligence</option>
<option value="wit">Wits</option>
<option value="cha">Charisma</option>

View File

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

View File

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

View File

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

View File

@ -1,4 +0,0 @@
<ul>
</ul>

100
templates/party-sheet.html Normal file
View 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">&nbsp;</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">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{/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>

View File

@ -4,5 +4,5 @@
<img class="chat-img" src="{{img}}" title="{{name}}" />
{{/if}}
<h4><b>Description : </b></h4>
<p class="card-content">{{{data.description}}}</p>
<p class="card-content">{{{system.description}}}</p>
</div>

View File

@ -10,23 +10,23 @@
{{#if weapon}}
<div class="flexrow">
<span class="item-field-label-vlong">Weapon : </span>
<span class="item-field-label-vlong">{{localize "WH.ui.weapon"}} : </span>
<span class="item-field-label-vlong">{{weapon.name}}</span>
</div>
{{#if (eq mode "damage")}}
{{#if (eq weapon.system.weapontype "special")}}
<div class="flexrow">
<span class="item-field-label-vlong">Damage : </span>
<span class="item-field-label-vlong">{{localize "WH.ui.damage"}} : </span>
<span class="item-field-label-vlong">{{weapon.system.damageformula}}</span>
</div>
{{else}}
<div class="flexrow">
<span class="item-field-label-vlong">Damage : </span>
<span class="item-field-label-vlong">{{localize "WH.ui.damage"}} : </span>
{{#if is2hands}}
<span class="item-field-label-vlong">{{weapon.damageFormula2Hands}}</span>
{{else}}
<span class="item-field-label-vlong">{{weapon.damage}}</span>
<span class="item-field-label-vlong">{{weapon.damageFormula}}</span>
{{/if}}
</div>
{{/if}}
@ -34,7 +34,7 @@
{{else}}
{{#if (eq weapon.system.weapontype "special")}}
<div class="flexrow">
<span class="item-field-label-vlong">Roll Formula : </span>
<span class="item-field-label-vlong">{{localize "WH.chat.rollformula"}} : </span>
<span class="item-field-label-vlong">{{weapon.system.rollformula}}</span>
</div>
{{/if}}
@ -54,7 +54,7 @@
{{#if stat.istxc}}
<div class="flexrow">
<span class="item-field-label-vlong">Multiple weapons malus ({{mWeaponMalus}})? </span>
<span class="item-field-label-vlong">{{localize "WH.chat.mweaponmalus"}} ({{mWeaponMalus}})? </span>
<span class="item-field-label-medium"><input type="checkbox" id="usemWeaponMalus" name="usemWeaponMalus" {{checked usemWeaponMalus}}/></span>
{{/if}}
</div>
@ -62,7 +62,7 @@
{{#if shield}}
<div class="flexrow">
<span class="item-field-label-vlong">Use shield ? : </span>
<span class="item-field-label-vlong">{{localize "WH.chat.useshield"}} : </span>
<span class="roll-dialog-label">
<input type="checkbox" id="useshield" name="useshield" {{checked useshield}}/>
</span>
@ -75,11 +75,11 @@
{{#if power}}
<div class="flexrow">
<span class="item-field-label-vlong">Power : </span>
<span class="item-field-label-vlong">{{localize "WH.chat.power"}} : </span>
<span class="item-field-label-medium">{{power.name}}</span>
</div>
<div class="flexrow">
<span class="item-field-label-vlong">Power Level : </span>
<span class="item-field-label-vlong">{{localize "WH.chat.powerlevel"}} : </span>
<span class="item-field-label-medium">{{power.system.level}}</span>
</div>
{{/if}}