MDL/ADRL fixes + MR fixes

This commit is contained in:
LeRatierBretonnien 2023-09-19 15:46:02 +02:00
parent bbf0f31d4c
commit 1b655a9c0e
6 changed files with 98 additions and 68 deletions

View File

@ -2254,6 +2254,7 @@ export class PegasusActor extends Actor {
}
rollData.hindranceDices = this.computeCurrentHindrances(statKey)
rollData.minHindranceDices = rollData.hindranceDices
this.processSizeBonus(rollData)
this.addEffects(rollData, isInit, isPower, subKey == "power-dmg")

View File

@ -296,6 +296,13 @@ export class PegasusRollDialog extends Dialog {
PegasusUtility.removeFromDicePool(this.rollData, idx)
this.refreshDialog()
})
html.find('.pool-remove-hindrance-dice').click(async (event) => {
if (this.rollData.hindranceDices > this.rollData.minHindranceDices) {
this.rollData.hindranceDices--;
}
this.refreshDialog()
})
}

View File

@ -165,7 +165,8 @@ export class PegasusUtility {
static getDiceList() {
return [{ key: "d4", level: 1, img: "systems/fvtt-pegasus-rpg/images/dice/d4.webp" }, { key: "d6", level: 2, img: "systems/fvtt-pegasus-rpg/images/dice/d6.webp" },
{ key: "d8", level: 3, img: "systems/fvtt-pegasus-rpg/images/dice/d8.webp" }, { key: "d10", level: 4, img: "systems/fvtt-pegasus-rpg/images/dice/d10.webp" },
{ key: "d12", level: 5, img: "systems/fvtt-pegasus-rpg/images/dice/d12.webp" }]
{ key: "d12", level: 5, img: "systems/fvtt-pegasus-rpg/images/dice/d12.webp" },
{ key: "hindrance", level: 0, img: "systems/fvtt-pegasus-rpg/images/dice/hindrance-dice.png"}]
}
/* -------------------------------------------- */
@ -283,11 +284,15 @@ export class PegasusUtility {
/* -------------------------------------------- */
static addDicePool(rollData, diceKey, level) {
let newDice = {
name: "dice-click", key: diceKey, level: level,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
if (diceKey == "hindrance") {
rollData.hindranceDices +=1
} else {
let newDice = {
name: "dice-click", key: diceKey, level: level,
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
}
rollData.dicePool.push(newDice)
}
rollData.dicePool.push(newDice)
}
/*-------------------------------------------- */

View File

@ -1536,4 +1536,13 @@ Focus FOC: #ff0084
max-width: 48px;
max-height: 48px;
flex-grow: 0;
}
.dice-pool-image-add {
border: 0;
margin-left: 4px;
min-width: 32px;
min-height: 32px;
max-width: 32px;
max-height: 32px;
flex-grow: 0;
}

View File

@ -252,7 +252,7 @@
],
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "11.0.21",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.21.zip",
"version": "11.0.22",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.22.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
}

View File

