Compare commits

..

19 Commits

Author SHA1 Message Date
908cf4206a #Fix 78 : add role level 2022-09-29 14:14:48 +02:00
e531b636bc #Fix 78 : add role level 2022-09-29 14:12:16 +02:00
4065d46ffd #Fix 78 : add role level 2022-09-29 13:14:34 +02:00
1bb869e715 Release 10.0.23 2022-09-29 13:11:07 +02:00
c8cc9d6c82 Fix #75 Token drag&drop 2022-09-29 13:10:41 +02:00
cfcc9ca557 Fix #75 Token drag&drop 2022-09-29 13:07:57 +02:00
a5e17b8276 Fix #71 : Display perk text 2022-09-29 10:59:47 +02:00
428db5e441 Fix #74 : Power damage type 2022-09-28 20:23:21 +02:00
9394e0e851 Fix #73 : Power damage type 2022-09-28 20:21:04 +02:00
18a69ba993 Fix #70 : effect OK for dmr roll 2022-09-28 20:14:24 +02:00
fb69f24fce Fix #72 : effect OK for dmr roll 2022-09-28 20:04:04 +02:00
e1d6b1aaff Fix #69 : Size management 2022-09-28 16:43:28 +02:00
7977233d93 #68 : Process stat effects automatically 2022-09-28 16:27:16 +02:00
e3674f076c Fix #67 2022-09-28 14:02:05 +02:00
1e020d469f Fix #66 2022-09-28 14:01:34 +02:00
7d040af19a Prepare for release 2022-09-28 13:54:57 +02:00
0c6faeb9ca Fix #65 2022-09-28 13:54:06 +02:00
65d0b18191 Fix #53 2022-09-28 13:48:50 +02:00
01a2fd9ff8 Fix #52 2022-09-28 13:43:36 +02:00
19 changed files with 339 additions and 187 deletions

View File

