v2 changes

This commit is contained in:
sladecraven 2022-07-10 10:22:04 +02:00
parent 55efa32739
commit f66b9c1913
32 changed files with 836 additions and 460 deletions

BIN
images/dice/PR2207-1063.pdf Normal file

Binary file not shown.

BIN
images/dice/d10.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
images/dice/d12.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
images/dice/d4.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
images/dice/d6.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
images/dice/d6_1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

BIN
images/dice/d6_2.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

BIN
images/dice/d6_3.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

BIN
images/dice/d6_4.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/dice/d6_5.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/dice/d6_6.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/dice/d8.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -15,7 +15,7 @@ export class PegasusActorSheet extends ActorSheet {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-pegasus-rpg", "sheet", "actor"],
template: "systems/fvtt-pegasus-rpg/templates/actor-sheet.html",
width: 920,
width: 960,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
@ -38,6 +38,7 @@ export class PegasusActorSheet extends ActorSheet {
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
data: actorData,
traumaState: this.actor.getTraumaState(),
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited,
specs: this.actor.getSpecs( ),
@ -210,6 +211,14 @@ export class PegasusActorSheet extends ActorSheet {
this.actor.incDecAmmo( li.data("item-id"), +1 )
} );
html.find('.stun-minus').click(event => {
this.actor.modifyStun( -1 )
} )
html.find('.stun-plus').click(event => {
this.actor.modifyStun( 1 )
} )
html.find('.momentum-minus').click(event => {
this.actor.modifyMomentum( -1 )
} )
@ -224,22 +233,22 @@ export class PegasusActorSheet extends ActorSheet {
this.openGenericRoll()
} );
html.find('.attack-melee').click((event) => {
this.actor.rollPool( 'com');
this.actor.rollPool( 'com', false, "melee-atk");
});
html.find('.attack-ranged').click((event) => {
this.actor.rollPool( 'agi');
this.actor.rollPool( 'agi', false, "ranged-atk");
});
html.find('.defense-roll').click((event) => {
this.actor.rollPool( 'def', true);
});
html.find('.damage-melee').click((event) => {
this.actor.rollPool( 'str');
this.actor.rollPool( 'str', false, "melee-dmg");
});
html.find('.damage-ranged').click((event) => {
this.actor.rollPool( 'per');
this.actor.rollPool( 'per', false, "ranged-dmg");
});
html.find('.damage-resistance').click((event) => {
this.actor.rollPool( 'phy');
this.actor.rollPool( 'phy', false, "dmg-res");
});
html.find('.roll-stat').click((event) => {

View File

@ -4,7 +4,7 @@ import { PegasusRollDialog } from "./pegasus-roll-dialog.js";
/* -------------------------------------------- */
const coverBonusTable = { "nocover": 0, "lightcover": 2, "heavycover": 4, "entrenchedcover": 6 };
const statThreatLevel = [ "agi", "str", "phy", "com", "def", "per" ]
const statThreatLevel = ["agi", "str", "phy", "com", "def", "per"]
/* -------------------------------------------- */
/* -------------------------------------------- */
/**
@ -129,16 +129,16 @@ export class PegasusActor extends Actor {
}
/* -------------------------------------------- */
checkAndPrepareEquipment(item) {
if ( item.data.resistance ) {
if (item.data.resistance) {
item.data.resistanceDice = PegasusUtility.getDiceFromLevel(item.data.resistance)
}
if ( item.data.idr ) {
if (item.data.idr) {
item.data.idrDice = PegasusUtility.getDiceFromLevel(item.data.idr)
}
if ( item.data.damage) {
if (item.data.damage) {
item.data.damageDice = PegasusUtility.getDiceFromLevel(item.data.damage)
}
if( item.data.level) {
if (item.data.level) {
item.data.levelDice = PegasusUtility.getDiceFromLevel(item.data.level)
}
}
@ -298,32 +298,32 @@ export class PegasusActor extends Actor {
/* ------------------------------------------- */
computeThreatLevel() {
let tl = 0
for(let key of statThreatLevel) { // Init with concerned stats
tl += PegasusUtility.getDiceValue( this.data.data.statistics[key].value )
for (let key of statThreatLevel) { // Init with concerned stats
tl += PegasusUtility.getDiceValue(this.data.data.statistics[key].value)
}
let powers = duplicate( this.getPowers() || [])
if ( powers.length > 0 ) { // Then add some mental ones of powers
tl += PegasusUtility.getDiceValue( this.data.data.statistics.foc.value )
tl += PegasusUtility.getDiceValue( this.data.data.statistics.mnd.value )
let powers = duplicate(this.getPowers() || [])
if (powers.length > 0) { // Then add some mental ones of powers
tl += PegasusUtility.getDiceValue(this.data.data.statistics.foc.value)
tl += PegasusUtility.getDiceValue(this.data.data.statistics.mnd.value)
}
tl += PegasusUtility.getDiceValue( this.data.data.mr.value )
let specThreat = this.data.items.filter( it => it.type == "specialisation" && it.data.data.isthreatlevel) || []
tl += PegasusUtility.getDiceValue(this.data.data.mr.value)
let specThreat = this.data.items.filter(it => it.type == "specialisation" && it.data.data.isthreatlevel) || []
for (let spec of specThreat) {
tl += PegasusUtility.getDiceValue( spec.data.data.level )
tl += PegasusUtility.getDiceValue(spec.data.data.level)
}
tl += this.data.data.nrg.absolutemax + this.data.data.secondary.health.max + this.data.data.secondary.delirium.max
tl += this.getPerks().length * 5
let weapons = this.getWeapons()
for(let weapon of weapons) {
for (let weapon of weapons) {
tl += PegasusUtility.getDiceValue(weapon.data.damage)
}
let armors = this.getArmors()
for(let armor of armors) {
for (let armor of armors) {
tl += PegasusUtility.getDiceValue(armor.data.resistance)
}
let shields = duplicate(this.getShields())
for(let shield of shields) {
for (let shield of shields) {
tl += PegasusUtility.getDiceValue(shield.data.level)
}
let abilities = duplicate(this.getAbilities())
@ -334,8 +334,8 @@ export class PegasusActor extends Actor {
for (let equip of equipments) {
tl += equip.data.threatlevel
}
if ( tl != this.data.data.biodata.threatlevel) {
this.update( {'data.biodata.threatlevel': tl} )
if (tl != this.data.data.biodata.threatlevel) {
this.update({ 'data.biodata.threatlevel': tl })
}
}
@ -350,7 +350,7 @@ export class PegasusActor extends Actor {
if (equip1._id != equip2._id && equip2.data.containerid == equip1._id) {
equip1.data.contents.push(equip2)
let q = equip2.data.quantity ?? 1
equip1.data.contentsEnc += q *equip2.data.weight
equip1.data.contentsEnc += q * equip2.data.weight
}
}
}
@ -359,7 +359,7 @@ export class PegasusActor extends Actor {
// Compute whole enc
let enc = 0
for (let item of equipments) {
item.data.idrDice = PegasusUtility.getDiceFromLevel( Number(item.data.idr))
item.data.idrDice = PegasusUtility.getDiceFromLevel(Number(item.data.idr))
if (item.data.equipped) {
if (item.data.iscontainer) {
enc += item.data.contentsEnc
@ -399,11 +399,39 @@ export class PegasusActor extends Actor {
}
}
/* -------------------------------------------- */
modifyStun(incDec) {
let combat = duplicate(this.data.data.combat)
combat.stunlevel += incDec
if (combat.stunlevel >= 0) {
this.update({ 'data.combat': combat })
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM'))
}
if (incDec > 0) {
chatData.content = `<div>${this.name} suffered a Stun level.</div`
} else {
chatData.content = `<div>${this.name} recovered a Stun level.</div`
}
ChatMessage.create(chatData)
} else {
ui.notifications.warn("Stun level cannot go below 0")
}
let stunAbove = combat.stunlevel - combat.stunthreshold
if (incDec > 0 && stunAbove > 0) {
let delirium = duplicate(this.data.data.secondary.delirium)
delirium.value -= incDec
this.update({ 'data.secondary.delirium': delirium })
}
}
/* -------------------------------------------- */
modifyMomentum(incDec) {
let momentum = duplicate(this.data.data.momentum)
momentum.value += incDec
if (momentum.value >= 0 ) {
if (momentum.value >= 0) {
this.update({ 'data.momentum': momentum })
let chatData = {
user: game.user.id,
@ -416,7 +444,7 @@ export class PegasusActor extends Actor {
chatData.content = `<div>${this.name} has used a Momentum</div`
}
ChatMessage.create(chatData)
}else {
} else {
ui.notifications.warn("Momentum cannot go below 0")
}
}
@ -705,6 +733,18 @@ export class PegasusActor extends Actor {
if (item.data.data.status == status) return;// Ensure we are really changing the status
// Severe Trauma management
if (this.getTraumaState() == "severetrauma") {
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM'))
}
chatData.content = `<div>${this.name} is suffering from Severe Trauma and cannot use Perks at this time.</div`
ChatMessage.create(chatData)
return
}
let updateOK = true
if (status == "ready") {
await this.cleanPerkEffects(itemId)
@ -803,6 +843,20 @@ export class PegasusActor extends Actor {
}
}
/* -------------------------------------------- */
getTraumaState() {
this.traumaState = "none"
if (this.type == "character") {
if (this.data.data.secondary.delirium.value >= 0 && this.data.data.secondary.delirium.value <= Math.floor((this.data.data.secondary.delirium.max + 1) / 2)) {
this.traumaState = "trauma"
}
if (this.data.data.secondary.delirium.value < 0) {
this.traumaState = "severetrauma"
}
}
return this.traumaState
}
/* -------------------------------------------- */
async computeNRGHealth() {
if (this.isToken) return
@ -883,12 +937,15 @@ export class PegasusActor extends Actor {
// Update current hindrance level
let hindrance = this.data.data.combat.hindrancedice
if (this.data.data.secondary.health.value < 0) {
hindrance += Math.abs(this.data.data.secondary.health.value)
}
if (this.data.data.secondary.delirium.value < 0) {
hindrance += Math.abs(this.data.data.secondary.delirium.value)
if (this.data.data.secondary.health.value < -Math.floor((this.data.data.secondary.health.value + 1) / 2)) { // Severe wounded
hindrance += 3
} else {
hindrance += 1
}
}
this.data.data.combat.hindrancedice = hindrance
this.getTraumaState()
}
}
@ -937,7 +994,7 @@ export class PegasusActor extends Actor {
let objetQ = this.data.items.get(objetId)
if (objetQ) {
let newQ = objetQ.data.data.ammocurrent + incDec;
if ( newQ >= 0 && newQ <= objetQ.data.data.ammomax) {
if (newQ >= 0 && newQ <= objetQ.data.data.ammomax) {
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.ammocurrent': newQ }]); // pdates one EmbeddedEntity
}
}
@ -1044,9 +1101,9 @@ export class PegasusActor extends Actor {
this.getIncreaseStatValue(updates, role.data.statincrease1)
this.getIncreaseStatValue(updates, role.data.statincrease2)
if ( role.data.specialability.length > 0) {
if (role.data.specialability.length > 0) {
console.log("Adding ability", role.data.specialability)
newItems = newItems.concat( duplicate(role.data.specialability) ) // Add new ability
newItems = newItems.concat(duplicate(role.data.specialability)) // Add new ability
this.applyAbility(role.data.specialability[0], newItems)
}
await this.update(updates)
@ -1091,7 +1148,13 @@ export class PegasusActor extends Actor {
if (effect.data.effectstatlevel) {
effect.data.effectlevel = this.data.data.statistics[effect.data.effectstat].value
}
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
if (this.getTraumaState() == "none") {
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
} else {
if (!effect.data.bonusdice) { // Do not push bonus dice effect when TraumaState is activated
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
}
}
}
}
}
@ -1141,8 +1204,11 @@ export class PegasusActor extends Actor {
rollData.actorImg = this.img
rollData.actorId = this.id
rollData.img = this.img
rollData.traumaState = this.getTraumaState()
rollData.activePerks = duplicate(this.getActivePerks())
rollData.diceList = PegasusUtility.getDiceList()
rollData.dicePool = []
if (statKey) {
rollData.statKey = statKey
rollData.stat = this.getStat(statKey)
@ -1153,8 +1219,13 @@ export class PegasusActor extends Actor {
if (statKey.toLowerCase() == "mr") {
rollData.img = "systems/fvtt-pegasus-rpg/images/icons/MR.webp"
} else {
rollData.img = `systems/fvtt-pegasus-rpg/images/icons/${rollData.stat.abbrev}.webp`
rollData.img = `systems/fvtt-pegasus-rpg/images/icons/${rollData.stat.abbrev}.webp`
}
let diceKey = PegasusUtility.getDiceFromLevel(rollData.stat.value)
rollData.dicePool.push({
name: "stat", key: diceKey,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
})
}
this.addEffects(rollData)
@ -1185,11 +1256,12 @@ export class PegasusActor extends Actor {
}
/* -------------------------------------------- */
rollPool(statKey, useShield = false) {
rollPool(statKey, useShield = false, subKey = "none") {
let stat = this.getStat(statKey)
if (stat) {
let rollData = this.getCommonRollData(statKey, useShield)
rollData.mode = "stat"
rollData.subKey = subKey
rollData.title = `Roll : ${stat.label} `
rollData.img = "icons/dice/d12black.svg"
@ -1259,6 +1331,9 @@ export class PegasusActor extends Actor {
rollData.combatId = combatId
rollData.combatantId = combatantId
console.log("MR ROLL", rollData)
if (isInit) {
rollData.title = "MR / Initiative"
}
this.startRoll(rollData);
} else {
ui.notifications.warn("MR not found !");

View File

@ -90,7 +90,7 @@ export class PegasusCommands {
if (command && command.func) {
const result = command.func(content, msg, params);
if (result == false) {
RdDCommands._chatAnswer(msg, command.descr);
PegasusCommands._chatAnswer(msg, command.descr);
}
return true;
}

View File

@ -3,12 +3,12 @@ import { PegasusUtility } from "./pegasus-utility.js";
export class PegasusRollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData ) {
static async create(actor, rollData) {
let options = { classes: ["PegasusDialog"], width: 620, height: 380, 'z-index': 99999 };
let html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html', rollData);
return new PegasusRollDialog(actor, rollData, html, options );
return new PegasusRollDialog(actor, rollData, html, options);
}
/* -------------------------------------------- */
@ -16,17 +16,18 @@ export class PegasusRollDialog extends Dialog {
let conf = {
title: (rollData.mode == "skill") ? "Skill" : "Roll",
content: html,
buttons: {
buttons: {
roll: {
icon: '<i class="fas fa-check"></i>',
label: "Roll !",
callback: () => { this.roll() }
},
cancel: {
icon: '<i class="fas fa-times"></i>',
label: "Cancel",
callback: () => { this.close() }
} },
icon: '<i class="fas fa-check"></i>',
label: "Roll !",
callback: () => { this.roll() }
},
cancel: {
icon: '<i class="fas fa-times"></i>',
label: "Cancel",
callback: () => { this.close() }
}
},
close: close
}
@ -37,89 +38,89 @@ export class PegasusRollDialog extends Dialog {
}
/* -------------------------------------------- */
roll () {
PegasusUtility.rollPegasus( this.rollData )
roll() {
PegasusUtility.rollPegasus(this.rollData)
}
/* -------------------------------------------- */
manageEffects( effectIdx, toggled) {
manageEffects(effectIdx, toggled) {
let effect = this.rollData.effectsList[effectIdx]
if (effect) {
effect.applied = toggled
let level, genre, idVal
if (effect.type == 'hindrance' ) {
if (effect.type == 'hindrance') {
level = effect.value
genre = 'positive'
idVal = "#hindranceDicesLevel"
idVal = "#hindranceDicesLevel"
}
if (effect.type == 'effect' ) {
let effectData = effect.effect
if (effect.type == 'effect') {
let effectData = effect.effect
level = effectData.data.effectlevel
genre = effectData.data.genre
effectData.data.isUsed = toggled
if (effectData.data.bonusdice) {
idVal = "#bonusDicesLevel"
}
if (effectData.data.reducedicevalue || effectData.data.statdice) {
idVal = "#statDicesLevel"
idVal = "#statDicesLevel"
}
if (effectData.data.otherdice) {
idVal = "#otherDicesLevel"
idVal = "#otherDicesLevel"
}
if (effectData.data.hindrance) {
idVal = "#hindranceDicesLevel"
idVal = "#hindranceDicesLevel"
genre = 'positive' // Dynamic fix
}
}
// Now process the dice level update
let newLevel = Number($(idVal).val())
console.log("Ongoing", newLevel, toggled, idVal )
if (toggled) {
if ( genre == 'positive') {
newLevel += Number(level)
}else {
newLevel -= Number(level)
}
}else {
if ( genre == 'positive') {
newLevel -= Number(level)
}else {
newLevel += Number(level)
if (idVal) {
if (toggled) {
let newLevel = Number($(idVal).val())
console.log("Ongoing", newLevel, toggled, idVal)
if (genre == 'positive') {
newLevel += Number(level)
} else {
newLevel -= Number(level)
}
} else {
if (genre == 'positive') {
newLevel -= Number(level)
} else {
newLevel += Number(level)
}
}
newLevel = (newLevel < 0) ? 0 : newLevel
$(idVal).val(newLevel)
}
newLevel = (newLevel<0) ? 0 : newLevel
$(idVal).val(newLevel)
}
//console.log("Effect", effect, toggled)
this.rollData.statDicesLevel = Number($('#statDicesLevel').val())
this.rollData.specDicesLevel = Number($('#specDicesLevel').val())
this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val())
this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val())
//this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val())
//this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val())
this.rollData.otherDicesLevel = Number($('#otherDicesLevel').val())
PegasusUtility.updateSpecDicePool(this.rollData)
PegasusUtility.updateEffectsBonusDice(this.rollData)
}
/* -------------------------------------------- */
manageArmors( armorIdx, toggled) {
manageArmors(armorIdx, toggled) {
let armor = this.rollData.armorsList[armorIdx]
if (armor) {
armor.applied = toggled
if (armor.type == 'other' ) {
if (armor.type == 'other') {
if (toggled) {
this.rollData.otherDicesLevel += Number(armor.value)
} else {
this.rollData.otherDicesLevel -= Number(armor.value)
this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel<0) ? 0 : this.rollData.otherDicesLevel
this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel < 0) ? 0 : this.rollData.otherDicesLevel
}
$("#otherDicesLevel").val(this.rollData.otherDicesLevel)
}
}
console.log("Armor", armorIdx, toggled)
console.log("Armor", armorIdx, toggled)
}
/* -------------------------------------------- */
manageWeapons( weaponIdx, toggled) {
manageWeapons(weaponIdx, toggled) {
let weapon = this.rollData.weaponsList[weaponIdx]
if (weapon) {
if (toggled) {
@ -128,42 +129,42 @@ export class PegasusRollDialog extends Dialog {
this.rollData.weaponName = undefined
}
weapon.applied = toggled
if (weapon.type == 'damage' || weapon.type == 'enhanced' ) {
if (weapon.type == 'damage' || weapon.type == 'enhanced') {
if (toggled) {
this.rollData.otherDicesLevel += Number(weapon.value)
} else {
this.rollData.weaponName = undefined
this.rollData.otherDicesLevel -= Number(weapon.value)
this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel<0) ? 0 : this.rollData.otherDicesLevel
this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel < 0) ? 0 : this.rollData.otherDicesLevel
}
$("#otherDicesLevel").val(this.rollData.otherDicesLevel)
}
}
console.log("Weapon", weaponIdx, toggled, this.rollData.otherDicesLevel, weapon)
console.log("Weapon", weaponIdx, toggled, this.rollData.otherDicesLevel, weapon)
}
/* -------------------------------------------- */
manageEquip( equipIdx, toggled) {
manageEquip(equipIdx, toggled) {
let equip = this.rollData.equipmentsList[equipIdx]
if (equip) {
equip.applied = toggled
let idVal = "#otherDicesLevel" // Default
if (equip.equip.data.bonusdice) {
idVal = "#bonusDicesLevel"
idVal = "#bonusDicesLevel"
}
if (equip.equip.data.statdice) {
idVal = "#statDicesLevel"
idVal = "#statDicesLevel"
}
if (equip.equip.data.otherdice) {
idVal = "#otherDicesLevel"
idVal = "#otherDicesLevel"
}
let newLevel = Number($(idVal).val())
if (toggled) {
newLevel += Number(equip.value)
} else {
newLevel += Number(equip.value)
} else {
newLevel -= Number(equip.value)
}
newLevel = (newLevel <0) ? 0 : newLevel
newLevel = (newLevel < 0) ? 0 : newLevel
$(idVal).val(newLevel)
// Then refresh
this.rollData.statDicesLevel = Number($('#statDicesLevel').val())
@ -174,6 +175,14 @@ export class PegasusRollDialog extends Dialog {
}
}
/* -------------------------------------------- */
async refreshDialog() {
PegasusUtility.updateSpecDicePool(this.rollData)
const content = await renderTemplate("systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html", this.rollData)
this.data.content = content
this.render(true)
}
/* -------------------------------------------- */
activateListeners(html) {
super.activateListeners(html);
@ -182,11 +191,11 @@ export class PegasusRollDialog extends Dialog {
function onLoad() {
}
$(function () { onLoad(); });
html.find('#specList').change(async (event) => {
html.find('#specList').change(async (event) => {
this.rollData.selectedSpec = event.currentTarget.value
let spec = this.rollData.specList.find(item => item._id == this.rollData.selectedSpec)
if ( spec) {
if (spec) {
this.rollData.specDicesLevel = spec.data.level
this.rollData.specName = spec.name
$('#specDicesLevel').val(this.rollData.specDicesLevel)
@ -194,15 +203,16 @@ export class PegasusRollDialog extends Dialog {
this.rollData.specName = undefined
$('#specDicesLevel').val(0)
}
const content = await renderTemplate("systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html", this.rollData)
this.data.content = content
this.render(true)
PegasusUtility.updateSpecDicePool(this.rollData)
this.refreshDialog()
});
html.find('#statDicesLevel').change((event) => {
this.rollData.statDicesLevel = Number(event.currentTarget.value)
});
html.find('#specDicesLevel').change((event) => {
html.find('#specDicesLevel').change( async (event) => {
this.rollData.specDicesLevel = Number(event.currentTarget.value)
PegasusUtility.updateSpecDicePool(this.rollData)
this.refreshDialog()
});
html.find('#bonusDicesLevel').change((event) => {
this.rollData.bonusDicesLevel = Number(event.currentTarget.value)
@ -213,27 +223,39 @@ export class PegasusRollDialog extends Dialog {
html.find('#otherDicesLevel').change((event) => {
this.rollData.otherDicesLevel = Number(event.currentTarget.value)
});
html.find('.effect-clicked').change((event) => {
html.find('.effect-clicked').change(async (event) => {
let toggled = event.currentTarget.checked
let effectIdx = $(event.currentTarget).data("effect-idx")
this.manageEffects( effectIdx, toggled)
this.manageEffects(effectIdx, toggled)
this.refreshDialog()
});
html.find('.armor-clicked').change((event) => {
let toggled = event.currentTarget.checked
let armorIdx = $(event.currentTarget).data("armor-idx")
this.manageArmors( armorIdx, toggled)
this.manageArmors(armorIdx, toggled)
});
html.find('.weapon-clicked').change((event) => {
let toggled = event.currentTarget.checked
let weaponIdx = $(event.currentTarget).data("weapon-idx")
this.manageWeapons( weaponIdx, toggled)
this.manageWeapons(weaponIdx, toggled)
});
html.find('.equip-clicked').change((event) => {
let toggled = event.currentTarget.checked
let equipIdx = $(event.currentTarget).data("equip-idx")
this.manageEquip( equipIdx, toggled)
});
this.manageEquip(equipIdx, toggled)
})
html.find('.pool-add-dice').click(async (event) => {
let diceKey = $(event.currentTarget).data("dice-key")
PegasusUtility.addDicePool( this.rollData, diceKey)
this.refreshDialog()
})
html.find('.pool-remove-dice').click(async (event) => {
let idx = $(event.currentTarget).data("dice-idx")
PegasusUtility.removeFromDicePool( this.rollData, idx)
this.refreshDialog()
})
}
}

View File

@ -55,11 +55,78 @@ export class PegasusUtility {
/* -------------------------------------------- */
static pushInitiativeOptions(html, options) {
console.log('Option pushed....')
options.push({ name: "Apply -10", condition: true, icon: '<i class="fas fa-plus"></i>', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } })
}
/* -------------------------------------------- */
static getDiceList() {
return [{ key: "d4", img: "systems/fvtt-pegasus-rpg/images/dice/d4.webp" }, { key: "d6", img: "systems/fvtt-pegasus-rpg/images/dice/d6.webp" },
{ key: "d8", img: "systems/fvtt-pegasus-rpg/images/dice/d8.webp" }, { key: "d10", img: "systems/fvtt-pegasus-rpg/images/dice/d10.webp" },
{ key: "d12", img: "systems/fvtt-pegasus-rpg/images/dice/d12.webp" }]
}
/* -------------------------------------------- */
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.effect.data.bonusdice) {
let diceKey = PegasusUtility.getDiceFromLevel(effect.effect.data.effectlevel)
let newDice = {
name: "effect-bonus-dice", key: diceKey, effect: effect.effect.name,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
}
newDicePool.push(newDice)
}
}
rollData.dicePool = newDicePool
}
/* -------------------------------------------- */
static updateSpecDicePool(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "spec")
if (rollData.specDicesLevel > 0) {
let diceKey = PegasusUtility.getDiceFromLevel(rollData.specDicesLevel)
let newDice = {
name: "spec", key: diceKey,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
}
newDicePool.push(newDice)
}
rollData.dicePool = newDicePool
}
/* -------------------------------------------- */
static addDicePool(rollData, diceKey) {
let newDice = {
name: "dice-click", key: diceKey,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
}
rollData.dicePool.push(newDice)
}
/*-------------------------------------------- */
static removeFromDicePool( rollData, diceIdx ) {
let toRemove = rollData.dicePool[diceIdx]
console.log("CLICK : ", rollData.dicePool, diceIdx)
if (toRemove && toRemove.name != "spec" && toRemove.name != "stat") {
let newDicePool = []
for (let i=0; i<rollData.dicePool.length; i++) {
if ( i!=diceIdx) {
newDicePool.push( rollData.dicePool[i])
}
}
rollData.dicePool = newDicePool
if (toRemove.name == "effect-bonus-dice") {
for (let effect of rollData.effectsList) {
if ( effect.effect.name == toRemove.effect && effect.applied) {
effect.applied = false //Remove the effect
}
}
}
}
}
/*-------------------------------------------- */
static getSpecs() {
return this.specs;
}
@ -279,7 +346,7 @@ export class PegasusUtility {
/* -------------------------------------------- */
static getDiceValue(level = 0) {
let diceString = this.diceList[level]
if ( !diceString) {
if (!diceString) {
console.log("Level error", level)
}
let diceTab = diceString.split(" ")
@ -384,14 +451,14 @@ export class PegasusUtility {
this.updateRollData(msg.data)
}
if (msg.name == "msg_gm_item_drop" && game.user.isGM) {
let actor = game.actors.get( msg.data.actorId )
let actor = game.actors.get(msg.data.actorId)
let item
if (msg.data.isPack) {
item = await fromUuid("Compendium." + msg.data.isPack + "." + msg.data.itemId)
} else {
item = game.items.get(msg.data.itemId)
}
this.addItemDropToActor( actor, item )
this.addItemDropToActor(actor, item)
}
}
@ -468,6 +535,22 @@ export class PegasusUtility {
}
}
/* -------------------------------------------- */
static removeOneUseEffects(rollData) {
// De-actived used effects from perks
let toRem = []
for (let effect of rollData.effectsList) {
if (effect.effect.data.isUsed && effect.effect.data.oneuse) {
toRem.push(effect.effect._id)
}
}
if (toRem.length > 0) {
console.log("Going to remove one use effects", toRem)
let actor = game.actors.get(rollData.actorId)
actor.deleteEmbeddedDocuments('Item', toRem)
}
}
/* -------------------------------------------- */
static async rollPegasus(rollData) {
@ -489,11 +572,15 @@ export class PegasusUtility {
if (rollData.specDicesLevel) {
dicePool[1].level = rollData.specDicesLevel
}
if (rollData.bonusDicesLevel) {
dicePool[2].level += Number(rollData.bonusDicesLevel)
if (rollData.traumaState == "none") {
if (rollData.bonusDicesLevel) {
dicePool[2].level += Number(rollData.bonusDicesLevel)
}
}
if (rollData.hindranceDicesLevel) {
dicePool[3].level += Number(rollData.hindranceDicesLevel)
if (!rollData.isInit) { // No Hindrance dice for Init
if (rollData.hindranceDicesLevel) {
dicePool[3].level += Number(rollData.hindranceDicesLevel)
}
}
if (rollData.otherDicesLevel) {
dicePool[4].level += Number(rollData.otherDicesLevel)
@ -509,7 +596,6 @@ export class PegasusUtility {
let myRoll = rollData.roll;
if (!myRoll) { // New rolls only of no rerolls
myRoll = new Roll(diceFormula).roll({ async: false });
console.log("ROLL : ", diceFormula)
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"));
rollData.roll = myRoll
}
@ -534,7 +620,14 @@ export class PegasusUtility {
combat.updateEmbeddedDocuments("Combatant", [{ _id: rollData.combatantId, initiative: rollData.finalScore }]);
}
// Stun specific -> Suffere a stun level when dmg-res
if (rollData.subKey && rollData.subKey == "dmg-res") {
let actor = game.actors.get(rollData.actorId)
actor.modifyStun(-1)
}
//this.removeUsedPerkEffects( rollData) // Unused for now
this.removeOneUseEffects(rollData) // Unused for now
// And save the roll
this.saveRollData(rollData);
@ -631,7 +724,7 @@ export class PegasusUtility {
item = await fromUuid("Compendium." + dataItem.pack + "." + dataItem.id)
} else {
item = game.items.get(dataItem.id)
}
}
return item
}

View File

@ -1164,12 +1164,13 @@ ul, li {
box-shadow: inset 0px 1px 0px 0px #a6827e;
background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%);
background-color: #7d5d3b00;
border-radius: 3px;
border: 2px ridge #846109;
border-radius: 2px;
border: 1px ridge #846109;
display: inline-block;
cursor: pointer;
color: #ffffff;
padding: 0px 6px 0px 6px;
margin: 2px 2px 2px 2px;
padding: 2px 2px 2px 2px;
text-decoration: none;
text-shadow: 0px 1px 0px #4d3534;
position: relative;
@ -1406,11 +1407,21 @@ Focus FOC: #ff0084
max-width: 12rem;
min-width: 12rem;
}
.item-name-label-header-long {
flex-grow:2;
max-width: 14rem;
min-width: 14rem;
}
.item-name-label {
flex-grow:2;
max-width: 10rem;
min-width: 10rem;
}
.item-name-label-long {
flex-grow:2;
max-width: 12rem;
min-width: 12rem;
}
.item-name-label-level2 {
flex-grow:2;
max-width: 9rem;
@ -1445,4 +1456,30 @@ Focus FOC: #ff0084
.item-controls-fixed {
min-width:2rem;
max-width: 2rem;
}
.dice-pool-stack {
flex: 1 1 5rem;
display: flex !important;
flex-grow: 0;
justify-content: flex-start;
}
.dice-pool-label {
margin-left: 4px;
}
.dice-pool-div {
border-left: 4px;
border-radius: 2px;
margin-bottom: 1rem;
background-color: #403f3e40;
}
.dice-pool-image {
border: 0;
margin-left: 4px;
min-width: 48px;
min-height: 48px;
max-width: 48px;
max-height: 48px;
flex-grow: 0;
}

View File

@ -180,9 +180,9 @@
"styles": [
"styles/simple.css"
],
"templateVersion": 90,
"templateVersion": 92,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "0.5.11",
"version": "0.5.13",
"background" : "./images/ui/pegasus_welcome_page.webp"
}

View File

@ -28,7 +28,9 @@
"notes": "",
"gmnotes": "",
"racename": "",
"rolename": ""
"rolename": "",
"corruption": 0,
"moralitythreshold": 0
}
},
"core": {
@ -195,7 +197,7 @@
}
},
"Item": {
"types": [ "race", "role", "ability", "specialisation", "perk", "power" , "armor", "shield", "equipment", "weapon", "effect", "money"],
"types": [ "race", "role", "ability", "specialisation", "perk", "power" , "armor", "shield", "equipment", "weapon", "effect", "money", "virtuevice"],
"effect": {
"type": "",
"genre": "",
@ -205,7 +207,7 @@
"specaffected": [],
"statdice": false,
"bonusdice": false,
"otherdice": false,
"weapondamage": false,
"hindrance" : false,
"resistedby": "",
"recoveryroll": false,
@ -213,6 +215,7 @@
"recoveryrollspec": [],
"effectstatlevel": false,
"effectstat": "",
"oneuse": false,
"description": ""
},
"race": {
@ -263,6 +266,14 @@
"threatlevel": 0,
"description": ""
},
"virtuevice": {
"subtype": "",
"unavailablevice": [],
"unavailablevirtue": [],
"effectsgained": [],
"threatlevel": 0,
"description": ""
},
"specialisation": {
"statistic": "",
"level": 1,
@ -279,6 +290,8 @@
"duration": "",
"isweaver": false,
"effectsgained": [],
"category": "general",
"upgradable": false,
"features": {
"nrgcost": {
"label": "NRG cost to use",

View File

@ -7,61 +7,64 @@
<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-actor-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
<li class="item flexrow list-item color-class-pool item-stat-roll" data-attr-key="pool">
<span class="stat-icon">
<img class="stat-icon" src="icons/dice/d12black.svg">
</span>
<span class="stat-label stat-margin" name="pool">
<h4 class="stat-text-white stat-margin"><a class="generic-pool-roll stat-margin" data-stat-key="pool">Dice Pool</a></h4>
</span>
</li>
</ul>
</div>
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 2)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
<li class="item flexrow list-item color-class-mr item-stat-roll" data-attr-key="mr">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/MR.webp">
</span>
<span class="stat-label stat-margin" name="mr">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="mr">MR</a></h4>
</span>
<select class="status-small-label color-class-common" type="text" name="data.mr.value" value="{{data.mr.value}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.mr.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="data.mr.mod" value="{{data.mr.mod}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} />
</li>
</ul>
</div>
<div class="stat-item status-block">
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-status.html}}
</div>
<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-actor-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
<li class="item flexrow list-item color-class-pool item-stat-roll" data-attr-key="pool">
<span class="stat-icon">
<img class="stat-icon" src="icons/dice/d12black.svg">
</span>
<span class="stat-label stat-margin" name="pool">
<h4 class="stat-text-white stat-margin"><a class="generic-pool-roll stat-margin"
data-stat-key="pool">Dice Pool</a></h4>
</span>
</li>
</ul>
</div>
<!--
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 2)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
<li class="item flexrow list-item color-class-mr item-stat-roll" data-attr-key="mr">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/MR.webp">
</span>
<span class="stat-label stat-margin" name="mr">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="mr">MR</a>
</h4>
</span>
<select class="status-small-label color-class-common" type="text" name="data.mr.value"
value="{{data.mr.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.mr.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
name="data.mr.mod" value="{{data.mr.mod}}" data-dtype="Number" {{#unless
@root.editScore}}disabled{{/unless}} />
</li>
</ul>
</div>
<div class="stat-item status-block">
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-status.html}}
</div>
<!--
<label class="status-small-label">Active NRG</label>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
-->
</div>
</div>
</div>
@ -83,76 +86,83 @@
{{!-- Combat Tab --}}
<div class="tab fight" data-group="primary" data-tab="combat">
<div class="flexcol">
<div class="flexrow">
<div>
<ul class="stat-item">
<li class="item flexrow list-item color-class-melee"><a class="combat-button attack-melee flexrow">
<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>
<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">
</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>
<span class="generic-label combat-margin stat-text-white">Melee/Thrown Damage</span>
</a>
</li>
</ul>
</div>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-ranged"><a class="combat-button attack-ranged flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PER.webp">
</span>
</span>
<span class="generic-label combat-margin stat-text-white">Ranged Attack</span>
</a>
</li>
<li class="item flexrow list-item color-class-range"><a class="combat-button damage-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 Damage</span>
</a>
<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 Damage</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<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>
<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>
<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="generic-label">
<div class="stat-item">
<span class="flexrow">
<h3>Stun</h3>
<span class="status-small-label no-grow">
<a class="stun-plus plus-minus-button">+</a>
<a class="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="data.combat.stunlevel" value="{{data.combat.stunlevel}}" data-dtype="Number" />
<input type="text" class="" name="data.combat.stunlevel" value="{{data.combat.stunlevel}}"
data-dtype="Number" />
<span class="generic-label small-label">Threshold</span>
<input type="text" class="" name="data.combat.stunthreshold" value="{{data.combat.stunthreshold}}" data-dtype="Number" />
<input type="text" class="" name="data.combat.stunthreshold" value="{{data.combat.stunthreshold}}"
data-dtype="Number" />
</li>
</ul>
</div>
@ -160,54 +170,55 @@
<div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Perks</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Level</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">#Targets</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Status</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Duration</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
</li>
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Perks</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">#Targets</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Level</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Range</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Status</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Duration</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
<span class="item-field-label-short">
<label class="short-label">&nbsp;</label>
</span>
</li>
{{#each perks as |perk key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{perk._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{perk.img}}" /></a>
<span class="item-name-label">{{perk.name}}</span>
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{perk.img}}" /></a>
<span class="item-name-label-long">{{perk.name}}</span>
<span class="item-field-label-short">{{perk.data.level}}</span>
{{#if perk.data.features.range.flag}}
<span class="item-field-label-medium">{{perk.data.features.range.value}}</span>
<span class="item-field-label-long">{{perk.data.features.range.value}}</span>
{{else}}
<span class="item-field-label-medium">&nbsp;-&nbsp;</span>
<span class="item-field-label-long">&nbsp;-&nbsp;</span>
{{/if}}
{{#if perk.data.features.nbtargets.flag}}
<span class="item-field-label-short">{{perk.data.features.nbtargets.value}}</span>
{{else}}
<span class="item-field-label-short">&nbsp;-&nbsp;</span>
<span class="item-field-label-short">&nbsp;-&nbsp;</span>
{{/if}}
<span class="item-field-label-long">
<select class="perk-status" type="text" value="{{perk.data.status}}" data-dtype="String">
{{#select perk.data.status}}
@ -216,29 +227,46 @@
<option value="round2">2 Rounds left</option>
<option value="round1">1 Round left</option>
{{/select}}
</select>
</select>
</span>
{{#if (ne perk.data.status "ready")}}
{{#if (eq perk.data.nbuse "next1action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span>
<span class="item-field-label-short ">&nbsp;</span>
<span class="item-field-label-short ">&nbsp;</span>
{{/if}}
{{#if (eq perk.data.nbuse "next2action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span>
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="2" name="perk.data.used2" {{checked perk.data.used2}}/></label></span>
<span class="item-field-label-short ">&nbsp;</span>
{{/if}}
{{#if (eq perk.data.nbuse "next3action")}}
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}}/></label></span>
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="2" name="perk.data.used2" {{checked perk.data.used2}}/></label></span>
<span class="item-field-label-short "><label class="item-field-label-short attribute-value checkbox"></label><input type="checkbox" class="perk-used" data-use-index="3" name="perk.data.used3" {{checked perk.data.used3}}/></label></span>
{{/if}}
{{#if (eq perk.data.nbuse "next1action")}}
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"><input type="checkbox" class="perk-used"
data-use-index="1" name="perk.data.used1" {{checked perk.data.used1}} /></label></span>
<span class="item-field-label-short ">&nbsp;</span>
<span class="item-field-label-short ">&nbsp;</span>
{{/if}}
{{#if (eq perk.data.nbuse "next2action")}}
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="1" name="perk.data.used1" {{checked
perk.data.used1}} /></label></span>
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="2" name="perk.data.used2" {{checked
perk.data.used2}} /></label></span>
<span class="item-field-label-short ">&nbsp;</span>
{{/if}}
{{#if (eq perk.data.nbuse "next3action")}}
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="1" name="perk.data.used1" {{checked
perk.data.used1}} /></label></span>
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="2" name="perk.data.used2" {{checked
perk.data.used2}} /></label></span>
<span class="item-field-label-short "><label
class="item-field-label-short attribute-value checkbox"></label><input type="checkbox"
class="perk-used" data-use-index="3" name="perk.data.used3" {{checked
perk.data.used3}} /></label></span>
{{/if}}
{{else}}
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
<span class="item-field-label-short "><label class="item-field-label-short">&nbsp;</label></span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
@ -248,7 +276,7 @@
{{/each}}
</ul>
</div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
@ -269,8 +297,10 @@
</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>
<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">{{effect.name}}</span>
<span class="item-field-label-short">{{effect.data.effectlevel}}</span>
<span class="item-field-label-short">{{upperFirst effect.data.type}}</span>
@ -289,44 +319,45 @@
{{!-- Other Tab --}}
<div class="tab items" data-group="primary" data-tab="specs">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Specialisations</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">Dice</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Powergroup</label>
</span>
</li>
{{#each specs as |spec key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{spec._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{spec.img}}" /></a>
<span class="item-name-label"><a class="roll-spec">{{spec.name}}</a></span>
<span class="item-field-label-short">{{upper spec.data.statistic}}</span>
<span class="item-field-label-short">{{spec.data.dice}}</span>
{{#if spec.data.ispowergroup}}
{{#if spec.data.powersactivated}}
<span class="item-field-label-long"><a class="spec-group-deactivate">Deactivate</a></span>
{{else}}
<span class="item-field-label-long"><a class="spec-group-activate">Activate</a></span>
{{/if}}
{{else}}
<span class="item-field-label-long">&nbsp;-&nbsp;</span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Specialisations</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">Dice</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Powergroup</label>
</span>
</li>
{{#each specs as |spec key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{spec._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{spec.img}}" /></a>
<span class="item-name-label"><a class="roll-spec">{{spec.name}}</a></span>
<span class="item-field-label-short">{{upper spec.data.statistic}}</span>
<span class="item-field-label-short">{{spec.data.dice}}</span>
{{#if spec.data.ispowergroup}}
{{#if spec.data.powersactivated}}
<span class="item-field-label-long"><a class="spec-group-deactivate">Deactivate</a></span>
{{else}}
<span class="item-field-label-long"><a class="spec-group-activate">Activate</a></span>
{{/if}}
{{else}}
<span class="item-field-label-long">&nbsp;-&nbsp;</span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
@ -339,11 +370,21 @@
<ul>
<li class="item flexrow list-item" data-key="nrg">
<span class="stat-label flexrow" name="nrg"><h4>{{data.nrg.label}}</h4> </span>
<span class="small-label padd-right packed-left">Activated</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left">&nbsp;Current</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left">&nbsp;Mod</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/>
<span class="small-label padd-right packed-left">&nbsp;Max</span><input type="text" class="padd-right update-field" data-field-name="data.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/>
<span class="stat-label flexrow" name="nrg">
<h4>{{data.nrg.label}}</h4>
</span>
<span class="small-label padd-right packed-left">Activated</span><input type="text"
class="padd-right update-field" data-field-name="data.nrg.activated" value="{{data.nrg.activated}}"
data-dtype="Number" />
<span class="small-label padd-right packed-left">&nbsp;Current</span><input type="text"
class="padd-right update-field" data-field-name="data.nrg.value" value="{{data.nrg.value}}"
data-dtype="Number" />
<span class="small-label padd-right packed-left">&nbsp;Mod</span><input type="text"
class="padd-right update-field" data-field-name="data.nrg.mod" value="{{data.nrg.mod}}"
data-dtype="Number" />
<span class="small-label padd-right packed-left">&nbsp;Max</span><input type="text"
class="padd-right update-field" data-field-name="data.nrg.max" value="{{data.nrg.max}}"
data-dtype="Number" />
<span class="small-label padd-right packed-left"> / {{data.nrg.absolutemax}}</span>
</li>
</ul>
@ -375,7 +416,8 @@
{{#each powers as |power key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{power._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{power.img}}" /></a>
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{power.img}}" /></a>
<span class="item-name-label">
{{#if power.data.rollneeded}}
<a class="power-roll">{{power.name}}</a>
@ -386,33 +428,34 @@
<span class="item-field-label-medium">{{upperFirst power.data.type}}</span>
<span class="item-field-label-short"><label class="short-label">
{{#if power.data.activated}}
Activated
{{else}}
&nbsp;-&nbsp;
{{/if}}
{{#if power.data.activated}}
Activated
{{else}}
&nbsp;-&nbsp;
{{/if}}
</label>
</span>
</span>
<span class="item-field-label-medium">{{upperFirst power.data.action}}</span>
<span class="item-field-label-medium">{{upperFirst power.data.action}}</span>
<span class="item-field-label-medium"><a class="power-dmg-roll">
{{#if power.data.dmgroll}}
{{upper power.data.dmgstatistic}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</a></span>
{{#if power.data.dmgroll}}
{{upper power.data.dmgstatistic}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</a></span>
<span class="item-field-label-medium">{{power.data.cost}}</span>
<span class="item-field-label-medium">{{power.data.cost}}</span>
<span class="item-field-label-medium">
<input type="text" class="padd-right input-numeric-short power-cost-spent" value="{{power.data.costspent}}" data-dtype="Number"/>
<input type="text" class="padd-right input-numeric-short power-cost-spent"
value="{{power.data.costspent}}" data-dtype="Number" />
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control power-activate" title="Activated">{{#if power.data.activated}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
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>
@ -436,10 +479,11 @@
<span class="item-field-label-medium">
<label class="short-label">Status Modifier</label>
</span>
</li>
</li>
{{#each abilities as |ability key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{ability._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{ability.img}}" /></a>
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{ability.img}}" /></a>
<span class="item-name-label">{{ability.name}}</span>
<span class="item-field-label-long">{{upper ability.data.affectedstat}}</span>
@ -454,7 +498,7 @@
</li>
{{/each}}
</ul>
</div>
</div>
@ -486,20 +530,21 @@
<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>
</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>
<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.data.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>
{{money.data.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.data.weight}}</label>
</span>
</span>
<span class="item-field-label-medium">
{{#if money.data.idrDice}}
<a class="roll-idr" data-dice-value="{{money.data.idrDice}}">{{money.data.idrDice}}</a>
@ -530,50 +575,58 @@
<span class="item-field-label-short">
<label class="short-label">DMG</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMGT</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMGTLVL</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Ammo</label>
<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>
<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>
</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>
<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.data.statistic}}</label></span>
<span class="item-field-label-short"><label>{{upper weapon.data.damagestatistic}}</label></span>
<span class="item-field-label-short"><label>{{weapon.data.damageDice}}</label></span>
<span class="item-field-label-short"><label>{{weapon.data.damagetype}}</label></span>
<span class="item-field-label-short"><label>{{weapon.data.damagetypelevel}}</label></span>
{{#if (gt weapon.data.ammomax 0)}}
<span class="item-field-label-long"><label>{{weapon.data.ammocurrent}}/{{weapon.data.ammomax}}
<span class="item-field-label-long"><label>{{weapon.data.ammocurrent}}/{{weapon.data.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>
<span class="item-field-label-long"><label>-</label>
</span>
{{/if}}
<span class="item-field-label-medium">
{{#if (count weapon.data.effects)}}
{{#if (count weapon.data.effects)}}
{{#if weapon.data.activated}}
<a class="equip-deactivate">Deactivate</a>
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
{{/if}}
</span>
<span class="item-field-label-short"><label>{{weapon.data.weight}}</label></span>
@ -585,7 +638,6 @@
{{/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.data.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
@ -613,7 +665,7 @@
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
@ -623,24 +675,25 @@
<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>
</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>
<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.data.statistic}}</span>
<span class="item-field-label-short">{{upper armor.data.statistic}}</span>
<span class="item-field-label-short">{{armor.data.resistanceDice}}</span>
<span class="item-field-label-medium">{{armor.data.locationprotected}}</span>
<span class="item-field-label-medium">
{{#if (count armor.data.effects)}}
{{#if armor.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{#if armor.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
&nbsp;-&nbsp;
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
@ -659,7 +712,7 @@
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>
</li>
{{/each}}
</ul>
@ -675,31 +728,32 @@
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
<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>
</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>
<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.data.levelDice}}</span>
<span class="item-field-label-medium">
{{#if (count shield.data.effects)}}
{{#if shield.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{#if shield.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
&nbsp;-&nbsp;
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
@ -733,7 +787,7 @@
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
@ -743,17 +797,17 @@
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
</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.data.contents as |subgear key|}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html equip=subgear level=2}}
{{/each}}
</ul>
{{> 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.data.contents as |subgear key|}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html equip=subgear level=2}}
{{/each}}
</ul>
{{/each}}
</ul>
<hr>
</div>
@ -799,12 +853,14 @@
</li>
<li class="flexrow item">
<label class="generic-label">Preferred Hand</label>
<input type="text" class="" name="data.biodata.preferredhand" value="{{data.biodata.preferredhand}}" data-dtype="String" />
</li>
<input type="text" class="" name="data.biodata.preferredhand" value="{{data.biodata.preferredhand}}"
data-dtype="String" />
</li>
<li class="flexrow item" data-item-id="{{race._id}}">
<label class="generic-label">Race</label>
<a class="item-edit"><img class="stat-icon" src="{{race.img}}"></a>
<input type="text" class="" name="data.biodata.racename" value="{{race.name}}" disabled data-dtype="String" />
<input type="text" class="" name="data.biodata.racename" value="{{race.name}}" disabled
data-dtype="String" />
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
@ -812,7 +868,8 @@
<li class="flexrow item" data-item-id="{{role._id}}">
<label class="generic-label">Role</label>
<a class="item-edit"><img class="stat-icon" src="{{role.img}}"></a>
<input type="text" class="" name="data.biodata.rolename" value="{{role.name}}" disabled data-dtype="String" />
<input type="text" class="" name="data.biodata.rolename" value="{{role.name}}" disabled
data-dtype="String" />
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
@ -825,14 +882,18 @@
<ul>
<li class="flexrow">
<label class="short-label">Worst Fear </label>
<input type="text" class="" name="data.biodata.worstfear" value="{{data.biodata.worstfear}}" data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-worstfear" name="data.biodata.worstfearactive" {{checked data.biodata.worstfearactive}}/> Active ?</label>
<input type="text" class="" name="data.biodata.worstfear" value="{{data.biodata.worstfear}}"
data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-worstfear"
name="data.biodata.worstfearactive" {{checked data.biodata.worstfearactive}} /> Active ?</label>
</li>
<li class="flexrow">
<label class="short-label">Desires </label>
<input type="text" class="" name="data.biodata.desires" value="{{data.biodata.desires}}" data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-desires" name="data.biodata.desiresactive" {{checked data.biodata.desiresactive}}/> Active ?</label>
</li>
<input type="text" class="" name="data.biodata.desires" value="{{data.biodata.desires}}"
data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-desires"
name="data.biodata.desiresactive" {{checked data.biodata.desiresactive}} /> Active ?</label>
</li>
</ul>
<h3>Catchphrase : </h3>
@ -849,7 +910,8 @@
</li>
<li class="flexrow">
<label class="short-label">Catchphrase used </label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.biodata.catchphraseused" {{checked data.biodata.catchphraseused}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.biodata.catchphraseused" {{checked
data.biodata.catchphraseused}} /></label>
</li>
</ul>
@ -862,13 +924,11 @@
</li>
<li class="flexrow">
<label class="short-label">Character Development Points Total (CDP total) : </label>
<input type="text" class="" name="data.biodata.cdp" value="{{data.biodata.cdp}}"
data-dtype="Number" />
<input type="text" class="" name="data.biodata.cdp" value="{{data.biodata.cdp}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Hero Level : </label>
<input type="text" class="" name="data.biodata.level" value="{{data.biodata.level}}"
data-dtype="Number" />
<input type="text" class="" name="data.biodata.level" value="{{data.biodata.level}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Hero Levels Remaining : </label>
@ -879,7 +939,7 @@
<label class="short-label">Threat Level : </label>
<input type="text" class="" name="data.biodata.threatlevel" value="{{data.biodata.threatlevel}}"
data-dtype="Number" />
</li>
</li>
</ul>
<hr>

24
templates/deleted.html Normal file
View File

@ -0,0 +1,24 @@
{{#if (eq traumaState "none")}}
<div class="flexrow">
<span class="roll-dialog-label" >Bonus Dice : </span>
<select class="roll-dialog-label" id="bonusDicesLevel" type="text" name="bonusDicesLevel" value="{{bonusDicesLevel}}" data-dtype="Number">
{{#select bonusDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}
{{#if isInit}}
{{else}}
<div class="flexrow">
<span class="roll-dialog-label" >Hindrance Dice :</span>
<select class="roll-dialog-label" id="hindranceDicesLevel" type="text" name="hindranceDicesLevel" value="{{hindranceDicesLevel}}" data-dtype="Number">
{{#select hindranceDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}

View File

@ -26,7 +26,7 @@
</select>
</li>
<li class="flexrow"><label class="generic-label">DMG RES Other Dice</label>
<li class="flexrow"><label class="generic-label">DMG RES Dice</label>
<select class="competence-base flexrow" type="text" name="data.resistance" value="{{data.resistance}}" data-dtype="Number">
{{#select data.resistance}}
{{{optionsDiceList}}}

View File

@ -33,8 +33,12 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">One use?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.oneuse" {{checked data.oneuse}}/></label>
</li>
<li class="flexrow"><label class="generic-label">'Effect Level is a Stat?</label>
<li class="flexrow"><label class="generic-label">Effect Level is a Stat?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.effectstatlevel" {{checked data.effectstatlevel}}/></label>
</li>
@ -71,7 +75,7 @@
<li class="flexrow"><label class="generic-label">Affected Stat</label>
<select class="competence-base flexrow" type="text" name="data.stataffected" value="{{data.stataffected}}" data-dtype="String">
{{#select data.stataffected}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=true all=true}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=true mr=true all=true combat=true}}
{{/select}}
</select>
</li>
@ -87,7 +91,7 @@
<label class="attribute-value checkbox"><input type="checkbox" name="data.bonusdice" {{checked data.bonusdice}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Other Dice ?</label>
<li class="flexrow"><label class="generic-label">Weapon Damage ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.otherdice" {{checked data.otherdice}}/></label>
</li>

View File

@ -16,6 +16,20 @@
<li class="flexrow"><label class="generic-label">Level</label>
<input type="text" class="input-numeric-short padd-right" name="data.level" value="{{data.level}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Perk category</label>
<select class="competence-base flexrow" type="text" name="data.category" value="{{data.category}}" data-dtype="String">
{{#select data.category}}
<option value="general">General</option>
<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">Perk Status</label>
<select class="competence-base flexrow" type="text" name="data.status" value="{{data.status}}" data-dtype="String">
@ -37,6 +51,11 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Upgradable?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.upgradable" {{checked data.upgradable}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Is Weaver Perk?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.isweaver" {{checked data.isweaver}}/></label>
</li>

View File

@ -22,7 +22,7 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Dice Level</label>
<li class="flexrow"><label class="generic-label">Bonus Dice</label>
<select class="competence-base flexrow" type="text" name="data.level" value="{{data.level}}" data-dtype="Number">
{{#select data.level}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-level.html}}

View File

@ -30,7 +30,7 @@
</select>
</li>
<li class="flexrow"><label class="generic-label">Damage (Other Dice pool)</label>
<li class="flexrow"><label class="generic-label">Damage Dice</label>
<select class="competence-base flexrow" type="text" name="data.damage" value="{{data.damage}}" data-dtype="String">
{{#select data.damage}}
{{{optionsDiceList}}}

View File

@ -8,7 +8,7 @@
<span class="item-field-label-long"><label>
{{equip.data.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
(<a class="quantity-minus plus-minus-button">&nbsp;-</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>

View File

@ -29,7 +29,7 @@
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/>
<span class="small-label status-small-label"> /{{data.nrg.absolutemax}}</span>
<span class="small-label status-small-label">&nbsp;/ {{data.nrg.absolutemax}}</span>
</li>
<li class="item flexrow " data-key="nrg">
<span class="stat-label flexrow status-col-name" name="activated-nrg">
@ -49,11 +49,12 @@
<label class="status-small-label"><strong>Momentum</strong></label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.value" value="{{data.momentum.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.max" value="{{data.momentum.max}}" data-dtype="Number"/>
<span>
<span class="padd-right status-small-label no-grow">
<a class="momentum-plus plus-minus-button">+</a>
<a class="momentum-minus plus-minus-button">-</a>
<a class="momentum-minus plus-minus-button">&nbsp;-</a>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.max" value="{{data.momentum.max}}" data-dtype="Number"/>
<span class="small-label status-small-label">&nbsp;</span>
</li>
<!--<li class="item flexrow list-item" data-key="lock-unlock">
<span class="stat-label flexrow status-col-name" name="momentum">

View File

@ -20,3 +20,10 @@
{{#if mr}}
<option value="mr">MR</option>
{{/if}}
{{#if combat}}
<option value="melee-atk">Melee ATK</option>
<option value="ranged-atk">Ranged ATK</option>
<option value="melee-dmg">Melee DMG</option>
<option value="ranged-dmg">Ranged DMG</option>
<option value="dmg-res">DMG RES</option>
{{/if}}

View File

@ -40,7 +40,7 @@
{{/if}}
</li>
{{else}}
{{#if (eq effect.effect.data.stataffected "all")}}
{{#if (eq @root.subKey effect.effect.data.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}}
@ -49,6 +49,17 @@
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{else}}
{{#if (eq effect.effect.data.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>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{/if}}
{{/if}}
{{/if}}
{{/if}}

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}}</h1>
</header>
<div class="grid grid-2col">
@ -11,72 +11,73 @@
<div class="flexcol">
<div class="flexrow">
<span class="roll-dialog-label" >Stat Dice : </span>
<select class="roll-dialog-label" id="statDicesLevel" type="text" name="statDicesLevel" value="{{statDicesLevel}}" data-dtype="Number"
{{#if statKey}}disabled{{/if}}>
<span class="roll-dialog-label">Stat Dice : </span>
<select class="roll-dialog-label" id="statDicesLevel" type="text" name="statDicesLevel"
value="{{statDicesLevel}}" data-dtype="Number" {{#if statKey}}disabled{{/if}}>
{{#select statDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
</select>
<span class="small-label">&nbsp;+&nbsp;{{statMod}}</span>
</div>
{{#if specList}}
<div class="flexrow">
<span class="roll-dialog-label" >Spec : </span>
<select class="roll-dialog-label" id="specList" type="text" name="selectedSpec" value="{{selectedSpec}}" data-dtype="String">
<span class="roll-dialog-label">Spec : </span>
<select class="roll-dialog-label" id="specList" type="text" name="selectedSpec" value="{{selectedSpec}}"
data-dtype="String">
{{#select selectedSpec}}
<option value="0">None</option>
{{#each specList as |spec idx|}}
<option value="{{spec._id}}">{{spec.name}}</option>
{{/each}}
{{#each specList as |spec idx|}}
<option value="{{spec._id}}">{{spec.name}}</option>
{{/each}}
{{/select}}
</select>
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label" >Spec Dice : </span>
<select class="roll-dialog-label" id="specDicesLevel" type="text" name="specDicesLevel" value="{{specDicesLevel}}" data-dtype="Number"
{{#if specList}}disabled{{/if}}>
<span class="roll-dialog-label">Spec Dice : </span>
<select class="roll-dialog-label" id="specDicesLevel" type="text" name="specDicesLevel"
value="{{specDicesLevel}}" data-dtype="Number" {{#if specList}}disabled{{/if}}>
{{#select specDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label" >Bonus Dice : </span>
<select class="roll-dialog-label" id="bonusDicesLevel" type="text" name="bonusDicesLevel" value="{{bonusDicesLevel}}" data-dtype="Number">
{{#select bonusDicesLevel}}
<span class="roll-dialog-label">Weapon Damage :</span>
<select class="roll-dialog-label" id="otherDicesLevel" type="text" name="otherDicesLevel"
value="{{otherDicesLevel}}" data-dtype="Number">
{{#select otherDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label" >Hindrance Dice :</span>
<select class="roll-dialog-label" id="hindranceDicesLevel" type="text" name="hindranceDicesLevel" value="{{hindranceDicesLevel}}" data-dtype="Number">
{{#select hindranceDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
<div class="dice-pool-div">
<span>
<h3 class="dice-pool-label">Current pool</h3>
</span>
<div class="flexrow dice-pool-stack">
{{#each dicePool as |dice idx|}}
<span><a class="pool-remove-dice" data-dice-idx="{{idx}}" data-dice-key="{{dice.key}}"><img class="dice-pool-image"
src="{{dice.img}}"></a></span>
{{/each}}
</div>
</div>
<div class="flexrow">
<span class="roll-dialog-label" >Other Dice :</span>
<select class="roll-dialog-label" id="otherDicesLevel" type="text" name="otherDicesLevel" value="{{otherDicesLevel}}" data-dtype="Number">
{{#select otherDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{#each diceList as |dice idx|}}
<span><a class="pool-add-dice" data-dice-key="{{dice.key}}"><img class="dice-pool-image"
src="{{dice.img}}"></a></span>
{{/each}}
</div>
</div>
<div>
@ -84,5 +85,5 @@
</div>
</div>
</form>
</form>