From 68d7344e9045494a6991c1144cad7f05f1eeadf1 Mon Sep 17 00:00:00 2001
From: sladecraven
Date: Fri, 28 Jan 2022 10:05:54 +0100
Subject: [PATCH] Sync effetcts + initiative
---
modules/pegasus-actor.js | 496 +++++++--------------
modules/pegasus-combat.js | 17 +-
modules/pegasus-commands.js | 14 +-
modules/pegasus-main.js | 12 +-
modules/pegasus-roll-dialog.js | 124 +++++-
modules/pegasus-utility.js | 367 ++++++++-------
packs/currency.db | 6 +
packs/effect.db | 68 ++-
packs/macro-commands.db | 2 +
styles/simple.css | 2 +-
system.json | 22 +-
templates/partial-roll-common-dices.html | 40 --
templates/partial-roll-select-effects.html | 41 ++
templates/roll-dialog-generic.html | 88 +++-
templates/roll-dialog-spec.html | 29 +-
templates/roll-dialog-stat.html | 25 +-
templates/roll-dialog-weapon.html | 26 +-
17 files changed, 755 insertions(+), 624 deletions(-)
create mode 100644 packs/currency.db
create mode 100644 packs/macro-commands.db
create mode 100644 templates/partial-roll-select-effects.html
diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js
index adcf515..97a31f6 100644
--- a/modules/pegasus-actor.js
+++ b/modules/pegasus-actor.js
@@ -261,124 +261,12 @@ export class PegasusActor extends Actor {
}
}
/* -------------------------------------------- */
- getInitiativeScore() {
+ getInitiativeScore( combatId, combatantId) {
if (this.type == 'character') {
- // TODO
+ this.rollMR(true, combatId, combatantId)
}
- return 0.0;
- }
-
- /* -------------------------------------------- */
- getArmorModifier() {
- let armors = this.getArmors();
- let modifier = 0;
- for (let armor of armors) {
- if (armor.data.data.equipped) {
- if (armor.data.data.type == 'light') modifier += 5;
- if (armor.data.data.type == 'medium') modifier += 10;
- if (armor.data.data.type == 'heavy') modifier += 15;
- }
- }
- return modifier;
- }
-
- /* -------------------------------------------- */
- async applyDamageLoss(damage) {
- let chatData = {
- user: game.user.id,
- alias: this.name,
- rollMode: game.settings.get("core", "rollMode"),
- whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
- };
- //console.log("Apply damage chat", chatData );
-
- if (damage > 0) {
- let health = duplicate(this.data.data.secondary.health);
- health.value -= damage;
- if (health.value < 0) health.value = 0;
- this.update({ "data.secondary.health.value": health.value });
- chatData.content = `${this.name} looses ${damage} health. New health value is : ${health.value}`;
- } else {
- chatData.content = `No health loss for ${this.name} !`;
- }
- await ChatMessage.create(chatData);
- }
-
-
- /* -------------------------------------------- */
- processNoDefense(attackRollData) {
- let defenseRollData = {
- mode: "nodefense",
- finalScore: 0,
- defenderName: this.name,
- attackerName: attackRollData.alias,
- armorModifier: this.getArmorModifier(),
- actorId: this.id,
- alias: this.name,
- result: 0,
-
- }
- this.syncRoll(defenseRollData);
- this.processDefenseResult(defenseRollData, attackRollData);
- }
-
- /* -------------------------------------------- */
- async processApplyDamage(defenseRollData, attackRollData) { // Processed by the defender actor
- if (attackRollData && attackRollData) {
- let result = attackRollData.finalScore;
- defenseRollData.damageDices = WotGUtility.getDamageDice(result);
- defenseRollData.damageRoll = await this.rollDamage(defenseRollData);
- chatData.damages = true;
- chatData.damageDices = defenseRollData.damageDices;
-
- WotGUtility.createChatWithRollMode(this.name, {
- content: await renderTemplate(`systems/fvtt-weapons-of-the-gods/templates/chat-opposed-damages.html`, chatData)
- });
- }
- }
-
- /* -------------------------------------------- */
- async processDefenseResult(defenseRollData, attackRollData) { // Processed by the defenser
-
- if (defenseRollData && attackRollData) {
-
- let result = attackRollData.finalScore - defenseRollData.finalScore;
- defenseRollData.defenderName = this.name,
- defenseRollData.attackerName = attackRollData.alias
- defenseRollData.result = result
- defenseRollData.damages = false
- defenseRollData.damageDices = 0;
-
- if (result > 0) {
- defenseRollData.damageDices = WotGUtility.getDamageDice(result);
- defenseRollData.damageRoll = await this.rollDamage(defenseRollData, attackRollData);
- defenseRollData.damages = true;
- defenseRollData.finalDamage = defenseRollData.damageRoll.total;
- WotGUtility.updateRollData(defenseRollData);
- console.log("DAMAGE ROLL OBJECT", defenseRollData);
- WotGUtility.createChatWithRollMode(this.name, {
- content: await renderTemplate(`systems/fvtt-weapons-of-the-gods/templates/chat-opposed-damage.html`, defenseRollData)
- });
- } else {
- WotGUtility.updateRollData(defenseRollData);
- WotGUtility.createChatWithRollMode(this.name, {
- content: await renderTemplate(`systems/fvtt-weapons-of-the-gods/templates/chat-opposed-fail.html`, defenseRollData)
- });
- }
- }
- }
-
- /* -------------------------------------------- */
- async rollDamage(defenseRollData, attackRollData) {
- let weaponDamage = 0;
- if (attackRollData.weapon?.data?.damage) {
- weaponDamage = Number(attackRollData.weapon.data.damage);
- }
- let formula = defenseRollData.damageDices + "d10+" + defenseRollData.armorModifier + "+" + weaponDamage;
- console.log("ROLL : ", formula);
- let myRoll = new Roll(formula).roll({ async: false });
- await WotGUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"));
- return myRoll;
+ console.log("Init required !!!!")
+ return -1;
}
/* -------------------------------------------- */
@@ -406,20 +294,6 @@ export class PegasusActor extends Actor {
await this.update({ 'data.subactors': newArray });
}
- /* -------------------------------------------- */
- setDefenseMode(rollData) {
- console.log("DEFENSE MODE IS SET FOR", this.name);
- this.data.defenseRollData = rollData;
- this.data.defenseDefenderId = rollData.defenderId;
- this.data.defenseAttackerId = rollData.attackerId;
- }
- /* -------------------------------------------- */
- clearDefenseMode() {
- this.data.defenseDefenderId = undefined;
- this.data.defenseAttackerId = undefined;
- this.data.defenseRollData = undefined;
- }
-
/* -------------------------------------------- */
syncRoll(rollData) {
let linkedRollId = PegasusUtility.getDefenseState(this.id);
@@ -460,126 +334,6 @@ export class PegasusActor extends Actor {
}
}
- /* -------------------------------------------- */
- getCommonRollData() {
- let rollData = {
- rollId: randomID(16),
- alias: this.name,
- actorImg: this.img,
- actorId: this.id,
- img: this.img,
- rollMode: game.settings.get("core", "rollMode"),
- activePerks: duplicate(this.getActivePerks()),
- optionsDiceList: PegasusUtility.getOptionsDiceList(),
- bonusDicesLevel: 0,
- hindranceDicesLevel: 0,
- otherDicesLevel: 0,
- }
- return rollData
- }
-
- /* -------------------------------------------- */
- async startRoll(rollData) {
- this.syncRoll(rollData);
- let rollDialog = await PegasusRollDialog.create(this, rollData);
- console.log(rollDialog);
- rollDialog.render(true);
-
- }
- /* -------------------------------------------- */
- getShieldDice() {
- let shields = this.data.items.filter(item => item.type == "shield" && item.data.data.equipped)
- let def = 0
- for (let sh of shields) {
- def += sh.data.data.level
- }
- return def
- }
-
- /* -------------------------------------------- */
- rollPool(statKey, useShield = false) {
- let stat = this.getStat(statKey);
- if (stat) {
- let rollData = this.getCommonRollData()
- rollData.mode = "stat"
- rollData.specList = this.getRelevantSpec(statKey)
- rollData.selectedSpec = "0"
- rollData.stat = stat;
-
- if (useShield) {
- rollData.otherDicesLevel = this.getShieldDice()
- }
- this.startRoll(rollData);
- } else {
- ui.notifications.warn("Statistic not found !");
- }
- }
- /* -------------------------------------------- */
- rollUnarmedAttack() {
- let stat = this.getStat('com');
- if (stat) {
- let rollData = this.getCommonRollData()
- rollData.mode = "stat"
- rollData.title = `Unarmed Attack`;
- rollData.stat = stat;
- rollData.damages = this.getStat('str');
-
- this.startRoll(rollData);
- } else {
- ui.notifications.warn("Statistic not found !");
- }
- }
-
- /* -------------------------------------------- */
- rollStat(statKey) {
- let stat = this.getStat(statKey);
- if (stat) {
- let rollData = this.getCommonRollData()
- rollData.specList = this.getRelevantSpec(statKey)
- rollData.mode = "stat"
- rollData.title = `Stat ${stat.label}`;
- rollData.stat = stat;
-
- this.startRoll(rollData);
- } else {
- ui.notifications.warn("Statistic not found !");
- }
- }
-
- /* -------------------------------------------- */
- async rollSpec(specId) {
- let spec = this.getOneSpec(specId)
- if (spec) {
- let rollData = this.getCommonRollData()
- rollData.mode = "spec"
- rollData.title = `Spec. : ${spec.name} `,
- rollData.stat = this.getStat(spec.data.statistic)
- rollData.spec = spec
-
- this.startRoll(rollData);
- } else {
- ui.notifications.warn("Specialisation not found !");
- }
- }
-
- /* -------------------------------------------- */
- async rollMR() {
- let mr = duplicate(this.data.data.mr);
- if (mr) {
- mr.dice = PegasusUtility.getDiceFromLevel(mr.value);
-
- let rollData = this.getCommonRollData()
- rollData.mode = "MR"
- rollData.stat = mr
- rollData.activePerks = duplicate(this.getActivePerks()),
- rollData.specList = this.getRelevantSpec('mr'),
-
- this.startRoll(rollData);
- } else {
- ui.notifications.warn("MR not found !");
- }
- }
-
/* -------------------------------------------- */
async deleteAllItemsByType(itemType) {
let items = this.data.items.filter(item => item.type == itemType);
@@ -636,7 +390,7 @@ export class PegasusActor extends Actor {
updates['data.momentum.max'] = momentum
}
- let mrLevel = (this.data.data.statistics.agi.value + this.data.data.statistics.str.value) - this.data.data.statistics.phy.value
+ let mrLevel = (this.data.data.statistics.agi.value + this.data.data.statistics.str.value) - this.data.data.statistics.phy.value
mrLevel = (mrLevel < 1) ? 1 : mrLevel;
if (mrLevel != this.data.data.mr.value) {
updates['data.mr.value'] = mrLevel
@@ -685,15 +439,15 @@ export class PegasusActor extends Actor {
}
}
- /* -------------------------------------------- */
- async incDecQuantity( objetId, incDec = 0 ) {
- let objetQ = this.data.items.get(objetId )
- if (objetQ) {
- let newQ = objetQ.data.data.quantity + incDec;
- const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.quantity': newQ }]); // pdates one EmbeddedEntity
- }
+ /* -------------------------------------------- */
+ async incDecQuantity(objetId, incDec = 0) {
+ let objetQ = this.data.items.get(objetId)
+ if (objetQ) {
+ let newQ = objetQ.data.data.quantity + incDec;
+ const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.quantity': newQ }]); // pdates one EmbeddedEntity
}
-
+ }
+
/* -------------------------------------------- */
applyAbility(ability, updates = []) {
if (ability.data.affectedstat != "notapplicable") {
@@ -768,74 +522,182 @@ export class PegasusActor extends Actor {
}
/* -------------------------------------------- */
- async rollPower(powId) {
- let power = this.data.items.find(item => item.type == 'power' && item.id == powId);
- if (power) {
- let rollData = {
- mode: "power",
- alias: this.name,
- actorImg: this.img,
- actorId: this.id,
- img: power.img,
- rollMode: game.settings.get("core", "rollMode"),
- title: `Power ${power.name} `,
- power: duplicate(power),
- activePerks: duplicate(this.getActivePerks()),
- optionsDiceList: PegasusUtility.getOptionsDiceList(),
- bonusDicesLevel: 0,
- hindranceDicesLevel: 0,
- otherDicesLevel: 0,
+ getShieldValue() {
+ let shields = this.data.items.filter(item => item.type == "shield" && item.data.data.equipped)
+ let def = 0
+ for (let sh of shields) {
+ def += sh.data.data.level
+ }
+ return def
+ }
+
+ /* -------------------------------------------- */
+ addHindrancesList( effectsList ) {
+ if (this.data.data.combat.stunlevel > 0) {
+ effectsList.push( { label: "Stun Hindrance", type: "hindrance", applied: false, value: this.data.data.combat.stunlevel } )
+ }
+ let effects = this.data.items.filter( item => item.type == 'effect' )
+ for( let effect of effects) {
+ effect = duplicate(effect)
+ if (effect.data.hindrance) {
+ effectsList.push( { label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel } )
}
-
- this.updateWithTarget(rollData);
-
- this.syncRoll(rollData);
-
- let rollDialog = await PegasusRollDialog.create(this, rollData);
- console.log(rollDialog);
- rollDialog.render(true);
- } else {
- ui.notifications.warn("Technique not found !");
}
}
/* -------------------------------------------- */
- updateWithTarget(rollData) {
- let objectDefender
- let target = PegasusUtility.getTarget();
- if (!target) {
- ui.notifications.warn("You are using a Weapon without a Target.");
- } else {
- let defenderActor = game.actors.get(target.data.actorId);
- objectDefender = PegasusUtility.data(defenderActor);
- objectDefender = mergeObject(objectDefender, target.data.actorData);
- rollData.defender = objectDefender;
- rollData.attackerId = this.id;
- rollData.defenderId = objectDefender._id;
- //console.log("ROLLDATA DEFENDER !!!", rollData);
+ /* ROLL SECTION
+ /* -------------------------------------------- */
+
+ /* -------------------------------------------- */
+ addEffects( rollData) {
+ let effects = this.data.items.filter( item => item.type == 'effect' )
+ for( let effect of effects) {
+ effect = duplicate(effect)
+ if ( !effect.data.hindrance
+ && effect.data.stataffected != "notapplicable"
+ && effect.data.stataffected != "special"
+ && effect.data.stataffected != "all") {
+ rollData.effectsList.push( { label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel } )
+ }
}
}
+ /* -------------------------------------------- */
+ addArmorsShields( rollData) {
+ let armors = this.getArmors()
+ let armorLevel = 0
+ for (let armor of armors) {
+ armorLevel += armor.data.resistance
+ }
+ rollData.armorsList.push( {label: 'Total armor level', type: "other", applied: false, value: armorLevel } )
+ rollData.armorsList.push( {label: 'Shield level', type: "other", applied: false, value: this.getShieldValue() } )
+ }
+
+ /* -------------------------------------------- */
+ getCommonRollData(statKey = undefined) {
+ let rollData = PegasusUtility.getBasicRollData()
+ rollData.alias = this.name
+ rollData.actorImg = this.img
+ rollData.actorId = this.id
+ rollData.img = this.img
+ rollData.activePerks = duplicate(this.getActivePerks())
+
+ if ( statKey) {
+ rollData.statKey = statKey
+ rollData.stat = this.getStat(statKey)
+ rollData.statDicesLevel = rollData.stat.value
+ rollData.statMod = rollData.stat.mod
+ rollData.specList = this.getRelevantSpec(statKey)
+ rollData.selectedSpec = "0"
+ }
+
+ this.addEffects( rollData)
+ this.addArmorsShields(rollData)
+
+ return rollData
+ }
+
+ /* -------------------------------------------- */
+ async startRoll(rollData) {
+ this.syncRoll(rollData);
+ console.log("ROLL DATA", rollData)
+ let rollDialog = await PegasusRollDialog.create(this, rollData);
+ console.log(rollDialog);
+ rollDialog.render(true);
+
+ }
+
+ /* -------------------------------------------- */
+ rollPool(statKey, useShield = false) {
+ let stat = this.getStat(statKey);
+ if (stat) {
+ let rollData = this.getCommonRollData(statKey)
+ rollData.mode = "stat"
+
+ this.startRoll(rollData)
+ } else {
+ ui.notifications.warn("Statistic not found !");
+ }
+ }
+
+ /* -------------------------------------------- */
+ rollUnarmedAttack() {
+ let stat = this.getStat('com');
+ if (stat) {
+ let rollData = this.getCommonRollData(statKey)
+ rollData.mode = "stat"
+ rollData.title = `Unarmed Attack`;
+ rollData.damages = this.getStat('str');
+
+ this.startRoll(rollData);
+ } else {
+ ui.notifications.warn("Statistic not found !");
+ }
+ }
+
+ /*-------------------------------------------- */
+ rollStat(statKey) {
+ let stat = this.getStat(statKey);
+ if (stat) {
+ let rollData = this.getCommonRollData(statKey)
+ rollData.mode = "stat"
+ rollData.title = `Stat ${stat.label}`;
+
+ this.startRoll(rollData)
+ } else {
+ ui.notifications.warn("Statistic not found !");
+ }
+ }
+
+ /* -------------------------------------------- */
+ async rollSpec(specId) {
+ let spec = this.getOneSpec(specId)
+ if (spec) {
+ let rollData = this.getCommonRollData(spec.data.statistic)
+ rollData.mode = "spec"
+ rollData.title = `Spec. : ${spec.name} `
+ rollData.specList = [ spec ]
+
+ this.startRoll(rollData)
+ } else {
+ ui.notifications.warn("Specialisation not found !");
+ }
+ }
+
+ /* -------------------------------------------- */
+ async rollMR( isInit = false, combatId = 0, combatantId = 0) {
+ let mr = duplicate(this.data.data.mr)
+ if (mr) {
+ mr.dice = PegasusUtility.getDiceFromLevel(mr.value);
+
+ let rollData = this.getCommonRollData("mr")
+ rollData.mode = "MR"
+ rollData.isInit = isInit
+ rollData.combatId = combatId
+ rollData.combatantId = combatantId
+
+ this.startRoll(rollData);
+ } else {
+ ui.notifications.warn("MR not found !");
+ }
+ }
+
/* -------------------------------------------- */
async rollArmor(armorId) {
let armor = this.data.items.get(armorId)
if (armor) {
- let rollData = this.getCommonRollData()
+ let rollData = this.getCommonRollData(armor.data.statistic)
armor = duplicate(armor);
this.checkAndPrepareArmor(armor);
rollData.mode = "armor"
- rollData.img = armor.img
rollData.armor = armor
rollData.title = `Armor : ${armor.name}`
- rollData.stat = this.getStat(armor.data.statistic)
- rollData.specList = this.getRelevantSpec(armor.data.statistic)
- rollData.activePerks = duplicate(this.getActivePerks())
rollData.isResistance = true;
rollData.otherDicesLevel = armor.data.resistance
- //this.updateWithTarget(rollData);
this.startRoll(rollData);
} else {
ui.notifications.warn("Armor not found !", weaponId);
@@ -847,26 +709,19 @@ export class PegasusActor extends Actor {
let weapon = this.data.items.get(weaponId)
if (weapon) {
- let rollData = this.getCommonRollData()
-
- weapon = duplicate(weapon);
- this.checkAndPrepareWeapon(weapon);
+ weapon = duplicate(weapon)
+ this.checkAndPrepareWeapon(weapon)
+ let rollData = this.getCommonRollData(weapon.data.statistic)
rollData.mode = "weapon"
- rollData.img = weapon.img
rollData.weapon = weapon
rollData.title = `Weapon : ${weapon.name}`
- rollData.specList = this.getRelevantSpec(weapon.data.statistic)
- rollData.activePerks = duplicate(this.getActivePerks())
if (damage) {
rollData.stat = this.getStat(weapon.data.damagestatistic)
rollData.isDamage = true;
rollData.otherDicesLevel = weapon.data.damage
- } else {
- rollData.stat = this.getStat(weapon.data.statistic)
- }
+ }
- //this.updateWithTarget(rollData);
this.startRoll(rollData);
} else {
ui.notifications.warn("Weapon not found !", weaponId);
@@ -878,20 +733,15 @@ export class PegasusActor extends Actor {
let power = this.data.items.get(powerId)
if (power) {
- let rollData = this.getCommonRollData()
- power = duplicate(power);
+ power = duplicate(power)
+ let rollData = this.getCommonRollData(power.data.statistic)
rollData.mode = "power"
- rollData.img = power.img
rollData.power = power
rollData.title = `Power : ${power.name}`
- rollData.stat = this.getStat(power.data.statistic)
- rollData.specList = this.getRelevantSpec(power.data.statistic)
- rollData.activePerks = duplicate(this.getActivePerks())
this.startRoll(rollData);
} else {
ui.notifications.warn("Power not found !", powerId);
}
}
-
}
diff --git a/modules/pegasus-combat.js b/modules/pegasus-combat.js
index 6d4274d..b3e191a 100644
--- a/modules/pegasus-combat.js
+++ b/modules/pegasus-combat.js
@@ -6,14 +6,25 @@ export class PegasusCombat extends Combat {
/* -------------------------------------------- */
async rollInitiative(ids, formula = undefined, messageOptions = {} ) {
ids = typeof ids === "string" ? [ids] : ids;
- const currentId = this.combatant._id;
for (let cId = 0; cId < ids.length; cId++) {
const c = this.combatants.get(ids[cId]);
- let initBonus = c.actor ? c.actor.getInitiativeScore() : 0;
let id = c._id || c.id;
- await this.updateEmbeddedDocuments("Combatant", { _id: id, initiative: initBonus });
+ let initBonus = c.actor ? c.actor.getInitiativeScore( this.id, id ) : -1;
+ await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: initBonus } ]);
}
return this;
}
+
+ /* -------------------------------------------- */
+ _onUpdate(changed, options, userId) {
+ }
+
+ /* -------------------------------------------- */
+ static decInitBy10( combatantId, value) {
+ const combatant = game.combat.combatants.get(combatantId)
+ let initValue = combatant.initiative + value
+ game.combat.setInitiative(combatantId, initValue)
+ }
+
}
diff --git a/modules/pegasus-commands.js b/modules/pegasus-commands.js
index d836e19..174bd1a 100644
--- a/modules/pegasus-commands.js
+++ b/modules/pegasus-commands.js
@@ -109,19 +109,11 @@ export class PegasusCommands {
/* -------------------------------------------- */
async poolRoll( msg) {
- let rollData = {
- rollId:randomID(16),
- alias: "Dice Pool Roll",
- rollMode: game.settings.get("core", "rollMode"),
- optionsDiceList: PegasusUtility.getOptionsDiceList(),
- statDicesLevel: 0,
- specDicesLevel: 0,
- bonusDicesLevel: 0,
- hindranceDicesLevel: 0,
- otherDicesLevel: 0,
- }
+ let rollData = PegasusUtility.getBasicRollData()
+ rollData.alias = "Dice Pool Roll",
rollData.mode = "generic"
rollData.title = `Dice Pool Roll`;
+
let rollDialog = await PegasusRollDialog.create( this, rollData);
rollDialog.render( true );
}
diff --git a/modules/pegasus-main.js b/modules/pegasus-main.js
index 00bff5d..8d71322 100644
--- a/modules/pegasus-main.js
+++ b/modules/pegasus-main.js
@@ -75,7 +75,17 @@ function welcomeMessage() {
ChatMessage.create({
user: game.user.id,
whisper: [game.user.id],
- content: `Welcome !
+ content: `
+ Welcome to the Pegasus Engine CORE RPG.
+ Created by GMD Online
+ The Pegasus Engine is a available for free on our website. It is also available as a PDF and in Print format at an affordable price on our website.
+ It is thanks to all my Official GMD Members and Patreon Members that have made this project possible and allowed for this interface to be provided for free.
+ In return I have made available a fully detailed Compendium for FREE for all members, which can be obtained from the Members page on my website.
+ You too can become a supporter for future projects.
+ Sign up Here:
+ https://www.gmdonline.co.uk/gmdmemberspage/
+ GMD Online, GMD CORE RPG logo are © 2018 CORE Worlds and Game Rules © 2001. Interface © 2021 All rights reserved.
+ Enjoy and become the hero you were born to be!
` });
}
diff --git a/modules/pegasus-roll-dialog.js b/modules/pegasus-roll-dialog.js
index d64bce2..3df005e 100644
--- a/modules/pegasus-roll-dialog.js
+++ b/modules/pegasus-roll-dialog.js
@@ -5,23 +5,9 @@ export class PegasusRollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData ) {
- let html
- let options = { classes: ["WotGdialog"], width: 420, height: 320, 'z-index': 99999 };
- if ( rollData.mode == "generic" ) {
- html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-generic.html', rollData);
- options.height = 320;
- } else if ( rollData.mode == "stat" || rollData.mode == "MR") {
- html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-stat.html', rollData);
- options.height = 320;
- } else if (rollData.mode == "spec") {
- html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-spec.html', rollData);
- options.height = 360;
- } else if (rollData.mode == "weapon" || rollData.mode == "armor" || rollData.mode == "power") {
- html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-weapon.html', rollData);
- options.height = 320;
- } else {
- html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-skill.html', rollData);
- }
+ let options = { classes: ["WotGdialog"], 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 );
}
@@ -55,6 +41,81 @@ export class PegasusRollDialog extends Dialog {
PegasusUtility.rollPegasus( this.rollData )
}
+ /* -------------------------------------------- */
+ manageEffects( effectIdx, toggled) {
+ let effect = this.rollData.effectsList[effectIdx]
+ if (effect) {
+ effect.applied = toggled
+
+ let level, genre, idVal
+ if (effect.type == 'hindrance' ) {
+ level = effect.value
+ genre = 'positive'
+ idVal = "#hindranceDicesLevel"
+ }
+ if (effect.type == 'effect' ) {
+ let effectData = effect.effect
+ level = effectData.data.effectlevel
+ genre = effectData.data.genre
+ if (effectData.data.bonusdice) {
+ idVal = "#bonusDicesLevel"
+ }
+ if (effectData.data.reducedicevalue) {
+ idVal = "#statDicesLevel"
+ }
+ if (effectData.data.otherdice) {
+ idVal = "#otherDicesLevel"
+ }
+ if (effectData.data.hindrance) {
+ 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 += level
+ }else {
+ newLevel -= level
+ }
+ }else {
+ if ( genre == 'positive') {
+ newLevel -= level
+ }else {
+ newLevel += level
+ }
+ }
+ newLevel = (newLevel<0) ? 0 : newLevel
+ $(idVal).val(newLevel)
+ }
+ //console.log("Effect", effect, toggled)
+ this.rollData.statDicesLevel = $('#statDicesLevel').val()
+ this.rollData.specDicesLevel = $('#specDicesLevel').val()
+ this.rollData.bonusDicesLevel = $('#bonusDicesLevel').val()
+ this.rollData.hindranceDicesLevel = $('#hindranceDicesLevel').val()
+ this.rollData.otherDicesLevel = $('#otherDicesLevel').val()
+ }
+
+ /* -------------------------------------------- */
+ manageArmors( armorIdx, toggled) {
+ let armor = this.rollData.armorsList[armorIdx]
+ if (armor) {
+ armor.applied = toggled
+ if (armor.type == 'other' ) {
+ if (toggled) {
+ this.rollData.otherDicesLevel += armor.value
+ } else {
+ this.rollData.otherDicesLevel -= armor.value
+ this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel<0) ? 0 : this.rollData.otherDicesLevel
+ }
+ $("#otherDicesLevel").val(this.rollData.otherDicesLevel)
+ }
+ }
+ console.log("Armor", armorIdx, toggled)
+ }
+
/* -------------------------------------------- */
activateListeners(html) {
super.activateListeners(html);
@@ -65,22 +126,39 @@ export class PegasusRollDialog extends Dialog {
$(function () { onLoad(); });
html.find('#specList').change((event) => {
- this.rollData.selectedSpec = event.currentTarget.value;
+ this.rollData.selectedSpec = event.currentTarget.value
+ let spec = this.rollData.specList.find(item => item._id == this.rollData.selectedSpec)
+ if ( spec) {
+ this.rollData.specDiceLevel = spec.data.level
+ $('#specDicesLevel').val(this.rollData.specDiceLevel)
+ }
});
html.find('#statDicesLevel').change((event) => {
- this.rollData.statDicesLevel = Number(event.currentTarget.value);
+ this.rollData.statDicesLevel = Number(event.currentTarget.value)
});
html.find('#specDicesLevel').change((event) => {
- this.rollData.specDicesLevel = Number(event.currentTarget.value);
+ this.rollData.specDicesLevel = Number(event.currentTarget.value)
});
html.find('#bonusDicesLevel').change((event) => {
- this.rollData.bonusDicesLevel = Number(event.currentTarget.value);
+ this.rollData.bonusDicesLevel = Number(event.currentTarget.value)
});
html.find('#hindranceDicesLevel').change((event) => {
- this.rollData.hindranceDicesLevel = Number(event.currentTarget.value);
+ this.rollData.hindranceDicesLevel = Number(event.currentTarget.value)
});
html.find('#otherDicesLevel').change((event) => {
- this.rollData.otherDicesLevel = Number(event.currentTarget.value);
+ this.rollData.otherDicesLevel = Number(event.currentTarget.value)
});
+ html.find('.effect-clicked').change((event) => {
+ let toggled = event.currentTarget.checked
+ let effectIdx = $(event.currentTarget).data("effect-idx")
+ this.manageEffects( effectIdx, toggled)
+ });
+ html.find('.armor-clicked').change((event) => {
+ let toggled = event.currentTarget.checked
+ let armorIdx = $(event.currentTarget).data("armor-idx")
+ this.manageArmors( armorIdx, toggled)
+ });
+
+
}
}
\ No newline at end of file
diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js
index 36949c8..88efba5 100644
--- a/modules/pegasus-utility.js
+++ b/modules/pegasus-utility.js
@@ -1,18 +1,22 @@
-/* -------------------------------------------- */
+/* -------------------------------------------- */
+import { PegasusCombat } from "./pegasus-combat.js";
import { PegasusCommands } from "./pegasus-commands.js";
import { PegasusActorCreate } from "./pegasus-create-char.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 __level2Dice = ["d0", "d4", "d6", "d8", "d10", "d12"];
+const __name2DiceValue = { "0": 0, "d0": 0, "d4": 4, "d6": 6, "d8": 8, "d10": 10, "d12": 12 }
+
+/* -------------------------------------------- */
+export class PegasusUtility {
-/* -------------------------------------------- */
-export class PegasusUtility {
-
/* -------------------------------------------- */
static async init() {
Hooks.on('renderChatLog', (log, html, data) => PegasusUtility.chatListeners(html));
+ Hooks.on("getCombatTrackerEntryContext", (html, options) => {
+ PegasusUtility.pushInitiativeOptions(html, options);
+ });
this.rollDataStore = {}
this.defenderStore = {}
this.diceList = [];
@@ -29,10 +33,16 @@ export class PegasusUtility {
return text.charAt(0).toUpperCase() + text.slice(1)
});
- }
+ }
/* -------------------------------------------- */
- static getSpecs( ) {
+ static pushInitiativeOptions(html, options) {
+ console.log('Option pushed....')
+ options.push( { name: "Apply -10", condition: true, icon: ' ', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } } )
+ }
+
+ /* -------------------------------------------- */
+ static getSpecs() {
return this.specs;
}
@@ -57,21 +67,21 @@ export class PegasusUtility {
/* -------------------------------------------- */
static buildDiceLists() {
let maxLevel = game.settings.get("fvtt-pegasus-rpg", "dice-max-level");
- let diceList = [ "0" ];
+ let diceList = ["0"];
let diceValues = [0];
- let diceFoundryList = [ "d0" ];
+ let diceFoundryList = ["d0"];
let diceLevel = 1;
let concat = "";
let concatFoundry = "";
let optionsDiceList = '0 ';
let optionsLevel = '0 ';
- for(let i=1; i<=maxLevel;i++) {
+ for (let i = 1; i <= maxLevel; i++) {
let currentDices = concat + __level2Dice[diceLevel];
- diceList.push( currentDices );
- diceFoundryList.push( concatFoundry + __level2Dice[diceLevel] + "x" );
- if ( __level2Dice[diceLevel] == "d12") {
- concat = concat + "d12 ";
- concatFoundry = concatFoundry + "d12x, ";
+ diceList.push(currentDices);
+ diceFoundryList.push(concatFoundry + __level2Dice[diceLevel] + "x");
+ if (__level2Dice[diceLevel] == "d12") {
+ concat = concat + "d12 ";
+ concatFoundry = concatFoundry + "d12x, ";
diceLevel = 1;
} else {
diceLevel++;
@@ -86,9 +96,8 @@ export class PegasusUtility {
this.optionsStatusList = 'Not applicable Health NRG Delirium ';
- console.log("Defautl dice List", diceList, diceFoundryList);
}
-
+
/* -------------------------------------------- */
static getOptionsStatusList() {
return this.optionsStatusList;
@@ -104,80 +113,81 @@ export class PegasusUtility {
/* -------------------------------------------- */
static computeAttackDefense(defenseRollId) {
- let defenseRollData = this.getRollData(defenseRollId );
+ let defenseRollData = this.getRollData(defenseRollId);
let attackRollData = this.getRollData(defenseRollData.linkedRollId);
- let defender = game.actors.get( defenseRollData.actorId);
+ let defender = game.actors.get(defenseRollData.actorId);
defender.processDefenseResult(defenseRollData, attackRollData);
}
/* -------------------------------------------- */
- static applyDamage( defenseRollId) {
- let defenseRollData = this.getRollData(defenseRollId );
- let defender = game.actors.get( defenseRollData.actorId);
- defender.applyDamageLoss( defenseRollData.finalDamage) ;
+ static applyDamage(defenseRollId) {
+ let defenseRollData = this.getRollData(defenseRollId);
+ let defender = game.actors.get(defenseRollData.actorId);
+ defender.applyDamageLoss(defenseRollData.finalDamage);
}
/* -------------------------------------------- */
- static applyNoDefense( actorId, attackRollId ) {
- let attackRollData = this.getRollData(attackRollId );
- let defender = game.actors.get( actorId );
- defender.processNoDefense( attackRollData ) ;
+ static applyNoDefense(actorId, attackRollId) {
+ let attackRollData = this.getRollData(attackRollId);
+ let defender = game.actors.get(actorId);
+ defender.processNoDefense(attackRollData);
}
/* -------------------------------------------- */
static async chatListeners(html) {
html.on("click", '.chat-create-actor', event => {
- game.system.pegasus.creator.processChatEvent(event);
- } );
+ game.system.pegasus.creator.processChatEvent(event);
+ });
html.on("click", '.view-item-from-chat', event => {
- game.system.pegasus.creator.openItemView( event)
- } );
+ game.system.pegasus.creator.openItemView(event)
+ });
}
-
- /* -------------------------------------------- */
+
+ /* -------------------------------------------- */
static async preloadHandlebarsTemplates() {
-
+
const templatePaths = [
'systems/fvtt-pegasus-rpg/templates/editor-notes-gm.html',
'systems/fvtt-pegasus-rpg/templates/partial-roll-common-dices.html',
+ 'systems/fvtt-pegasus-rpg/templates/partial-roll-select-effects.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-level.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-range.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-equipment-types.html'
]
- return loadTemplates(templatePaths);
+ return loadTemplates(templatePaths);
}
- /* -------------------------------------------- */
- static removeChatMessageId(messageId) {
- if (messageId){
- game.messages.get(messageId)?.delete();
+ /* -------------------------------------------- */
+ static removeChatMessageId(messageId) {
+ if (messageId) {
+ game.messages.get(messageId)?.delete();
+ }
+ }
+
+ static findChatMessageId(current) {
+ return PegasusUtility.getChatMessageId(PegasusUtility.findChatMessage(current));
+ }
+
+ static getChatMessageId(node) {
+ return node?.attributes.getNamedItem('data-message-id')?.value;
+ }
+
+ static findChatMessage(current) {
+ return PegasusUtility.findNodeMatching(current, it => it.classList.contains('chat-message') && it.attributes.getNamedItem('data-message-id'));
+ }
+
+ static findNodeMatching(current, predicate) {
+ if (current) {
+ if (predicate(current)) {
+ return current;
}
+ return PegasusUtility.findNodeMatching(current.parentElement, predicate);
}
-
- static findChatMessageId(current) {
- return PegasusUtility.getChatMessageId(PegasusUtility.findChatMessage(current));
- }
-
- static getChatMessageId(node) {
- return node?.attributes.getNamedItem('data-message-id')?.value;
- }
-
- static findChatMessage(current) {
- return PegasusUtility.findNodeMatching(current, it => it.classList.contains('chat-message') && it.attributes.getNamedItem('data-message-id'));
- }
-
- static findNodeMatching(current, predicate) {
- if (current) {
- if (predicate(current)) {
- return current;
- }
- return PegasusUtility.findNodeMatching(current.parentElement, predicate);
- }
- return undefined;
- }
-
+ return undefined;
+ }
+
/* -------------------------------------------- */
static templateData(it) {
return PegasusUtility.data(it)?.data ?? {}
@@ -190,9 +200,9 @@ export class PegasusUtility {
}
return it;
}
-
+
/* -------------------------------------------- */
- static getDiceValue( level = 0) {
+ static getDiceValue(level = 0) {
let diceString = this.diceList[level]
let diceTab = diceString.split(" ")
let diceValue = 0
@@ -210,14 +220,14 @@ export class PegasusUtility {
/* -------------------------------------------- */
static getFoundryDiceFromLevel(level = 0) {
level = Number(level)
- console.log(this.diceFoundryList);
+ //console.log(this.diceFoundryList);
return this.diceFoundryList[level];
}
-
+
/* -------------------------------------------- */
- static createDirectOptionList( min, max) {
+ static createDirectOptionList(min, max) {
let options = {};
- for(let i=min; i<=max; i++) {
+ for (let i = min; i <= max; i++) {
options[`${i}`] = `${i}`;
}
return options;
@@ -241,69 +251,71 @@ export class PegasusUtility {
}
return undefined;
}
-
+
/* -------------------------------------------- */
- static getDefenseState( actorId) {
+ static getDefenseState(actorId) {
return this.defenderStore[actorId];
}
-
+
/* -------------------------------------------- */
- static async updateDefenseState( defenderId, rollId) {
+ static async updateDefenseState(defenderId, rollId) {
this.defenderStore[defenderId] = rollId;
- if ( game.user.character && game.user.character.id == defenderId ) {
- let defender = game.actors.get( defenderId);
+ if (game.user.character && game.user.character.id == defenderId) {
+ let defender = game.actors.get(defenderId);
let chatData = {
user: game.user.id,
- alias : defender.name,
+ alias: defender.name,
rollMode: game.settings.get("core", "rollMode"),
- whisper: [game.user.id].concat( ChatMessage.getWhisperRecipients('GM') ),
+ whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
content: `${defender.name} is under attack. He must roll a skill/weapon/technique to defend himself or suffer damages (button below).
No defense
item._id == rollData.selectedSpec);
+ rollData.spec = rollData.specList.find(item => item._id == rollData.selectedSpec);
rollData.spec.data.dice = PegasusUtility.getDiceFromLevel(rollData.spec.data.level);
}
if (rollData.spec) {
dicePool[1].level += Number(rollData.spec.data.level);
}
- if ( rollData.specDicesLevel) {
+ if (rollData.specDicesLevel) {
dicePool[1].level = rollData.specDicesLevel;
}
if (rollData.bonusDicesLevel) {
@@ -400,17 +412,17 @@ export class PegasusUtility {
let diceFormulaTab = [];
for (let diceGroup of dicePool) {
- diceFormulaTab.push( this.getFoundryDiceFromLevel( diceGroup.level) )
+ diceFormulaTab.push(this.getFoundryDiceFromLevel(diceGroup.level))
}
let diceFormula = '{' + diceFormulaTab.join(', ') + '}kh';
console.log(diceFormula);
// Performs roll
let myRoll = rollData.roll;
- if ( !myRoll ) { // New rolls only of no rerolls
- myRoll = new Roll(diceFormula).roll( { async: false} );
+ 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") );
+ await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"));
rollData.roll = myRoll
}
@@ -419,43 +431,49 @@ export class PegasusUtility {
console.log("ROLLLL!!!!", rollData);
if (rollData.damages) {
- let dmgFormula = this.getFoundryDiceFromLevel( rollData.damages.value )
- let dmgRoll = new Roll(dmgFormula).roll( { async: false} );
- await this.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode") );
- rollData.dmgResult = dmgRoll.total;
+ let dmgFormula = this.getFoundryDiceFromLevel(rollData.damages.value)
+ let dmgRoll = new Roll(dmgFormula).roll({ async: false });
+ await this.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"));
+ rollData.dmgResult = dmgRoll.total;
}
- this.createChatWithRollMode( rollData.alias, {
+ this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-generic-result.html`, rollData)
});
- if ( rollData.defender ) {
- this.storeDefenseState( rollData );
+ if (rollData.defender) {
+ this.storeDefenseState(rollData);
}
- this.saveRollData( rollData );
+ // Init stuf
+ if (rollData.isInit) {
+ let combat = game.combats.get( rollData.combatId)
+ combat.updateEmbeddedDocuments("Combatant", [ { _id: rollData.combatantId, initiative: rollData.finalScore } ]);
+ }
+ // And save the roll
+ this.saveRollData(rollData);
}
/* -------------------------------------------- */
- static getDamageDice( result ) {
- if ( result < 0) return 0;
- return Math.floor(result/5) + 1;
+ static getDamageDice(result) {
+ if (result < 0) return 0;
+ return Math.floor(result / 5) + 1;
}
/* ------------------------- ------------------- */
- static async updateRoll( rollData) {
+ static async updateRoll(rollData) {
let diceResults = rollData.diceResults;
let sortedRoll = [];
- for (let i=0; i<10; i++) {
+ for (let i = 0; i < 10; i++) {
sortedRoll[i] = 0;
}
for (let dice of diceResults) {
sortedRoll[dice.result]++;
}
let index = 0;
- let bestRoll = 0;
- for (let i=0; i<10; i++) {
- if ( sortedRoll[i] > bestRoll) {
+ let bestRoll = 0;
+ for (let i = 0; i < 10; i++) {
+ if (sortedRoll[i] > bestRoll) {
bestRoll = sortedRoll[i];
index = i;
}
@@ -464,30 +482,30 @@ export class PegasusUtility {
rollData.bestScore = bestScore;
rollData.finalScore = bestScore + rollData.negativeModifier + rollData.positiveModifier;
- this.saveRollData(rollData );
-
- this.createChatWithRollMode( rollData.alias, {
+ this.saveRollData(rollData);
+
+ this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-weapons-of-the-gods/templates/chat-generic-result.html`, rollData)
});
}
/* ------------------------- ------------------- */
- static async rerollDice( actorId, diceIndex = -1 ) {
+ static async rerollDice(actorId, diceIndex = -1) {
let actor = game.actors.get(actorId);
- let rollData = actor.getRollData( );
+ let rollData = actor.getRollData();
- if ( diceIndex == -1 ) {
+ if (diceIndex == -1) {
rollData.hasWillpower = actor.decrementWillpower();
rollData.roll = undefined;
- } else {
- let myRoll = new Roll("1d6").roll( { async: false} );
- await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode") );
+ } else {
+ let myRoll = new Roll("1d6").roll({ async: false });
+ await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"));
console.log("Result: ", myRoll);
rollData.roll.dice[0].results[diceIndex].result = myRoll.total; // Patch
rollData.nbStrongHitUsed++;
}
- this.rollFraggedKingdom( rollData );
+ this.rollFraggedKingdom(rollData);
}
/* -------------------------------------------- */
@@ -520,18 +538,18 @@ export class PegasusUtility {
/* -------------------------------------------- */
static split3Columns(data) {
-
- let array = [ [], [], [] ];
- if (data== undefined) return array;
+
+ let array = [[], [], []];
+ if (data == undefined) return array;
let col = 0;
for (let key in data) {
let keyword = data[key];
keyword.key = key; // Self-reference
- array[col].push( keyword);
+ array[col].push(keyword);
col++;
if (col == 3) col = 0;
- }
+ }
return array;
}
@@ -557,6 +575,39 @@ export class PegasusUtility {
ChatMessage.create(chatOptions);
}
+ /* -------------------------------------------- */
+ static getBasicRollData() {
+ let rollData = {
+ rollId: randomID(16),
+ rollMode: game.settings.get("core", "rollMode"),
+ bonusDicesLevel: 0,
+ hindranceDicesLevel: 0,
+ otherDicesLevel: 0,
+ statDicesLevel: 0,
+ specDicesLevel: 0,
+ effectsList: [],
+ armorsList: [],
+ optionsDiceList: PegasusUtility.getOptionsDiceList()
+ }
+ PegasusUtility.updateWithTarget(rollData)
+ return rollData
+ }
+
+ /* -------------------------------------------- */
+ static updateWithTarget(rollData) {
+ let objectDefender
+ let target = PegasusUtility.getTarget();
+ if (target) {
+ let defenderActor = game.actors.get(target.data.actorId)
+ objectDefender = PegasusUtility.data(defenderActor)
+ objectDefender = mergeObject(objectDefender, target.data.actorData)
+ rollData.defender = objectDefender
+ rollData.attackerId = this.id
+ rollData.defenderId = objectDefender._id
+ defenderActor.addHindrancesList(rollData.effectsList)
+ }
+ }
+
/* -------------------------------------------- */
static createChatWithRollMode(name, chatOptions) {
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
@@ -568,26 +619,26 @@ export class PegasusUtility {
let msgTxt = "Are you sure to remove this Item ?";
let buttons = {
delete: {
- icon: ' ',
- label: "Yes, remove it",
- callback: () => {
- actorSheet.actor.deleteEmbeddedDocuments( "Item", [itemId] );
- li.slideUp(200, () => actorSheet.render(false));
- }
- },
- cancel: {
- icon: ' ',
- label: "Cancel"
+ icon: ' ',
+ label: "Yes, remove it",
+ callback: () => {
+ actorSheet.actor.deleteEmbeddedDocuments("Item", [itemId]);
+ li.slideUp(200, () => actorSheet.render(false));
}
+ },
+ cancel: {
+ icon: ' ',
+ label: "Cancel"
}
- msgTxt += "
";
- let d = new Dialog({
- title: "Confirm removal",
- content: msgTxt,
- buttons: buttons,
- default: "cancel"
- });
- d.render(true);
+ }
+ msgTxt += "
";
+ let d = new Dialog({
+ title: "Confirm removal",
+ content: msgTxt,
+ buttons: buttons,
+ default: "cancel"
+ });
+ d.render(true);
}
}
\ No newline at end of file
diff --git a/packs/currency.db b/packs/currency.db
new file mode 100644
index 0000000..76e4bc8
--- /dev/null
+++ b/packs/currency.db
@@ -0,0 +1,6 @@
+{"_id":"8M6RoT7gYUXDFP9L","name":"Dollars $","type":"money","img":"systems/fvtt-pegasus-rpg/images/icons/icon_money.webp","data":{"value":0,"quantity":1,"weight":0,"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.oGkVk0cSNIo2ks99"}}}
+{"_id":"FUZC2gxmU8o8FdCx","name":"Pounds £","type":"money","img":"systems/fvtt-pegasus-rpg/images/icons/icon_money.webp","data":{"value":0,"quantity":1,"weight":0,"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.oGkVk0cSNIo2ks99"}}}
+{"_id":"OC32xfxMIOQmnj6S","name":"Copper Pieces","type":"money","img":"systems/fvtt-pegasus-rpg/images/icons/icon_money.webp","data":{"value":0,"quantity":1,"weight":0,"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.oGkVk0cSNIo2ks99"}}}
+{"_id":"ROgdUZJmgLOg3hSI","name":"Silver Pieces","type":"money","img":"systems/fvtt-pegasus-rpg/images/icons/icon_money.webp","data":{"value":0,"quantity":1,"weight":0,"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.oGkVk0cSNIo2ks99"}}}
+{"_id":"oGkVk0cSNIo2ks99","name":"Gold Pieces","type":"money","img":"systems/fvtt-pegasus-rpg/images/icons/icon_money.webp","data":{"value":0,"quantity":1,"weight":0,"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.oGkVk0cSNIo2ks99"}}}
+{"_id":"wXMW7B28BM00ZJrj","name":"Credits","type":"money","img":"systems/fvtt-pegasus-rpg/images/icons/icon_money.webp","data":{"value":0,"quantity":1,"weight":0,"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Item.oGkVk0cSNIo2ks99"}}}
diff --git a/packs/effect.db b/packs/effect.db
index fce8c1b..aa4548f 100644
--- a/packs/effect.db
+++ b/packs/effect.db
@@ -1,18 +1,50 @@
-{"_id":"1ncwbVD5I5KqsVNE","name":"Confusion","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":0,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":true,"recoveryrollstat":"foc","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"25nV47vTuv89WFaG","name":"Acid","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"2NLtpctx4ZVYTuqy","name":"Distraction","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"3Xxb1jrd8C9bRH0P","name":"Exhaustion","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"5ZQr1t6ilt4LIOYS","name":"Disease","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"ACgqb3T5NOrNIHGK","name":"Blindness","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":5,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"notapplicable","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"EnHmhs0CKMNCN2QK","name":"Fear","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"mnd","recoveryroll":true,"recoveryrollstat":"mnd","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"F5zA3QmaMjdogM2g","name":"Deafened","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":5,"reducedicevalue":false,"stataffected":"per","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"H8A4cVuxURJFHevQ","name":"Prone","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":0,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"ICQMiXnMpwcfTznZ","name":"Inspired","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"KE1IfWHAJso5yO1L","name":"Staggered","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":0,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":true,"recoveryrollstat":"phy","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"LhxkKXaCyFMlyrWE","name":"Shock","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"phy","recoveryroll":true,"recoveryrollstat":"phy","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"Mk7XJ35jiA8isovl","name":"Bleeding","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":true,"recoveryrollstat":"notapplicable","recoveryrollspec":[{"_id":"7GGc9JTWgqeQX2u6","name":"First Aid [MND]","type":"specialisation","img":"systems/fvtt-pegasus-rpg/images/icons/icon_spec.webp","data":{"statistic":"mnd","level":1,"ispowergroup":false,"powersource":"","powers":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"RzH5QvSanCmD8zT8","name":"Burning","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":true,"recoveryrollstat":"agi","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"VPaLpl0dZTrQOfR3","name":"Grappled","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"notapplicable","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"f8NQlR7GtXjtYMHb","name":"Slowed","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"mr","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"uQZnpVL7l6xIIRg9","name":"Taunted","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":0,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"mnd","recoveryroll":true,"recoveryrollstat":"mnd","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
-{"_id":"yrJYjyHColPtif8t","name":"Poisoned","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"notapplicable","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"1ncwbVD5I5KqsVNE","name":"Confusion","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":0,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":true,"recoveryrollstat":"foc","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"25nV47vTuv89WFaG","name":"Acid","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"2NLtpctx4ZVYTuqy","name":"Distraction","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"3Xxb1jrd8C9bRH0P","name":"Exhaustion","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"42jaDISJtNW7Neb0","name":"Disease STR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"str","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"5ZQr1t6ilt4LIOYS","name":"Disease ALL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"6FtiSK0eXsyqSJsO","name":"Hindrance Dice MND","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"mnd","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"7qoDNK0oEeAR2EKh","name":"Bonus Dice MND","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"mnd","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"8Wk7tLk1HbGcKHng","name":"Bonus Dice FOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"foc","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"8dGYMGVY7elF2Vmo","name":"Bonus Dice PER","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"per","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"ACgqb3T5NOrNIHGK","name":"Blindness","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":5,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"DuuFSrwBaJ5dIQhZ","name":"Hindrance Dice PER","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"per","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"EnHmhs0CKMNCN2QK","name":"Fear","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"mnd","recoveryroll":true,"recoveryrollstat":"mnd","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"EosbwC0P1qJQhtGX","name":"Disease PHY","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"phy","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"F5zA3QmaMjdogM2g","name":"Deafened","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":5,"reducedicevalue":false,"stataffected":"special","specaffected":[{"_id":"giyLDiUIuVmtegy3","name":"Listen [PER]","type":"specialisation","img":"systems/fvtt-pegasus-rpg/images/icons/icon_spec.webp","data":{"statistic":"per","level":1,"ispowergroup":false,"powersource":"","powers":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Compendium.fvtt-pegasus-rpg.specialisations.bRcGg9LOg5RyRuf0"}}}],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"FC6Akm1UnnekfQdi","name":"Hindrance Dice FOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"foc","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"H8A4cVuxURJFHevQ","name":"Prone","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":0,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"HAse0ZvMjzBBbJfK","name":"Hindrance Dice DEF","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"def","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"Hmf3hRqgBk8ggRri","name":"Disease PER","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"per","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"ICQMiXnMpwcfTznZ","name":"Inspired","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"IrpZcvrUIMxGMw8y","name":"Bonus Dice ALL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"Iyd4eOFLMSwolBW6","name":"Disease FOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"foc","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"JCF1iYkI7jn65u6F","name":"Hindrance Dice COM","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"com","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"KE1IfWHAJso5yO1L","name":"Staggered","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":0,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":true,"recoveryrollstat":"phy","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"LhxkKXaCyFMlyrWE","name":"Shock","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"phy","recoveryroll":true,"recoveryrollstat":"phy","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"LznTbFw2RBZ2AeBm","name":"Disease STL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"stl","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"Mk7XJ35jiA8isovl","name":"Bleeding","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":true,"recoveryrollstat":"notapplicable","recoveryrollspec":[{"_id":"7GGc9JTWgqeQX2u6","name":"First Aid [MND]","type":"specialisation","img":"systems/fvtt-pegasus-rpg/images/icons/icon_spec.webp","data":{"statistic":"mnd","level":1,"ispowergroup":false,"powersource":"","powers":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"ODkTL7nC0JSoB0Jg","name":"Disease SOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"soc","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"R1Zrm75eBzEZkrKx","name":"Bonus Dice AGI","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"agi","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"RvVB0hkVXMGaOgjE","name":"Hindrance Dice AGI","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"agi","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"RzH5QvSanCmD8zT8","name":"Burning","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":true,"recoveryrollstat":"agi","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"U4V52kGOXvGmySYT","name":"Bonus Dice PHY","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"phy","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"VPaLpl0dZTrQOfR3","name":"Grappled","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"notapplicable","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"WMxnCQCo4Pwa87WN","name":"Bonus Dice STL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"stl","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"WRkDNeK2LYFnk4St","name":"Bonus Dice COM","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"com","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"YjkqzCOpm2ItZowA","name":"Hindrance Dice SOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"soc","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"ZCysG6p7j6ChkB4I","name":"Disease AGI","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"agi","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"ZEyan7n07ewf42i9","name":"Hindrance Dice ALL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"aHXGayFUrYJ2TvlZ","name":"Bonus Dice SOC","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"soc","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"bZzD4fGjvqybsDSq","name":"Disease DEF","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"def","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"dmmQUbWdYVLlDoN9","name":"Disease MND","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"mnd","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"f8NQlR7GtXjtYMHb","name":"Slowed","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"mr","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"kQIaBaag7USrdDxP","name":"Hindrance Dice STL","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"stl","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"ki4WjkgabwYKtoA8","name":"Hindrance Dice STR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"str","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"mX52jEGP6ycrNwgn","name":"Bonus Dice DEF","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"def","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"uQZnpVL7l6xIIRg9","name":"Taunted","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":0,"reducedicevalue":false,"stataffected":"special","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"mnd","recoveryroll":true,"recoveryrollstat":"mnd","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"ws6UmwTaVVTT4kh3","name":"Disease COM","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":true,"stataffected":"com","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":""},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"wtl84r5MezEwyDBd","name":"Bonus Dice STR","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"positive","effectlevel":1,"reducedicevalue":false,"stataffected":"str","specaffected":[],"statdice":false,"bonusdice":true,"otherdice":false,"hindrance":false,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"yrJYjyHColPtif8t","name":"Poisoned","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"physical","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"all","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"phy","recoveryroll":true,"recoveryrollstat":"phy","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
+{"_id":"zbPfPn6c0XqlsGtp","name":"Hindrance Dice PHY","type":"effect","img":"systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp","data":{"type":"mental","genre":"negative","effectlevel":1,"reducedicevalue":false,"stataffected":"phy","specaffected":[],"statdice":false,"bonusdice":false,"otherdice":false,"hindrance":true,"resistedby":"notapplicable","recoveryroll":false,"recoveryrollstat":"","recoveryrollspec":[],"description":"See Pegasus Engine CORE RPG
"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{}}
diff --git a/packs/macro-commands.db b/packs/macro-commands.db
new file mode 100644
index 0000000..edb80c0
--- /dev/null
+++ b/packs/macro-commands.db
@@ -0,0 +1,2 @@
+{"name":"Character Creator","type":"chat","author":"iNL4aGohJ8v6YrUk","img":"icons/svg/dice-target.svg","scope":"global","command":"/char","folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Macro.gP0oh8bAbYMvx9hI"}},"_id":"FpBCH1fXTGocuaSC"}
+{"name":"Dice Pool","type":"chat","author":"iNL4aGohJ8v6YrUk","img":"icons/svg/dice-target.svg","scope":"global","command":"/pool","folder":null,"sort":0,"permission":{"default":0,"iNL4aGohJ8v6YrUk":3},"flags":{"core":{"sourceId":"Macro.lHt7paRKAFMrM9Z0"}},"_id":"oRQzgYLHiNaEXPMM"}
diff --git a/styles/simple.css b/styles/simple.css
index 0ab9522..d6cd123 100644
--- a/styles/simple.css
+++ b/styles/simple.css
@@ -670,6 +670,7 @@ ul, li {
margin-right: 4px;
margin-left: 4px;
}
+
.input-sante-header,
.stress-style {
flex-grow: 0;
@@ -1148,7 +1149,6 @@ ul, li {
background-color: red;
}
-.river-button:active,
.plus-minus-button:active,
.chat-card-button:active {
position:relative;
diff --git a/system.json b/system.json
index a2fa193..b452deb 100644
--- a/system.json
+++ b/system.json
@@ -152,6 +152,26 @@
"tags": [
"weapon", "ranged"
]
+ },
+ {
+ "entity": "Item",
+ "label": "Currency",
+ "name": "currency",
+ "path": "./packs/currency.db",
+ "system": "fvtt-pegasus-rpg",
+ "tags": [
+ "currency", "money"
+ ]
+ },
+ {
+ "entity": "Item",
+ "label": "Macros",
+ "name": "macro-commands",
+ "path": "./packs/macro-commands.db",
+ "system": "fvtt-pegasus-rpg",
+ "tags": [
+ "macro", "command"
+ ]
}
],
"primaryTokenAttribute": "secondary.health",
@@ -163,6 +183,6 @@
"templateVersion": 63,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
- "version": "0.1.16",
+ "version": "0.2.0",
"background" : "./images/ui/pegasus_welcome_page.webp"
}
diff --git a/templates/partial-roll-common-dices.html b/templates/partial-roll-common-dices.html
index d788e9c..e69de29 100644
--- a/templates/partial-roll-common-dices.html
+++ b/templates/partial-roll-common-dices.html
@@ -1,40 +0,0 @@
-{{#if specList}}
-
- Specialisation :
-
- {{#select selectedSpecIndex}}
- None
- {{#each specList as |spec idx|}}
- {{spec.name}}
- {{/each}}
- {{/select}}
-
-
-{{/if}}
-
-
- Bonus Dice :
-
- {{#select bonusDicesLevel}}
- {{{optionsDiceList}}}
- {{/select}}
-
-
-
-
- Target Hindrance Dice :
-
- {{#select hindranceDicesLevel}}
- {{{optionsDiceList}}}
- {{/select}}
-
-
-
-
- Other Dice :
-
- {{#select otherDicesLevel}}
- {{{optionsDiceList}}}
- {{/select}}
-
-
diff --git a/templates/partial-roll-select-effects.html b/templates/partial-roll-select-effects.html
new file mode 100644
index 0000000..21c116f
--- /dev/null
+++ b/templates/partial-roll-select-effects.html
@@ -0,0 +1,41 @@
+
+
+
\ No newline at end of file
diff --git a/templates/roll-dialog-generic.html b/templates/roll-dialog-generic.html
index 0614921..0324e9e 100644
--- a/templates/roll-dialog-generic.html
+++ b/templates/roll-dialog-generic.html
@@ -6,28 +6,82 @@
-
+
-
-
Stat Dice :
-
- {{#select statDicesLevel}}
- {{{optionsDiceList}}}
- {{/select}}
-
+
+
+
+ Stat Dice :
+
+ {{#select statDicesLevel}}
+ {{{optionsDiceList}}}
+ {{/select}}
+
+ + {{statMod}}
+
+
+ {{#if specList}}
+
+ Specialisation :
+
+ {{#select selectedSpecIndex}}
+ None
+ {{#each specList as |spec idx|}}
+ {{spec.name}}
+ {{/each}}
+ {{/select}}
+
+
+
+ {{/if}}
+
+ Spec Dice :
+
+ {{#select specDicesLevel}}
+ {{{optionsDiceList}}}
+ {{/select}}
+
+
+
+
+
+ Bonus Dice :
+
+ {{#select bonusDicesLevel}}
+ {{{optionsDiceList}}}
+ {{/select}}
+
+
+
+
+
+ Hindrance Dice :
+
+ {{#select hindranceDicesLevel}}
+ {{{optionsDiceList}}}
+ {{/select}}
+
+
+
+
+
+ Other Dice :
+
+ {{#select otherDicesLevel}}
+ {{{optionsDiceList}}}
+ {{/select}}
+
+
+
+
-
-
Spec Dice :
-
- {{#select specDicesLevel}}
- {{{optionsDiceList}}}
- {{/select}}
-
+
+ {{> systems/fvtt-pegasus-rpg/templates/partial-roll-select-effects.html}}
- {{> systems/fvtt-pegasus-rpg/templates/partial-roll-common-dices.html}}
-
diff --git a/templates/roll-dialog-spec.html b/templates/roll-dialog-spec.html
index cd030d5..57fe044 100644
--- a/templates/roll-dialog-spec.html
+++ b/templates/roll-dialog-spec.html
@@ -4,17 +4,26 @@
-
-
-
- {{stat.label}} : {{stat.dice}} (+{{stat.mod}})
-
-
- {{spec.name}} : {{spec.data.dice}}
-
+
- {{> systems/fvtt-pegasus-rpg/templates/partial-roll-common-dices.html}}
+
+
+
+ {{stat.label}} : {{stat.dice}} (+{{stat.mod}})
+
+
+
+ {{spec.name}} : {{spec.data.dice}}
+
+
+ {{> systems/fvtt-pegasus-rpg/templates/partial-roll-common-dices.html}}
+
+
+
+
+ {{> systems/fvtt-pegasus-rpg/templates/partial-roll-select-effects.html}}
+
-
+
diff --git a/templates/roll-dialog-stat.html b/templates/roll-dialog-stat.html
index 43ca709..3e6f176 100644
--- a/templates/roll-dialog-stat.html
+++ b/templates/roll-dialog-stat.html
@@ -1,17 +1,24 @@