diff --git a/images/ui/pc_sheet_bg.webp b/images/ui/pc_sheet_bg.webp
new file mode 100644
index 0000000..94d7da6
Binary files /dev/null and b/images/ui/pc_sheet_bg.webp differ
diff --git a/images/ui/sheet_background.webp b/images/ui/sheet_background.webp
deleted file mode 100644
index 6e10040..0000000
Binary files a/images/ui/sheet_background.webp and /dev/null differ
diff --git a/modules/pegasus-actor-sheet.js b/modules/pegasus-actor-sheet.js
index a386cc3..45bbb61 100644
--- a/modules/pegasus-actor-sheet.js
+++ b/modules/pegasus-actor-sheet.js
@@ -138,11 +138,19 @@ export class PegasusActorSheet extends ActorSheet {
let itemId = li.data("item-id");
this.actor.updatePerkStatus( itemId, ev.currentTarget.value)
});
+
html.find('.power-cost-spent').change(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
this.actor.updatePowerSpentCost( itemId, ev.currentTarget.value)
});
+
+ html.find('.power-dmg-roll').click(ev => {
+ const li = $(ev.currentTarget).parents(".item")
+ let itemId = li.data("item-id")
+ this.actor.powerDmgRoll( itemId )
+ })
+
html.find('.perk-used').change(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js
index b89f8fb..aa9ad78 100644
--- a/modules/pegasus-actor.js
+++ b/modules/pegasus-actor.js
@@ -982,9 +982,18 @@ export class PegasusActor extends Actor {
}
+ /* -------------------------------------------- */
+ powerDmgRoll( itemId) {
+ let power = this.data.items.get(itemId)
+ if (power ) {
+ power = duplicate(power)
+ this.rollPool( power.data.dmgstatistic )
+ }
+ }
+
/* -------------------------------------------- */
rollPool(statKey, useShield = false) {
- let stat = this.getStat(statKey);
+ let stat = this.getStat(statKey)
if (stat) {
let rollData = this.getCommonRollData(statKey, useShield)
rollData.mode = "stat"
@@ -998,7 +1007,7 @@ export class PegasusActor extends Actor {
/* -------------------------------------------- */
rollUnarmedAttack() {
- let stat = this.getStat('com');
+ let stat = this.getStat('com')
if (stat) {
let rollData = this.getCommonRollData(statKey)
rollData.mode = "stat"
diff --git a/modules/pegasus-item-sheet.js b/modules/pegasus-item-sheet.js
index eb88917..60ff8d8 100644
--- a/modules/pegasus-item-sheet.js
+++ b/modules/pegasus-item-sheet.js
@@ -386,7 +386,8 @@ export class PegasusItemSheet extends ItemSheet {
/* -------------------------------------------- */
async _onDrop(event) {
- if (this.object.type == 'weapon' || this.object.type == 'shield' || this.object.type == 'armor' || this.object.type == 'shield') {
+ if (this.object.type == 'weapon' || this.object.type == 'armor' || this.object.type == 'shield'
+ || this.object.type == 'equipment') {
let data = event.dataTransfer.getData('text/plain');
if (data) {
let dataItem = JSON.parse(data);
diff --git a/modules/pegasus-roll-dialog.js b/modules/pegasus-roll-dialog.js
index 1ae0a04..b2ed5cc 100644
--- a/modules/pegasus-roll-dialog.js
+++ b/modules/pegasus-roll-dialog.js
@@ -5,7 +5,7 @@ export class PegasusRollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData ) {
- let options = { classes: ["WotGdialog"], width: 620, height: 380, 'z-index': 99999 };
+ 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 );
diff --git a/styles/simple.css b/styles/simple.css
index b427cd2..421b406 100644
--- a/styles/simple.css
+++ b/styles/simple.css
@@ -320,6 +320,7 @@ table {border: 1px solid #7a7971;}
height: 40px;
border-top: 1px solid #AAA;
border-bottom: 1px solid #AAA;
+ color: #000000;
}
.fvtt-pegasus-rpg .tabs .item {
@@ -376,9 +377,10 @@ table {border: 1px solid #7a7971;}
/* ======================================== */
/* Sheet */
.window-app.sheet .window-content .sheet-header{
- color: rgba(168, 139, 139, 0.5);
+ background: url("../images/ui/pc_sheet_bg.webp")
}
/* background: #011d33 url("../images/ui/fond1.webp") repeat left top;*/
+/*color: rgba(168, 139, 139, 0.5);*/
.window-app.sheet .window-content .sheet-header input[type="text"], .window-app.sheet .window-content .sheet-header input[type="number"], .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] {
color: rgba(36, 37, 37, 0.75);
@@ -389,6 +391,7 @@ table {border: 1px solid #7a7971;}
.window-app .window-content, .window-app.sheet .window-content .sheet-body{
font-size: 0.8rem;
+ background: url("../images/ui/pc_sheet_bg.webp") repeat left top;
}
/* background: rgba(245,245,240,0.6) url("../images/ui/sheet_background.webp") left top;*/
@@ -414,7 +417,8 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
line-height: 1.5rem;
border-top: 0 none;
border-bottom: 0 none;
- color: rgba(52, 52, 52, 0.95);
+ background-color:black;
+ color:beige;
}
/* background: rgb(245,245,240) url("../images/ui/fond4.webp") repeat left top;*/
@@ -453,18 +457,6 @@ section.sheet-body:after {
width: 50px;
}
-#vie-plus, #vie-moins, #endurance-plus, #endurance-moins, #fatigue-plus, #fatigue-moins, #ptreve-actuel-plus, #ptreve-actuel-moins, .monnaie-plus, .monnaie-moins {
- display: inline-block;
- width: 1.25rem;
- background: rgba(30, 25, 20, 1);
- text-align: center;
- border: 1px solid rgba(72, 46, 28, 1);
- border-radius: 0.25rem;
- line-height: 1.25rem;
- color: rgba(255, 255, 255, 0.5);
-}
-
-
.window-app.sheet .window-content .tooltip:hover .tooltiptext {
top: 2rem;
left: 2rem;
@@ -1224,44 +1216,3 @@ ul, li {
height: 54px;
position:relative;
}
-
-.dice-river-list-river {
- position:relative;
-}
-
-.dice-river-list .dice,
-.dice-formula .dice,
-.dice-total .dice {
- margin: 2px;
- display: inline-flex;
- width: 50px;
- height: 50px;
-}
-
-.dice-river-list .dice label,
-.dice-formula .dice label,
-.dice-total .dice label {
- font-weight: bold;
- color: white;
- position:absolute;
- text-align: center;
- margin-top: 10px;
- margin-left: 20px;
- z-index: 1;
-}
-
-.dice-river-list .dice img,
-.dice-formula .dice img,
-.dice-total .dice img {
- position: relative;
- width: 48px;
- height: 48px;
- border: none;
-}
-
-.dice-river-list .modifier,
-.dice-formula .modifier,
-.dice-total .modifier {
- margin: 2px;
- display: inline-flex;
-}
\ No newline at end of file
diff --git a/system.json b/system.json
index 08673b3..0a6c566 100644
--- a/system.json
+++ b/system.json
@@ -180,9 +180,9 @@
"styles": [
"styles/simple.css"
],
- "templateVersion": 80,
+ "templateVersion": 81,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
- "version": "0.4.18",
+ "version": "0.4.19",
"background" : "./images/ui/pegasus_welcome_page.webp"
}
diff --git a/template.json b/template.json
index 154cccb..11fea33 100644
--- a/template.json
+++ b/template.json
@@ -329,6 +329,8 @@
"activated": false,
"purchasedeffects": "",
"effectsgained": [],
+ "dmgroll": false,
+ "dmgstatistic": "",
"description": ""
},
"armor": {
diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html
index 6ceeb5b..da9a074 100644
--- a/templates/actor-sheet.html
+++ b/templates/actor-sheet.html
@@ -7,6 +7,11 @@