Event
Jump to navigation
Jump to search
FQ is primarily event driven using a system of GameEvents. Up to date information can be found in the GameEvent class: https://gitgud.io/JasX/fetishquest/-/blob/mistress/public/classes/GameEvent.js?ref_type=heads
Note that not all fields will be populated for all events.
Field | Type | Default | Description |
---|---|---|---|
type | String | NULL | The event type, see below for a list. |
sender | Player | NULL | The event sender. Varies by type. |
target | Array of Player | NULL | The target(s) of the event. Varies by event type. |
parentWrapperTarget | Player | NULL | Present when in some event types with a wrapper parent. Set to the target of said wrapper. |
parentWrapperSender | Player | NULL | Same as above, but for sender. |
action | Action | NULL | |
wrapper | Wrapper | NULL | This is overridden by the active wrapper when validating effect triggers. |
originalWrapper | Wrapper | NULL | For events raised with a wrapper that has the listener attached to its own wrapper, this will point to the listener's wrapper. |
effect | Effect | NULL | |
asset | Asset | NULL | |
quest | Quest | NULL | |
encounter | Encounter | NULL | |
dungeon | Dungeon | NULL | |
room | Room | NULL | |
gameAction | Game Action | NULL | |
dungeonRoomAsset | Room Asset | NULL | |
wrapperReturn | WrapperReturn | NULL | Meta about using a wrapper. See https://gitgud.io/JasX/fetishquest/-/blob/mistress/public/classes/EffectSys.js for more info. |
roleplayStageOption | Roleplay Option | NULL | |
text | Text | NULL | |
custom | Object | {} | Depends on the event type. See below. |
debug | Boolean | NULL | Used internally for debugging. |
Event Types
Some events may only be used internally, and not be exposed to event bindings in the editor. In that case, raised is No.
Type | Raised | Objects Attached | Sender | Target | Custom | Description |
---|---|---|---|---|---|---|
damageDone | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Damaging Player | Damaged player | amount : (int)actual_amount,
overAmount : (int)overkill_amount, hpPre : (int)hp_before_damage |
Raised when a player deals damage. |
damageTaken | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Damaging Player | Damaged player | amount : (int)actual_amount,
overAmount : (int)overkill_amount, hpPre : (int)hp_before_damage |
Raised when a player takes damage. |
healingDone | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Damaging Player | Damaged player | amount : (int)actual_amount,
overAmount : (int)overheal_amount, hpPre : (int)hp_before_heal |
Raised when a player heals damage. |
healingTaken | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Damaging Player | Damaged player | amount : (int)actual_amount,
overAmount : (int)overheal_amount, hpPre : (int)hp_before_heal |
Raised when a player receives healing. |
hpDamageTaken | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Damaging Player | Damaged player | amount : (int)actual_amount | Raised when a player takes HP damage. |
lifeSteal | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Stealing Player | Stolen from player | amount : (int)amount_stolen | Raised when a player uses a life steal. |
interrupt | Yes | action | Interrupting player | Interrupted player | Raised when a player's casting is interrupted. | |
actionCharged | Yes | action | Casting player | Target players | Raised when a player uses an action with a charge time. | |
actionUsed | Yes | action, wrapperReturn (only on hit) | Casting player | Target players | resist : (bool)missed (only on miss) | Raised when a player uses an instant action or finishes a charged action. |
actionRiposte | Yes | action, wrapperReturn | Player doing the riposte | Player who was riposted | Raised when a player successfully ripostes an action. | |
reroll | Yes | Player who rerolled | Sender | Raised when a player rerolls momentum. | ||
internalWrapperAdded | No | Wrapper, Action | Caster | Target | Raised when a wrapper is applied to a player, but only raised on the wrapper effects. Use this over wrapperAdded whenever possible, since it's faster. | |
wrapperAdded | Yes | Same as above, but raised globally. | ||||
internalWrapperRemoved | No | Wrapper, Action (If it was removed by an action) | Remover | Removee | Raised when a wrapper is removed, regardless of method of removal. Only raised on the wrapper's effects. Use this over the non-internal version when possible, since this is faster. | |
wrapperAdded | Yes | Same as above, but raised globally. | ||||
internalWrapperTick | No | Wrapper, Action (If it was applied by an action) | Wrapper sender | Wrapper target | Raised when a wrapper ticks. Only raised on the wrapper's effects. Use this whenever possible since it's faster than the non-internal alternative. | |
wrapperTick | Yes | Same as above, but raised globally. | ||||
internalWrapperExpired | No | Wrapper, Action (If event was triggered by an action) | Wrapper sender | Wrapper target | Raised when a wrapper duration expires naturally. Only raised on the wrapper's own effects. Use this over the non-internal one whenever possible. | |
wrapperExpired | Yes | Same as above, but raised globally. | ||||
internalWrapperAfter | No | Same as internalWrapperExpired, except it's raised after the wrapper has been removed from the player. | ||||
wrapperAfter | Yes | Same as above, but global. | ||||
turnChanged | Yes | First player (Don't use) | Players whose turn is starting | Raised when team turn changes. | ||
playerDefeated | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Player who caused the defeat. | Player who was defeated | Raised when a player is defeated. parentWrapperTarget/sender are used when the defeat was done by a ticking wrapper. | |
diminishingResist | Yes | wrapper, action | Caster | Victim | Raised when a player resists a stun due to the over-stun protect kicking in. | |
effectTrigger | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Caster | Victim | Raised when an effect triggers. | |
armorEquipped | Yes | asset | Initiating Player | Target | Initiating player is usually the target, but if the equipment was added by a spell that forced an item onto a player, it's the player who summoned the item. Asset is the equipped asset. | |
armorUnequipped | Yes | asset | Initiating Player | Target | Initiating player is the player who removed the asset from target. | |
downedProtection | Yes | Attacker | Victim | Raised when a second wind is triggered on a player. | ||
stdAttCombo | Yes | Attacker | Targets | amount : nr_used | Tracks how many times in a row players have used a standard attack. Legacy event. | |
battleStarted | Yes | N/A | N/A | Battle has started. Do not rely on sender/target. | ||
battleEnded | Yes | N/A | N/A | Battle has finished, regardless of outcome. | ||
playerFirstTurn | Yes | player | Enemies | Player's first turn this battle has started. | ||
encounterDefeated | Yes | encounter, dungeon | player who defeated the final player | All players | Raised when the player team wins a battle. | |
encounterLost | Yes | encounter, dungeon | player who defeated the final player | All players | Raised when the player team loses a battle. | |
inventoryChanged | Yes | target | target | Raised when target's inventory has changed in any way. | ||
inventoryReceived | Yes | asset | sender | target | Raised when target has received asset. | |
encounterEnemyDefeated | Yes | encounter, dungeon, room | winner[0] | target | Raised on every player not on the enemy team when an encounter has been defeated. | |
questStarted | Yes | quest | N/A | players on player team | Raised when a quest is started. | |
questFinished | Yes | quest | N/A | players on player team | Raised when a quest has been completed. | |
questObjectiveChanged | Yes | quest, questObjective | N/A | players on player team | Raised when a quest objective status has changed. | |
actionLearned | Yes | action | player | player | Raised when player has learned action. | |
encounterStarted | Yes | encounter | first player in encounter | player who started it | Raised when an encounter starts, including friendly encounters. | |
blockExpired | Yes | player | player | amount : (int)block_faded | Raised when player's block fades on turn start. | |
blockAdded | Yes | caster | player | amount : (int)block_added | Raised when caster adds block to player. | |
blockSubtracted | Yes | caster | player | amount : (int)block_removed | Raised when caster subtracts block from player. | |
blockBroken | Yes | caster | player | Raised when player's block was broken by caster. | ||
dungeonExited | Yes | N/A | N/A | Raised when players exit a dungeon (change from one zone to another). | ||
dungeonEntered | Yes | dungeon | N/A | N/A | Raised when players enter a zone. | |
roomChanged | Yes | dungeon, room | N/A | Players on player team | Raised when room has changed. | |
rpStage | Yes | N/A | N/A | Raised when a roleplay stage has changed. | ||
rpStageHasHighlight | Yes | N/A | N/A | Raised when a roleplay stage that has a highlighted option is started. | ||
textTrigger | Yes | varies based on text trigger | textSender | textTargets | Raised when a text is triggered in the combat log. | |
explorationComplete | Yes | N/A | Players on player team | Raised when you complete an exploration dungeon. | ||
sleep | Yes | Player | All players | duration : (int)duration_seconds | Raised when player triggers a sleep. | |
stun | Yes | wrapper, action | Caster | Target | Raised when caster has stunned target. | |
orgasm | Yes | Caster | Target | Raised when caster has caused target to orgasm. | ||
diceRoll | Yes | Player | Player | Raised after a player picks an option that rolls a dice. | ||
knockdown | Yes | wrapper, effect, parentWrapperTarget, parentWrapperSender | Caster | Target | Raised when caster triggers a knockdown effect on Target. | |
netgameHosted | Yes | N/A | N/A | Raised when you put your game session online. | ||
gameStart | No | N/A | N/A | Raised when a new game is started. But only raised on tutorials. |