Fix #95 message for GM

This commit is contained in:
sladecraven 2022-10-05 10:00:30 +02:00
parent c2831e4ccd
commit 6e69e151c5

View File

@ -263,13 +263,14 @@ export class PegasusActor extends Actor {
effect.system.stataffected = "mr" effect.system.stataffected = "mr"
effect.system.bonusdice = true effect.system.bonusdice = true
await this.createEmbeddedDocuments('Item', [effect]) await this.createEmbeddedDocuments('Item', [effect])
ChatMessage.create({ content: `Tactician Bonus Dice has been added to ${this.name} (${level})` }) ChatMessage.create({ content: `Tactician Bonus Dice has been added to ${this.name} (${level})`,
whisper: ChatMessage.getWhisperRecipients('GM') } )
} }
async removeTacticianEffect() { async removeTacticianEffect() {
let effect = this.items.find(item => item.name.toLowerCase().includes("tactician bonus dice")) let effect = this.items.find(item => item.name.toLowerCase().includes("tactician bonus dice"))
if (effect) { if (effect) {
await this.deleteEmbeddedDocuments('Item', [effect.id]) await this.deleteEmbeddedDocuments('Item', [effect.id])
ChatMessage.create({ content: `Tactician Bonus Dice has been removed to ${this.name}` }) ChatMessage.create({ content: `Tactician Bonus Dice has been removed to ${this.name}`,whisper: ChatMessage.getWhisperRecipients('GM') } )
} }
} }
@ -289,13 +290,13 @@ export class PegasusActor extends Actor {
effect.system.stataffected = "all" effect.system.stataffected = "all"
effect.system.bonusdice = true effect.system.bonusdice = true
await this.createEmbeddedDocuments('Item', [effect]) await this.createEmbeddedDocuments('Item', [effect])
ChatMessage.create({ content: `Enhancer Bonus Dice has been added to ${this.name} (${level})` }) ChatMessage.create({ content: `Enhancer Bonus Dice has been added to ${this.name} (${level})`,whisper: ChatMessage.getWhisperRecipients('GM') })
} }
async removeEnhancerEffect() { async removeEnhancerEffect() {
let effect = this.items.find(item => item.name.toLowerCase().includes("enhancer bonus dice")) let effect = this.items.find(item => item.name.toLowerCase().includes("enhancer bonus dice"))
if (effect) { if (effect) {
await this.deleteEmbeddedDocuments('Item', [effect.id]) await this.deleteEmbeddedDocuments('Item', [effect.id])
ChatMessage.create({ content: `Enhancer Bonus Dice has been removed to ${this.name}` }) ChatMessage.create({ content: `Enhancer Bonus Dice has been removed to ${this.name}`,whisper: ChatMessage.getWhisperRecipients('GM') })
} }
} }
@ -316,13 +317,13 @@ export class PegasusActor extends Actor {
effect.system.genre = "negative" effect.system.genre = "negative"
effect.system.hindrance = true effect.system.hindrance = true
await this.createEmbeddedDocuments('Item', [effect]) await this.createEmbeddedDocuments('Item', [effect])
ChatMessage.create({ content: `Agitator Hindrance has been added to ${this.name} (${level})` }) ChatMessage.create({ content: `Agitator Hindrance has been added to ${this.name} (${level})`,whisper: ChatMessage.getWhisperRecipients('GM') })
} }
async removeAgitatorHindrance() { async removeAgitatorHindrance() {
let effect = this.items.find(item => item.name.toLowerCase().includes("hindered by agitator")) let effect = this.items.find(item => item.name.toLowerCase().includes("hindered by agitator"))
if (effect) { if (effect) {
await this.deleteEmbeddedDocuments('Item', [effect.id]) await this.deleteEmbeddedDocuments('Item', [effect.id])
ChatMessage.create({ content: `Agitator Hindrance has been removed to ${this.name}` }) ChatMessage.create({ content: `Agitator Hindrance has been removed to ${this.name}` ,whisper: ChatMessage.getWhisperRecipients('GM')})
} }
} }