Initial release
This commit is contained in:
@@ -171,6 +171,10 @@ export default class MGNEActor extends Actor {
|
||||
ui.notifications.warn(f("MGNE.Notification.ItemBurnedOut", { item: item.name }))
|
||||
return null
|
||||
}
|
||||
if (this.system.resonance?.blocked) {
|
||||
ui.notifications.warn(f("MGNE.Notification.ResonationBlocked", { actor: this.name }))
|
||||
return null
|
||||
}
|
||||
if ((this.system.resonance?.used ?? 0) >= (this.system.resonance?.max ?? 0)) {
|
||||
ui.notifications.warn(f("MGNE.Notification.ResonancePerDayReached", { actor: this.name }))
|
||||
return null
|
||||
@@ -187,7 +191,10 @@ export default class MGNEActor extends Actor {
|
||||
await this.update({ "system.resonance.used": (this.system.resonance.used ?? 0) + 1 })
|
||||
|
||||
if (!result.success) {
|
||||
await this.applyDamage(1, { sourceItem: item, ignoreArmor: true, chat: false })
|
||||
const feedbackRoll = await (new Roll("1d2")).evaluate()
|
||||
await this.applyDamage(feedbackRoll.total, { sourceItem: item, ignoreArmor: true, chat: true })
|
||||
await this.update({ "system.resonance.blocked": true })
|
||||
ui.notifications.warn(f("MGNE.Notification.ResonationFeedbackBlocked", { actor: this.name }))
|
||||
}
|
||||
|
||||
return result
|
||||
@@ -245,6 +252,7 @@ export default class MGNEActor extends Actor {
|
||||
await this.update({
|
||||
"system.hp.value": newHp,
|
||||
"system.omens.current": omenRoll.total,
|
||||
"system.resonance.blocked": false,
|
||||
})
|
||||
|
||||
await MGNERoll.createRestCard({
|
||||
@@ -297,6 +305,7 @@ export default class MGNEActor extends Actor {
|
||||
"system.omens.current": omenRoll.total,
|
||||
"system.resonance.max": resonanceMax,
|
||||
"system.resonance.used": 0,
|
||||
"system.resonance.blocked": false,
|
||||
"system.artifactSync.used": 0,
|
||||
"system.survival.salvationUsed": false,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user