Compare commits

..

9 Commits

Author SHA1 Message Date
7a9ed39d02 Actor/Crew rolls 2022-09-21 16:58:02 +02:00
8345ee0ebb Actor/Crew rolls 2022-09-21 16:54:34 +02:00
343ac6ab9d NRG stuff 2022-09-18 17:30:15 +02:00
9a20a96cec Start vehicle automation 2022-09-16 17:36:58 +02:00
ae697b0bb8 WIP for vehicle sheets 2022-09-09 08:33:28 +02:00
ecf5a38eb0 WIP for vehicle sheets 2022-09-08 21:26:45 +02:00
1849a60194 Vehicle - WIP 2022-09-05 11:32:21 +02:00
fbb578c541 Vehicle - WIP 2022-09-05 08:57:48 +02:00
7614964772 Vehicle - WIP 2022-09-05 08:57:02 +02:00
27 changed files with 1946 additions and 236 deletions

View File

@ -1,6 +1,6 @@
[Dolphin]
SortRole=creationtime
Timestamp=2021,4,13,9,23,48.267
SortRole=modificationtime
Timestamp=2022,9,8,20,43,38.73
Version=4
ViewMode=1
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -9,8 +9,22 @@ const __subkey2title = {
"melee-dmg": "Melee Damage", "melee-atk": "Melee Attack", "ranged-atk": "Ranged Attack",
"ranged-dmg": "Ranged Damage", "dmg-res": "Damare Resistance"
}
const __statBuild = [
{ modules: ["vehiclehull"], field: "hr", itemfield: "hr" },
{ modules: ["vehiclehull", "vehiclemodule"], field: "hr", itemfield: "size", subfield: "size" },
//{ modules: ["vehiclehull"], field: "pc", itemfield: "vms", subfield: "avgnrg" },
//{ modules: ["powercoremodule"], field: "pc", itemfield: "nrg", subfield: "avgnrg" },
{ modules: ["vehiclehull", "mobilitymodule"], itemfield: "man", field: "man" },
{ modules: ["powercoremodule"], field: "pc", itemfield: "pc", additionnal1: "curnrg", additionnal2: "maxnrg" },
{ modules: ["mobilitymodule"], field: "mr", itemfield: "mr" },
{ modules: ["propulsionmodule"], field: "ad", itemfield: "ad" },
{ modules: ["combatmodule"], field: "fc", itemfield: "fc" },
]
const __isVehicleUnique = { vehiclehull:1, powercoremodule:1, mobilitymodule: 1, propulsionmodule: 1, combatmodule: 1}
const __speed2Num = { fullstop: 0, crawling: 1, slow: 2, average: 3, fast: 4, extfast: 5 }
const __num2speed = ["fullstop", "crawling", "slow", "average", "fast", "extfast"]
const __isVehicle = { vehiclehull: 1, powercoremodule: 1, mobilitymodule: 1, combatmodule: 1, propulsionmodule: 1, vehiclemodule: 1, vehicleweaponmodule: 1, effect: 1}
/* -------------------------------------------- */
/* -------------------------------------------- */
/**
* Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.
@ -71,7 +85,9 @@ export class PegasusActor extends Actor {
this.system.encCapacity = this.getEncumbranceCapacity()
this.buildContainerTree()
}
if (this.type == 'vehicle') {
this.computeVehicleStats();
}
super.prepareDerivedData();
}
@ -106,6 +122,42 @@ export class PegasusActor extends Actor {
let comp = this.items.filter(item => item.type == 'effect');
return comp;
}
/* -------------------------------------------- */
getCombatModules() {
let comp = this.items.filter(item => item.type == 'combatmodule');
return comp;
}
/* -------------------------------------------- */
getVehicleHull() {
let comp = this.items.filter(item => item.type == 'vehiclehull');
return comp;
}
/* -------------------------------------------- */
getPowercoreModules() {
let comp = this.items.filter(item => item.type == 'powercoremodule');
return comp;
}
/* -------------------------------------------- */
getMobilityModules() {
let comp = this.items.filter(item => item.type == 'mobilitymodule');
return comp;
}
/* -------------------------------------------- */
getPropulsionModules() {
let comp = this.items.filter(item => item.type == 'propulsionmodule');
return comp;
}
/* -------------------------------------------- */
getVehicleModules() {
let comp = this.items.filter(item => item.type == 'vehiclemodule');
return comp;
}
/* -------------------------------------------- */
getVehicleWeaponModules() {
let comp = this.items.filter(item => item.type == 'vehicleweaponmodule');
return comp;
}
/* -------------------------------------------- */
getPowers() {
let comp = this.items.filter(item => item.type == 'power');
@ -210,7 +262,8 @@ export class PegasusActor extends Actor {
/* -------------------------------------------- */
async manageDesires(flag) {
if (flag) {
let effect = await PegasusUtility.getEffectFromCompendium("Desires")
let effect = await PegasusUtility.getEffectFromCompendium("Desire")
//console.log("EFFECT", effect)
effect.system.desires = true
this.createEmbeddedDocuments('Item', [effect])
} else {
@ -576,6 +629,11 @@ export class PegasusActor extends Actor {
/* -------------------------------------------- */
async preprocessItem(event, item, onDrop = false) {
if ( item.type != "effect" && __isVehicle[item.type]) {
ui.notifications.warn("You can't drop Vehicles item over a character sheet.")
return
}
// Pre-filter effects
if (item.type == 'effect') {
if (this.checkMentalDisruption() && item.system.type == "mental" && item.system.genre == "positive") {
@ -596,6 +654,7 @@ export class PegasusActor extends Actor {
}
}
if (item.type == 'race') {
this.applyRace(item.system)
} else if (item.type == 'role') {
@ -623,7 +682,7 @@ export class PegasusActor extends Actor {
return false
}
}
if (item.type == "power" && item.system.purchasedtext.length > 0 ) {
if (item.type == "power" && item.system.purchasedtext.length > 0) {
ChatMessage.create({ content: `Power ${item.name} puchased : ${item.system.purchasedtext}` })
}
let dropID = $(event.target).parents(".item").attr("data-item-id") // Only relevant if container drop
@ -687,12 +746,12 @@ export class PegasusActor extends Actor {
/* -------------------------------------------- */
getStat(statKey) {
let stat
if (statKey == 'mr') {
if (this.type == "character" && statKey == 'mr') {
stat = duplicate(this.system.mr);
} else {
stat = duplicate(this.system.statistics[statKey]);
}
stat.dice = PegasusUtility.getDiceFromLevel(stat.value);
stat.dice = PegasusUtility.getDiceFromLevel(stat.value || stat.level);
return stat;
}
@ -712,8 +771,8 @@ export class PegasusActor extends Actor {
if (spec) {
let powers = []
for (let power of spec.system.powers) {
if ( power.data ) {
power.system = power.data
if (power.data) {
power.system = power.data
}
power.system.specId = specId
powers.push(power)
@ -860,10 +919,18 @@ export class PegasusActor extends Actor {
/* -------------------------------------------- */
incDecNRG(value) {
let nrg = duplicate(this.system.nrg)
nrg.value += value
if (nrg.value >= 0 && nrg.value <= nrg.max) {
this.update({ 'data.nrg': nrg })
if (this.type == "character") {
let nrg = duplicate(this.system.nrg)
nrg.value += value
if (nrg.value >= 0 && nrg.value <= nrg.max) {
this.update({ 'data.nrg': nrg })
}
} else {
let pc = duplicate(this.system.statistics.pc)
pc.curnrg += value
if (pc.curnrg >= 0 && pc.curnrg <= pc.maxnrg) {
this.update({ 'system.statistics.pc': pc })
}
}
}
@ -931,7 +998,7 @@ export class PegasusActor extends Actor {
if (status == "activated") {
// Add effects linked to the perk
let effects = []
for (let effect of item.system.effectsgained) {
for (let effect of item.system.effectsgained) {
if (effect.data) {
effect.system = effect.data
}
@ -1001,13 +1068,15 @@ export class PegasusActor extends Actor {
/* -------------------------------------------- */
getTraumaState() {
this.traumaState = "none"
let negDelirium = -Math.floor((this.system.secondary.delirium.max + 1) / 2)
if (this.type == "character") {
if (this.system.secondary.delirium.value <= 0 && this.system.secondary.delirium.value >= negDelirium) {
this.traumaState = "trauma"
}
if (this.system.secondary.delirium.value < negDelirium) {
this.traumaState = "severetrauma"
if ( this.type == "character") {
let negDelirium = -Math.floor((this.system.secondary.delirium.max + 1) / 2)
if (this.type == "character") {
if (this.system.secondary.delirium.value <= 0 && this.system.secondary.delirium.value >= negDelirium) {
this.traumaState = "trauma"
}
if (this.system.secondary.delirium.value < negDelirium) {
this.traumaState = "severetrauma"
}
}
}
return this.traumaState
@ -1098,8 +1167,10 @@ export class PegasusActor extends Actor {
}
}
/* -------------------------------------------- */
async computeNRGHealth() {
if (this.isOwner || game.user.isGM) {
let updates = {}
let phyDiceValue = PegasusUtility.getDiceValue(this.system.statistics.phy.value) + this.system.secondary.health.bonus + this.system.statistics.phy.mod;
@ -1262,24 +1333,24 @@ export class PegasusActor extends Actor {
if (ability.system.affectedstat != "notapplicable") {
let stat = duplicate(this.system.statistics[ability.system.affectedstat])
stat.mod += Number(ability.system.statmodifier)
updates[`data.statistics.${ability.system.affectedstat}`] = stat
updates[`system.statistics.${ability.system.affectedstat}`] = stat
}
// manage status bonus
if (ability.system.statusaffected != "notapplicable") {
if (ability.system.statusaffected == 'nrg') {
let nrg = duplicate(this.system.nrg)
nrg.mod += Number(ability.system.statusmodifier)
updates[`data.nrg`] = nrg
updates[`system.nrg`] = nrg
}
if (ability.system.statusaffected == 'health') {
let health = duplicate(this.system.secondary.health)
health.bonus += Number(ability.system.statusmodifier)
updates[`data.secondary.health`] = health
updates[`system.secondary.health`] = health
}
if (ability.system.statusaffected == 'delirium') {
let delirium = duplicate(this.system.secondary.delirium)
delirium.bonus += Number(ability.system.statusmodifier)
updates[`data.secondary.delirium`] = delirium
updates[`system.secondary.delirium`] = delirium
}
}
if (directUpdate) {
@ -1471,9 +1542,19 @@ export class PegasusActor extends Actor {
}
}
}
addVehicleWeapons(rollData, vehicle) {
if (vehicle) {
let modules = vehicle.items.filter(vehicle => vehicle.type == "vehicleweaponmodule")
if (modules && modules.length > 0) {
for( let module of modules) {
rollData.vehicleWeapons.push({ label: `Weapon ${module.name}`, type: "item", applied: false, weapon: module, value: module.system.damagedicevalue } )
}
}
}
}
/* -------------------------------------------- */
getCommonRollData(statKey = undefined, useShield = false, isInit = false, isPower = false, isPowerDmg = false) {
getCommonRollData(statKey = undefined, useShield = false, isInit = false, isPower = false, subKey = "", vehicle = undefined ) {
let rollData = PegasusUtility.getBasicRollData(isInit)
rollData.alias = this.name
rollData.actorImg = this.img
@ -1486,11 +1567,34 @@ export class PegasusActor extends Actor {
rollData.noBonusDice = this.checkNoBonusDice()
rollData.dicePool = []
if (subKey == "melee-dmg" || subKey == "ranged-dmg" || subKey == "power-dmg") {
rollData.isDamage = true
}
if (statKey) {
rollData.statKey = statKey
rollData.stat = this.getStat(statKey)
rollData.statDicesLevel = rollData.stat.value
rollData.statDicesLevel = rollData.stat.value || rollData.stat.level
rollData.statMod = rollData.stat.mod
if ( vehicle) {
rollData.vehicle = duplicate(vehicle)
if (subKey == "melee-dmg") {
rollData.statVehicle = vehicle.system.statistics.mr
rollData.statDicesLevel += vehicle.system.statistics.mr.currentlevel
this.addVehicleWeapons(rollData, vehicle)
}
if (subKey == "ranged-atk") {
rollData.statVehicle = vehicle.system.statistics.fc
rollData.statDicesLevel += vehicle.system.statistics.fc.currentlevel
}
if (subKey == "ranged-dmg") {
this.addVehicleWeapons(rollData, vehicle)
}
if (subKey == "defense") {
rollData.statVehicle = vehicle.system.statistics.man
rollData.statDicesLevel += vehicle.system.statistics.man.currentlevel
}
}
rollData.specList = this.getRelevantSpec(statKey)
rollData.selectedSpec = "0"
if (statKey.toLowerCase() == "mr") {
@ -1498,7 +1602,7 @@ export class PegasusActor extends Actor {
} else {
rollData.img = `systems/fvtt-pegasus-rpg/images/icons/${rollData.stat.abbrev}.webp`
}
let diceKey = PegasusUtility.getDiceFromLevel(rollData.stat.value)
let diceKey = PegasusUtility.getDiceFromLevel(rollData.statDicesLevel)
let diceList = diceKey.split(" ")
let mod = rollData.stat.mod
for (let myDice of diceList) {
@ -1512,7 +1616,7 @@ export class PegasusActor extends Actor {
}
}
this.addEffects(rollData, isInit, isPower, isPowerDmg)
this.addEffects(rollData, isInit, isPower, subKey == "power-dmg" )
this.addArmorsShields(rollData, statKey, useShield)
this.addWeapons(rollData, statKey, useShield)
this.addEquipments(rollData, statKey)
@ -1558,10 +1662,10 @@ export class PegasusActor extends Actor {
}
/* -------------------------------------------- */
rollPool(statKey, useShield = false, subKey = "none") {
rollPool(statKey, useShield = false, subKey = "none", vehicle = undefined) {
let stat = this.getStat(statKey)
if (stat) {
let rollData = this.getCommonRollData(statKey, useShield, false, false, subKey == "power-dmg")
let rollData = this.getCommonRollData(statKey, useShield, false, false, subKey, vehicle)
rollData.mode = "stat"
rollData.subKey = subKey
let def = stat.label
@ -1570,9 +1674,6 @@ export class PegasusActor extends Actor {
}
rollData.title = `Roll : ${def} `
rollData.img = "icons/dice/d12black.svg"
if (subKey == "melee-dmg" || subKey == "ranged-dmg" || subKey == "power-dmg") {
rollData.isDamage = true
}
this.startRoll(rollData)
} else {
ui.notifications.warn("Statistic not found !");
@ -1678,7 +1779,7 @@ export class PegasusActor extends Actor {
if (power) {
power = duplicate(power)
let rollData = this.getCommonRollData(power.system.statistic, false, false, true, false)
let rollData = this.getCommonRollData(power.system.statistic, false, false, true)
rollData.mode = "power"
rollData.power = power
@ -1690,4 +1791,217 @@ export class PegasusActor extends Actor {
ui.notifications.warn("Power not found !", powerId);
}
}
/* -------------------------------------------- */
/* VEHICLE STUFF */
manageCurrentSpeed(speed) {
if (speed == "fullstop") {
this.update({ 'system.secondary.moverange': "nomovement" })
}
if (speed == "crawling") {
this.update({ 'system.secondary.moverange': "threatzone" })
}
if (speed == "slow") {
this.update({ 'system.secondary.moverange': "close" })
}
if (speed == "average") {
this.update({ 'system.secondary.moverange': "medium" })
}
if (speed == "fast") {
this.update({ 'system.secondary.moverange': "long" })
}
if (speed == "extfast") {
this.update({ 'system.secondary.moverange': "extreme" })
}
}
/* -------------------------------------------- */
modifyVehicleStun(incDec) {
let stun = this.system.stun.value + incDec
this.update({ 'stun.value': stun })
}
/* -------------------------------------------- */
addTopSpeedBonus( topspeed, bonus) {
let num = __speed2Num[topspeed] + Number(bonus)
num = Math.max(0, num)
num = Math.min(num, __num2speed.length-1)
return __num2speed[num]
}
/* -------------------------------------------- */
async computeVehicleStats() {
if (this.type == "vehicle") {
for (let statDef of __statBuild) {
let sum = 0
let list = []
for (let moduleType of statDef.modules) {
list = list.concat(this.items.filter(item => item.type == moduleType))
}
if (list && list.length > 0) {
sum = list.reduce((value, item2) => value + Number(item2.system[statDef.itemfield]), 0)
}
//console.log("Processing", statDef.field, this.system.statistics[statDef.field].level, list, sum)
if (statDef.subfield){
if (sum != Number(this.system.statistics[statDef.field][statDef.subfield])) {
//console.log("Update", statDef.field, statDef.subfield, sum, this.system.statistics[statDef.field][statDef.subfield])
this.update({ [`system.statistics.${statDef.field}.${statDef.subfield}`]: sum } )
}
} else {
if (sum != Number(this.system.statistics[statDef.field].level)) {
this.update({ [`system.statistics.${statDef.field}.level`]: sum, [`system.statistics.${statDef.field}.currentlevel`]: sum })
if (statDef.additionnal1) {
if (sum != Number(this.system.statistics[statDef.field][statDef.additionnal1])) {
this.update({ [`system.statistics.${statDef.field}.${statDef.additionnal1}`]: sum } )
}
}
if (statDef.additionnal2) {
if (sum != Number(this.system.statistics[statDef.field][statDef.additionnal2])) {
this.update({ [`system.statistics.${statDef.field}.${statDef.additionnal2}`]: sum } )
}
}
}
}
}
// Top speed management
let mobility = this.items.find( item => item.type == "mobilitymodule")
let arcs = duplicate(this.system.arcs)
if (mobility) {
let propulsion = this.items.find( item => item.type == "propulsionmodule")
let bonus = (propulsion) ? propulsion.system.topspeed : 0
arcs.frontarc.topspeed = this.addTopSpeedBonus(mobility.system.ts_f, bonus)
arcs.rightarc.topspeed = mobility.system.ts_s
arcs.leftarc.topspeed = mobility.system.ts_s
arcs.toparc.topspeed = mobility.system.ts_s
arcs.bottomarc.topspeed = mobility.system.ts_s
arcs.reararc.topspeed = mobility.system.ts_r
} else {
arcs.frontarc.topspeed = "fullstop"
arcs.rightarc.topspeed = "fullstop"
arcs.leftarc.topspeed = "fullstop"
arcs.toparc.topspeed = "fullstop"
arcs.bottomarc.topspeed = "fullstop"
arcs.reararc.topspeed = "fullstop"
}
for (let key in this.system.arcs) {
if (this.system.arcs[key].topspeed != arcs[key].topspeed) {
this.update( { 'system.arcs': arcs})
}
}
// VMS management
let hull = this.items.find( item => item.type == "vehiclehull")
let modules = duplicate(this.system.modules)
if (hull ) {
modules.totalvms = Number(hull.system.vms)
} else {
modules.totalvms = 0
}
let spaceList = this.items.filter(item => item.type == "vehiclemodule") || []
spaceList = spaceList.concat(this.items.filter(item => item.type == "vehicleweaponmodule") || [])
let space = 0
if (spaceList && spaceList.length> 0) {
space = spaceList.reduce((value, item2) => value + Number(item2.system.space), 0)
}
modules.usedvms = space
if ( modules.totalvms != this.system.modules.totalvms || modules.usedvms != this.system.modules.usedvms) {
this.update( {'system.modules': modules})
}
if (modules.usedvms > modules.totalvms ) {
ui.notifications.warn("Warning! No more space available in cargo !!")
}
}
}
/* -------------------------------------------- */
getTotalCost( ) {
let sumCost = 0
for( let item of this.items) {
if ( __isVehicle[item.type]) {
if (item.system.cost) {
sumCost += Number(item.system.cost)
}
}
}
return sumCost
}
/* -------------------------------------------- */
async preprocessItemVehicle(event, item, onDrop = false) {
if ( item.type != "effect" && !__isVehicle[item.type]) {
ui.notifications.warn("You can't drop Character items over a vehicle sheet.")
return
}
//console.log(">>>>> item", item.type, __isVehicleUnique[item.type])
if ( __isVehicleUnique[item.type] ) {
let toDelList = []
for (let toDel of this.items) {
if ( toDel.type == item.type) {
toDelList.push( toDel.id )
}
}
//console.log("TODEL : ", toDelList)
if ( toDelList.length > 0 ) {
await this.deleteEmbeddedDocuments('Item', toDelList)
}
}
// Check size
if (item.type == "vehiclemodule" || item.type == "vehicleweaponmodule") {
item.system.space = item.system.space || 0
if ( this.system.modules.usedvms + Number(item.system.space) > this.system.modules.totalvms ) {
ChatMessage.create( { content: `No more room available to host module ${item.name}. Module is not added to the vehicle.`})
return false
}
}
return true
}
/* -------------------------------------------- */
getCrewList() {
let crew = []
for (let actorDef of this.system.crew) {
let actor = game.actors.get(actorDef.id)
if (actor ) {
crew.push( {name: actor.name, img: actor.img, id: actor.id })
}
}
return crew
}
/* -------------------------------------------- */
addCrew(actorId) {
let crewList = duplicate( this.system.crew.filter( actorDef => actorDef.id != actorId ) || [] )
crewList.push( {id: actorId})
this.update( { 'system.crew': crewList } )
}
/* -------------------------------------------- */
delCrew(actorId) {
let crewList = duplicate( this.system.crew.filter( actorDef => actorDef.id != actorId ) || [] )
this.update( { 'system.crew': crewList } )
}
/* -------------------------------------------- */
rollPoolFromVehicle(statKey, useShield = false, subKey = "none") {
// Find relevant actor
let actor
for( let actorDef of this.system.crew) {
let actorTest = game.actors.get( actorDef.id)
if (actorTest.testUserPermission( game.user, "OWNER")) {
actor = actorTest
break
}
}
if (!actor) {
ui.notifications.warn("You do no own any actors in the crew of this vehicle.")
return
}
actor.rollPool( statKey, useShield, subKey, this )
}
}

View File

@ -11,6 +11,7 @@
import { PegasusActor } from "./pegasus-actor.js";
import { PegasusItemSheet } from "./pegasus-item-sheet.js";
import { PegasusActorSheet } from "./pegasus-actor-sheet.js";
import { PegasusVehicleSheet } from "./pegasus-vehicle-sheet.js";
import { PegasusNPCSheet } from "./pegasus-npc-sheet.js";
import { PegasusUtility } from "./pegasus-utility.js";
import { PegasusCombat } from "./pegasus-combat.js";
@ -62,8 +63,8 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("fvtt-pegasus", PegasusActorSheet, { types: ["character"], makeDefault: true });
//Actors.registerSheet("fvtt-pegasus", PegasusVehicleSheet, { types: ["vehicle"], makeDefault: false });
Actors.registerSheet("fvtt-pegasus", PegasusActorSheet, { types: ["character"], makeDefault: true })
Actors.registerSheet("fvtt-pegasus", PegasusVehicleSheet, { types: ["vehicle"], makeDefault: false })
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("fvtt-pegasus", PegasusItemSheet, { makeDefault: true });

View File

@ -118,6 +118,21 @@ export class PegasusRollDialog extends Dialog {
PegasusUtility.updateDamageDicePool(this.rollData)
}
/* -------------------------------------------- */
manageVehicleWeapon( weaponIdx, toggled) {
let weapon = this.rollData.vehicleWeapons[weaponIdx]
if (weapon) {
this.rollData.weapon = duplicate(weapon)
if (toggled) {
this.rollData.weaponName = weapon.weapon.name
} else {
this.rollData.weaponName = undefined
}
weapon.applied = toggled
}
PegasusUtility.updateDamageDicePool(this.rollData)
}
/* -------------------------------------------- */
manageEquip(equipIdx, toggled) {
let equip = this.rollData.equipmentsList[equipIdx]
@ -216,6 +231,12 @@ export class PegasusRollDialog extends Dialog {
let equipIdx = $(event.currentTarget).data("equip-idx")
this.manageEquip(equipIdx, toggled)
})
html.find('.vehicle-weapon-clicked').change((event) => {
let toggled = event.currentTarget.checked
let weaponIdx = $(event.currentTarget).data("vehicle-weapon-idx")
this.manageVehicleWeapon(weaponIdx, toggled)
this.refreshDialog()
})
html.find('.pool-add-dice').click(async (event) => {
let diceKey = $(event.currentTarget).data("dice-key")

View File

@ -7,7 +7,7 @@ import { PegasusRollDialog } from "./pegasus-roll-dialog.js";
/* -------------------------------------------- */
const __level2Dice = ["d0", "d4", "d6", "d8", "d10", "d12"]
const __name2DiceValue = { "0": 0, "d0": 0, "d4": 4, "d6": 6, "d8": 8, "d10": 10, "d12": 12 }
const __dice2Level = {"d0": 0, "d4": 1, "d6": 2, "d8": 3, "d10": 4, "d12": 5}
const __dice2Level = { "d0": 0, "d4": 1, "d6": 2, "d8": 3, "d10": 4, "d12": 5 }
/* -------------------------------------------- */
export class PegasusUtility {
@ -61,8 +61,8 @@ export class PegasusUtility {
/* -------------------------------------------- */
static initGenericRoll() {
let rollData = PegasusUtility.getBasicRollData()
rollData.alias = "Dice Pool Roll",
rollData.mode = "generic"
rollData.alias = "Dice Pool Roll",
rollData.mode = "generic"
rollData.title = `Dice Pool Roll`
rollData.img = "icons/dice/d12black.svg"
rollData.isGeneric = true
@ -85,14 +85,14 @@ export class PegasusUtility {
event.preventDefault()
let rollData = PegasusUtility.initGenericRoll()
rollData.isChatRoll = true
let rollDialog = await PegasusRollDialog.create( undefined, rollData)
rollDialog.render( true )
let rollDialog = await PegasusRollDialog.create(undefined, rollData)
rollDialog.render(true)
})
}
})
}
}
/* -------------------------------------------- */
static pushInitiativeOptions(html, options) {
options.push({ name: "Apply -10", condition: true, icon: '<i class="fas fa-plus"></i>', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } })
@ -114,7 +114,7 @@ export class PegasusUtility {
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "effect-bonus-dice", key: myDice, level: effect.effect.system.effectlevel, effect: effect.effect.name,
name: "effect-bonus-dice", key: myDice, level: PegasusUtility.getLevelFromDice(myDice), effect: effect.effect.name,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
@ -128,12 +128,12 @@ export class PegasusUtility {
static updateHindranceBonusDice(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "effect-hindrance")
for (let hindrance of rollData.effectsList) {
if (hindrance && hindrance.applied && (hindrance.type == "hindrance" || (hindrance.type == "effect" && hindrance.effect?.system?.hindrance) ) ) {
let diceKey = PegasusUtility.getDiceFromLevel( (hindrance.value) ? hindrance.value : hindrance.effect.system.effectlevel)
if (hindrance && hindrance.applied && (hindrance.type == "hindrance" || (hindrance.type == "effect" && hindrance.effect?.system?.hindrance))) {
let diceKey = PegasusUtility.getDiceFromLevel((hindrance.value) ? hindrance.value : hindrance.effect.system.effectlevel)
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "effect-hindrance", key: myDice, level: hindrance.value, effect: hindrance.name,
name: "effect-hindrance", key: myDice, level: PegasusUtility.getLevelFromDice(myDice), effect: hindrance.name,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
@ -152,7 +152,7 @@ export class PegasusUtility {
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "armor-shield", key: myDice, level: armor.value,
name: "armor-shield", key: myDice, level: PegasusUtility.getLevelFromDice(myDice),
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
@ -173,7 +173,21 @@ export class PegasusUtility {
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "damage", key: myDice, level: weapon.value,
name: "damage", key: myDice, level: PegasusUtility.getLevelFromDice(myDice),
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
}
}
}
for (let weapon of rollData.vehicleWeapons) {
if (weapon.applied) {
let diceKey = PegasusUtility.getDiceFromLevel(weapon.value)
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "damage", key: myDice, level: PegasusUtility.getLevelFromDice(myDice),
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
@ -181,11 +195,11 @@ export class PegasusUtility {
}
}
rollData.dicePool = newDicePool
}
}
}
/* -------------------------------------------- */
static updateStatDicePool( rollData) {
static updateStatDicePool(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "stat")
let statDice = rollData.dicePool.find(dice => dice.name == "stat")
if (statDice.level > 0) {
@ -302,14 +316,16 @@ export class PegasusUtility {
/* -------------------------------------------- */
static async loadCompendiumData(compendium) {
const pack = game.packs.get(compendium);
return await pack?.getDocuments() ?? [];
const pack = game.packs.get(compendium)
console.log("PACK", pack, compendium)
return await pack?.getDocuments() ?? []
}
/* -------------------------------------------- */
static async loadCompendium(compendium, filter = item => true) {
let compendiumData = await PegasusUtility.loadCompendiumData(compendium);
return compendiumData.filter(filter);
let compendiumData = await PegasusUtility.loadCompendiumData(compendium)
//console.log("Comp data", compendiumData)
return compendiumData.filter(filter)
}
/* -------------------------------------------- */
@ -397,7 +413,7 @@ export class PegasusUtility {
this.rollPegasus(rollData)
character.modifyHeroLevelRemaining(-1)
} else {
ui.notifications.warn(`No more Hero Level for ${actor.name} ! Unable to reroll.`)
ui.notifications.warn(`No more Hero Level for ${character.name} ! Unable to reroll.`)
}
}
}
@ -408,7 +424,7 @@ export class PegasusUtility {
}
/* -------------------------------------------- */
static targetToken( user, token, flag) {
static targetToken(user, token, flag) {
if (flag) {
token.actor.checkIfPossible()
}
@ -447,6 +463,8 @@ export class PegasusUtility {
'systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-status.html',
'systems/fvtt-pegasus-rpg/templates/partial-vehicle-stat-block.html',
'systems/fvtt-pegasus-rpg/templates/partial-vehicle-arc.html',
'systems/fvtt-pegasus-rpg/templates/partial-item-nav.html',
'systems/fvtt-pegasus-rpg/templates/partial-item-description.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html',
@ -460,7 +478,7 @@ export class PegasusUtility {
effectName = effectName.toLowerCase()
let effect = game.items.contents.find(item => item.type == 'effect' && item.name.toLowerCase() == effectName)
if (!effect) {
let effects = await this.loadCompendium('fvtt-pegasus.effect', item => item.name.toLowerCase() == effectName)
let effects = await this.loadCompendium('fvtt-pegasus-rpg.effects', item => item.name.toLowerCase() == effectName)
let objs = effects.map(i => i.toObject())
effect = objs[0]
} else {
@ -632,7 +650,7 @@ export class PegasusUtility {
}
/* -------------------------------------------- */
static removeForeignEffect( effectData) {
static removeForeignEffect(effectData) {
if (game.user.isGM) {
console.log("Remote removal of effects", effectData)
let actor = game.canvas.tokens.get(effectData.defenderTokenId).actor
@ -660,19 +678,6 @@ export class PegasusUtility {
return chatData;
}
/* -------------------------------------------- */
static async loadCompendiumData(compendium) {
const pack = game.packs.get(compendium);
return await pack?.getDocuments() ?? [];
}
/* -------------------------------------------- */
static async loadCompendium(compendium, filter = item => true) {
let compendiumData = await this.loadCompendiumData(compendium);
//console.log("Compendium", compendiumData);
return compendiumData.filter(filter);
}
/* -------------------------------------------- */
static async showDiceSoNice(roll, rollMode) {
if (game.modules.get("dice-so-nice")?.active) {
@ -723,7 +728,7 @@ export class PegasusUtility {
if (effect.foreign) {
if (game.user.isGM) {
this.removeForeignEffect(effect)
} else {
} else {
game.socket.emit("system.fvtt-pegasus-rpg", { msg: "msg_gm_remove_effect", data: effect })
}
} else {
@ -776,7 +781,6 @@ export class PegasusUtility {
/* -------------------------------------------- */
static async rollPegasus(rollData) {
let actor = game.actors.get(rollData.actorId)
let diceFormulaTab = []
@ -824,6 +828,8 @@ export class PegasusUtility {
// And save the roll
this.saveRollData(rollData)
actor.lastRoll = rollData
console.log("Rolldata performed ", rollData, diceFormula)
}
/* -------------------------------------------- */
@ -977,10 +983,11 @@ export class PegasusUtility {
effectsList: [],
armorsList: [],
weaponsList: [],
vehicleWeapons: [],
equipmentsList: [],
optionsDiceList: PegasusUtility.getOptionsDiceList()
}
if ( !isInit) { // For init, do not display target hindrances
if (!isInit) { // For init, do not display target hindrances
PegasusUtility.updateWithTarget(rollData)
}
return rollData
@ -990,7 +997,7 @@ export class PegasusUtility {
static updateWithTarget(rollData) {
let target = PegasusUtility.getTarget()
if (target) {
console.log("TARGET ", target)
console.log("TARGET ", target)
let defenderActor = target.actor
rollData.defenderTokenId = target.id
//rollData.attackerId = this.id

View File

@ -0,0 +1,317 @@
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
import { PegasusUtility } from "./pegasus-utility.js"
import { PegasusRollDialog } from "./pegasus-roll-dialog.js"
/* -------------------------------------------- */
export class PegasusVehicleSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-pegasus-rpg", "sheet", "actor"],
template: "systems/fvtt-pegasus-rpg/templates/vehicle-sheet.html",
width: 960,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: true
});
}
/* -------------------------------------------- */
async getData() {
const objectData = this.object
let actorData = duplicate(this.object)
let formData = {
title: this.title,
id: objectData.id,
type: objectData.type,
img: objectData.img,
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
data: actorData.system,
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited,
optionsDiceList: PegasusUtility.getOptionsDiceList(),
vmsAvailable: objectData.system.modules.totalvms - objectData.system.modules.vmsused,
avgNRG: objectData.system.statistics.pc.maxnrg - objectData.system.statistics.pc.curnrg,
crewList: this.actor.getCrewList(),
totalCost: this.actor.getTotalCost(),
optionsLevel: PegasusUtility.getOptionsLevel(),
subActors: duplicate(this.actor.getSubActors()),
effects: duplicate(this.actor.getEffects()),
combatModules: duplicate(this.actor.getCombatModules()),
powerCoreModules: duplicate(this.actor.getPowercoreModules()),
vehicleHull: duplicate(this.actor.getVehicleHull()),
mobilityModules: duplicate(this.actor.getMobilityModules()),
propulsionModules: duplicate(this.actor.getPropulsionModules()),
vehicleModules: duplicate(this.actor.getVehicleModules()),
vehicleWeaponModules: duplicate(this.actor.getVehicleWeaponModules()),
options: this.options,
owner: this.document.isOwner,
editScore: this.options.editScore,
isGM: game.user.isGM
}
this.formData = formData;
console.log("VEHICLE : ", formData, this.object);
return formData;
}
/* -------------------------------------------- */
async openGenericRoll() {
let rollData = PegasusUtility.initGenericRoll()
rollData.traumaState = this.actor.getTraumaState()
let rollDialog = await PegasusRollDialog.create( this.actor, rollData);
rollDialog.render( true );
}
/* -------------------------------------------- */
async rollIDR( itemId, diceValue) {
let item = this.actor.items.get( itemId) ?? {name: "Unknown"}
let myRoll = new Roll(diceValue+"x").roll({ async: false })
await PegasusUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
content: `${this.actor.name} has roll IDR for ${item.name} : ${myRoll.total}`
}
ChatMessage.create(chatData)
}
/* -------------------------------------------- */
/** @override */
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
html.bind("keydown", function(e) { // Ignore Enter in actores sheet
if (e.keyCode === 13) return false;
});
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
const item = this.actor.items.get( itemId );
item.sheet.render(true);
});
// Delete Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item")
PegasusUtility.confirmDelete(this, li)
})
html.find('.item-add').click(ev => {
let dataType = $(ev.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
})
html.find('.current-speed-change').click(ev => {
let speed = ev.currentTarget.value
this.actor.manageCurrentSpeed(speed)
});
html.find('.equip-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.equipActivate( itemId)
});
html.find('.equip-deactivate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.equipDeactivate( itemId)
});
html.find('.effect-used').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
this.actor.perkEffectUsed( itemId)
});
html.find('.member-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let actorId = li.data("actor-id")
this.actor.delCrew(actorId)
});
html.find('.quantity-minus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), -1 );
} )
html.find('.quantity-plus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), +1 );
} )
html.find('.vehicle-current-nrg-minus').click(event => {
this.actor.incDecNRG( -1 );
} )
html.find('.vehicle-current-nrg-plus').click(event => {
this.actor.incDecNRG( 1 );
} )
html.find('.ammo-minus').click(event => {
const li = $(event.currentTarget).parents(".item")
this.actor.incDecAmmo( li.data("item-id"), -1 );
} );
html.find('.ammo-plus').click(event => {
const li = $(event.currentTarget).parents(".item")
this.actor.incDecAmmo( li.data("item-id"), +1 )
} );
html.find('.vehicle-stun-minus').click(event => {
this.actor.modifyVehicleStun( -1 )
} )
html.find('.vehicle-stun-plus').click(event => {
this.actor.modifyVehicleStun( 1 )
} )
html.find('.momentum-minus').click(event => {
this.actor.modifyMomentum( -1 )
} )
html.find('.momentum-plus').click(event => {
this.actor.modifyMomentum( 1 )
} )
html.find('.unarmed-attack').click((event) => {
this.actor.rollUnarmedAttack();
});
html.find('.generic-pool-roll').click((event) => {
this.openGenericRoll()
} );
html.find('.attack-melee').click((event) => {
this.actor.rollPoolFromVehicle( 'com', false, "melee-atk")
});
html.find('.damage-melee').click((event) => {
this.actor.rollPoolFromVehicle( 'str', false, "melee-dmg")
});
html.find('.attack-ranged').click((event) => {
this.actor.rollPoolFromVehicle( 'agi', false, "ranged-atk")
});
html.find('.damage-ranged').click((event) => {
this.actor.rollPoolFromVehicle( 'per', false, "ranged-dmg");
});
html.find('.defense-roll').click((event) => {
this.actor.rollPoolFromVehicle( 'def', true, "defense");
});
html.find('.damage-resistance').click((event) => {
this.actor.rollVehicleDamageResistance( );
});
html.find('.roll-stat').click((event) => {
const statId = $(event.currentTarget).data("stat-key");
this.actor.rollStat(statId);
});
html.find('.roll-mr').click((event) => {
this.actor.rollMR();
});
html.find('.roll-idr').click((event) => {
const diceValue = $(event.currentTarget).data("dice-value")
const li = $(event.currentTarget).parents(".item")
this.rollIDR( li.data("item-id"), diceValue)
})
html.find('.weapon-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weaponId = li.data("item-id");
this.actor.rollWeapon(weaponId);
});
html.find('.armor-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const armorId = li.data("item-id");
this.actor.rollArmor(armorId);
});
html.find('.weapon-damage-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weaponId = li.data("item-id");
this.actor.rollWeapon(weaponId, true);
});
html.find('.weapon-damage').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weapon = this.actor.getOwnedItem(li.data("item-id"));
this.actor.rollDamage(weapon, 'damage');
});
html.find('.lock-unlock-sheet').click((event) => {
this.options.editScore = !this.options.editScore;
this.render(true);
});
html.find('.item-link a').click((event) => {
const itemId = $(event.currentTarget).data("item-id");
const item = this.actor.getOwnedItem(itemId);
item.sheet.render(true);
});
html.find('.item-equip').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.actor.equipItem( li.data("item-id") );
this.render(true);
});
html.find('.update-field').change(ev => {
const fieldName = $(ev.currentTarget).data("field-name");
let value = Number(ev.currentTarget.value);
this.actor.update( { [`${fieldName}`]: value } );
})
html.find('.member-view').click((event) => {
const li = $(event.currentTarget).parents(".item")
let actorId = li.data("actor-id")
const actor = game.actors.get( actorId )
actor.sheet.render(true)
})
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {
const position = super.setPosition(options);
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
return position;
}
/* -------------------------------------------- */
async _onDropItem(event, dragData) {
const item = fromUuidSync(dragData.uuid)
if (item == undefined) {
item = this.actor.items.get( dragData.uuid )
}
let ret = await this.actor.preprocessItemVehicle( event, item, true )
if ( ret ) {
super._onDropItem(event, dragData)
}
}
/* -------------------------------------------- */
async _onDropActor(event, dragData) {
const actor = fromUuidSync(dragData.uuid)
if (actor) {
this.actor.addCrew(actor.id)
}else {
ui.notifications.warn("This actor is not found and can't be added to the Vehicle's crew.")
}
super._onDropActor(event)
}
/* -------------------------------------------- */
/** @override */
_updateObject(event, formData) {
// Update the Actor
return this.object.update(formData)
}
}

View File

@ -1235,8 +1235,7 @@ ul, li {
/*************************************************************/
#pause
{
font-size: 2rem;
{ font-size: 2rem;
}
#pause > h3
{
@ -1285,6 +1284,8 @@ Focus FOC: #ff0084
background-color: black;
background: black;
}
.color-class-fc,
.color-class-man,
.color-class-agi,
.color-class-ranged-attack {
background-color: #02a41d;
@ -1303,10 +1304,12 @@ Focus FOC: #ff0084
.color-class-meleedmg {
background-color: #5f3d00;
}
.color-class-hr,
.color-class-phy,
.color-class-dmgres {
background-color: #990304;
}
.color-class-ad,
.color-class-mr {
background-color: #050505;
}
@ -1325,6 +1328,7 @@ Focus FOC: #ff0084
.color-class-ranged-damage {
background-color: #f9c801;
}
.color-class-pc,
.color-class-foc {
background-color: #ff0084;
}
@ -1376,6 +1380,10 @@ Focus FOC: #ff0084
max-height: 42px;
min-height: 36px;
}
.item-stat-roll-vehicle {
max-height: 102px;
min-height: 102px;
}
.item-stat-roll select, .item-stat-roll input {
margin-top: 4px;
margin-right: 2px;

View File

@ -1,6 +1,5 @@
{
"description": "Pegasus RPG system for FoundryVTT",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.0.zip",
"esmodules": [
"modules/pegasus-main.js"
],
@ -10,7 +9,8 @@
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
"path": "lang/en.json",
"flags": {}
}
],
"authors": [
@ -19,14 +19,11 @@
"flags": {}
}
],
"library": false,
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/raw/branch/master/system.json",
"manifestPlusVersion": "1.0.0",
"media": [],
"compatibility": {
"minimum": "10",
"verified": "10.284",
"verified": "10.285",
"maximum": "10"
},
"id": "fvtt-pegasus-rpg",
@ -35,241 +32,217 @@
"type": "Item",
"label": "Specialisations",
"name": "specialisations",
"path": "./packs/specialisations.db",
"path": "packs/specialisations.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"specialisation"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Racial Abilities",
"name": "racial-abilities",
"path": "./packs/racial-abilities.db",
"path": "packs/racial-abilities.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"ability"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Perks",
"name": "perk",
"path": "./packs/perk.db",
"path": "packs/perk.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"perk"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Powers",
"name": "powers",
"path": "./packs/powers.db",
"path": "packs/powers.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"power"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Race",
"name": "race",
"path": "./packs/race.db",
"path": "packs/race.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"race"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Role",
"name": "role",
"path": "./packs/role.db",
"path": "packs/role.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"role"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Effects",
"name": "effects",
"path": "./packs/effects.db",
"path": "packs/effects.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"effect"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Armour",
"name": "armour",
"path": "./packs/armour.db",
"path": "packs/armour.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"armour"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Equipment",
"name": "equipment",
"path": "./packs/equipment.db",
"path": "packs/equipment.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"equipment"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Shields",
"name": "shields",
"path": "./packs/shields.db",
"path": "packs/shields.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"shield"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Melee Weapons",
"name": "melee-weapons",
"path": "./packs/melee-weapons.db",
"path": "packs/melee-weapons.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"weapon", "melee"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Ranged Weapons",
"name": "ranged-weapons",
"path": "./packs/ranged-weapons.db",
"path": "packs/ranged-weapons.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"weapon", "ranged"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Currency",
"name": "currency",
"path": "./packs/currency.db",
"path": "packs/currency.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"currency", "money"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Macros",
"name": "macro-commands",
"path": "./packs/macro-commands.db",
"path": "packs/macro-commands.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"macro", "command"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Weapon modules",
"name": "vm-vehicle-weapons-modules",
"path": "./packs/vm-vehicle-weapons-modules.db",
"path": "packs/vm-vehicle-weapons-modules.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"weapon", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Propulsion modules",
"name": "vm-vehicle-propulsion-modules",
"path": "./packs/vm-vehicle-propulsion-modules.db",
"path": "packs/vm-vehicle-propulsion-modules.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"propulsion", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Power core modules",
"name": "vm-vehicle-power-core-module",
"path": "./packs/vm-vehicle-power-core-module.db",
"path": "packs/vm-vehicle-power-core-module.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"propulsion", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Modules",
"name": "vm-vehicle-modules",
"path": "./packs/vm-vehicle-modules.db",
"path": "packs/vm-vehicle-modules.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"module", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Mobility module",
"name": "vm-vehicle-mobility-module",
"path": "./packs/vm-vehicle-mobility-module.db",
"path": "packs/vm-vehicle-mobility-module.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"mobility", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Hull module",
"name": "vm-vehicle-hulls",
"path": "./packs/vm-vehicle-hulls.db",
"path": "packs/vm-vehicle-hulls.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"hull", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Combat module",
"name": "vm-vehicle-combat-module",
"path": "./packs/vm-vehicle-combat-module.db",
"path": "packs/vm-vehicle-combat-module.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"combat", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vices",
"name": "vices",
"path": "./packs/vices.db",
"path": "packs/vices.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"vice"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Virtues",
"name": "virtues",
"path": "./packs/virtues.db",
"path": "packs/virtues.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"virtue"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "ZZ-Admin-FX",
"name": "zz-adminfx-zz",
"path": "./packs/zz-adminfx-zz.db",
"path": "packs/zz-adminfx-zz.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"fx"
]
"private": false,
"flags": {}
}
],
"primaryTokenAttribute": "secondary.health",
@ -278,9 +251,9 @@
"styles": [
"styles/simple.css"
],
"templateVersion": 109,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "10.0.0",
"background" : "./images/ui/pegasus_welcome_page.webp"
}
"version": "10.0.12",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.12.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
}

View File

@ -10,6 +10,7 @@
"name": "",
"age": 0,
"size": "",
"sizenum": 0,
"weight": "",
"hair": "",
"sex": "",
@ -199,26 +200,31 @@
"description": ""
},
"vehicle": {
"crew": [],
"statistics": {
"fc": {
"label": "FC",
"abbrev": "fc",
"level": 0,
"currentlevel": 0
"currentlevel": 0,
"col": 1
},
"man": {
"label": "FC",
"abbrev": "fc",
"label": "MAN",
"abbrev": "man",
"dicevalue": "",
"level": 0,
"currentlevel": 0
"currentlevel": 0,
"turningarc45": 0,
"col": 1
},
"hr": {
"label": "HR",
"abbrev": "hr",
"level": 0,
"currentlevel": 0,
"size": 0
"size": 0,
"col": 2
},
"pc": {
"label": "PC",
@ -226,13 +232,16 @@
"level": 0,
"currentlevel": 0,
"avgnrg": 0,
"curnrg": 0
"curnrg": 0,
"maxnrg": 0,
"col": 2
},
"mr": {
"label": "MR",
"abbrev": "mr",
"level": 0,
"currentlevel": 0
"currentlevel": 0,
"col": 3
},
"ad": {
"label": "A/D",
@ -240,7 +249,8 @@
"level": 0,
"currentlevel": 0,
"accmode": "",
"currentspeed": ""
"currentspeed": "",
"col": 3
}
},
"stun": {
@ -257,7 +267,7 @@
"activatedmoduleenergy": 0,
"vdp": 0,
"vehiculevalue": 0,
"availablevms": 0,
"totalvms": 0,
"vmsused": 0,
"totalcost": 0
},
@ -275,34 +285,46 @@
},
"arcs": {
"frontarc": {
"label": "Fore Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": false
},
"reararc": {
"label": "Rear Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": false
},
"rightarc": {
"label": "Right Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": false
},
"leftarc": {
"label": "Left Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": false
},
"toparc": {
"label": "Top Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": true
},
"bottomarc": {
"label": "Bottom Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": true
}
}
}
@ -655,6 +677,7 @@
"range": "",
"idr": "",
"cost": 0,
"size": 0,
"space": 0
},
"vehicleweaponmodule": {

View File

@ -848,8 +848,8 @@
<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>
<input type="text" class="" name="system.biodata.size" value="{{data.biodata.size}}" data-dtype="String" />
<label class="generic-label">Height/Weight</label>
<input type="text" class="" name="system.biodata.weight" value="{{data.biodata.weight}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Eyes</label>
@ -864,9 +864,9 @@
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Weight</label>
<input type="text" class="" name="system.biodata.weight" value="{{data.biodata.weight}}"
data-dtype="String" />
<label class="generic-label">Size</label>
<input type="text" class="" name="system.biodata.sizenum" value="{{data.biodata.sizenum}}"
data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label">Sex</label>
@ -986,6 +986,14 @@
<label class="attribute-value checkbox"><input type="checkbox" class="change-desires"
name="system.biodata.desiresactive" {{checked data.biodata.desiresactive}} /> Active ?</label>
</li>
<li class="flexrow">
<label class="short-label">Morality : </label>
<input type="text" class="" name="system.biodata.morality" value="{{data.biodata.morality}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Morality threshold : </label>
<input type="text" class="" name="system.biodata.moralitythreshold" value="{{data.biodata.moralitythreshold}}" disabled data-dtype="Number" />
</li>
</ul>
<h3>Catchphrase : </h3>
@ -1026,14 +1034,6 @@
<label class="short-label">Bonus selection : </label>
<input type="text" class="" name="system.biodata.bonusselection" value="{{data.biodata.bonusselection}}" data-dtype="String" />
</li>
<li class="flexrow">
<label class="short-label">Morality : </label>
<input type="text" class="" name="system.biodata.morality" value="{{data.biodata.morality}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Morality threshold : </label>
<input type="text" class="" name="system.biodata.moralitythreshold" value="{{data.biodata.moralitythreshold}}" disabled data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Hero Level (max) : </label>
<select class="status-small-label color-class-common" type="text" name="system.biodata.maxlevelremaining" value="{{data.biodata.maxlevelremaining}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>

View File

@ -25,7 +25,7 @@
<li>Weapon Damage Dice : {{weaponDamageDice}}</li>
{{/if}}
{{#if isResistance}}
<li>Armor Resistance Dice : {{armor.data.resistanceDice}}</li>
<li>Armor Resistance Dice : {{armor.system.resistanceDice}}</li>
{{/if}}
{{#if stat}}
<li>Statistic : {{stat.label}}</li>
@ -38,7 +38,11 @@
<li>Weapon : {{weaponName}}</li>
{{/if}}
{{#if weapon}}
<li>Damage type : {{weapon.weapon.data.damagetype}} {{weapon.weapon.data.damagetypelevel}}</li>
{{#if vehicle}}
<li>Damage type : {{weapon.weapon.system.damagetype}}</li>
{{else}}
<li>Damage type : {{weapon.weapon.system.damagetype}} {{weapon.weapon.system.damagetypelevel}}</li>
{{/if}}
{{/if}}
{{#if isResistance}}

View File

@ -124,7 +124,7 @@
<input type="text" class="padd-right" name="system.deactivatedtext" value="{{data.deactivatedtext}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">Power Level Cost</label>
<li class="flexrow"><label class="generic-label">PPP Used to Purchase</label>
<input type="text" class="input-numeric-short padd-right" name="system.powerlevelcost" value="{{data.powerlevelcost}}"
data-dtype="Number" />
</li>

View File

@ -29,7 +29,7 @@
<input type="text" class="" name="system.ad" value="{{data.ad}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Top Speed (TS)</label>
<li class="flexrow"><label class="generic-label">Top Speed (TS) bonus</label>
<input type="text" class="" name="system.topspeed" value="{{data.topspeed}}" data-dtype="Number"/>
</li>

View File

@ -54,12 +54,12 @@
<ul>
<li class="flexrow"><label class="generic-label">Selectable Stats ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.selectablestats" {{checked
data.selectablestats}} /></label>
system.selectablestats}} /></label>
</li>
{{#if data.selectablestats}}
<li class="flexrow"><label class="generic-label">Select 1 stat only once?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.statsonlyonce" {{checked
data.statsonlyonce}} /></label>
system.statsonlyonce}} /></label>
</li>
<li class="flexrow"><label class="generic-label">Number of selectable stats</label>
<input type="text" class="input-numeric-short padd-right" name="system.numberstats" value="{{data.numberstats}}"

View File

@ -50,7 +50,7 @@
<label class="attribute-value checkbox"><input type="checkbox" name="system.activated" {{checked data.activated}}/></label>
</li>
<li class="flexrow"><label class="generic-label">NRG</label>
<li class="flexrow"><label class="generic-label">NRG Cost</label>
<input type="text" class="" name="system.nrg" value="{{data.nrg}}" data-dtype="Number"/>
</li>

View File

@ -1,4 +1,4 @@
<option value="none">None</option>
<option value="fullstop">Full stop</option>
<option value="crawling">Crawling</option>
<option value="slow">Slow</option>
<option value="average">Average</option>

View File

@ -4,10 +4,10 @@
<ul>
{{#each effectsList as |effect idx|}}
{{#if effect.effect.data.hindrance}}
{{#if effect.effect.system.hindrance}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
<label class="generic-label">Target Hindrance : {{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">Target Hindrance : {{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
</li>
{{else}}
{{#if (eq type "hindrance")}}
@ -30,13 +30,13 @@
</li>
{{/if}}
{{#if (count effect.effect.data.specaffected)}}
{{#each effect.effect.data.specaffected as |spec idx2|}}
{{#if (count effect.effect.system.specaffected)}}
{{#each effect.effect.system.specaffected as |spec idx2|}}
{{#if (eq @root.specName spec.name)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
@ -44,31 +44,31 @@
{{/if}}
{{/each}}
{{else}}
{{#if (eq @root.statKey effect.effect.data.stataffected)}}
{{#if (eq @root.statKey effect.effect.system.stataffected)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{else}}
{{#if (eq @root.subKey effect.effect.data.stataffected)}}
{{#if (eq @root.subKey effect.effect.system.stataffected)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{else}}
{{#if (eq effect.effect.data.stataffected "all")}}
{{#if (eq effect.effect.system.stataffected "all")}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
@ -125,3 +125,17 @@
</ul>
{{/if}}
{{#if (notEmpty vehicleWeapons)}}
<label>Vehicle Weapons</label>
<ul>
{{#each vehicleWeapons as |weapon idx|}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="vehicle-weapon-clicked" id="vehicle-weapon-{{idx}}" data-vehicle-weapon-idx="{{idx}}" {{checked weapon.applied}}/></label>
<label class="generic-label padd-right">{{weapon.label}} ({{weapon.value}})</label>
</li>
{{/each}}
</ul>
{{/if}}

View File

@ -0,0 +1,46 @@
<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">{{arc.label}}</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Top speed</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Shield</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Armour</label>
</span>
</li>
<li class="item flexrow list-item list-item-shadow" data-arc-name="{{idx}}">
<span class="item-name-img">&nbsp;</span>
<span class="item-name-label-long">&nbsp;</span>
<span class="item-field-label-long">
<select type="text" name="system.arcs.{{idx}}.topspeed" value="{{arc.topspeed}}" data-dtype="String" disabled>
{{#select arc.topspeed}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-vehicle-speed.html}}
{{/select}}
</select>
</span>
<span class="item-field-label-long">
<select type="text" name="system.arcs.{{idx}}.shieldlevel" value="{{arc.shieldlevel}}" data-dtype="Number">
{{#select arc.shieldlevel}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
</span>
<span class="item-field-label-long">
<select type="text" name="system.arcs.{{idx}}.armourlevel" value="{{arc.armourlevel}}" data-dtype="Number">
{{#select arc.armourlevel}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
</span>
</li>
</ul>

View File

@ -0,0 +1,82 @@
<li class="item flexrow list-item color-class-{{lower stat.abbrev}} item-stat-roll-vehicle" data-attr-key="{{key}}">
<div class="flexcol">
<div class="flexrow">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/icon_vehicle_{{stat.abbrev}}.webp">
</span>
<span class="stat-label stat-margin" name="{{key}}">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin"
data-stat-key="{{key}}">{{upper stat.abbrev}}</a></h4>
</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.level"
value="{{stat.level}}" data-dtype="Number" disabled>
{{#select stat.level}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
</div>
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">Current level</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.currentlevel"
value="{{stat.currentlevel}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.currentlevel}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
</div>
{{#if (eq key "man")}}
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">45° Turning Arcs</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.turningarc45"
value="{{stat.turningarc45}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.turningarc45}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
</div>
{{/if}}
{{#if (eq key "hr")}}
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">Size</span>
<input type="text" class="input-numeric-short" name="system.statistics.{{key}}.size" value="{{stat.size}}" data-dtype="Number" />
</div>
{{/if}}
{{#if (eq key "pc")}}
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">Cur NRG</span>
<input type="text" class="input-numeric-short" name="system.statistics.{{key}}.curnrg" value="{{stat.curnrg}}" data-dtype="Number" />
<span class="padd-right status-small-label no-grow">
<a class="vehicle-current-nrg-plus plus-minus-button">+</a>
<a class="vehicle-current-nrg-minus plus-minus-button">&nbsp;-</a>
</span>
<span class="stat-label stat-margin" name="{{key}}">Av NRG</span>
<input type="text" class="input-numeric-short" value="{{@root.avgNRG}}" data-dtype="Number" disabled/>
<span class="stat-label stat-margin" name="{{key}}">Max NRG</span>
<input type="text" class="input-numeric-short" name="system.statistics.{{key}}.maxnrg" value="{{stat.maxnrg}}" data-dtype="Number" disabled />
</div>
{{/if}}
{{#if (eq key "ad")}}
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">Acc Mode</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.accmode"
value="{{stat.accmode}}" data-dtype="String" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.accmode}}
<option value="acc">ACC</option>
<option value="dec">DEC</option>
{{/select}}
</select>
<span class="stat-label stat-margin" name="{{key}}">Curr. speed</span>
<select class="status-small-label color-class-common current-speed-change" type="text" name="system.statistics.{{key}}.currentspeed"
value="{{stat.currentspeed}}" data-dtype="String" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.currentspeed}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-vehicle-speed.html}}
{{/select}}
</select>
</div>
{{/if}}
</div>
</li>

View File

@ -3,7 +3,7 @@
{{#if img}}
<img class="actor-icon" src="{{img}}" data-edit="img" title="{{name}}" />
{{/if}}
<h1 class="dialog-roll-title roll-dialog-header">{{title}}</h1>
<h1 class="dialog-roll-title roll-dialog-header">{{title}} {{#if vehicle}} from {{vehicle.name}} {{/if}}</h1>
</header>
<div class="grid grid-2col">
@ -14,7 +14,7 @@
{{else}}
<div class="flexrow">
<span class="roll-dialog-label">Stat Dice ({{stat.label}}) : </span>
<span class="roll-dialog-label">Stat ({{stat.label}} {{#if statVehicle}}+{{statVehicle.label}}{{/if}}) : </span>
<select class="roll-dialog-label" id="statDicesLevel" type="text" name="statDicesLevel"
value="{{statDicesLevel}}" data-dtype="Number" {{#if statKey}}disabled{{/if}}>
{{#select statDicesLevel}}

View File

@ -0,0 +1,900 @@
<form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}}
<header class="sheet-header">
<div class="header-fields">
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
<div class="flexrow">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="flexcol">
<div class="flexrow">
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 1)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
</ul>
</div>
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 2)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
</ul>
</div>
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 3)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
</ul>
</div>
</div>
</div>
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="modules">Vehicle Modules</a>
<a class="item" data-tab="crew">Crew</a>
<a class="item" data-tab="cargo">Cargo Hold</a>
<a class="item" data-tab="details">Vehicle Details</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Combat Tab --}}
<div class="tab fight" data-group="primary" data-tab="combat">
<div class="flexcol">
<div class="flexrow">
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-melee"><a class="combat-button attack-melee flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/COM.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Melee Attack</span>
</a>
</li>
<li class="item flexrow list-item color-class-meleedmg"><a class="combat-button damage-melee flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/STR.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Melee/Thrown Damage</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-ranged-attack"><a class="combat-button attack-ranged flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/AGI.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Ranged Attack</span>
</a>
</li>
<li class="item flexrow list-item color-class-ranged-damage"><a class="combat-button damage-ranged flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PER.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Ranged Damage</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-defence"><a class="combat-button defense-roll flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/DEF.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Defence</span>
</a>
</li>
<li class="item flexrow list-item color-class-dmgres"><a class="combat-button damage-resistance flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PHY.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Damage Resistance</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<span class="flexrow">
<h3>Stun</h3>
<span class="status-small-label no-grow">
<a class="vehicle-stun-plus plus-minus-button">+</a>
<a class="vehicle-stun-minus plus-minus-button">&nbsp;-</a>
</span>
</span>
<ul class="stat-list alternate-list">
<li class="item stat flexrow list-item">
<span class="generic-label small-label">Current</span>
<input type="text" class="" name="system.combat.stunlevel" value="{{data.combat.stunlevel}}"
data-dtype="Number" />
<span class="generic-label small-label">Threshold</span>
<input type="text" class="" name="system.combat.stunthreshold" value="{{data.combat.stunthreshold}}"
data-dtype="Number" />
</li>
</ul>
</div>
</div>
<div class="flexrow">
<span class="item-name-label-header-long">
<label class="items-title-text">Direction of travel</label>
<select type="text" name="system.secondary.traveldirection" value="{{data.secondary.traveldirection}}" data-dtype="String">
{{#select data.secondary.traveldirection}}
{{#each data.arcs as |arc idx|}}
<option value="{{idx}}">{{arc.label}}</option>
{{/each}}
{{/select}}
</select>
</span>
<span class="item-name-label-header-long">
<label class="items-title-text">Move range</label>
<select type="text" name="system.secondary.moverange" value="{{data.secondary.moverange}}" data-dtype="String">
{{#select data.secondary.moverange}}
<option value="nomovement">No Movement</option>
<option value="threatzone">Threat zone</option>
<option value="close">Close</option>
<option value="medium">Medium</option>
<option value="long">Long</option>
<option value="extreme">Extreme</option>
{{/select}}
</select>
</span>
</div>
<div class="flexrow">
<span class="item-name-label-header-long">
<label class="items-title-text">Using 3D combat</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.secondary.is3Dcombat" {{checked
data.secondary.is3Dcombat}} /></label>
</span>
{{#if data.secondary.is3Dcombat}}
<span class="item-name-label-header-long">
<label class="items-title-text">Elevation</label>
<input type="text" class="input-numeric-short padd-right" name="system.secondary.elevation" value="{{data.secondary.elevation}}" data-dtype="Number"/>
</span>
<span class="item-name-label-header-long">
<label class="items-title-text">Angle</label>
<select type="text" name="system.secondary.angle" value="{{data.secondary.angle}}" data-dtype="String">
{{#select data.secondary.angle}}
<option value="level">Level</option>
<option value="angled">Angled</option>
<option value="Vertical">Vertical</option>
{{/select}}
</select>
</span>
{{/if}}
</div>
<div>
{{#each data.arcs as |arc idx|}}
{{#if arc.is3D}}
{{#if @root.data.secondary.is3Dcombat}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-arc.html idx=idx arc=arc}}
{{/if}}
{{else}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-arc.html idx=idx arc=arc}}
{{/if}}
{{/each}}
</div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long2">
<h3><label class="items-title-text">Effects</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Level</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">P/N</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Stat</label>
</span>
</li>
{{#each effects as |effect key|}}
<li class="item stat flexrow list-item list-item-shadow" data-arme-id="{{effect.id}}"
data-item-id="{{effect._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{effect.img}}" /></a>
<span class="item-name-label-long2">{{effect.name}}</span>
<span class="item-field-label-short">{{effect.system.effectlevel}}</span>
<span class="item-field-label-short">{{upperFirst effect.system.type}}</span>
<span class="item-field-label-short">{{upperFirst effect.datsystema.genre}}</span>
<span class="item-field-label-short">{{upper effect.system.stataffected}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Modules Tab --}}
<div class="tab items" data-group="primary" data-tab="modules">
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item stat flexrow list-item">
<span class="generic-label small-label "><strong>VDP</strong></span>
<input type="text" class="input-numeric-short padd-right" name="system.modules.vdp" value="{{data.modules.vdp}}"
data-dtype="Number" />
<span class="generic-label small-label"><strong>Vehicle Value</strong></span>
<input type="text" class="input-numeric-short" name="system.modules.vehiculevalue" value="{{data.modules.vehiculevalue}}"
data-dtype="Number" />
<span class="generic-label small-label"><strong>Total cost</strong></span>
<input type="text" class="" value="{{totalCost}}"
data-dtype="Number" disabled />
<span class="generic-label small-label "><strong>VMS</strong></span>
<span class="generic-label small-label">Total</span>
<input type="text" class="input-numeric-short" name="system.modules.totalvms" value="{{data.modules.totalvms}}"
data-dtype="Number" disabled />
<span class="generic-label small-label">Available</span>
<input type="text" class="input-numeric-short" name="system.modules.vmsavailable" value="{{data.modules.vmsAvailable}}"
data-dtype="Number" disabled />
<span class="generic-label small-label">Used</span>
<input type="text" class="input-numeric-short" name="system.modules.vmsused" value="{{data.modules.vmsused}}"
data-dtype="Number" disabled />
</li>
</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">1 - Hull</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Size</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Hull Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">HR</label>
</span>
<span class="item-field-label-short">
<label class="short-label">MAN</label>
</span>
<span class="item-field-label-short">
<label class="short-label">VMS</label>
</span>
</li>
{{#each vehicleHull as |hull key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{hull._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{hull.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{hull.name}}</a></span>
<span class="item-field-label-short">{{hull.system.size}}</span>
<span class="item-field-label-medium">{{hull.system.hulltype}}</span>
<span class="item-field-label-short">{{hull.system.hr}}</span>
<span class="item-field-label-short">{{hull.system.man}}</span>
<span class="item-field-label-short">{{hull.system.vms}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="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">2 - Power core</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">PC</label>
</span>
<span class="item-field-label-short">
<label class="short-label">NRG</label>
</span>
</li>
{{#each powerCoreModules as |powercore key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{powercore._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{powercore.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{powercore.name}}</a></span>
<span class="item-field-label-medium">{{powercore.system.coretype}}</span>
<span class="item-field-label-short">{{powercore.system.pc}}</span>
<span class="item-field-label-short">{{powercore.system.nrg}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="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">3 -Mobility</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Vehicle Category</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Quality</label>
</span>
<span class="item-field-label-short">
<label class="short-label">MR</label>
</span>
<span class="item-field-label-short">
<label class="short-label">TS:F</label>
</span>
<span class="item-field-label-short">
<label class="short-label">TS:S</label>
</span>
<span class="item-field-label-short">
<label class="short-label">TS:R</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">MAN Adj.</label>
</span>
</li>
{{#each mobilityModules as |mobility key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{mobility._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{mobility.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{mobility.name}}</a></span>
<span class="item-field-label-long">{{mobility.system.vehiclecategory}}</span>
<span class="item-field-label-medium">{{mobility.system.quality}}</span>
<span class="item-field-label-short">{{mobility.system.mr}}</span>
<span class="item-field-label-short">{{mobility.system.ts_f}}</span>
<span class="item-field-label-short">{{mobility.system.ts_s}}</span>
<span class="item-field-label-short">{{mobility.system.ts_r}}</span>
<span class="item-field-label-medium">{{mobility.system.man}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="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">4 - Propulsion</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Quality</label>
</span>
<span class="item-field-label-short">
<label class="short-label">A/D</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">TS:F Adj.</label>
</span>
</li>
{{#each propulsionModules as |propulsion key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{propulsion._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{propulsion.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{propulsion.name}}</a></span>
<span class="item-field-label-medium">{{propulsion.system.quality}}</span>
<span class="item-field-label-short">{{propulsion.system.ad}}</span>
<span class="item-field-label-short">{{propulsion.system.topspeed}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="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">5 - Combat</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Quality</label>
</span>
<span class="item-field-label-short">
<label class="short-label">FC</label>
</span>
</li>
{{#each combatModules as |combat key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{combat._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{combat.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{combat.name}}</a></span>
<span class="item-field-label-long">{{combat.system.combattype}}</span>
<span class="item-field-label-short">{{combat.system.fc}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="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">Vehicles modules</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Category</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Location</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Security</label>
</span>
<span class="item-field-label-short">
<label class="short-label">NRG</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Range</label>
</span>
<span class="item-field-label-short">
<label class="short-label">IDR</label>
</span>
</li>
{{#each vehicleModules as |vehiclemod key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{vehiclemod._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{vehiclemod.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{vehiclemod.name}}</a></span>
<span class="item-field-label-long">{{vehiclemod.system.category}}</span>
<span class="item-field-label-long">{{vehiclemod.system.location}}</span>
<span class="item-field-label-long">{{vehiclemod.system.security}}</span>
<span class="item-field-label-short">{{vehiclemod.system.nrg}}</span>
<span class="item-field-label-medium">{{vehiclemod.system.range}}</span>
<span class="item-field-label-short">{{vehiclemod.system.idr}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="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">Vehicles weapons</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Site</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Location</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">AoE</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Turret</label>
</span>
<span class="item-field-label-short">
<label class="short-label">NRG</label>
</span>
<span class="item-field-label-short">
<label class="short-label">IDR</label>
</span>
</li>
{{#each vehicleWeaponModules as |weapon key|}}
<li class="item stat 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-spec">{{weapon.name}}</a></span>
<span class="item-field-label-long">{{weapon.system.site}}</span>
<span class="item-field-label-long">{{weapon.system.location}}</span>
<span class="item-field-label-short">{{weapon.system.dmg}}</span>
<span class="item-field-label-medium">{{weapon.system.aoe}}</span>
<span class="item-field-label-medium">{{weapon.system.turrent}}</span>
<span class="item-field-label-short">{{weapon.system.nrg}}</span>
<span class="item-field-label-short">{{weapon.system.idr}}</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>
{{!-- Crew Tab --}}
<div class="tab items" data-group="primary" data-tab="crew">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Crew</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each crewList as |member key|}}
<li class="item flexrow list-item list-item-shadow" data-actor-id="{{member.id}}">
<a class="member-view item-name-img" title="View Actor"><img class="sheet-competence-img"
src="{{member.img}}" /></a>
<span class="item-name-label">{{member.name}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control member-delete" title="Delete Member"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{!-- Cargo Tab --}}
<div class="tab equipment" data-group="primary" data-tab="cargo">
<div class="flexrow">
<h3>Encumbrance</h3>
<span class="small-label">Current : {{encCurrent}}</span>
<span class="small-label">Capacity : {{encCapacity}}</span>
<span class="small-label">Hindrance : {{encHindrance}}</span>
</div>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Money</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Qty</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="money" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each moneys as |money key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{money.img}}" /></a>
<span class="item-name-label">{{money.name}}</span>
<span class="item-field-label-long"><label>
{{money.system.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>
<span class="item-field-label-medium">
<label>{{money.system.weight}}</label>
</span>
<span class="item-field-label-medium">
{{#if money.system.idrDice}}
<a class="roll-idr" data-dice-value="{{money.system.idrDice}}">{{money.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Weapons</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Attack</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Damage</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">DMGT</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Ammo</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each weapons as |weapon key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{weapon.img}}" /></a>
<span class="item-name-label">{{weapon.name}}</span>
<span class="item-field-label-short"><label>{{upper weapon.system.statistic}}</label></span>
<span class="item-field-label-short"><label>{{upper weapon.system.damagestatistic}}</label></span>
<span class="item-field-label-short"><label>{{weapon.system.damageDice}}</label></span>
<span class="item-field-label-medium"><label>{{weapon.system.damagetype}} ({{weapon.system.damagetypelevel}})</label></span>
{{#if (gt weapon.system.ammomax 0)}}
<span class="item-field-label-long"><label>{{weapon.system.ammocurrent}}/{{weapon.system.ammomax}}
(<a class="ammo-minus plus-minus-button"> -</a>/<a class="ammo-plus plus-minus-button">+</a>)
</label></span>
{{else}}
<span class="item-field-label-long"><label>-</label>
</span>
{{/if}}
<span class="item-field-label-medium">
{{#if (count weapon.system.effects)}}
{{#if weapon.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short"><label>{{weapon.system.weight}}</label></span>
<span class="item-field-label-medium">
{{#if weapon.system.idrDice}}
<a class="roll-idr" data-dice-value="{{weapon.system.idrDice}}">{{weapon.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if weapon.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Armors</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Stat</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG RES</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Loc</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="armor" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each armors as |armor key|}}
<li class="item list-item flexrow list-item-shadow" data-item-id="{{armor._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{armor.img}}" /></a>
<span class="item-name-label">{{armor.name}}</span>
<span class="item-field-label-short">{{upper armor.system.statistic}}</span>
<span class="item-field-label-short">{{armor.system.resistanceDice}}</span>
<span class="item-field-label-medium">{{armor.system.locationprotected}}</span>
<span class="item-field-label-medium">
{{#if (count armor.system.effects)}}
{{#if armor.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">{{armor.system.weight}}</span>
<span class="item-field-label-medium">
{{#if armor.system.idrDice}}
<a class="roll-idr" data-dice-value="{{armor.system.idrDice}}">{{armor.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if armor.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Shields</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Dice</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="shield" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each shields as |shield key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{shield._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{shield.img}}" /></a>
<span class="item-name-label">{{shield.name}}</span>
<span class="item-field-label-short">{{shield.system.levelDice}}</span>
<span class="item-field-label-medium">
{{#if (count shield.system.effects)}}
{{#if shield.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">{{shield.system.weight}}</span>
<span class="item-field-label-medium">
{{#if shield.system.idrDice}}
<a class="roll-idr" data-dice-value="{{shield.system.idrDice}}">{{shield.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if shield.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Equipment</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Quantity</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each containersTree as |equip key|}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html equip=equip level=1}}
<ul class="item-list list-item-shadow2 list-item-margin1">
{{#each equip.system.contents as |subgear key|}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html equip=subgear level=2}}
{{/each}}
</ul>
{{/each}}
</ul>
<hr>
</div>
{{!-- Details Tab --}}
<div class="tab biodata" data-group="primary" data-tab="details">
<hr>
<h3>Description : </h3>
<div class="form-group editor">
{{editor data.biodata.description target="system.biodata.description" button=true owner=owner
editable=editable}}
</div>
<hr>
<h3>Notes : </h3>
<div class="form-group editor">
{{editor data.biodata.notes target="system.biodata.notes" button=true owner=owner editable=editable}}
</div>
<hr>
</article>
</div>
</section>
</form>