@ -26,7 +26,7 @@
{{#if statVehicle}}
<div class="flexrow">
<span class="roll-dialog-label">{{upper statVehicle.label}} :</span>
<span class="roll-dialog-label">{{upper statVehicle.label}} :</span>
<select class="roll-dialog-label" id="statVehicleLevel" type="text" name="statVehicleLevel"
value="{{statVehicle.currentlevel}}" data-dtype="Number" {{#if statKey}}disabled{{/if}}>
{{#select statVehicle.currentlevel}}
@ -37,73 +37,72 @@
</div>
{{/if}}
{{#if specList}}
<div class="flexrow">
<span class="roll-dialog-label">Spec : </span>
<select class="roll-dialog-label" id="specList" type="text" name="selectedSpec" value="{{selectedSpec}}"
data-dtype="String">
{{#select selectedSpec}}
<option value="0">None</option>
{{#each specList as |spec idx|}}
<option value="{{spec._id}}">{{spec.name}}</option>
{{/each}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Spec Dice : </span>
<select class="roll-dialog-label" id="specDicesLevel" type="text" name="specDicesLevel"
value="{{specDicesLevel}}" data-dtype="Number" {{#if specList}}disabled{{/if}}>
{{#select specDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}
{{#if specList}}
<div class="flexrow">
<span class="roll-dialog-label">Spec : </span>
<select class="roll-dialog-label" id="specList" type="text" name="selectedSpec" value="{{selectedSpec}}"
data-dtype="String">
{{#select selectedSpec}}
<option value="0">None</option>
{{#each specList as |spec idx|}}
<option value="{{spec._id}}">{{spec.name}}</option>
{{/each}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Spec Dice : </span>
<select class="roll-dialog-label" id="specDicesLevel" type="text" name="specDicesLevel"
value="{{specDicesLevel}}" data-dtype="Number" {{#if specList}}disabled{{/if}}>
{{#select specDicesLevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}
{{/if}}
<div class="dice-pool-div">
<span>
<h3 class="dice-pool-label">Current pool</h3>
</span>
<div class="flexrow dice-pool-stack">
{{#each dicePool as |dice idx|}}
<span><a class="pool-remove-dice" data-dice-idx="{{idx}}" data-dice-level="{{dice.level}}" data-dice-key="{{dice.key}}"><img class="dice-pool-image"
src="{{dice.img}}" alt="dices"></a></span>
<span><a class="pool-remove-dice" data-dice-idx="{{idx}}" data-dice-level="{{dice.level}}"
data-dice-key="{{dice.key}}"><img class="dice-pool-image" src="{{dice.img}}" alt="dices"></a></span>
{{/each}}
</div>
</div>
{{#if noBonusDice}}
<div class="flexrow">
No bonus dice due to effect !
</div>
{{else}}
<div class="flexrow">
{{#each diceList as |dice idx|}}
<span><a class="pool-add-dice" data-dice-key="{{dice.key}}" data-dice-level="{{dice.level}}"><img class="dice-pool-image"
src="{{dice.img}}" alt="dices"></a></span>
{{/each}}
</div>
{{/if}}
{{#if hindranceDices}}
<div class="dice-pool-div">
<span>
<h3 class="dice-pool-label">Hindrance Dice</h3>
</span>
<div class="flexrow dice-pool-stack">
{{#for 1 hindranceDices 1}}
<span><a class="" data-dice-idx="{{idx}}" data-dice-level="2" data-dice-key="d6"><img class="dice-pool-image"
<span><a class="pool-remove-hindrance-dice" data-dice-idx="{{idx}}" data-dice-level="2" data-dice-key="d6"><img class="dice-pool-image"
src="systems/fvtt-pegasus-rpg/images/dice/hindrance-dice.png" alt="dices"></a></span>
{{/for}}
</div>
</div>
{{#if noBonusDice}}
<div class="flexrow">
No bonus dice due to effect !
</div>
{{else}}
<div class="flexrow">
{{#each diceList as |dice idx|}}
<span><a class="pool-add-dice" data-dice-key="{{dice.key}}" data-dice-level="{{dice.level}}"><img
class="dice-pool-image-add" src="{{dice.img}}" alt="dices"></a></span>
{{/each}}
</div>
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">Modifiers : </span>
@ -129,21 +128,30 @@
<option value="d6">Outnumbered 2 Extra Allies d6</option>
<option value="d8">Outnumbered 3 Extra Allies d8</option>
<option value="d10">Outnumbered 4 Extra Allies d10</option>
<option value="d12">Outnumbered 5 Extra Allies d12<option>
<option value="d12">Outnumbered 5 Extra Allies d12
<option>
<option value="none4">===== Called DMG Shot Bonus</option>
<option value="d12">Eyes/head d12<option>
<option value="d12">Eyes/head d12
<option>
<option value="none4">===== Impact DMG Bonus</option>
<option value="d4">Soft d4<option>
<option value="d6">Thin/Flimsy d6<option>
<option value="d8">Solid Furniture d8<option>
<option value="d10">Thin Metal/Thick Wood d10<option>
<option value="d12">Solid Object/Concrete d12<option>
<option value="d4">Soft d4
<option>
<option value="d6">Thin/Flimsy d6
<option>
<option value="d8">Solid Furniture d8
<option>
<option value="d10">Thin Metal/Thick Wood d10
<option>
<option value="d12">Solid Object/Concrete d12
<option>
<option value="none5">===== Other Circumstances</option>
<option value="d4">Concentrated<option>
<option value="d4">Off Hand d4<option>
<option value="d4">Concentrated
<option>
<option value="d4">Off Hand d4
<option>
<option value="d6">Higher Ground d6</option>
{{/select}}
</select>
</select>
</div>
</div>
@ -154,14 +162,14 @@
{{else}}
{{> systems/fvtt-pegasus-rpg/templates/partial-roll-select-effects.html}}
{{/if}}
{{#if isInit}}
{{#each TICs as |tic index|}}
<div class="flexrow">
<span class="roll-dialog-label">TIC {{add index 1}}:</span>
<input class="roll-input-tic" id="roll-input-tic{{index}}" type="text" value="{{tic.text}}" data-dtype="String">
</div>
{{/each}}
{{#each TICs as |tic index|}}
<div class="flexrow">
<span class="roll-dialog-label">TIC {{add index 1}}:</span>
<input class="roll-input-tic" id="roll-input-tic{{index}}" type="text" value="{{tic.text}}" data-dtype="String">
</div>
{{/each}}
{{/if}}
</div>