Various changes + updates
This commit is contained in:
parent
76c8cde3d9
commit
30ef811bbf
BIN
images/icons/icon_vice.webp
Normal file
BIN
images/icons/icon_vice.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
BIN
images/icons/icon_virtue.webp
Normal file
BIN
images/icons/icon_virtue.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
24
lang/en.json
24
lang/en.json
@ -1,3 +1,25 @@
|
|||||||
{
|
{
|
||||||
|
"ITEM": {
|
||||||
|
"TypeRace": "Race",
|
||||||
|
"TypeRole": "Role",
|
||||||
|
"TypeAbility": "Ability",
|
||||||
|
"TypeSpecialisation": "Specialisation",
|
||||||
|
"TypePerk": "Perk",
|
||||||
|
"TypePower": "Power",
|
||||||
|
"TypeArmor": "Armor",
|
||||||
|
"TypeShield": "Shield",
|
||||||
|
"TypeEquipment": "Equipment",
|
||||||
|
"TypeWeapon": "Weapon",
|
||||||
|
"TypeEffect": "Effect",
|
||||||
|
"TypeMoney": "Money",
|
||||||
|
"TypeVirtue": "Virtue",
|
||||||
|
"TypeVice": "Vice",
|
||||||
|
"TypeVehiclehull": "Vehicule Hull",
|
||||||
|
"TypePowercoremodule": "Power Core Module",
|
||||||
|
"TypeMobilitymodule": "Mobility Module",
|
||||||
|
"TypeCombatmodule": "Combat Module",
|
||||||
|
"TypeVehiclemodule": "Vehicle Module",
|
||||||
|
"TypeVehicleweaponmodule" : "Vehicle Weapon Module",
|
||||||
|
"TypePropulsionmodule": "Propulsion module"
|
||||||
|
}
|
||||||
}
|
}
|
@ -3,8 +3,8 @@
|
|||||||
* @extends {ActorSheet}
|
* @extends {ActorSheet}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { PegasusUtility } from "./pegasus-utility.js";
|
import { PegasusUtility } from "./pegasus-utility.js"
|
||||||
import { PegasusRollDialog } from "./pegasus-roll-dialog.js";
|
import { PegasusRollDialog } from "./pegasus-roll-dialog.js"
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class PegasusActorSheet extends ActorSheet {
|
export class PegasusActorSheet extends ActorSheet {
|
||||||
@ -78,15 +78,8 @@ export class PegasusActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async openGenericRoll() {
|
async openGenericRoll() {
|
||||||
let rollData = PegasusUtility.getBasicRollData()
|
let rollData = PegasusUtility.initGenericRoll()
|
||||||
rollData.alias = "Dice Pool Roll",
|
|
||||||
rollData.mode = "generic"
|
|
||||||
rollData.title = `Dice Pool Roll`
|
|
||||||
rollData.img = "icons/dice/d12black.svg"
|
|
||||||
rollData.isGeneric = true
|
|
||||||
rollData.traumaState = this.actor.getTraumaState()
|
rollData.traumaState = this.actor.getTraumaState()
|
||||||
rollData.diceList = PegasusUtility.getDiceList()
|
|
||||||
rollData.dicePool = []
|
|
||||||
|
|
||||||
let rollDialog = await PegasusRollDialog.create( this.actor, rollData);
|
let rollDialog = await PegasusRollDialog.create( this.actor, rollData);
|
||||||
rollDialog.render( true );
|
rollDialog.render( true );
|
||||||
|
@ -464,6 +464,9 @@ export class PegasusActor extends Actor {
|
|||||||
ui.notifications.warn("Stun level cannot go below 0")
|
ui.notifications.warn("Stun level cannot go below 0")
|
||||||
}
|
}
|
||||||
let stunAbove = combat.stunlevel - combat.stunthreshold
|
let stunAbove = combat.stunlevel - combat.stunthreshold
|
||||||
|
if (stunAbove > 0) {
|
||||||
|
ChatMessage.create( { content: `${this.name} Stun threshold has been exceeded.`})
|
||||||
|
}
|
||||||
if (incDec > 0 && stunAbove > 0) {
|
if (incDec > 0 && stunAbove > 0) {
|
||||||
let delirium = duplicate(this.data.data.secondary.delirium)
|
let delirium = duplicate(this.data.data.secondary.delirium)
|
||||||
delirium.value -= incDec
|
delirium.value -= incDec
|
||||||
@ -561,6 +564,27 @@ export class PegasusActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async preprocessItem(event, item, onDrop = false) {
|
async preprocessItem(event, item, onDrop = false) {
|
||||||
|
|
||||||
|
// Pre-filter effects
|
||||||
|
if (item.data.type == 'effect' ) {
|
||||||
|
if ( this.checkMentalDisruption() && item.data.data.type == "mental" && item.data.data.genre == "positive") {
|
||||||
|
ChatMessage.create( { content: "Effects of this type cannot be applied while Disruption is applied, Use a Soft Action to remove Disruption"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if ( this.checkPhysicalDisruption() && item.data.data.type == "physical" && item.data.data.genre == "positive") {
|
||||||
|
ChatMessage.create( { content: "Effects of this type cannot be applied while Disruption is applied, Use a Soft Action to remove Disruption"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if ( this.checkMentalImmunity() && item.data.data.type == "mental" && item.data.data.genre == "negative") {
|
||||||
|
ChatMessage.create( { content: "Effects of this type cannot be applied while Immunity is applied"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if ( this.checkPhysicalImmunity() && item.data.data.type == "physical" && item.data.data.genre == "negative") {
|
||||||
|
ChatMessage.create( { content: "Effects of this type cannot be applied while Immunity is applied"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (item.data.type == 'race') {
|
if (item.data.type == 'race') {
|
||||||
this.applyRace(item.data)
|
this.applyRace(item.data)
|
||||||
} else if (item.data.type == 'role') {
|
} else if (item.data.type == 'role') {
|
||||||
@ -833,6 +857,10 @@ export class PegasusActor extends Actor {
|
|||||||
if (item) {
|
if (item) {
|
||||||
|
|
||||||
if (item.data.data.status == status) return;// Ensure we are really changing the status
|
if (item.data.data.status == status) return;// Ensure we are really changing the status
|
||||||
|
if (this.checkNoPerksAllowed() ) {
|
||||||
|
ChatMessage( {content: "No perks activation allowed due to effect !"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Severe Trauma management
|
// Severe Trauma management
|
||||||
if (this.getTraumaState() == "severetrauma") {
|
if (this.getTraumaState() == "severetrauma") {
|
||||||
@ -978,6 +1006,78 @@ export class PegasusActor extends Actor {
|
|||||||
return biodata.currentlevelremaining
|
return biodata.currentlevelremaining
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
checkIgnoreHealth() {
|
||||||
|
for (let effect of this.data.items) {
|
||||||
|
if (effect.type == "effect" && effect.data.data.ignorehealthpenalty) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
checkMentalDisruption() {
|
||||||
|
for (let effect of this.data.items) {
|
||||||
|
if (effect.type == "effect" && effect.data.data.mentaldisruption) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
checkPhysicalDisruption() {
|
||||||
|
for (let effect of this.data.items) {
|
||||||
|
if (effect.type == "effect" && effect.data.data.physicaldisruption) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
checkMentalImmunity() {
|
||||||
|
for (let effect of this.data.items) {
|
||||||
|
if (effect.type == "effect" && effect.data.data.mentalimmunity) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
checkPhysicalImmunity() {
|
||||||
|
for (let effect of this.data.items) {
|
||||||
|
if (effect.type == "effect" && effect.data.data.physicalimmunity) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
checkNoBonusDice() {
|
||||||
|
for (let effect of this.data.items) {
|
||||||
|
if (effect.type == "effect" && effect.data.data.nobonusdice) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
checkNoPerksAllowed() {
|
||||||
|
for (let effect of this.data.items) {
|
||||||
|
if (effect.type == "effect" && effect.data.data.noperksallowed) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
checkIfPossible() {
|
||||||
|
for (let effect of this.data.items) {
|
||||||
|
if (effect.type == "effect" && effect.data.data.isthispossible.length > 0) {
|
||||||
|
ChatMessage.create( { content: effect.data.data.isthispossible} )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async computeNRGHealth() {
|
async computeNRGHealth() {
|
||||||
if (this.isOwner || game.user.isGM) {
|
if (this.isOwner || game.user.isGM) {
|
||||||
@ -1021,9 +1121,10 @@ export class PegasusActor extends Actor {
|
|||||||
updates['data.nrg.value'] = nrgValue
|
updates['data.nrg.value'] = nrgValue
|
||||||
}
|
}
|
||||||
|
|
||||||
nrgValue = PegasusUtility.getDiceValue(this.data.data.statistics.mnd.value) + this.data.data.statistics.mnd.mod;
|
let stunth = PegasusUtility.getDiceValue(this.data.data.statistics.phy.value) + PegasusUtility.getDiceValue(this.data.data.statistics.mnd.value) + PegasusUtility.getDiceValue(this.data.data.statistics.foc.value)
|
||||||
if (nrgValue != this.data.data.combat.stunthreshold) {
|
+ this.data.data.statistics.mnd.mod + this.data.data.statistics.phy.mod + this.data.data.statistics.foc.mod
|
||||||
updates['data.combat.stunthreshold'] = nrgValue
|
if (stunth != this.data.data.combat.stunthreshold) {
|
||||||
|
updates['data.combat.stunthreshold'] = stunth
|
||||||
}
|
}
|
||||||
|
|
||||||
let momentum = this.data.data.statistics.foc.value + this.data.data.statistics.foc.mod
|
let momentum = this.data.data.statistics.foc.value + this.data.data.statistics.foc.mod
|
||||||
@ -1038,7 +1139,6 @@ export class PegasusActor extends Actor {
|
|||||||
updates['data.mr.value'] = mrLevel
|
updates['data.mr.value'] = mrLevel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let moralitythreshold = - (Number(PegasusUtility.getDiceValue(this.data.data.statistics.foc.value)) + Number(this.data.data.statistics.foc.mod))
|
let moralitythreshold = - (Number(PegasusUtility.getDiceValue(this.data.data.statistics.foc.value)) + Number(this.data.data.statistics.foc.mod))
|
||||||
if (moralitythreshold != this.data.data.biodata.moralitythreshold) {
|
if (moralitythreshold != this.data.data.biodata.moralitythreshold) {
|
||||||
updates['data.biodata.moralitythreshold'] = moralitythreshold
|
updates['data.biodata.moralitythreshold'] = moralitythreshold
|
||||||
@ -1063,20 +1163,20 @@ export class PegasusActor extends Actor {
|
|||||||
}
|
}
|
||||||
if (Object.entries(updates).length > 0) {
|
if (Object.entries(updates).length > 0) {
|
||||||
await this.update(updates)
|
await this.update(updates)
|
||||||
this.computeThreatLevel()
|
|
||||||
}
|
}
|
||||||
|
this.computeThreatLevel()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isOwner || game.user.isGM) {
|
if (this.isOwner || game.user.isGM) {
|
||||||
// Update current hindrance level
|
// Update current hindrance level
|
||||||
let hindrance = this.data.data.combat.hindrancedice
|
let hindrance = this.data.data.combat.hindrancedice
|
||||||
if (this.data.data.secondary.health.value < 0) {
|
if ( !this.checkIgnoreHealth() ) {
|
||||||
if (this.data.data.secondary.health.value < -Math.floor((this.data.data.secondary.health.max + 1) / 2)) { // Severe wounded
|
if (this.data.data.secondary.health.value < 0) {
|
||||||
hindrance += 3
|
if (this.data.data.secondary.health.value < -Math.floor((this.data.data.secondary.health.max + 1) / 2)) { // Severe wounded
|
||||||
} else {
|
hindrance += 3
|
||||||
hindrance += 1
|
} else {
|
||||||
|
hindrance += 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.data.data.combat.hindrancedice = hindrance
|
this.data.data.combat.hindrancedice = hindrance
|
||||||
@ -1347,6 +1447,7 @@ export class PegasusActor extends Actor {
|
|||||||
rollData.levelRemaining = this.getLevelRemaining()
|
rollData.levelRemaining = this.getLevelRemaining()
|
||||||
rollData.activePerks = duplicate(this.getActivePerks())
|
rollData.activePerks = duplicate(this.getActivePerks())
|
||||||
rollData.diceList = PegasusUtility.getDiceList()
|
rollData.diceList = PegasusUtility.getDiceList()
|
||||||
|
rollData.noBonusDice = this.checkNoBonusDice()
|
||||||
rollData.dicePool = []
|
rollData.dicePool = []
|
||||||
|
|
||||||
if (statKey) {
|
if (statKey) {
|
||||||
|
@ -15,6 +15,8 @@ export const defaultItemImg = {
|
|||||||
weapon: "systems/fvtt-pegasus-rpg/images/icons/icon_meleeweapon.webp",
|
weapon: "systems/fvtt-pegasus-rpg/images/icons/icon_meleeweapon.webp",
|
||||||
shield: "systems/fvtt-pegasus-rpg/images/icons/icon_shield.webp",
|
shield: "systems/fvtt-pegasus-rpg/images/icons/icon_shield.webp",
|
||||||
money: "systems/fvtt-pegasus-rpg/images/icons/icon_money.webp",
|
money: "systems/fvtt-pegasus-rpg/images/icons/icon_money.webp",
|
||||||
|
vice: "systems/fvtt-pegasus-rpg/images/icons/icon_vice.webp",
|
||||||
|
virtue: "systems/fvtt-pegasus-rpg/images/icons/icon_virtue.webp",
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,8 +33,8 @@ export class PegasusRollDialog extends Dialog {
|
|||||||
|
|
||||||
super(conf, options);
|
super(conf, options);
|
||||||
|
|
||||||
this.actor = actor;
|
this.actor = actor
|
||||||
this.rollData = rollData;
|
this.rollData = rollData
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -106,6 +106,7 @@ export class PegasusRollDialog extends Dialog {
|
|||||||
manageWeapons(weaponIdx, toggled) {
|
manageWeapons(weaponIdx, toggled) {
|
||||||
let weapon = this.rollData.weaponsList[weaponIdx]
|
let weapon = this.rollData.weaponsList[weaponIdx]
|
||||||
if (weapon) {
|
if (weapon) {
|
||||||
|
this.rollData.weapon = duplicate(weapon)
|
||||||
if (toggled) {
|
if (toggled) {
|
||||||
this.rollData.weaponName = weapon.weapon.name
|
this.rollData.weaponName = weapon.weapon.name
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { PegasusCombat } from "./pegasus-combat.js";
|
import { PegasusCombat } from "./pegasus-combat.js";
|
||||||
import { PegasusCommands } from "./pegasus-commands.js";
|
import { PegasusCommands } from "./pegasus-commands.js";
|
||||||
import { PegasusActorCreate } from "./pegasus-create-char.js";
|
import { PegasusActorCreate } from "./pegasus-create-char.js";
|
||||||
|
import { PegasusRollDialog } from "./pegasus-roll-dialog.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
const __level2Dice = ["d0", "d4", "d6", "d8", "d10", "d12"]
|
const __level2Dice = ["d0", "d4", "d6", "d8", "d10", "d12"]
|
||||||
@ -14,7 +15,10 @@ export class PegasusUtility {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async init() {
|
static async init() {
|
||||||
Hooks.on('renderChatLog', (log, html, data) => PegasusUtility.chatListeners(html));
|
Hooks.on('renderChatLog', (log, html, data) => PegasusUtility.chatListeners(html))
|
||||||
|
Hooks.on('targetToken', (user, token, flag) => PegasusUtility.targetToken(user, token, flag))
|
||||||
|
Hooks.on('renderSidebarTab', (app, html, data) => PegasusUtility.addDiceRollButton(app, html, data))
|
||||||
|
|
||||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||||
PegasusUtility.pushInitiativeOptions(html, options);
|
PegasusUtility.pushInitiativeOptions(html, options);
|
||||||
});
|
});
|
||||||
@ -54,6 +58,41 @@ export class PegasusUtility {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static initGenericRoll() {
|
||||||
|
let rollData = PegasusUtility.getBasicRollData()
|
||||||
|
rollData.alias = "Dice Pool Roll",
|
||||||
|
rollData.mode = "generic"
|
||||||
|
rollData.title = `Dice Pool Roll`
|
||||||
|
rollData.img = "icons/dice/d12black.svg"
|
||||||
|
rollData.isGeneric = true
|
||||||
|
rollData.diceList = PegasusUtility.getDiceList()
|
||||||
|
rollData.dicePool = []
|
||||||
|
rollData.traumaState = "none"
|
||||||
|
return rollData
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static async addDiceRollButton(app, html, data) {
|
||||||
|
if (app.tabName !== 'chat') return
|
||||||
|
let $chat_form = html.find('#chat-form')
|
||||||
|
const template = 'systems/fvtt-pegasus-rpg/templates/chat-roll-button.html'
|
||||||
|
renderTemplate(template, {}).then(c => {
|
||||||
|
if (c.length > 0) {
|
||||||
|
let $content = $(c)
|
||||||
|
$chat_form.before($content)
|
||||||
|
$content.find('#pegasus-chat-roll-button').on('click', async event => {
|
||||||
|
event.preventDefault()
|
||||||
|
let rollData = PegasusUtility.initGenericRoll()
|
||||||
|
rollData.isChatRoll = true
|
||||||
|
let rollDialog = await PegasusRollDialog.create( undefined, rollData)
|
||||||
|
rollDialog.render( true )
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static pushInitiativeOptions(html, options) {
|
static pushInitiativeOptions(html, options) {
|
||||||
options.push({ name: "Apply -10", condition: true, icon: '<i class="fas fa-plus"></i>', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } })
|
options.push({ name: "Apply -10", condition: true, icon: '<i class="fas fa-plus"></i>', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } })
|
||||||
@ -345,6 +384,7 @@ export class PegasusUtility {
|
|||||||
ui.notifications.warn(`No character linked to the player : reroll not allowed.`)
|
ui.notifications.warn(`No character linked to the player : reroll not allowed.`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log("Going to reroll", character, rollId)
|
||||||
let rollData = this.getRollData(rollId)
|
let rollData = this.getRollData(rollId)
|
||||||
if (character.getLevelRemaining() > 0) {
|
if (character.getLevelRemaining() > 0) {
|
||||||
rollData.rerollHero = true
|
rollData.rerollHero = true
|
||||||
@ -361,6 +401,13 @@ export class PegasusUtility {
|
|||||||
game.socket.emit("system.fvtt-pegasus-rpg", { name: "msg_reroll_hero", data: { userId: userId, rollId: rollId } })
|
game.socket.emit("system.fvtt-pegasus-rpg", { name: "msg_reroll_hero", data: { userId: userId, rollId: rollId } })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static targetToken( user, token, flag) {
|
||||||
|
if (flag) {
|
||||||
|
token.actor.checkIfPossible()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async chatListeners(html) {
|
static async chatListeners(html) {
|
||||||
|
|
||||||
@ -509,7 +556,7 @@ export class PegasusUtility {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static getTarget() {
|
static getTarget() {
|
||||||
if (game.user.targets && game.user.targets.size == 1) {
|
if (game.user.targets) {
|
||||||
for (let target of game.user.targets) {
|
for (let target of game.user.targets) {
|
||||||
return target
|
return target
|
||||||
}
|
}
|
||||||
@ -546,11 +593,12 @@ export class PegasusUtility {
|
|||||||
let id = rollData.rollId
|
let id = rollData.rollId
|
||||||
let oldRollData = this.rollDataStore[id] || {}
|
let oldRollData = this.rollDataStore[id] || {}
|
||||||
let newRollData = mergeObject(oldRollData, rollData)
|
let newRollData = mergeObject(oldRollData, rollData)
|
||||||
|
console.log("Rolldata saved", id)
|
||||||
this.rollDataStore[id] = newRollData
|
this.rollDataStore[id] = newRollData
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static saveRollData(rollData) {
|
static saveRollData(rollData) {
|
||||||
game.socket.emit("system.pegasus-rpg", {
|
game.socket.emit("system.fvtt-pegasus-rpg", {
|
||||||
name: "msg_update_roll", data: rollData
|
name: "msg_update_roll", data: rollData
|
||||||
}); // Notify all other clients of the roll
|
}); // Notify all other clients of the roll
|
||||||
this.updateRollData(rollData)
|
this.updateRollData(rollData)
|
||||||
@ -581,6 +629,7 @@ export class PegasusUtility {
|
|||||||
this.addItemDropToActor(actor, item)
|
this.addItemDropToActor(actor, item)
|
||||||
}
|
}
|
||||||
if (msg.name == "msg_reroll_hero") {
|
if (msg.name == "msg_reroll_hero") {
|
||||||
|
console.log("Reroll requested")
|
||||||
this.rerollHeroRemaining(msg.data.userId, msg.data.rollId)
|
this.rerollHeroRemaining(msg.data.userId, msg.data.rollId)
|
||||||
}
|
}
|
||||||
if (msg.name == "msg_gm_remove_effect") {
|
if (msg.name == "msg_gm_remove_effect") {
|
||||||
@ -681,7 +730,7 @@ export class PegasusUtility {
|
|||||||
if (game.user.isGM) {
|
if (game.user.isGM) {
|
||||||
this.removeForeignEffect(effect)
|
this.removeForeignEffect(effect)
|
||||||
} else {
|
} else {
|
||||||
game.socket.emit("system.fvtt-pegasus-rgp", { msg: "msg_gm_remove_effect", data: effect })
|
game.socket.emit("system.fvtt-pegasus-rpg", { msg: "msg_gm_remove_effect", data: effect })
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toRem.push(effect.effect._id)
|
toRem.push(effect.effect._id)
|
||||||
@ -863,7 +912,7 @@ export class PegasusUtility {
|
|||||||
chatGM.whisper = this.getUsers(user => user.isGM);
|
chatGM.whisper = this.getUsers(user => user.isGM);
|
||||||
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
|
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
|
||||||
console.log("blindMessageToGM", chatGM);
|
console.log("blindMessageToGM", chatGM);
|
||||||
game.socket.emit("system.fvtt-pegasus-rgp", { msg: "msg_gm_chat_message", data: chatGM });
|
game.socket.emit("system.fvtt-pegasus-rpg", { msg: "msg_gm_chat_message", data: chatGM });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -950,7 +999,7 @@ export class PegasusUtility {
|
|||||||
console.log("TARGET ", target)
|
console.log("TARGET ", target)
|
||||||
let defenderActor = target.actor
|
let defenderActor = target.actor
|
||||||
rollData.defenderTokenId = target.id
|
rollData.defenderTokenId = target.id
|
||||||
rollData.attackerId = this.id
|
//rollData.attackerId = this.id
|
||||||
console.log("DEFENDER", defenderActor)
|
console.log("DEFENDER", defenderActor)
|
||||||
defenderActor.addHindrancesList(rollData.effectsList)
|
defenderActor.addHindrancesList(rollData.effectsList)
|
||||||
}
|
}
|
||||||
|
@ -1159,6 +1159,10 @@ ul, li {
|
|||||||
position:relative;
|
position:relative;
|
||||||
top:1px;
|
top:1px;
|
||||||
}
|
}
|
||||||
|
.pegasus-chat-roll-button {
|
||||||
|
height: 38px;
|
||||||
|
max-height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
.plus-minus-button {
|
.plus-minus-button {
|
||||||
box-shadow: inset 0px 1px 0px 0px #a6827e;
|
box-shadow: inset 0px 1px 0px 0px #a6827e;
|
||||||
@ -1282,7 +1286,7 @@ Focus FOC: #ff0084
|
|||||||
background: black;
|
background: black;
|
||||||
}
|
}
|
||||||
.color-class-agi,
|
.color-class-agi,
|
||||||
.color-class-range {
|
.color-class-ranged-attack {
|
||||||
background-color: #02a41d;
|
background-color: #02a41d;
|
||||||
background: #02a41d;
|
background: #02a41d;
|
||||||
}
|
}
|
||||||
@ -1318,7 +1322,7 @@ Focus FOC: #ff0084
|
|||||||
background-color: #505050;
|
background-color: #505050;
|
||||||
}
|
}
|
||||||
.color-class-per,
|
.color-class-per,
|
||||||
.color-class-ranged {
|
.color-class-ranged-damage {
|
||||||
background-color: #f9c801;
|
background-color: #f9c801;
|
||||||
}
|
}
|
||||||
.color-class-foc {
|
.color-class-foc {
|
||||||
|
@ -180,9 +180,9 @@
|
|||||||
"styles": [
|
"styles": [
|
||||||
"styles/simple.css"
|
"styles/simple.css"
|
||||||
],
|
],
|
||||||
"templateVersion": 99,
|
"templateVersion": 100,
|
||||||
"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.6.8",
|
"version": "0.6.10",
|
||||||
"background" : "./images/ui/pegasus_welcome_page.webp"
|
"background" : "./images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
||||||
|
@ -361,6 +361,14 @@
|
|||||||
"effectstatlevel": false,
|
"effectstatlevel": false,
|
||||||
"effectstat": "",
|
"effectstat": "",
|
||||||
"oneuse": false,
|
"oneuse": false,
|
||||||
|
"ignorehealthpenalty": false,
|
||||||
|
"isthispossible": "",
|
||||||
|
"mentaldisruption": false,
|
||||||
|
"physicaldisruption": false,
|
||||||
|
"mentalimmunity": false,
|
||||||
|
"physicalimmunity": false,
|
||||||
|
"nobonusdice": false,
|
||||||
|
"noperksallowed": false,
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"race": {
|
"race": {
|
||||||
@ -443,6 +451,8 @@
|
|||||||
"effectsgained": [],
|
"effectsgained": [],
|
||||||
"category": "general",
|
"category": "general",
|
||||||
"upgradable": false,
|
"upgradable": false,
|
||||||
|
"activatedtext": "",
|
||||||
|
"deactivatedtext": "",
|
||||||
"features": {
|
"features": {
|
||||||
"nrgcost": {
|
"nrgcost": {
|
||||||
"label": "NRG cost to use",
|
"label": "NRG cost to use",
|
||||||
|
@ -110,16 +110,16 @@
|
|||||||
|
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<ul class="stat-list alternate-list">
|
<ul class="stat-list alternate-list">
|
||||||
<li class="item flexrow list-item color-class-ranged"><a class="combat-button attack-ranged flexrow">
|
<li class="item flexrow list-item color-class-ranged-attack"><a class="combat-button attack-ranged flexrow">
|
||||||
<span class="combat-icon flexrow">
|
<span class="combat-icon flexrow">
|
||||||
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PER.webp">
|
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/AGI.webp">
|
||||||
</span>
|
</span>
|
||||||
<span class="generic-label combat-margin stat-text-white">Ranged Attack</span>
|
<span class="generic-label combat-margin stat-text-white">Ranged Attack</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item color-class-range"><a class="combat-button damage-ranged flexrow">
|
<li class="item flexrow list-item color-class-ranged-damage"><a class="combat-button damage-ranged flexrow">
|
||||||
<span class="combat-icon flexrow">
|
<span class="combat-icon flexrow">
|
||||||
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/AGI.webp">
|
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PER.webp">
|
||||||
</span>
|
</span>
|
||||||
<span class="generic-label combat-margin stat-text-white">Ranged Damage</span>
|
<span class="generic-label combat-margin stat-text-white">Ranged Damage</span>
|
||||||
</a>
|
</a>
|
||||||
@ -186,8 +186,8 @@
|
|||||||
<span class="item-field-label-long">
|
<span class="item-field-label-long">
|
||||||
<label class="short-label">Status</label>
|
<label class="short-label">Status</label>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-field-label-short">
|
<span class="item-field-label-long">
|
||||||
<label class="short-label">Duration</label>
|
<label class="short-label">Uses remaining</label>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-field-label-short">
|
<span class="item-field-label-short">
|
||||||
<label class="short-label"> </label>
|
<label class="short-label"> </label>
|
||||||
@ -593,12 +593,9 @@
|
|||||||
<span class="item-field-label-short">
|
<span class="item-field-label-short">
|
||||||
<label class="short-label">DMG</label>
|
<label class="short-label">DMG</label>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-field-label-short">
|
<span class="item-field-label-medium">
|
||||||
<label class="short-label">DMGT</label>
|
<label class="short-label">DMGT</label>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-field-label-short">
|
|
||||||
<label class="short-label">DMGTLVL</label>
|
|
||||||
</span>
|
|
||||||
<span class="item-field-label-long">
|
<span class="item-field-label-long">
|
||||||
<label class="short-label">Ammo</label>
|
<label class="short-label">Ammo</label>
|
||||||
</span>
|
</span>
|
||||||
@ -611,6 +608,7 @@
|
|||||||
<span class="item-field-label-medium">
|
<span class="item-field-label-medium">
|
||||||
<label class="short-label">IDR</label>
|
<label class="short-label">IDR</label>
|
||||||
</span>
|
</span>
|
||||||
|
<div class="item-filler"> </div>
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
|
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@ -623,8 +621,7 @@
|
|||||||
<span class="item-field-label-short"><label>{{upper weapon.data.statistic}}</label></span>
|
<span class="item-field-label-short"><label>{{upper weapon.data.statistic}}</label></span>
|
||||||
<span class="item-field-label-short"><label>{{upper weapon.data.damagestatistic}}</label></span>
|
<span class="item-field-label-short"><label>{{upper weapon.data.damagestatistic}}</label></span>
|
||||||
<span class="item-field-label-short"><label>{{weapon.data.damageDice}}</label></span>
|
<span class="item-field-label-short"><label>{{weapon.data.damageDice}}</label></span>
|
||||||
<span class="item-field-label-short"><label>{{weapon.data.damagetype}}</label></span>
|
<span class="item-field-label-medium"><label>{{weapon.data.damagetype}} ({{weapon.data.damagetypelevel}})</label></span>
|
||||||
<span class="item-field-label-short"><label>{{weapon.data.damagetypelevel}}</label></span>
|
|
||||||
|
|
||||||
{{#if (gt weapon.data.ammomax 0)}}
|
{{#if (gt weapon.data.ammomax 0)}}
|
||||||
<span class="item-field-label-long"><label>{{weapon.data.ammocurrent}}/{{weapon.data.ammomax}}
|
<span class="item-field-label-long"><label>{{weapon.data.ammocurrent}}/{{weapon.data.ammomax}}
|
||||||
@ -656,6 +653,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<div class="item-filler"> </div>
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
<a class="item-control item-equip" title="Worn">{{#if weapon.data.equipped}}<i
|
<a class="item-control item-equip" title="Worn">{{#if weapon.data.equipped}}<i
|
||||||
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
|
|
||||||
{{#if weaponName}}
|
{{#if weaponName}}
|
||||||
<li>Weapon : {{weaponName}}</li>
|
<li>Weapon : {{weaponName}}</li>
|
||||||
|
Damage Type: Piercing 1
|
||||||
|
{{/if}}
|
||||||
|
{{#if weapon}}
|
||||||
|
<li>Damage type : {{weapon.data.damagetype}} {{weapon.data.damagetypelevel}}</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if isResistance}}
|
{{#if isResistance}}
|
||||||
@ -48,7 +52,11 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if isChatRoll}}
|
||||||
|
|
||||||
|
{{else}}
|
||||||
<button class="chat-card-button reroll-level-remaining" data-roll-id="{{rollId}}">Reroll</button>
|
<button class="chat-card-button reroll-level-remaining" data-roll-id="{{rollId}}">Reroll</button>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,4 +4,9 @@
|
|||||||
<img class="chat-img" src="{{img}}" title="{{name}}" />
|
<img class="chat-img" src="{{img}}" title="{{name}}" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div>{{name}} has just activated the Perk: {{perk.name}}.</div>
|
<div>{{name}} has just activated the Perk: {{perk.name}}.</div>
|
||||||
|
|
||||||
|
{{#if (count perk.data.activatedtext)}}
|
||||||
|
<div>{{perk.data.activatedtext}}</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,4 +4,9 @@
|
|||||||
<img class="chat-img" src="{{img}}" title="{{name}}" />
|
<img class="chat-img" src="{{img}}" title="{{name}}" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div>{{name}} has just deactivated the Perk: {{perk.name}}, make sure to manually delete all Effects provided by this Perk from Targets.</div>
|
<div>{{name}} has just deactivated the Perk: {{perk.name}}, make sure to manually delete all Effects provided by this Perk from Targets.</div>
|
||||||
|
|
||||||
|
{{#if (count perk.data.deactivatedtext)}}
|
||||||
|
<div>{{perk.data.deactivatedtext}}</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
5
templates/chat-roll-button.html
Normal file
5
templates/chat-roll-button.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<section class="pegasus-chat-roll-button">
|
||||||
|
<div >
|
||||||
|
<button class="chat-card-button" id="pegasus-chat-roll-button">Roll pool</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
@ -37,6 +37,30 @@
|
|||||||
<li class="flexrow"><label class="generic-label">One use?</label>
|
<li class="flexrow"><label class="generic-label">One use?</label>
|
||||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.oneuse" {{checked data.oneuse}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.oneuse" {{checked data.oneuse}}/></label>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Ignore health penalty?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.ignorehealthpenalty" {{checked data.ignorehealthpenalty}}/></label>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Is this possible ?</label>
|
||||||
|
<input type="text" class="padd-right" name="data.isthispossible" value="{{data.isthispossible}}" data-dtype="String"/>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Mental disruption ?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.mentaldisruption" {{checked data.mentaldisruption}}/></label>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Physical disruption ?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.physicaldisruption" {{checked data.physicaldisruption}}/></label>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Mental immunity ?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.mentalimmunity" {{checked data.mentalimmunity}}/></label>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Physical immunity ?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.physicalimmunity" {{checked data.physicalimmunity}}/></label>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">No bonus dice ?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.nobonusdice" {{checked data.nobonusdice}}/></label>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">No perks allowed ?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.noperksallowed" {{checked data.noperksallowed}}/></label>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="flexrow"><label class="generic-label">Effect Level is a Stat?</label>
|
<li class="flexrow"><label class="generic-label">Effect Level is a Stat?</label>
|
||||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.effectstatlevel" {{checked data.effectstatlevel}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.effectstatlevel" {{checked data.effectstatlevel}}/></label>
|
||||||
|
@ -77,6 +77,13 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="generic-label">When activated display text</label>
|
||||||
|
<input type="text" class="padd-right" name="data.activatedtext" value="{{data.activatedtext}}" data-dtype="String"/>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">When deactivated display text</label>
|
||||||
|
<input type="text" class="padd-right" name="data.deactivatedtext" value="{{data.deactivatedtext}}" data-dtype="String"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
{{#each data.features as |feature key|}}
|
{{#each data.features as |feature key|}}
|
||||||
{{#if feature.isvalid}}
|
{{#if feature.isvalid}}
|
||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
|
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
|
||||||
</span>
|
</span>
|
||||||
<span class="padd-right status-small-label no-grow">
|
<span class="padd-right status-small-label no-grow">
|
||||||
<a class="current-nrg--plus plus-minus-button">+</a>
|
<a class="current-nrg-plus plus-minus-button">+</a>
|
||||||
<a class="current-nrg--minus plus-minus-button"> -</a>
|
<a class="current-nrg-minus plus-minus-button"> -</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!--<span class="stat-label flexrow status-col-name" name="momentum">
|
<!--<span class="stat-label flexrow status-col-name" name="momentum">
|
||||||
|
@ -79,17 +79,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flexrow">
|
{{#if noBonusDice}}
|
||||||
{{#each diceList as |dice idx|}}
|
<div class="flexrow">
|
||||||
<span><a class="pool-add-dice" data-dice-key="{{dice.key}}" data-dice-level="{{dice.level}}"><img class="dice-pool-image"
|
No bonus dice due to effect !
|
||||||
src="{{dice.img}}"></a></span>
|
</div>
|
||||||
{{/each}}
|
{{else}}
|
||||||
</div>
|
<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}}"></a></span>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
{{#if isChatRoll}}
|
||||||
|
|
||||||
|
{{else}}
|
||||||
{{> systems/fvtt-pegasus-rpg/templates/partial-roll-select-effects.html}}
|
{{> systems/fvtt-pegasus-rpg/templates/partial-roll-select-effects.html}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user