export const MODULE_ID = "configurable-reactions"; export const MODULE_TITLE = "Configurable Reactions"; export const SETTINGS = Object.freeze({ REACTIONS: "reactions", ASSIGNMENTS: "assignments", SHOW_FAILED_TELEPORT_MESSAGES: "showFailedTeleportMessages", CREATE_MANAGED_EFFECTS_ON_ASSIGNMENT: "createManagedEffectsOnAssignment" }); export const TRIGGER_TYPES = Object.freeze({ DAMAGE_RECEIVED: "onDamageReceived", TARGET_SELECTED: "onTargeted", SPELL_SEEN: "onSpellSeen", SPELL_CAST_START: "onSpellCastStart", SPELL_CAST_COMPLETE: "onSpellCastComplete", FEATURE_USED: "onFeatureUsed" }); export const ACTION_TYPES = Object.freeze({ APPLY_STATUS: "applyStatus", TELEPORT: "teleport", CAST_SPELL_FROM_TOKEN: "castSpellFromToken", USE_INVENTORY_ITEM: "useInventoryItem" }); export const TRIGGER_PALETTE = Object.freeze([ { type: TRIGGER_TYPES.DAMAGE_RECEIVED, icon: "fa-solid fa-heart-crack", labelKey: "CONFIGURABLE_REACTIONS.Triggers.OnDamageReceived.Label", hintKey: "CONFIGURABLE_REACTIONS.Triggers.OnDamageReceived.Hint" }, { type: TRIGGER_TYPES.TARGET_SELECTED, icon: "fa-solid fa-bullseye", labelKey: "CONFIGURABLE_REACTIONS.Triggers.OnTargeted.Label", hintKey: "CONFIGURABLE_REACTIONS.Triggers.OnTargeted.Hint" }, { type: TRIGGER_TYPES.SPELL_SEEN, icon: "fa-solid fa-eye", labelKey: "CONFIGURABLE_REACTIONS.Triggers.OnSpellSeen.Label", hintKey: "CONFIGURABLE_REACTIONS.Triggers.OnSpellSeen.Hint" }, { type: TRIGGER_TYPES.SPELL_CAST_START, icon: "fa-solid fa-wand-magic-sparkles", labelKey: "CONFIGURABLE_REACTIONS.Triggers.OnSpellCastStart.Label", hintKey: "CONFIGURABLE_REACTIONS.Triggers.OnSpellCastStart.Hint" }, { type: TRIGGER_TYPES.SPELL_CAST_COMPLETE, icon: "fa-solid fa-hat-wizard", labelKey: "CONFIGURABLE_REACTIONS.Triggers.OnSpellCastComplete.Label", hintKey: "CONFIGURABLE_REACTIONS.Triggers.OnSpellCastComplete.Hint" }, { type: TRIGGER_TYPES.FEATURE_USED, icon: "fa-solid fa-hand-sparkles", labelKey: "CONFIGURABLE_REACTIONS.Triggers.OnFeatureUsed.Label", hintKey: "CONFIGURABLE_REACTIONS.Triggers.OnFeatureUsed.Hint" } ]); export const ACTION_PALETTE = Object.freeze([ { type: ACTION_TYPES.APPLY_STATUS, icon: "fa-solid fa-certificate", labelKey: "CONFIGURABLE_REACTIONS.Actions.ApplyStatus.Label", hintKey: "CONFIGURABLE_REACTIONS.Actions.ApplyStatus.Hint" }, { type: ACTION_TYPES.TELEPORT, icon: "fa-solid fa-location-arrow", labelKey: "CONFIGURABLE_REACTIONS.Actions.Teleport.Label", hintKey: "CONFIGURABLE_REACTIONS.Actions.Teleport.Hint" }, { type: ACTION_TYPES.CAST_SPELL_FROM_TOKEN, icon: "fa-solid fa-wand-sparkles", labelKey: "CONFIGURABLE_REACTIONS.Actions.CastSpellFromToken.Label", hintKey: "CONFIGURABLE_REACTIONS.Actions.CastSpellFromToken.Hint" }, { type: ACTION_TYPES.USE_INVENTORY_ITEM, icon: "fa-solid fa-toolbox", labelKey: "CONFIGURABLE_REACTIONS.Actions.UseInventoryItem.Label", hintKey: "CONFIGURABLE_REACTIONS.Actions.UseInventoryItem.Hint" } ]); export const DEFAULT_REACTION = Object.freeze({ name: "Neue Reaktion", enabled: true, trigger: { type: TRIGGER_TYPES.DAMAGE_RECEIVED }, conditions: { damage: { enabled: true, amountMode: "damageOnly", types: [], typeMode: "any", minAmount: 1 }, hpAfterDamage: { enabled: false, operator: "lte", mode: "percent", value: 50 } }, consumption: { enabled: false, mode: "none", maxUses: 1, consumeOnFailure: false }, actions: [] });