Compare commits
No commits in common. "master" and "fvtt-pegasus-rpg-v11.0.18" have entirely different histories.
master
...
fvtt-pegas
@ -495,7 +495,7 @@ export class PegasusActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async activateViceOrVirtue(itemId) {
|
async activateViceOrVirtue(itemId) {
|
||||||
let item = this.items.find(item => item.id == itemId)
|
let item = this.items.find(item => item.id == itemId)
|
||||||
if (item?.system) {
|
if (item && item.system) {
|
||||||
let nrg = duplicate(this.system.nrg)
|
let nrg = duplicate(this.system.nrg)
|
||||||
if (!item.system.activated) { // Current value
|
if (!item.system.activated) { // Current value
|
||||||
|
|
||||||
@ -581,7 +581,7 @@ export class PegasusActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async activatePower(itemId) {
|
async activatePower(itemId) {
|
||||||
let item = this.items.find(item => item.id == itemId)
|
let item = this.items.find(item => item.id == itemId)
|
||||||
if (item?.system) {
|
if (item && item.system) {
|
||||||
|
|
||||||
let nrg = duplicate(this.system.nrg)
|
let nrg = duplicate(this.system.nrg)
|
||||||
if (!item.system.activated) { // Current value
|
if (!item.system.activated) { // Current value
|
||||||
@ -1502,7 +1502,7 @@ export class PegasusActor extends Actor {
|
|||||||
}
|
}
|
||||||
if (this.isOwner || game.user.isGM) {
|
if (this.isOwner || game.user.isGM) {
|
||||||
// Update current hindrance level
|
// Update current hindrance level
|
||||||
let hindrance = 0; //this.system.combat.hindrancedice
|
let hindrance = this.system.combat.hindrancedice
|
||||||
if (!this.checkIgnoreHealth()) {
|
if (!this.checkIgnoreHealth()) {
|
||||||
if (this.system.secondary.health.status == "wounded") {
|
if (this.system.secondary.health.status == "wounded") {
|
||||||
hindrance += 1
|
hindrance += 1
|
||||||
@ -1517,11 +1517,6 @@ export class PegasusActor extends Actor {
|
|||||||
let effect = await PegasusUtility.getEffectFromCompendium("Fear")
|
let effect = await PegasusUtility.getEffectFromCompendium("Fear")
|
||||||
this.createEmbeddedDocuments('Item', [effect])
|
this.createEmbeddedDocuments('Item', [effect])
|
||||||
}
|
}
|
||||||
} else { // Remove fear if healed
|
|
||||||
let fear = this.items.find(it => it.name.toLowerCase() == "fear" && it.type == "effect")
|
|
||||||
if (fear) {
|
|
||||||
this.deleteEmbeddedDocuments('Item', [fear.id])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Manage flag state for status */
|
/* Manage flag state for status */
|
||||||
this.defeatedDisplayed = this.defeatedDisplayed && this.system.secondary.health.status != "defeated"
|
this.defeatedDisplayed = this.defeatedDisplayed && this.system.secondary.health.status != "defeated"
|
||||||
@ -1924,18 +1919,6 @@ export class PegasusActor extends Actor {
|
|||||||
await this.createEmbeddedDocuments('Item', newItems)
|
await this.createEmbeddedDocuments('Item', newItems)
|
||||||
|
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
|
||||||
checkEFfectsHindranceDeletion(statKey) {
|
|
||||||
let toRem = []
|
|
||||||
let effects = this.items.filter(effect => effect.type == 'effect' && effect.system.oneuse &&
|
|
||||||
effect.system.hindrance && (effect.system.stataffected == statKey || effect.system.stataffected == "all"))
|
|
||||||
for (let effect of effects) {
|
|
||||||
toRem.push(effect.id)
|
|
||||||
}
|
|
||||||
if (toRem.length > 0) {
|
|
||||||
this.deleteEmbeddedDocuments('Item', toRem)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
computeCurrentHindrances(statKey) {
|
computeCurrentHindrances(statKey) {
|
||||||
@ -1947,10 +1930,12 @@ export class PegasusActor extends Actor {
|
|||||||
if (overCapacity > 0) {
|
if (overCapacity > 0) {
|
||||||
hindrancesDices += overCapacity
|
hindrancesDices += overCapacity
|
||||||
}
|
}
|
||||||
let effects = this.items.filter(effect => effect.type == 'effect' && effect.system.hindrance && (effect.system.stataffected == statKey || effect.system.stataffected == "all"))
|
let effects = this.items.filter(item => item.type == 'effect')
|
||||||
for (let effect of effects) {
|
for (let effect of effects) {
|
||||||
|
if (effect.system.hindrance) {
|
||||||
hindrancesDices += effect.system.effectlevel
|
hindrancesDices += effect.system.effectlevel
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (statKey.toLowerCase() == "stl" && this.system.secondary.concealment.status == "exposed") {
|
if (statKey.toLowerCase() == "stl" && this.system.secondary.concealment.status == "exposed") {
|
||||||
hindrancesDices += 1
|
hindrancesDices += 1
|
||||||
}
|
}
|
||||||
@ -2254,7 +2239,6 @@ export class PegasusActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rollData.hindranceDices = this.computeCurrentHindrances(statKey)
|
rollData.hindranceDices = this.computeCurrentHindrances(statKey)
|
||||||
rollData.minHindranceDices = rollData.hindranceDices
|
|
||||||
|
|
||||||
this.processSizeBonus(rollData)
|
this.processSizeBonus(rollData)
|
||||||
this.addEffects(rollData, isInit, isPower, subKey == "power-dmg")
|
this.addEffects(rollData, isInit, isPower, subKey == "power-dmg")
|
||||||
|
@ -104,6 +104,7 @@ export class PegasusCombat extends Combat {
|
|||||||
user: game.user.id,
|
user: game.user.id,
|
||||||
alias: combatant.actor.name,
|
alias: combatant.actor.name,
|
||||||
rollMode: game.settings.get("core", "rollMode"),
|
rollMode: game.settings.get("core", "rollMode"),
|
||||||
|
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
|
||||||
content: msg
|
content: msg
|
||||||
}
|
}
|
||||||
ChatMessage.create(chatData);
|
ChatMessage.create(chatData);
|
||||||
@ -152,6 +153,7 @@ export class PegasusCombat extends Combat {
|
|||||||
user: game.user.id,
|
user: game.user.id,
|
||||||
alias: combatant.actor.name,
|
alias: combatant.actor.name,
|
||||||
rollMode: game.settings.get("core", "rollMode"),
|
rollMode: game.settings.get("core", "rollMode"),
|
||||||
|
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
|
||||||
content: `<div>${combatant.actor.name} is performing ${ticData[num].text}</div`
|
content: `<div>${combatant.actor.name} is performing ${ticData[num].text}</div`
|
||||||
};
|
};
|
||||||
ChatMessage.create(chatData);
|
ChatMessage.create(chatData);
|
||||||
|
@ -296,13 +296,6 @@ export class PegasusRollDialog extends Dialog {
|
|||||||
PegasusUtility.removeFromDicePool(this.rollData, idx)
|
PegasusUtility.removeFromDicePool(this.rollData, idx)
|
||||||
this.refreshDialog()
|
this.refreshDialog()
|
||||||
})
|
})
|
||||||
html.find('.pool-remove-hindrance-dice').click(async (event) => {
|
|
||||||
if (this.rollData.hindranceDices > this.rollData.minHindranceDices) {
|
|
||||||
this.rollData.hindranceDices--;
|
|
||||||
}
|
|
||||||
this.refreshDialog()
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -165,8 +165,7 @@ export class PegasusUtility {
|
|||||||
static getDiceList() {
|
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" },
|
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: "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"}]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -284,16 +283,12 @@ export class PegasusUtility {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static addDicePool(rollData, diceKey, level) {
|
static addDicePool(rollData, diceKey, level) {
|
||||||
if (diceKey == "hindrance") {
|
|
||||||
rollData.hindranceDices +=1
|
|
||||||
} else {
|
|
||||||
let newDice = {
|
let newDice = {
|
||||||
name: "dice-click", key: diceKey, level: level,
|
name: "dice-click", key: diceKey, level: level,
|
||||||
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
|
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
|
||||||
}
|
}
|
||||||
rollData.dicePool.push(newDice)
|
rollData.dicePool.push(newDice)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
static removeFromDicePool(rollData, diceIdx) {
|
static removeFromDicePool(rollData, diceIdx) {
|
||||||
@ -792,7 +787,7 @@ export class PegasusUtility {
|
|||||||
// De-actived used effects from perks
|
// De-actived used effects from perks
|
||||||
let toRem = []
|
let toRem = []
|
||||||
for (let effect of rollData.effectsList) {
|
for (let effect of rollData.effectsList) {
|
||||||
if (effect?.effect?.system.isUsed && effect.effect.system.oneuse) {
|
if (effect.effect && effect.effect.system.isUsed && effect.effect.system.oneuse) {
|
||||||
effect.defenderTokenId = rollData.defenderTokenId
|
effect.defenderTokenId = rollData.defenderTokenId
|
||||||
if (effect.foreign) {
|
if (effect.foreign) {
|
||||||
if (game.user.isGM) {
|
if (game.user.isGM) {
|
||||||
@ -806,11 +801,11 @@ export class PegasusUtility {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let actor = game.actors.get(rollData.actorId)
|
|
||||||
if (toRem.length > 0) {
|
if (toRem.length > 0) {
|
||||||
|
//console.log("Going to remove one use effects", toRem)
|
||||||
|
let actor = game.actors.get(rollData.actorId)
|
||||||
actor.deleteEmbeddedDocuments('Item', toRem)
|
actor.deleteEmbeddedDocuments('Item', toRem)
|
||||||
}
|
}
|
||||||
actor.checkEFfectsHindranceDeletion(rollData.statKey)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -1537,12 +1537,3 @@ Focus FOC: #ff0084
|
|||||||
max-height: 48px;
|
max-height: 48px;
|
||||||
flex-grow: 0;
|
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;
|
|
||||||
}
|
|
@ -252,7 +252,7 @@
|
|||||||
],
|
],
|
||||||
"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": "11.0.23",
|
"version": "11.0.18",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.23.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.18.zip",
|
||||||
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
@ -71,24 +71,12 @@
|
|||||||
</span>
|
</span>
|
||||||
<div class="flexrow dice-pool-stack">
|
<div class="flexrow dice-pool-stack">
|
||||||
{{#each dicePool as |dice idx|}}
|
{{#each dicePool as |dice idx|}}
|
||||||
<span><a class="pool-remove-dice" data-dice-idx="{{idx}}" data-dice-level="{{dice.level}}"
|
<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"
|
||||||
data-dice-key="{{dice.key}}"><img class="dice-pool-image" src="{{dice.img}}" alt="dices"></a></span>
|
src="{{dice.img}}" alt="dices"></a></span>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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="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}}
|
{{#if noBonusDice}}
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
No bonus dice due to effect !
|
No bonus dice due to effect !
|
||||||
@ -96,12 +84,25 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{#each diceList as |dice idx|}}
|
{{#each diceList as |dice idx|}}
|
||||||
<span><a class="pool-add-dice" data-dice-key="{{dice.key}}" data-dice-level="{{dice.level}}"><img
|
<span><a class="pool-add-dice" data-dice-key="{{dice.key}}" data-dice-level="{{dice.level}}"><img class="dice-pool-image"
|
||||||
class="dice-pool-image-add" src="{{dice.img}}" alt="dices"></a></span>
|
src="{{dice.img}}" alt="dices"></a></span>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/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"
|
||||||
|
src="systems/fvtt-pegasus-rpg/images/dice/hindrance-dice.png" alt="dices"></a></span>
|
||||||
|
{{/for}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
|
|
||||||
@ -128,27 +129,18 @@
|
|||||||
<option value="d6">Outnumbered 2 Extra Allies d6</option>
|
<option value="d6">Outnumbered 2 Extra Allies d6</option>
|
||||||
<option value="d8">Outnumbered 3 Extra Allies d8</option>
|
<option value="d8">Outnumbered 3 Extra Allies d8</option>
|
||||||
<option value="d10">Outnumbered 4 Extra Allies d10</option>
|
<option value="d10">Outnumbered 4 Extra Allies d10</option>
|
||||||
<option value="d12">Outnumbered 5 Extra Allies d12
|
<option value="d12">Outnumbered 5 Extra Allies d12<option>
|
||||||
<option>
|
|
||||||
<option value="none4">===== Called DMG Shot Bonus</option>
|
<option value="none4">===== Called DMG Shot Bonus</option>
|
||||||
<option value="d12">Eyes/head d12
|
<option value="d12">Eyes/head d12<option>
|
||||||
<option>
|
|
||||||
<option value="none4">===== Impact DMG Bonus</option>
|
<option value="none4">===== Impact DMG Bonus</option>
|
||||||
<option value="d4">Soft d4
|
<option value="d4">Soft d4<option>
|
||||||
<option>
|
<option value="d6">Thin/Flimsy d6<option>
|
||||||
<option value="d6">Thin/Flimsy d6
|
<option value="d8">Solid Furniture d8<option>
|
||||||
<option>
|
<option value="d10">Thin Metal/Thick Wood d10<option>
|
||||||
<option value="d8">Solid Furniture d8
|
<option value="d12">Solid Object/Concrete d12<option>
|
||||||
<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="none5">===== Other Circumstances</option>
|
||||||
<option value="d4">Concentrated
|
<option value="d4">Concentrated<option>
|
||||||
<option>
|
<option value="d4">Off Hand d4<option>
|
||||||
<option value="d4">Off Hand d4
|
|
||||||
<option>
|
|
||||||
<option value="d6">Higher Ground d6</option>
|
<option value="d6">Higher Ground d6</option>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
Loading…
Reference in New Issue
Block a user