Managedeletion
This commit is contained in:
parent
a4abedd4b3
commit
74a2b434c7
@ -836,13 +836,16 @@ export class PegasusActor extends Actor {
|
||||
|
||||
// Severe Trauma management
|
||||
if (this.getTraumaState() == "severetrauma") {
|
||||
let chatData = {
|
||||
user: game.user.id,
|
||||
rollMode: game.settings.get("core", "rollMode"),
|
||||
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM'))
|
||||
if ( !this.severeTraumaMessage) {
|
||||
let chatData = {
|
||||
user: game.user.id,
|
||||
rollMode: game.settings.get("core", "rollMode"),
|
||||
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM'))
|
||||
}
|
||||
chatData.content = `<div>${this.name} is suffering from Severe Trauma and cannot use Perks at this time.</div`
|
||||
ChatMessage.create(chatData)
|
||||
this.severeTraumaMessage = true
|
||||
}
|
||||
chatData.content = `<div>${this.name} is suffering from Severe Trauma and cannot use Perks at this time.</div`
|
||||
ChatMessage.create(chatData)
|
||||
this.updateEmbeddedDocuments('Item', [{ _id: itemId, 'data.status': "ready", 'data.used1': false, 'data.used2': false, 'data.used3': false }])
|
||||
return
|
||||
}
|
||||
@ -1040,11 +1043,16 @@ export class PegasusActor extends Actor {
|
||||
if (moralitythreshold != this.data.data.biodata.moralitythreshold) {
|
||||
updates['data.biodata.moralitythreshold'] = moralitythreshold
|
||||
}
|
||||
if (!this.warnMorality && this.data.data.biodata.morality < 0) {
|
||||
ChatMessage.create({ content: "WARNING: Your character is dangerously close to becoming corrupted and defeated. Start on a path of redemption!" })
|
||||
this.warnMorality = true
|
||||
if ( !this.isToken) {
|
||||
if (this.warnMorality != this.data.data.biodata.morality && this.data.data.biodata.morality < 0) {
|
||||
console.log("CHAR", this)
|
||||
ChatMessage.create({ content: "WARNING: Your character is dangerously close to becoming corrupted and defeated. Start on a path of redemption!" })
|
||||
}
|
||||
if (this.warnMorality != this.data.data.biodata.morality) {
|
||||
this.warnMorality = this.data.data.biodata.morality
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let race = this.getRace()
|
||||
if (race && race.name && (race.name != this.data.data.biodata.racename)) {
|
||||
updates['data.biodata.racename'] = race.name
|
||||
|
@ -183,6 +183,6 @@
|
||||
"templateVersion": 96,
|
||||
"title": "Pegasus RPG",
|
||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||
"version": "0.6.6",
|
||||
"version": "0.6.7",
|
||||
"background" : "./images/ui/pegasus_welcome_page.webp"
|
||||
}
|
||||
|
@ -384,7 +384,7 @@
|
||||
<span class="small-label padd-right packed-left"> Current</span><input type="text"
|
||||
class="padd-right update-field" data-field-name="data.nrg.value" value="{{data.nrg.value}}"
|
||||
data-dtype="Number" />
|
||||
<a class="current-nrg-minus plus-minus-button"> -</a>/<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>
|
||||
<span class="small-label padd-right packed-left"> Mod</span><input type="text"
|
||||
class="padd-right update-field" data-field-name="data.nrg.mod" value="{{data.nrg.mod}}"
|
||||
data-dtype="Number" />
|
||||
|
Loading…
Reference in New Issue
Block a user