Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment decrement operators single string #78229

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions data/json/effects_on_condition/addictions_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{ "math": [ "rand(10) < u_addiction_intensity('caffeine')" ] }
]
},
"then": { "math": [ "u_val('stim')", "--" ] }
"then": { "math": [ "u_val('stim')--" ] }
},
{
"if": {
Expand All @@ -42,7 +42,7 @@
"id": "EOC_SLEEP_ADDICTION",
"//": "Actual effects processed in player::can_sleep(). Here, only prolong this addiction longer than usual.",
"condition": { "and": [ { "one_in_chance": 2 }, { "math": [ "u_addiction_turns('sleeping pill') < 0" ] } ] },
"effect": { "math": [ "u_addiction_turns('sleeping pill')", "++" ] }
"effect": { "math": [ "u_addiction_turns('sleeping pill')++" ] }
},
{
"type": "effect_on_condition",
Expand All @@ -51,7 +51,7 @@
"effect": [
{ "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 },
{ "u_message": "You daydream about luscious pink berries as big as your fist.", "type": "info" },
{ "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')", "--" ] } }
{ "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')--" ] } }
]
},
{
Expand All @@ -61,7 +61,7 @@
"effect": [
{ "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 },
{ "u_message": "You daydream about nutty cyan seeds as big as your hand.", "type": "info" },
{ "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')", "--" ] } }
{ "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')--" ] } }
]
},
{
Expand All @@ -71,7 +71,7 @@
"effect": [
{ "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 },
{ "u_message": "You daydream about succulent, pale golden gel, sweet but light.", "type": "info" },
{ "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')", "--" ] } }
{ "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')--" ] } }
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions data/json/effects_on_condition/bionic_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"effect": [
{ "u_message": "Your malfunctioning bionic causes you to spasm and fall to the floor!", "type": "bad" },
{ "sound_effect": "elec_crackle_high", "id": "bionics", "volume": 100 },
{ "math": [ "u_pain()", "++" ] },
{ "math": [ "u_pain()++" ] },
{ "u_add_effect": "stunned", "duration": 1 },
{ "u_add_effect": "downed", "duration": 1, "force": true }
]
Expand Down Expand Up @@ -84,7 +84,7 @@
"recurrence": [ "25 minutes", "1 hours 15 minutes" ],
"condition": { "and": [ { "u_has_bionics": "bio_sleepy" }, { "not": { "u_has_effect": "sleep" } } ] },
"deactivate_condition": { "not": { "u_has_bionics": "bio_sleepy" } },
"effect": { "math": [ "u_val('sleepiness')", "++" ] }
"effect": { "math": [ "u_val('sleepiness')++" ] }
},
{
"type": "effect_on_condition",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"id": "EOC_mininuke_record",
"eoc_type": "EVENT",
"required_event": "activates_mininuke",
"effect": [ { "math": [ "u_mininuke_activated", "++" ] } ]
"effect": [ { "math": [ "u_mininuke_activated++" ] } ]
},
{
"id": "EOC_DEATH_SWITCH",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
{ "u_forget_recipe": "prac_unmute_bird" }
],
"false_effect": [
{ "math": [ "u_progress_unmute_bird", "++" ] },
{ "math": [ "u_progress_unmute_bird++" ] },
{
"u_message": "Restricting your range to the apes' feels demeaning, and you decide to take a break before you start plucking out your feathers in frustration."
}
Expand All @@ -92,7 +92,7 @@
{ "u_forget_recipe": "prac_unmute_ceph" }
],
"false_effect": [
{ "math": [ "u_progress_unmute_ceph", "++" ] },
{ "math": [ "u_progress_unmute_ceph++" ] },
{
"u_message": "Draw air into your mantle, close your throat, rehearse your sentence, exhale and contort your beak just so."
}
Expand All @@ -111,7 +111,7 @@
{ "u_forget_recipe": "prac_unmute_gastropod" }
],
"false_effect": [
{ "math": [ "u_progress_unmute_gastropod", "++" ] },
{ "math": [ "u_progress_unmute_gastropod++" ] },
{
"u_message": "If you rub your tongue against your palate like this is makes a `th` - or at least, a `thrksrkkk`, but it's a start. Ignore the taste of blood, there's work to be done."
}
Expand All @@ -130,7 +130,7 @@
{ "u_forget_recipe": "prac_unmute_insect" }
],
"false_effect": [
{ "math": [ "u_progress_unmute_insect", "++" ] },
{ "math": [ "u_progress_unmute_insect++" ] },
{
"u_message": "You have all these new moving parts in your not-mouth, but they are struggling under the strain you put them under."
}
Expand All @@ -149,7 +149,7 @@
{ "u_forget_recipe": "prac_unmute_slime" }
],
"false_effect": [
{ "math": [ "u_progress_unmute_slime", "++" ] },
{ "math": [ "u_progress_unmute_slime++" ] },
{
"u_message": "Do you need teeth, lungs? You fall back into your resting shape in exasperation. This will take long."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
{ "remove_active_mission": "MISSION_INVESTIGATE_PORTAL_DUNGEON" },
{ "remove_active_mission": "MISSION_INVESTIGATE_PORTAL_STORM_CENTER" },
{ "alter_timed_events": "portal_dungeon_entrance" },
{ "math": [ "u_counter_portal_storm_counter", "++" ] },
{ "math": [ "u_counter_portal_storm_counter++" ] },
{ "math": [ "talked_to_storm = 0" ] },
{
"trigger_event": "u_var_changed",
Expand Down Expand Up @@ -275,9 +275,9 @@
"id": "EOC_PORTAL_EXPAND",
"condition": { "math": [ "portal_storm_distance != 0" ] },
"effect": [
{ "math": [ "portal_storm_distant_distance", "++" ] },
{ "math": [ "portal_storm_close_distance", "++" ] },
{ "math": [ "portal_storm_distance", "++" ] }
{ "math": [ "portal_storm_distant_distance++" ] },
{ "math": [ "portal_storm_close_distance++" ] },
{ "math": [ "portal_storm_distance++" ] }
],
"false_effect": [
{ "math": [ "portal_storm_distant_distance = 201" ] },
Expand Down Expand Up @@ -379,7 +379,7 @@
"or": [ { "is_weather": "distant_portal_storm" }, { "is_weather": "near_portal_storm" }, { "is_weather": "portal_storm" } ]
}
},
"effect": [ { "math": [ "u_ire", "++" ] }, { "u_message": "PORTAL_STORM_WITNESSED", "snippet": true } ]
"effect": [ { "math": [ "u_ire++" ] }, { "u_message": "PORTAL_STORM_WITNESSED", "snippet": true } ]
},
{
"type": "effect_on_condition",
Expand Down Expand Up @@ -974,7 +974,7 @@
"type": "effect_on_condition",
"id": "EOC_PORTAL_STORM_DUNGEON_NEXT_LEVEL",
"effect": [
{ "math": [ "portal_dungeon_level", "++" ] },
{ "math": [ "portal_dungeon_level++" ] },
{ "mapgen_update": "portal_dungeon_cleanup", "target_var": { "global_val": "dungeon_loc" } },
{ "u_teleport": { "global_val": "dungeon_start" }, "fail_message": "Something is very wrong!", "force": true },
{ "run_eocs": [ "EOC_PORTAL_STORM_DUNGEON_REFLECTION_SPAWN", "capture_generic_nre_anomaly" ] },
Expand Down Expand Up @@ -1276,7 +1276,7 @@
}
},
"effect": [
{ "math": [ "u_portal_storm_record", "++" ] },
{ "math": [ "u_portal_storm_record++" ] },
{
"run_eocs": [
{
Expand Down Expand Up @@ -1315,10 +1315,7 @@
"id": "capture_generic_nre_anomaly",
"global": true,
"condition": { "u_has_items": { "item": "nre_recorder", "charges": 1 } },
"effect": [
{ "math": [ "u_generic_nre_anomaly", "++" ] },
{ "u_message": "The NRE recorder emits a sharp beep!", "type": "info" }
]
"effect": [ { "math": [ "u_generic_nre_anomaly++" ] }, { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } ]
},
{
"type": "effect_on_condition",
Expand Down Expand Up @@ -1352,10 +1349,7 @@
}
]
},
"effect": [
{ "math": [ "u_generic_nre_anomaly", "++" ] },
{ "u_message": "The NRE recorder emits a sharp beep!", "type": "info" }
]
"effect": [ { "math": [ "u_generic_nre_anomaly++" ] }, { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } ]
},
{
"type": "effect_on_condition",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"case": 1,
"effect": [
{ "u_message": "Vitrifaction_Ambient_1", "snippet": true, "type": "good" },
{ "math": [ "u_vitri_glassed", "++" ] },
{ "math": [ "u_vitri_glassed++" ] },
{ "u_add_morale": "morale_vitri_placid", "bonus": 3, "max_bonus": 50 },
{ "run_eocs": "EOC_queue_vitrified_int_drain" }
]
Expand All @@ -210,7 +210,7 @@
"case": 2,
"effect": [
{ "u_message": "Vitrifaction_Ambient_2", "snippet": true, "type": "good" },
{ "math": [ "u_vitri_glassed", "++" ] },
{ "math": [ "u_vitri_glassed++" ] },
{ "u_add_morale": "morale_vitri_placid", "bonus": 5, "max_bonus": 99 },
{ "run_eocs": "EOC_queue_vitrified_int_drain" }
]
Expand All @@ -219,7 +219,7 @@
"case": 3,
"effect": [
{ "u_message": "Vitrifaction_Ambient_3", "snippet": true, "type": "good" },
{ "math": [ "u_vitri_glassed", "++" ] },
{ "math": [ "u_vitri_glassed++" ] },
{ "u_add_morale": "morale_vitri_placid", "bonus": 7, "max_bonus": 99 },
{ "run_eocs": "EOC_queue_vitrified_int_drain" }
]
Expand All @@ -228,7 +228,7 @@
"case": 4,
"effect": [
{ "u_message": "Vitrifaction_Ambient_4", "snippet": true, "type": "good" },
{ "math": [ "u_vitri_glassed", "++" ] },
{ "math": [ "u_vitri_glassed++" ] },
{ "u_add_morale": "morale_vitri_placid", "bonus": 10, "max_bonus": 99 },
{ "run_eocs": "EOC_queue_vitrified_int_drain" }
]
Expand All @@ -237,7 +237,7 @@
"case": 5,
"effect": [
{ "u_message": "Vitrifaction_Ambient_5", "snippet": true, "type": "good" },
{ "math": [ "u_vitri_glassed", "++" ] },
{ "math": [ "u_vitri_glassed++" ] },
{ "u_add_morale": "morale_vitri_placid", "bonus": 15, "max_bonus": 99 },
{ "run_eocs": "EOC_queue_vitrified_int_drain" }
]
Expand All @@ -246,7 +246,7 @@
"case": 6,
"effect": [
{ "u_message": "Vitrifaction_Ambient_6", "snippet": true, "type": "good" },
{ "math": [ "u_vitri_glassed", "++" ] },
{ "math": [ "u_vitri_glassed++" ] },
{ "u_add_morale": "morale_vitri_placid", "bonus": 20, "max_bonus": 99 },
{ "run_eocs": "EOC_queue_vitrified_int_drain" }
]
Expand Down Expand Up @@ -295,7 +295,7 @@
"id": "EOC_vitrified_int_drain",
"condition": { "and": [ { "x_in_y_chance": { "x": 1, "y": 2 } }, { "math": [ "u_vitri_glassed >= 5" ] } ] },
"effect": [
{ "math": [ "u_vitri_vitrified", "++" ] },
{ "math": [ "u_vitri_vitrified++" ] },
{ "u_add_effect": "VITRIFYING", "duration": "PERMANENT", "intensity": { "math": [ "u_vitri_vitrified" ] } },
{ "math": [ "u_vitri_glassed = 0" ] }
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
},
"effect": [
{ "u_spawn_npc": "hells_raiders_assassin", "real_count": 1, "min_radius": 15, "max_radius": 25 },
{ "math": [ "u_bandit_assassins_sent", "++" ] }
{ "math": [ "u_bandit_assassins_sent++" ] }
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
"deactivate_condition": { "math": [ "isherwood_luke_truck_status > 1" ] },
"effect": [
{ "mapgen_update": "LUKE_REMOVE_TRUCK", "om_terrain": "trailhead_shack_z0" },
{ "math": [ "isherwood_luke_truck_status", "++" ] }
{ "math": [ "isherwood_luke_truck_status++" ] }
],
"false_effect": [ { "run_eocs": "EOC_LUKE_RETRIEVE_TRUCK_END", "time_in_future": 100 } ]
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/furniture_and_terrain/terrain-traps.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"and": [ { "u_has_items": { "item": "human_sample", "count": 1 } }, { "u_has_mission": "BEM_human_sample_mission" } ]
},
"effect": [
{ "math": [ "u_counter_BEM_BEM_human_sample_reward_owed", "++" ] },
{ "math": [ "u_counter_BEM_BEM_human_sample_reward_owed++" ] },
{ "u_message": "You prepare the drop as instructed", "popup": true },
{ "u_consume_item": "human_sample", "count": 1 },
{ "finish_mission": "BEM_human_sample_mission", "success": true }
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/science.json
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@
"condition": { "not": { "one_in_chance": 3 } },
"effect": [
{ "u_message": "You have a slight feeling of being watched." },
{ "math": [ "u_migo_interest_interest_migo_interest", "++" ] }
{ "math": [ "u_migo_interest_interest_migo_interest++" ] }
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions data/json/monster_special_attacks/spells.json
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@
],
"false_effect": [
{ "math": [ "u_pain()", "+=", "3" ] },
{ "math": [ "u_madness", "++" ] },
{ "math": [ "u_madness++" ] },
{
"u_message": "You can't look away from the impossible shape, staring at it is making you feel sick, you have to get away!"
}
Expand Down Expand Up @@ -910,7 +910,7 @@
"effect": [
{ "u_message": "Your reflection uses your bond to feast on your essence." },
{ "math": [ "u_val('sleepiness') = min(u_val('sleepiness') + portal_dungeon_reflect_strength, 1200)" ] },
{ "math": [ "portal_dungeon_reflect_strength", "++" ] }
{ "math": [ "portal_dungeon_reflect_strength++" ] }
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions data/json/npcs/Lighthouse_Family/NPC_lighthouse_man.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
{ "npc_at_om_location": "lighthouse_ground" }
]
},
"effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] }
"effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] }
},
{
"text": "Yes. First floor is clear.",
Expand All @@ -146,7 +146,7 @@
{ "npc_at_om_location": "lighthouse_z1" }
]
},
"effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] }
"effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] }
},
{
"text": "Yes. Second floor is clear.",
Expand All @@ -158,7 +158,7 @@
{ "npc_at_om_location": "lighthouse_z2" }
]
},
"effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] }
"effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] }
},
{
"text": "Yes. Third floor is clear.",
Expand All @@ -170,7 +170,7 @@
{ "npc_at_om_location": "lighthouse_z3" }
]
},
"effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] }
"effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] }
},
{
"text": "Yes. Fourth floor is clear.",
Expand All @@ -182,7 +182,7 @@
{ "npc_at_om_location": "lighthouse_z4" }
]
},
"effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] }
"effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] }
},
{
"text": "Yes. Top floor is clear.",
Expand All @@ -193,7 +193,7 @@
{ "npc_at_om_location": "lighthouse_z5" }
]
},
"effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] },
"effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] },
"topic": "TALK_lighthouse_man_cleaned_done"
},
{
Expand All @@ -205,7 +205,7 @@
{ "npc_at_om_location": "lighthouse_ground" }
]
},
"effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] },
"effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] },
"topic": "TALK_MISSION_INQUIRE"
},
{ "text": "Not yet.", "topic": "TALK_DONE" }
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/TALK_TEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@
{
"text": "This is a math test response that increments by 1.",
"topic": "TALK_DONE",
"effect": { "math": [ "u_test_var_compare_test_test", "++" ] }
"effect": { "math": [ "u_test_var_compare_test_test++" ] }
},
{
"text": "This is an math test response that increments by 2.",
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/computers/TALK_MSU14.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"effect": [
{ "run_eocs": [ "capture_generic_nre_anomaly" ] },
{ "u_spawn_item": "melchior_science_doc", "count": 1 },
{ "math": [ "u_counter_robofac_knowledge_dimensional_heuristics", "++" ] }
{ "math": [ "u_counter_robofac_knowledge_dimensional_heuristics++" ] }
],
"topic": "TALK_DONE"
}
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/godco/members/NPC_Katherine_Weaver.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
"type": "talk_topic",
"id": "TALK_GODCO_Katherine_Angry_Pressed",
"dynamic_line": "&Katherine scowls with anger at you. \"This is the exact <swear> reason I don't want to talk to you, now go away!\"",
"speaker_effect": [ { "effect": { "math": [ "n_npc_anger()", "++" ] } } ],
"speaker_effect": [ { "effect": { "math": [ "n_npc_anger()++" ] } } ],
"responses": [ { "text": "Fuck's sake <name_b>, I'm leaving!", "topic": "TALK_DONE" } ]
}
]
Loading
Loading