Compare commits
4 Commits
fvtt-pegas
...
fvtt-pegas
Author | SHA1 | Date | |
---|---|---|---|
8fac4dcb36 | |||
2c015d8f8f | |||
fdbfbf0350 | |||
37d27104fc |
@ -15,7 +15,7 @@ const __statBuild = [
|
|||||||
//{ modules: ["vehiclehull"], field: "pc", itemfield: "vms", subfield: "avgnrg" },
|
//{ modules: ["vehiclehull"], field: "pc", itemfield: "vms", subfield: "avgnrg" },
|
||||||
//{ modules: ["powercoremodule"], field: "pc", itemfield: "nrg", subfield: "avgnrg" },
|
//{ modules: ["powercoremodule"], field: "pc", itemfield: "nrg", subfield: "avgnrg" },
|
||||||
{ modules: ["vehiclehull", "mobilitymodule"], itemfield: "man", field: "man", additionnal1: "turningarc45" },
|
{ modules: ["vehiclehull", "mobilitymodule"], itemfield: "man", field: "man", additionnal1: "turningarc45" },
|
||||||
{ modules: ["powercoremodule"], field: "pc", itemfield: "pc", additionnal1: "curnrg", additionnal2: "maxnrg" },
|
{ modules: ["powercoremodule"], field: "pc", itemfield: "pc" },
|
||||||
{ modules: ["mobilitymodule"], field: "mr", itemfield: "mr" },
|
{ modules: ["mobilitymodule"], field: "mr", itemfield: "mr" },
|
||||||
{ modules: ["propulsionmodule"], field: "ad", itemfield: "ad" },
|
{ modules: ["propulsionmodule"], field: "ad", itemfield: "ad" },
|
||||||
{ modules: ["combatmodule"], field: "fc", itemfield: "fc" },
|
{ modules: ["combatmodule"], field: "fc", itemfield: "fc" },
|
||||||
@ -194,8 +194,13 @@ export class PegasusActor extends Actor {
|
|||||||
let comp = this.items.filter(item => item.type == 'vehiclemodule');
|
let comp = this.items.filter(item => item.type == 'vehiclemodule');
|
||||||
return comp;
|
return comp;
|
||||||
}
|
}
|
||||||
getVehicleWeaponModules() {
|
getVehicleWeaponModules( activated = false ) {
|
||||||
let comp = this.items.filter(item => item.type == 'vehicleweaponmodule' && item.system.activated);
|
let comp = []
|
||||||
|
if (activated ) {
|
||||||
|
comp = this.items.filter(item => item.type == 'vehicleweaponmodule' && item.system.activated)
|
||||||
|
} else {
|
||||||
|
comp = this.items.filter(item => item.type == 'vehicleweaponmodule' )
|
||||||
|
}
|
||||||
return comp;
|
return comp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1801,7 +1806,7 @@ export class PegasusActor extends Actor {
|
|||||||
}
|
}
|
||||||
addVehicleWeapons(rollData, vehicle) {
|
addVehicleWeapons(rollData, vehicle) {
|
||||||
if (vehicle) {
|
if (vehicle) {
|
||||||
let modules = vehicle.items.filter(vehicle => vehicle.type == "vehicleweaponmodule")
|
let modules = vehicle.items.filter(item => item.type == "vehicleweaponmodule" && item.system.activated)
|
||||||
if (modules && modules.length > 0) {
|
if (modules && modules.length > 0) {
|
||||||
for (let module of modules) {
|
for (let module of modules) {
|
||||||
rollData.vehicleWeapons.push({ label: `Weapon ${module.name}`, type: "item", applied: false, weapon: module, value: module.system.damagedicevalue })
|
rollData.vehicleWeapons.push({ label: `Weapon ${module.name}`, type: "item", applied: false, weapon: module, value: module.system.damagedicevalue })
|
||||||
@ -2364,6 +2369,13 @@ export class PegasusActor extends Actor {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// NRG max management
|
||||||
|
if (item.type == "powercoremodule" ) {
|
||||||
|
if (this.system.statistics.pc.maxnrg != item.system.nrg ) {
|
||||||
|
this.update( {'system.statistics.pc.maxnrg': item.system.nrg })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Cargo management
|
// Cargo management
|
||||||
if (__isVehicleCargo[item.type]) {
|
if (__isVehicleCargo[item.type]) {
|
||||||
let capacity = this.getCurrentCargoCapacity()
|
let capacity = this.getCurrentCargoCapacity()
|
||||||
|
@ -253,7 +253,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||||
"version": "10.1.5",
|
"version": "10.1.7",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.5.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.7.zip",
|
||||||
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
@ -540,7 +540,7 @@
|
|||||||
<span class="item-field-label-medium">{{weapon.system.location}}</span>
|
<span class="item-field-label-medium">{{weapon.system.location}}</span>
|
||||||
<span class="item-field-label-short">{{weapon.system.dmg}}</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.aoe}}</span>
|
||||||
<span class="item-field-label-medium">{{weapon.system.turrent}}</span>
|
<span class="item-field-label-medium">{{weapon.system.turret}}</span>
|
||||||
<span class="item-field-label-short">{{weapon.system.nrg}}</span>
|
<span class="item-field-label-short">{{weapon.system.nrg}}</span>
|
||||||
|
|
||||||
<span class="item-field-label-short">
|
<span class="item-field-label-short">
|
||||||
|
Reference in New Issue
Block a user