diff options
| author | historia <[not public]> | 2026-07-08 19:59:14 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-08 19:59:14 -0400 |
| commit | 09d325dcf5e779eab5550d3fd3377bde50101428 (patch) | |
| tree | a433be903aabbf1d2eadce2aacdac12a9eb8dde0 /data | |
| parent | 9184377301c2604e003f36426788c032fb0ca524 (diff) | |
| download | thehouseoficarus-09d325dcf5e779eab5550d3fd3377bde50101428.tar.gz | |
feat: unify on use, on look, and on kill. all support same conditions/actions now.
Diffstat (limited to 'data')
| -rw-r--r-- | data/help/use.yaml | 2 | ||||
| -rw-r--r-- | data/mobs/examples/client.yaml | 226 | ||||
| -rw-r--r-- | data/objects/anvil.yaml | 2 | ||||
| -rw-r--r-- | data/objects/aps_tower.yaml | 2 | ||||
| -rw-r--r-- | data/objects/iron_gate.yaml | 2 | ||||
| -rw-r--r-- | data/objects/tutorial_lever.yaml | 2 | ||||
| -rw-r--r-- | data/rooms/intro/1001.yaml | 11 |
7 files changed, 86 insertions, 161 deletions
diff --git a/data/help/use.yaml b/data/help/use.yaml index 8139f8e..d9bcfd4 100644 --- a/data/help/use.yaml +++ b/data/help/use.yaml @@ -13,7 +13,7 @@ description: | Station object (furnace, anvil, fire, range, workbench, etc.) Shows a combined production menu of all recipes you can make. - Object with use_interactions + Object with on_use interactions Shows a message or triggers an action (flags, teleport, etc.). Some interactions need a specific item; bare interactions run immediately. diff --git a/data/mobs/examples/client.yaml b/data/mobs/examples/client.yaml index 2442a8a..da3aede 100644 --- a/data/mobs/examples/client.yaml +++ b/data/mobs/examples/client.yaml @@ -12,13 +12,13 @@ idle_descriptions: talk: nodes: assign_task: - action: + action: null messages: - '"Let me check what''s available..." The Client scrolls through their data pad.' options: - - text: '"Understood."' - - goto: start - text: '"What else do you have?"' + - text: '"Understood."' + - goto: start + text: '"What else do you have?"' buy_acid: action: credits: -10 @@ -26,42 +26,12 @@ talk: messages: - '"Handle with care." The Client passes you a vial of corrosive acid.' options: - - condition: - min_credits: 10 - goto: buy_acid - text: '"Buy more."' - - goto: supplies - text: '"Thanks."' - buy_auto_acid: - action: - reputation_cost: 200 - set_player_flags: - assassin_unlocked_auto_acid_vial: true - messages: - - '"Auto-acid purchased. Acid vials will no longer be consumed."' - options: - - goto: rep_shop - text: '"Thanks."' - buy_auto_salt: - action: - reputation_cost: 200 - set_player_flags: - assassin_unlocked_auto_salt: true - messages: - - '"Auto-salt purchased. You''ll no longer consume salt on finishing blows."' - options: - - goto: rep_shop - text: '"Thanks."' - buy_extend_unlock: - action: - reputation_cost: 100 - set_player_flags: - assassin_unlocked_extend: true - messages: - - '"You can now extend tasks via our conversation."' - options: - - goto: rep_shop - text: '"Thanks."' + - condition: + min_credits: 10 + goto: buy_acid + text: '"Buy more."' + - goto: supplies + text: '"Thanks."' buy_gloves: action: credits: -50 @@ -69,8 +39,8 @@ talk: messages: - '"These''ll keep the current from frying your hands." The Client tosses you a pair of thick rubber gloves.' options: - - goto: supplies - text: '"Thanks."' + - goto: supplies + text: '"Thanks."' buy_salt: action: credits: -5 @@ -78,22 +48,12 @@ talk: messages: - '"Here you go." The Client slides a packet of salt across the table.' options: - - condition: - min_credits: 5 - goto: buy_salt - text: '"Buy more."' - - goto: supplies - text: '"Thanks."' - buy_superiors: - action: - reputation_cost: 300 - set_player_flags: - assassin_unlocked_superiors: true - messages: - - '"Superior encounters unlocked. Watch yourself out there."' - options: - - goto: rep_shop - text: '"Thanks."' + - condition: + min_credits: 5 + goto: buy_salt + text: '"Buy more."' + - goto: supplies + text: '"Thanks."' buy_visor: action: credits: -75 @@ -101,120 +61,92 @@ talk: messages: - '"Spectral frequency filter. Makes the invisible visible — and keeps their attacks from scrambling your brain."' options: - - goto: supplies - text: '"Thanks."' + - goto: supplies + text: '"Thanks."' current_task: messages: - '"Let me check your file." The Client pulls up your record.' options: - - text: '"Okay."' + - text: '"Okay."' extend_confirm: messages: - '"Extending your task costs 30 Reputation and adds more kills. Want to proceed?"' options: - - goto: extend_done - text: '"Yes, extend it."' - - goto: start - text: '"Never mind."' + - goto: extend_done + text: '"Yes, extend it."' + - goto: start + text: '"Never mind."' extend_done: - action: + action: null messages: - '"Done. I''ve added more targets to your contract."' options: - - text: '"Thanks."' - rep_shop: - messages: - - '"Here''s what I''ve got. All purchases are permanent."' - options: - - condition: - not: true - player_flag: assassin_unlocked_auto_salt - goto: buy_auto_salt - text: '"Auto-finish: Salt (200 Rep) - Never consume salt on finishing blows."' - - condition: - not: true - player_flag: assassin_unlocked_auto_acid_vial - goto: buy_auto_acid - text: '"Auto-finish: Acid Vial (200 Rep) - Never consume acid vials on finishing blows."' - - condition: - not: true - player_flag: assassin_unlocked_superiors - goto: buy_superiors - text: '"Unlock Superior Mobs (300 Rep) - Rare superior variants may spawn."' - - condition: - not: true - player_flag: assassin_unlocked_extend - goto: buy_extend_unlock - text: '"Unlock Extended Tasks (100 Rep) - Allows extending tasks."' - - goto: start - text: '"Back."' + - text: '"Thanks."' skip_confirm: messages: - '"Skipping a task costs 30 Reputation and resets your streak. Are you sure?"' options: - - goto: skip_done - text: '"Yes, skip it."' - - goto: start - text: '"Never mind."' + - goto: skip_done + text: '"Yes, skip it."' + - goto: start + text: '"Never mind."' skip_done: - action: + action: null messages: - '"Task cancelled. Your streak has been reset."' options: - - goto: assign_task - text: '"Give me a new one."' - - text: '"Goodbye."' + - goto: assign_task + text: '"Give me a new one."' + - text: '"Goodbye."' start: messages: - The Client looks up from their data pad. "What do you need?" options: - - condition: - not: true - player_flag: assassin_task_mob - goto: assign_task - text: '"I need a job."' - - condition: - not: false - player_flag: assassin_task_mob - goto: current_task - text: '"What''s my current task?"' - - condition: - not: false - player_flag: assassin_task_mob - goto: skip_confirm - text: '"I want to skip my task."' - - condition: - all_of: - - not: false - player_flag: assassin_task_mob - - player_flag: assassin_unlocked_extend - value: true - goto: extend_confirm - text: '"I want to extend my task."' - - goto: rep_shop - text: '"I''d like to browse the Reputation Shop."' - - goto: supplies - text: '"I need supplies."' - - text: '"Goodbye."' + - condition: + not: true + player_flag: assassin_task_mob + goto: assign_task + text: '"I need a job."' + - condition: + not: false + player_flag: assassin_task_mob + goto: current_task + text: '"What''s my current task?"' + - condition: + not: false + player_flag: assassin_task_mob + goto: skip_confirm + text: '"I want to skip my task."' + - condition: + all_of: + - not: false + player_flag: assassin_task_mob + - player_flag: assassin_unlocked_extend + value: true + goto: extend_confirm + text: '"I want to extend my task."' + - goto: supplies + text: '"I need supplies."' + - text: '"Goodbye."' supplies: messages: - '"I stock everything you need for the job. Cheap, too."' options: - - condition: - min_credits: 5 - goto: buy_salt - text: '"Buy salt (5 credits each)."' - - condition: - min_credits: 10 - goto: buy_acid - text: '"Buy acid vial (10 credits each)."' - - condition: - min_credits: 50 - goto: buy_gloves - text: '"Buy insulated gloves (50 credits)."' - - condition: - min_credits: 75 - goto: buy_visor - text: '"Buy spectral visor (75 credits)."' - - goto: start - text: '"Back."' + - condition: + min_credits: 5 + goto: buy_salt + text: '"Buy salt (5 credits each)."' + - condition: + min_credits: 10 + goto: buy_acid + text: '"Buy acid vial (10 credits each)."' + - condition: + min_credits: 50 + goto: buy_gloves + text: '"Buy insulated gloves (50 credits)."' + - condition: + min_credits: 75 + goto: buy_visor + text: '"Buy spectral visor (75 credits)."' + - goto: start + text: '"Back."' diff --git a/data/objects/anvil.yaml b/data/objects/anvil.yaml index b7b50bf..4737573 100644 --- a/data/objects/anvil.yaml +++ b/data/objects/anvil.yaml @@ -1,7 +1,7 @@ name: anvil color: "FA" description: "A heavy iron anvil for hammering metal into shape." -use_interactions: +on_use: - item_id: silver_bar message: "You should use this with a mold at a furnace." - item_id: gold_bar diff --git a/data/objects/aps_tower.yaml b/data/objects/aps_tower.yaml index 5d18b4d..68b34fc 100644 --- a/data/objects/aps_tower.yaml +++ b/data/objects/aps_tower.yaml @@ -2,7 +2,7 @@ name: APS Tower color: "21" description: "A tall, skeletal metal tower with a pulsing cyan beacon at its apex. A datapad sync panel glows softly at the base." inroom_description: "An APS Tower looms here, its beacon pulsing steadily." -use_interactions: +on_use: - message: "You connect your datapad to the APS Tower. Coordinates triangulated and stored." action: aps_node: true diff --git a/data/objects/iron_gate.yaml b/data/objects/iron_gate.yaml index 44599ae..b5c7de6 100644 --- a/data/objects/iron_gate.yaml +++ b/data/objects/iron_gate.yaml @@ -2,7 +2,7 @@ color: "FA" description: A heavy iron gate. It looks like it can be pushed open. hidden: true name: iron gate -use_interactions: +on_use: - condition: global_flag: gate_open not: true diff --git a/data/objects/tutorial_lever.yaml b/data/objects/tutorial_lever.yaml index ffcfa07..73166bd 100644 --- a/data/objects/tutorial_lever.yaml +++ b/data/objects/tutorial_lever.yaml @@ -3,7 +3,7 @@ color: "FA" hidden: true inroom_description: "A stone lever protrudes from the base of the rock formation." description: "A weathered stone lever set into a metal bracket. It looks like it can be pulled." -use_interactions: +on_use: - condition: player_flag: unlocked_rock_cover value: 1 diff --git a/data/rooms/intro/1001.yaml b/data/rooms/intro/1001.yaml index 93bf7ac..8960ea5 100644 --- a/data/rooms/intro/1001.yaml +++ b/data/rooms/intro/1001.yaml @@ -32,15 +32,8 @@ objects: hidden: true name: framed sign on_look: - credits: 0 - give_item: "" - heal: 0 - reputation_cost: 0 - set_global_flags: {} - set_player_flags: - 1001_look_sign: true - take_item: "" - teleport: 0 + - set_player_flags: + 1001_look_sign: true - description: - text: A sturdy, locked steel door that keeps passengers out of the cockpit. There is a tiny, thin window at eye level. hidden: true |