@ -7,7 +7,7 @@ const coverBonusTable = { "nocover": 0, "lightcover": 2, "heavycover": 4, "entre
const statThreatLevel = ["agi", "str", "phy", "com", "def", "per"]
const __subkey2title = {
"melee-dmg": "Melee Damage", "melee-atk": "Melee Attack", "ranged-atk": "Ranged Attack",
"ranged-dmg": "Ranged Damage", "defence": "Defence", "dmg-res": "Damare Resistance"
"ranged-dmg": "Ranged Damage", "defence": "Defence", "dmg-res": "Damage Resistance", "power-dmg": "Power Damage"
}
const __statBuild = [
{ modules: ["vehiclehull"], field: "hr", itemfield: "hr" },
@ -121,6 +121,7 @@ export class PegasusActor extends Actor {
this.system.encCapacity = this.getEncumbranceCapacity()
this.buildContainerTree()
this.updatePPP()
this.updateSize()
}
if (this.type == 'vehicle') {
this.computeVehicleStats();
@ -150,11 +151,11 @@ export class PegasusActor extends Actor {
return ab;
}
/* -------------------------------------------- */
getPerks() {
getPerks() {
let comp = duplicate(this.items.filter(item => item.type == 'perk') || [])
for (let perk of comp) {
if (perk.system.features.range.flag) {
perk.rangeText = PegasusUtility.getRangeText( perk.system.features.range.value)
perk.rangeText = PegasusUtility.getRangeText(perk.system.features.range.value)
}
}
return comp;
@ -362,19 +363,29 @@ export class PegasusActor extends Actor {
await this.updateEmbeddedDocuments('Item', [update]) // Updates one EmbeddedEntity
}
}
/* -------------------------------------------- */
updatePPP() {
let ppp = 0
for(let power of this.items) {
for (let power of this.items) {
if (power.type == "power") {
ppp += Number(power.system.powerlevelcost)
}
}
console.log("PPP update", ppp)
if ( ppp != this.system.ppp.spentPPP) {
console.log("PPP update2", ppp)
this.update( { 'system.ppp.spentPPP': ppp} )
if (ppp != this.system.ppp.spentPPP) {
this.update({ 'system.ppp.spentPPP': ppp })
}
}
/* -------------------------------------------- */
updateSize() {
let sizeBonus = 0
for(let effect of this.items) {
if (effect.type == "effect" && effect.system.effectlevel > 0 && effect.system.affectsize) {
sizeBonus += effect.system.effectlevel
}
}
if (sizeBonus != this.system.biodata.sizebonus) {
this.update( {'system.biodata.sizebonus': sizeBonus})
}
}
@ -1332,6 +1343,25 @@ export class PegasusActor extends Actor {
this.system.combat.hindrancedice = hindrance
this.getTraumaState()
this.cleanupPerksIfTrauma()
this.parseStatEffects()
}
}
/* -------------------------------------------- */
parseStatEffects() {
let effects = this.items.filter(effect => effect.type == "effect" && effect.system.genre == "positive" && effect.system.statdice )
for (let statKey in this.system.statistics) {
let stat = duplicate(this.system.statistics[statKey])
let bonus = 0
for (let effect of effects) {
if (effect.system.stataffected == statKey) {
bonus += Number(effect.system.effectlevel)
}
}
if ( bonus != stat.bonuseffect) {
stat.bonuseffect = bonus
this.update( { [`system.statistics.${statKey}`]: stat} )
}
}
}
@ -1570,7 +1600,7 @@ export class PegasusActor extends Actor {
let effects = this.items.filter(item => item.type == 'effect')
for (let effect of effects) {
effect = duplicate(effect)
if (!effect.system.hindrance
if (!effect.system.hindrance && !effect.system.statdice
&& (effect.system.stataffected != "notapplicable" || effect.system.specaffected.length > 0)
&& effect.system.stataffected != "special"
&& effect.system.stataffected != "powerroll"
@ -1654,6 +1684,7 @@ export class PegasusActor extends Actor {
rollData.diceList = PegasusUtility.getDiceList()
rollData.noBonusDice = this.checkNoBonusDice()
rollData.dicePool = []
rollData.subKey = subKey
if (subKey == "melee-dmg" || subKey == "ranged-dmg" || subKey == "power-dmg") {
rollData.isDamage = true
@ -1662,7 +1693,10 @@ export class PegasusActor extends Actor {
if (statKey) {
rollData.statKey = statKey
rollData.stat = this.getStat(statKey)
rollData.statDicesLevel = rollData.stat.value || rollData.stat.level
if ( rollData.stat.value != undefined ) {
rollData.stat.level = rollData.stat.value // Normalize
}
rollData.statDicesLevel = rollData.stat.level + rollData.stat.bonuseffect
rollData.statMod = rollData.stat.mod
if (vehicle) {
rollData.vehicle = duplicate(vehicle)
@ -1689,7 +1723,7 @@ export class PegasusActor extends Actor {
rollData.statVehicle = vehicle.system.statistics.man
rollData.vehicleKey = "man"
}
vehicle.addVehicleShields( rollData)
vehicle.addVehicleShields(rollData)
}
vehicle.addEffects(rollData, false, false, false)
//this.addVehiculeHindrances(rollData.effectsList, vehicle)
@ -1710,6 +1744,7 @@ export class PegasusActor extends Actor {
}
}
this.processSizeBonus(rollData)
this.addEffects(rollData, isInit, isPower, subKey == "power-dmg")
this.addArmorsShields(rollData, statKey, useShield)
this.addWeapons(rollData, statKey, useShield)
@ -1719,6 +1754,34 @@ export class PegasusActor extends Actor {
return rollData
}
/* -------------------------------------------- */
processSizeBonus( rollData) {
if ( rollData.defenderTokenId) {
let diffSize = rollData.defenderSize - this.system.biodata.sizenum+this.system.biodata.sizebonus
//console.log("Diffsize", diffSize)
if( rollData.subKey == "melee-atk" || rollData.subKey == "ranged-atk") {
if ( diffSize > 0) {
rollData.effectsList.push({ label: "Size Bonus", type: "effect", applied: false, isdynamic: true, value: diffSize })
}
}
if( rollData.subKey == "dmg-res" ) {
if ( diffSize < 0) {
rollData.effectsList.push({ label: "Size Bonus", type: "effect", applied: false, isdynamic: true, value: Math.abs(diffSize) })
}
}
if( rollData.subKey == "defence" ) {
if ( diffSize > 0) {
rollData.effectsList.push({ label: "Size Bonus", type: "effect", applied: false, isdynamic: true, value: Math.abs(diffSize) })
}
}
if( rollData.subKey == "melee-dmg" || rollData.subKey == "ranged-dmg" || rollData.subKey == "power-dmg") {
if ( diffSize < 0) {
rollData.effectsList.push({ label: "Size Bonus", type: "effect", applied: false, isdynamic: true, value: Math.abs(diffSize) })
}
}
}
}
/* -------------------------------------------- */
getLevelRemainingList() {
let options = []
@ -2034,7 +2097,7 @@ export class PegasusActor extends Actor {
if (this.system.statistics.hr.currentlevel == 0) {
ChatMessage.create({ content: `The vehicle ${this.name} has been destroyed !` })
}
this.processVehicleArmorShields()
}
}
@ -2096,47 +2159,6 @@ export class PegasusActor extends Actor {
}
}
// Armour management
if (item.type == "vehiclemodule" && item.system.category == "armor") {
let armorsList = this.items.filter(item => item.type == "vehiclemodule" && item.system.category == "armor") || []
armorsList.push(item)
let arcKey = item.system.location + "arc"
let arc = duplicate(this.system.arcs[arcKey])
let level = 0
for (let armour of armorsList) {
if (armour.system.armourdicevalue > 0) {
level += Number(armour.system.armourdicevalue)
}
}
if (level != Number(arc.armourlevel)) {
arc.armourlevel = level
setTimeout(500, this.update({ [`system.arcs.${arcKey}`]: arc }))
}
}
// Shield management
if (item.type == "vehiclemodule" && item.system.category == "shield") {
let shieldsList = this.items.filter(item => item.type == "vehiclemodule" && item.system.category == "shield") || []
shieldsList.push(item)
let level = 0
for (let armour of shieldsList) {
if (armour.system.shielddicevalue > 0) {
level += Number(armour.system.shielddicevalue)
}
}
let shift = 500
for( let loc of __LocationsArmour) {
let arcKey = loc + "arc"
let arc = duplicate(this.system.arcs[arcKey])
if (level != Number(arc.shieldlevel)) {
arc.shieldlevel = level
setTimeout(shift, this.update({ [`system.arcs.${arcKey}`]: arc }))
shift += 200
}
}
}
return true
}
@ -2224,7 +2246,7 @@ export class PegasusActor extends Actor {
}
/* -------------------------------------------- */
addVehicleArmors( rollData) {
addVehicleArmors(rollData) {
for (let arcKey in this.system.arcs) {
let arc = this.system.arcs[arcKey]
if (arc.armourlevel > 0) {
@ -2249,7 +2271,7 @@ export class PegasusActor extends Actor {
}
/* -------------------------------------------- */
activateVehicleModule(itemId) {
async activateVehicleModule(itemId) {
let mod = this.items.get(itemId)
if (mod) {
if (mod.system.nrg && mod.system.nrg > 0) {
@ -2259,7 +2281,7 @@ export class PegasusActor extends Actor {
ChatMessage.create({ content: `The Vehicle ${this.name} does not have enough Energy to Activate this module at this time.` })
return
}
this.updateEmbeddedDocuments('Item', [{ _id: mod.id, 'system.activated': !mod.system.activated }])
await this.updateEmbeddedDocuments('Item', [{ _id: mod.id, 'system.activated': !mod.system.activated }])
pc.actnrg += Number(mod.system.nrg)
pc.maxnrg -= Number(mod.system.nrg)
pc.curnrg -= Number(mod.system.nrg)
@ -2268,17 +2290,61 @@ export class PegasusActor extends Actor {
pc.actnrg -= Number(mod.system.nrg)
pc.maxnrg += Number(mod.system.nrg)
this.update({ 'system.statistics.pc': pc })
this.updateEmbeddedDocuments('Item', [{ _id: mod.id, 'system.activated': !mod.system.activated }])
await this.updateEmbeddedDocuments('Item', [{ _id: mod.id, 'system.activated': !mod.system.activated }])
}
} else {
this.updateEmbeddedDocuments('Item', [{ _id: mod.id, 'system.activated': !mod.system.activated }])
await this.updateEmbeddedDocuments('Item', [{ _id: mod.id, 'system.activated': !mod.system.activated }])
}
}
this.processVehicleArmorShields()
}
/* -------------------------------------------- */
processVehicleArmorShields() {
// Shield management
let shieldsList = this.items.filter(item => item.type == "vehiclemodule" && item.system.category == "shield" && item.system.activated) || []
let level = 0
for (let armour of shieldsList) {
if (armour.system.shielddicevalue > 0) {
level += Number(armour.system.shielddicevalue)
}
}
let shift = 500
for (let loc of __LocationsArmour) {
let arcKey = loc + "arc"
let arc = duplicate(this.system.arcs[arcKey])
if (level != Number(arc.shieldlevel)) {
arc.shieldlevel = level
setTimeout(shift, this.update({ [`system.arcs.${arcKey}`]: arc }))
shift += 200
}
}
// Armour management
let armorsList = this.items.filter(item => item.type == "vehiclemodule" && item.system.category == "armor" && item.system.activated) || []
for (let loc of __LocationsArmour) {
let arcKey = loc + "arc"
let arc = duplicate(this.system.arcs[arcKey])
let level = 0
for (let armour of armorsList) {
if (armour.system.location == loc && armour.system.armourdicevalue > 0) {
level += Number(armour.system.armourdicevalue)
}
}
if (level != Number(arc.armourlevel)) {
arc.armourlevel = level
setTimeout(500, this.update({ [`system.arcs.${arcKey}`]: arc }))
}
}
}
/* -------------------------------------------- */
updateMaxNrg(currentLevel) {
this.update({ 'system.statistics.pc.maxnrg': Number(currentLevel) })
}
/* -------------------------------------------- */
setTurningArc(currentLevel) {
this.update({ 'system.statistics.man.turningarc45': currentLevel })
this.update({ 'system.statistics.man.turningarc45': Number(currentLevel) })
}
/* -------------------------------------------- */

View File

@ -49,7 +49,7 @@ export class PegasusRollDialog extends Dialog {
effect.applied = toggled
let level, genre, idVal, key
if (effect.type == 'effect') {
if (effect.type == 'effect' && effect.effect) {
let effectData = effect.effect
level = effectData.system.effectlevel
genre = effectData.system.genre

View File

@ -8,9 +8,11 @@ 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 __rangeKeyToText = { notapplicable: "N/A", touch: "Self Only", touchself: "Touch/Self", tz: "Threat Zone", close: "Close", medium: "Medium",
long: "Long", extreme: "Extreme", sight: "Lineof Sight", tz_close: "TZ/Close", close_medium: "Close/Medium", medium_long: "Medium/Long",
long_extreme: "Long/Extreme"}
const __rangeKeyToText = {
notapplicable: "N/A", touch: "Self Only", touchself: "Touch/Self", tz: "Threat Zone", close: "Close", medium: "Medium",
long: "Long", extreme: "Extreme", sight: "Lineof Sight", tz_close: "TZ/Close", close_medium: "Close/Medium", medium_long: "Medium/Long",
long_extreme: "Long/Extreme"
}
/* -------------------------------------------- */
export class PegasusUtility {
@ -59,6 +61,16 @@ export class PegasusUtility {
Handlebars.registerHelper('mul', function (a, b) {
return parseInt(a) * parseInt(b);
})
Handlebars.registerHelper('add', function (a, b) {
return parseInt(a) + parseInt(b);
});
Handlebars.registerHelper('sub', function (a, b) {
return parseInt(a) - parseInt(b);
})
Handlebars.registerHelper('getDice', function (a) {
return PegasusUtility.getDiceFromLevel(a)
})
}
/* -------------------------------------------- */
@ -102,7 +114,7 @@ export class PegasusUtility {
}
/* -------------------------------------------- */
static getRangeText( rangeKey) {
static getRangeText(rangeKey) {
return __rangeKeyToText[rangeKey] || "N/A"
}
@ -134,8 +146,11 @@ export class PegasusUtility {
static updateEffectsBonusDice(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "effect-bonus-dice")
for (let effect of rollData.effectsList) {
if (effect && effect.applied && effect.type == "effect" && effect.effect.system.bonusdice) {
newDicePool = newDicePool.concat( this.buildDicePool("effect-bonus-dice", effect.effect.system.effectlevel, 0, effect.effect.name ))
if (effect && effect.applied && effect.type == "effect" && effect.effect && effect.effect.system.bonusdice) {
newDicePool = newDicePool.concat(this.buildDicePool("effect-bonus-dice", effect.effect.system.effectlevel, 0, effect.effect.name))
}
if (effect && effect.applied && effect.type == "effect" && effect.value && effect.isdynamic) {
newDicePool = newDicePool.concat(this.buildDicePool("effect-bonus-dice", effect.value, 0, effect.name))
}
}
rollData.dicePool = newDicePool
@ -146,7 +161,7 @@ export class PegasusUtility {
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))) {
newDicePool = newDicePool.concat( this.buildDicePool("effect-hindrance", (hindrance.value) ? hindrance.value : hindrance.effect.system.effectlevel, 0, hindrance.name ))
newDicePool = newDicePool.concat(this.buildDicePool("effect-hindrance", (hindrance.value) ? hindrance.value : hindrance.effect.system.effectlevel, 0, hindrance.name))
}
}
rollData.dicePool = newDicePool
@ -157,13 +172,13 @@ export class PegasusUtility {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "armor-shield")
for (let armor of rollData.armorsList) {
if (armor.applied) {
newDicePool = newDicePool.concat( this.buildDicePool("armor-shield", armor.value, 0))
newDicePool = newDicePool.concat(this.buildDicePool("armor-shield", armor.value, 0))
}
}
newDicePool = rollData.dicePool.filter(dice => dice.name != "vehicle-shield")
for (let shield of rollData.vehicleShieldList) {
if (shield.applied) {
newDicePool = newDicePool.concat( this.buildDicePool("vehicle-shield", shield.value, 0))
newDicePool = newDicePool.concat(this.buildDicePool("vehicle-shield", shield.value, 0))
}
}
rollData.dicePool = newDicePool
@ -176,17 +191,17 @@ export class PegasusUtility {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "damage")
for (let weapon of rollData.weaponsList) {
if (weapon.applied && weapon.type == "damage") {
newDicePool = newDicePool.concat( this.buildDicePool("damage", weapon.value, 0))
newDicePool = newDicePool.concat(this.buildDicePool("damage", weapon.value, 0))
}
}
for (let weapon of rollData.vehicleWeapons) {
if (weapon.applied) {
newDicePool = newDicePool.concat( this.buildDicePool("damage", weapon.value, 0))
newDicePool = newDicePool.concat(this.buildDicePool("damage", weapon.value, 0))
}
}
rollData.dicePool = newDicePool
}
}
}
/* -------------------------------------------- */
@ -194,13 +209,13 @@ export class PegasusUtility {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "stat")
let statDice = rollData.dicePool.find(dice => dice.name == "stat")
if (statDice.level > 0) {
newDicePool = newDicePool.concat( this.buildDicePool( "stat", rollData.statDicesLevel, statDice.mod))
newDicePool = newDicePool.concat(this.buildDicePool("stat", rollData.statDicesLevel, statDice.mod))
}
if (rollData.vehicleStat) {
newDicePool = rollData.dicePool.filter(dice => dice.name != "vehiclestat")
if (rollData.vehicleStat.currentlevel > 0 ) {
newDicePool = newDicePool.concat( this.buildDicePool( "vehiclestat", rollData.vehicleStat.currentlevel, 0))
if (rollData.vehicleStat.currentlevel > 0) {
newDicePool = newDicePool.concat(this.buildDicePool("vehiclestat", rollData.vehicleStat.currentlevel, 0))
}
rollData.dicePool = newDicePool
}
@ -210,7 +225,7 @@ export class PegasusUtility {
static updateSpecDicePool(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "spec")
if (rollData.specDicesLevel > 0) {
newDicePool = newDicePool.concat( this.buildDicePool( "spec", rollData.specDicesLevel, 0))
newDicePool = newDicePool.concat(this.buildDicePool("spec", rollData.specDicesLevel, 0))
}
rollData.dicePool = newDicePool
}
@ -258,6 +273,7 @@ export class PegasusUtility {
/* -------------------------------------------- */
static async addItemDropToActor(actor, item) {
console.log("ITEM DROPPED", actor, item)
actor.preprocessItem("none", item, false)
let chatData = {
user: game.user.id,
@ -281,11 +297,16 @@ export class PegasusUtility {
for (let token of tokensList) {
if (x >= token.x && x <= (token.x + token.width)
&& y >= token.y && y <= (token.y + token.height)) {
let item = await this.searchItem(data)
const item = fromUuidSync(data.uuid)
if (item == undefined) {
item = this.actor.items.get(data.uuid)
}
let itemFull = await PegasusUtility.searchItem(item)
console.log("DROPPED DATA", data.uuid)
if (game.user.isGM || token.actor.isOwner) {
this.addItemDropToActor(token.actor, item)
this.addItemDropToActor(token.actor, itemFull)
} else {
game.socket.emit("system.fvtt-pegasus-rpg", { name: "msg_gm_item_drop", data: { actorId: token.actor.id, itemId: item.id, isPack: item.pack } })
game.socket.emit("system.fvtt-pegasus-rpg", { name: "msg_gm_item_drop", data: { actorId: token.actor.id, itemId: itemFull.id, isPack: item.pack } })
}
return
}
@ -899,7 +920,7 @@ export class PegasusUtility {
let item
if (dataItem.pack) {
let id = dataItem.id || dataItem._id
let items = await this.loadCompendium( dataItem.pack, item => item.id == id)
let items = await this.loadCompendium(dataItem.pack, item => item.id == id)
//console.log(">>>>>> PACK", items)
item = items[0] || undefined
//item = await fromUuid(dataItem.pack + "." + id)
@ -981,11 +1002,11 @@ export class PegasusUtility {
static updateWithTarget(rollData) {
let target = PegasusUtility.getTarget()
if (target) {
console.log("TARGET ", target)
let defenderActor = target.actor
rollData.defenderTokenId = target.id
rollData.defenderSize = Number(defenderActor.system.biodata.sizenum) + Number(defenderActor.system.biodata.sizebonus)
//rollData.attackerId = this.id
console.log("DEFENDER", defenderActor)
console.log("Target/DEFENDER", defenderActor)
defenderActor.addHindrancesList(rollData.effectsList)
}
}

View File

@ -227,6 +227,9 @@ export class PegasusVehicleSheet extends ActorSheet {
if ( statKey == "man") {
this.actor.setTurningArc(event.currentTarget.value)
}
if ( statKey == "pc") {
this.actor.updateMaxNrg(event.currentTarget.value)
}
})
html.find('.roll-stat').click((event) => {

View File

@ -293,6 +293,12 @@ table {border: 1px solid #7a7971;}
padding: 0 3px;
}
.long-editor{
border: 2;
height: 400px;
padding: 0 3px;
}
.medium-editor {
border: 2;
height: 240px;
@ -613,6 +619,9 @@ ul, li {
flex-grow: 2;
margin-left: 4px;
}
.select-stat {
max-width: 5rem;
}
.status-header-label {
margin-left: 2px;
}

View File

@ -253,7 +253,7 @@
],
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "10.0.20",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.20.zip",
"version": "10.0.25",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.25.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
}

View File

@ -11,6 +11,7 @@
"age": 0,
"size": "",
"sizenum": 0,
"sizebonus": 0,
"weight": "",
"hair": "",
"sex": "",
@ -49,6 +50,7 @@
"abbrev": "AGI",
"level": 1,
"value": 1,
"bonuseffect": 0,
"mod": 0,
"col": 1
},
@ -57,6 +59,7 @@
"abbrev": "MND",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 1,
"mod": 0
},
@ -65,6 +68,7 @@
"abbrev": "SOC",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 1,
"mod": 0
},
@ -73,6 +77,7 @@
"abbrev": "STR",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 1,
"mod": 0
},
@ -81,6 +86,7 @@
"abbrev": "PHY",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 1,
"mod": 0
},
@ -89,6 +95,7 @@
"abbrev": "COM",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 2,
"mod": 0
},
@ -97,6 +104,7 @@
"abbrev": "DEF",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 2,
"mod": 0
},
@ -105,6 +113,7 @@
"abbrev": "STL",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 2,
"mod": 0
},
@ -113,6 +122,7 @@
"abbrev": "PER",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 2,
"mod": 0
},
@ -121,6 +131,7 @@
"abbrev": "FOC",
"level": 1,
"value": 1,
"bonuseffect": 0,
"col": 2,
"mod": 0
}
@ -208,6 +219,7 @@
"label": "FC",
"abbrev": "fc",
"level": 0,
"bonuseffect": 0,
"currentlevel": 0,
"col": 1
},
@ -216,6 +228,7 @@
"abbrev": "man",
"dicevalue": "",
"level": 0,
"bonuseffect": 0,
"currentlevel": 0,
"turningarc45": 0,
"col": 1
@ -224,6 +237,7 @@
"label": "HR",
"abbrev": "hr",
"level": 0,
"bonuseffect": 0,
"currentlevel": 0,
"size": 0,
"col": 2
@ -232,6 +246,7 @@
"label": "PC",
"abbrev": "pc",
"level": 0,
"bonuseffect": 0,
"currentlevel": 0,
"actnrg": 0,
"curnrg": 0,
@ -242,6 +257,7 @@
"label": "MR",
"abbrev": "mr",
"level": 0,
"bonuseffect": 0,
"currentlevel": 0,
"col": 3
},
@ -249,6 +265,7 @@
"label": "A/D",
"abbrev": "ad",
"level": 0,
"bonuseffect": 0,
"currentlevel": 0,
"accmode": "",
"currentspeed": "",
@ -385,6 +402,7 @@
"recoveryrollspec": [],
"effectstatlevel": false,
"effectstat": "",
"affectsize": false,
"oneuse": false,
"ignorehealthpenalty": false,
"isthispossible": "",
@ -425,7 +443,8 @@
"specincrease": [],
"perks": [],
"perksrole": "",
"description": ""
"description": "",
"rolelevel": 1
},
"ability": {
"affectedstat": "str",
@ -548,6 +567,8 @@
"activatedtext": "",
"deactivatedtext": "",
"powerlevelcost": "",
"powerdamagetype": "",
"powerdamagetypelevel": 0,
"dmgroll": false,
"dmgstatistic": "",
"description": ""

View File

@ -865,6 +865,8 @@
<label class="generic-label">Size</label>
<input type="text" class="" name="system.biodata.sizenum" value="{{data.biodata.sizenum}}"
data-dtype="Number" />
<input type="text" class="" value="{{add data.biodata.sizenum data.biodata.sizebonus}}"
data-dtype="Number" disabled />
</li>
<li class="flexrow item">
<label class="generic-label">Origin</label>

View File

@ -45,6 +45,10 @@
{{/if}}
{{/if}}
{{#if power}}
<li>Power Damage type : {{power.system.powerdamagetype}} {{power.system.powerdamagetypelevel}}</li>
{{/if}}
{{#if isResistance}}
<li><strong>Defense Result : {{finalScore}}</strong>
{{else}}

View File

@ -5,8 +5,8 @@
{{/if}}
<div>{{name}} has just activated the Perk: {{perk.name}}.</div>
{{#if (count perk.data.activatedtext)}}
<div>{{perk.data.activatedtext}}</div>
{{#if (count perk.system.activatedtext)}}
<div>{{perk.system.activatedtext}}</div>
{{/if}}
</div>

View File

@ -5,8 +5,8 @@
{{/if}}
<div>{{name}} has just deactivated the Perk: {{perk.name}}, make sure to manually delete all Effects provided by this Perk from Targets.</div>
{{#if (count perk.data.deactivatedtext)}}
<div>{{perk.data.deactivatedtext}}</div>
{{#if (count perk.system.deactivatedtext)}}
<div>{{perk.system.deactivatedtext}}</div>
{{/if}}
</div>

View File

@ -77,7 +77,10 @@
{{else}}
<li class="flexrow"><label class="generic-label">Effect Level</label>
<input type="text" class="input-numeric-short padd-right" name="system.effectlevel" value="{{data.effectlevel}}" data-dtype="Number"/>
</li>
</li>
<li class="flexrow"><label class="generic-label">Affect size ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectsize" {{checked data.affectsize}}/></label>
</li>
{{/if}}
<li class="flexrow"> <label class="generic-label">Affected Specialisations </label></li>

View File

@ -13,18 +13,18 @@
<div class="tab description" data-group="primary" data-tab="description">
<div class="medium-editor item-text-long-line">
<label class="generic-label">Power Ups</label>
{{editor purchasedeffects target="system.purchasedeffects" button=true owner=owner
editable=editable}}
</div>
<div class="long-editor item-text-long-line">
<label class="generic-label">Description</label>
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
<div class="medium-editor item-text-long-line">
<label class="generic-label">Available Effects</label>
<label class="generic-label">Available Upgrades</label>
{{editor effects target="system.effects" button=true owner=owner editable=editable}}
</div>
<div class="medium-editor item-text-long-line">
<label class="generic-label">Purchased Effects</label>
{{editor purchasedeffects target="system.purchasedeffects" button=true owner=owner
editable=editable}}
</div>
</div>
<div class="tab details" data-group="primary" data-tab="details">
@ -104,14 +104,22 @@
data.dmgroll}} /></label>
</li>
{{#if data.dmgroll}}
<li class="flexrow"><label class="generic-label">Related DMG Statistic </label>
<select class="competence-base flexrow" type="text" name="system.dmgstatistic" value="{{data.dmgstatistic}}"
data-dtype="String">
{{#select data.dmgstatistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Related DMG Statistic </label>
<select class="competence-base flexrow" type="text" name="system.dmgstatistic" value="{{data.dmgstatistic}}"
data-dtype="String">
{{#select data.dmgstatistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Damage Type</label>
<input type="text" class="padd-right" name="system.powerdamagetype" value="{{data.powerdamagetype}}"
data-dtype="String" />
</li>
<li class="flexrow"><label class="generic-label">Damage Type Level</label>
<input type="text" class="padd-right" name="system.powerdamagetypelevel" value="{{data.powerdamagetypelevel}}"
data-dtype="Number" />
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">When purchased display text</label>

View File

@ -1,80 +1,92 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname">
<input name="name" type="text" value="{{name}}" placeholder="Name"/>
</h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields">
<h1 class="charname">
<input name="name" type="text" value="{{name}}" placeholder="Name" />
</h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Stat increase 1</label>
<select class="competence-base flexrow" type="text" name="system.statincrease1" value="{{data.statincrease1}}" data-dtype="String">
{{#select data.statincrease1}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Stat increase 2</label>
<select class="competence-base flexrow" type="text" name="system.statincrease2" value="{{data.statincrease2}}" data-dtype="String">
{{#select data.statincrease2}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">Role Level</label>
<input type="text" class="input-numeric-short padd-right" name="system.rolelevel" value="{{data.rolelevel}}"
data-dtype="Number" />
</li>
<li class="flexrow">
<label class="generic-label">Role Ability</label>
</li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-specialability"><label>Drop Abilities here !</label></div>
</li>
{{#each data.specialability as |ability idx|}}
<li class="flexrow">
<label name="system.specialability[{{idx}}].name"><a class="view-subitem" data-type="specialability" data-index="{{idx}}">{{ability.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specialability" data-index="{{idx}}" title="Delete Ability"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<li class="flexrow"><label class="generic-label">Stat increase 1</label>
<select class="competence-base flexrow" type="text" name="system.statincrease1" value="{{data.statincrease1}}"
data-dtype="String">
{{#select data.statincrease1}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Stat increase 2</label>
<select class="competence-base flexrow" type="text" name="system.statincrease2" value="{{data.statincrease2}}"
data-dtype="String">
{{#select data.statincrease2}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="generic-label">Role Ability</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
<div class="drop-specialability"><label>Drop Abilities here !</label></div>
</li>
<li class="flexrow"><label class="generic-label">Statistic increase (Choose 2 at +1 DT)</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
{{#each data.statincreasechoice as |stat idx|}}
<label name="statchoice{{idx}}">{{stat.name}}</label>
<label class="attribute-value checkbox"><input type="checkbox" class="stat-choice-flag" data-stat-idx="{{idx}}" {{checked stat.flag}}/></label>
{{/each}}
</li>
</ul>
</li>
{{#each data.specialability as |ability idx|}}
<li class="flexrow">
<label name="system.specialability[{{idx}}].name"><a class="view-subitem" data-type="specialability"
data-index="{{idx}}">{{ability.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specialability" data-index="{{idx}}"
title="Delete Ability"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
<li class="flexrow"><label class="generic-label">Statistic increase (Choose 2 at +1 DT)</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
{{#each data.statincreasechoice as |stat idx|}}
<label name="statchoice{{idx}}">{{stat.name}}</label>
<label class="attribute-value checkbox"><input type="checkbox" class="stat-choice-flag"
data-stat-idx="{{idx}}" {{checked stat.flag}} /></label>
{{/each}}
</li>
</ul>
</li>
<li class="flexrow"><label class="generic-label">Role category for available perks</label>
<select class="competence-base flexrow" type="text" name="system.perksrole" value="{{data.perksrole}}" data-dtype="String">
{{#select data.perksrole}}
<option value="agitator">Agitator</option>
<option value="defender">Defender</option>
<option value="enhancer">Enhancer</option>
<option value="scrapper">Scrapper</option>
<option value="ranged">Ranged</option>
<option value="tactician">Tactician</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Role category for available perks</label>
<select class="competence-base flexrow" type="text" name="system.perksrole" value="{{data.perksrole}}"
data-dtype="String">
{{#select data.perksrole}}
<option value="agitator">Agitator</option>
<option value="defender">Defender</option>
<option value="enhancer">Enhancer</option>
<option value="scrapper">Scrapper</option>
<option value="ranged">Ranged</option>
<option value="tactician">Tactician</option>
{{/select}}
</select>
</li>
</ul>
</ul>
</div>
</div>
</section>
</form>
</section>
</form>

View File

@ -47,7 +47,7 @@
<li class="item flexrow list-item" data-item-id="{{trait.id}}">
<img class="sheet-competence-img" src="{{trait.img}}"/>
<span class="competence-label">{{trait.name}}</span>
<span class="competence-label">{{trait.data.data.type}}</span>
<span class="competence-label">{{trait.system.type}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
@ -103,17 +103,17 @@
<img class="sheet-competence-img" src="{{weapon.img}}"/>
<span class="stat-label">{{weapon.name}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if weapon.data.data.equipped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<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-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
<li class="item stat flexrow list-item stats-table" data-armure-id="{{weapon.id}}" data-item-id="{{weapon.id}}">
{{#each weapon.data.data.weaponstats as |weaponstat statkey|}}
{{#each weapon.system.weaponstats as |weaponstat statkey|}}
<ul>
<li class="item stat flexrow list-item" data-item-id="{{weapon.id}}" data-stat-id={{statkey}}><span class="stat-label weapon-label"><a name="{{weapon.name}}">Attack with {{weaponstat.name}}</a></span>
</li>
<li>{{> "systems/fvtt-fragged-kingdom/templates/weapon-stats-section.html" stats=weaponstat.data.statstotal isfinal=false header=true}}
<li>{{> "systems/fvtt-fragged-kingdom/templates/weapon-stats-section.html" stats=weaponstat.system.statstotal isfinal=false header=true}}
</li>
</ul>
{{/each}}
@ -151,7 +151,7 @@
<span class="equipement-label">{{equip.name}}</span>
<span class="equipement-label">{{equip.type}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if equip.data.data.equipped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-equip" title="Worn">{{#if equip.system.equipped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>

View File

@ -24,7 +24,7 @@
{{/if}}
</span>
<span class="item-field-label-short">
{{#if equip.data.iscontainer}}
{{#if equip.system.iscontainer}}
{{equip.system.contentsEnc}}
{{else}}
{{mul equip.system.weight equip.system.quantity}}
@ -32,7 +32,7 @@
</span>
<span class="item-field-label-medium">
{{#if equip.system.idrDice}}
<a class="roll-idr" data-dice-value="{{equip.data.idrDice}}">{{equip.system.idrDice}}</a>
<a class="roll-idr" data-dice-value="{{equip.system.idrDice}}">{{equip.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}

View File

@ -5,12 +5,15 @@
<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}}">{{stat.abbrev}}</a></h4>
</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.value" value="{{stat.value}}"
<select class="status-small-label color-class-common select-stat" type="text" name="system.statistics.{{key}}.value" value="{{stat.value}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<span class="stat-label stat-margin" name="{{key}}">
<h4 class="stat-text-white stat-margin">{{getDice (add stat.value stat.bonuseffect)}}</h4>
</span>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="system.statistics.{{key}}.mod" value="{{stat.mod}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} />
</li>

View File

@ -17,13 +17,13 @@
</li>
{{else}}
{{#if (eq effect.effect.data.stataffected "powerroll")}}
{{#if (eq effect.effect.system.stataffected "powerroll")}}
<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">{{effect.label}} ({{effect.value}})</label>
</li>
{{/if}}
{{#if (eq effect.effect.data.stataffected "powerdmgroll")}}
{{#if (eq effect.effect.system.stataffected "powerdmgroll")}}
<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">{{effect.label}} ({{effect.value}})</label>

View File

@ -115,8 +115,8 @@
<option value="none0">==== Combat Arcs</option>
<option value="d4">Combat Arc Flank (Grey) d4</option>
<option value="d6">Combat Arc Blind Spot (Red) d6</option>
<option value="d6">Slight cover d4</option>
<option value="none1">===== Cover defence</option>
<option value="d4">Slight cover d4</option>
<option value="d8">Half cover d8</option>
<option value="d12">Full cover d12</option>
<option value="d12">Full cover d12</option>