Fix numbering
This commit is contained in:
parent
98fbc92e9b
commit
9974c5365a
@ -76,26 +76,26 @@ export class PegasusRollDialog extends Dialog {
|
|||||||
console.log("Ongoing", newLevel, toggled, idVal )
|
console.log("Ongoing", newLevel, toggled, idVal )
|
||||||
if (toggled) {
|
if (toggled) {
|
||||||
if ( genre == 'positive') {
|
if ( genre == 'positive') {
|
||||||
newLevel += level
|
newLevel += Number(level)
|
||||||
}else {
|
}else {
|
||||||
newLevel -= level
|
newLevel -= Number(level)
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if ( genre == 'positive') {
|
if ( genre == 'positive') {
|
||||||
newLevel -= level
|
newLevel -= Number(level)
|
||||||
}else {
|
}else {
|
||||||
newLevel += level
|
newLevel += Number(level)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newLevel = (newLevel<0) ? 0 : newLevel
|
newLevel = (newLevel<0) ? 0 : newLevel
|
||||||
$(idVal).val(newLevel)
|
$(idVal).val(newLevel)
|
||||||
}
|
}
|
||||||
//console.log("Effect", effect, toggled)
|
//console.log("Effect", effect, toggled)
|
||||||
this.rollData.statDicesLevel = $('#statDicesLevel').val()
|
this.rollData.statDicesLevel = Number($('#statDicesLevel').val())
|
||||||
this.rollData.specDicesLevel = $('#specDicesLevel').val()
|
this.rollData.specDicesLevel = Number($('#specDicesLevel').val())
|
||||||
this.rollData.bonusDicesLevel = $('#bonusDicesLevel').val()
|
this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val())
|
||||||
this.rollData.hindranceDicesLevel = $('#hindranceDicesLevel').val()
|
this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val())
|
||||||
this.rollData.otherDicesLevel = $('#otherDicesLevel').val()
|
this.rollData.otherDicesLevel = Number($('#otherDicesLevel').val())
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -105,9 +105,9 @@ export class PegasusRollDialog extends Dialog {
|
|||||||
armor.applied = toggled
|
armor.applied = toggled
|
||||||
if (armor.type == 'other' ) {
|
if (armor.type == 'other' ) {
|
||||||
if (toggled) {
|
if (toggled) {
|
||||||
this.rollData.otherDicesLevel += armor.value
|
this.rollData.otherDicesLevel += Number(armor.value)
|
||||||
} else {
|
} else {
|
||||||
this.rollData.otherDicesLevel -= armor.value
|
this.rollData.otherDicesLevel -= Number(armor.value)
|
||||||
this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel<0) ? 0 : this.rollData.otherDicesLevel
|
this.rollData.otherDicesLevel = (this.rollData.otherDicesLevel<0) ? 0 : this.rollData.otherDicesLevel
|
||||||
}
|
}
|
||||||
$("#otherDicesLevel").val(this.rollData.otherDicesLevel)
|
$("#otherDicesLevel").val(this.rollData.otherDicesLevel)
|
||||||
@ -164,11 +164,11 @@ export class PegasusRollDialog extends Dialog {
|
|||||||
newLevel = (newLevel <0) ? 0 : newLevel
|
newLevel = (newLevel <0) ? 0 : newLevel
|
||||||
$(idVal).val(newLevel)
|
$(idVal).val(newLevel)
|
||||||
// Then refresh
|
// Then refresh
|
||||||
this.rollData.statDicesLevel = $('#statDicesLevel').val()
|
this.rollData.statDicesLevel = Number($('#statDicesLevel').val())
|
||||||
this.rollData.specDicesLevel = $('#specDicesLevel').val()
|
this.rollData.specDicesLevel = Number($('#specDicesLevel').val())
|
||||||
this.rollData.bonusDicesLevel = $('#bonusDicesLevel').val()
|
this.rollData.bonusDicesLevel = Number($('#bonusDicesLevel').val())
|
||||||
this.rollData.hindranceDicesLevel = $('#hindranceDicesLevel').val()
|
this.rollData.hindranceDicesLevel = Number($('#hindranceDicesLevel').val())
|
||||||
this.rollData.otherDicesLevel = $('#otherDicesLevel').val()
|
this.rollData.otherDicesLevel = Number($('#otherDicesLevel').val())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,6 +183,6 @@
|
|||||||
"templateVersion": 64,
|
"templateVersion": 64,
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||||
"version": "0.2.6",
|
"version": "0.2.7",
|
||||||
"background" : "./images/ui/pegasus_welcome_page.webp"
|
"background" : "./images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user