Skip to content

Commit

Permalink
Merge branch 'CleverRaven:master' into more-molotov-cocktail-containers
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodbowel authored Aug 24, 2024
2 parents 255addf + 292302f commit c8dd3b1
Show file tree
Hide file tree
Showing 16 changed files with 373 additions and 45 deletions.
46 changes: 37 additions & 9 deletions data/json/faults/faults_guns.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
"item_prefix": "rusting",
"flags": [ "BLACKPOWDER_FOULING_DAMAGE", "NO_DIRTYING" ]
},
{
"id": "fault_gun_chamber_spent",
"type": "fault",
"name": { "str": "Spent casing in chamber" },
"description": "This gun currently has an empty casing chambered. It will have to be removed before firing.",
"item_prefix": "jammed",
"flags": [ "JAMMED_GUN" ]
},
{
"id": "fault_gun_unlubricated",
"type": "fault",
Expand Down Expand Up @@ -54,6 +46,42 @@
"type": "fault",
"name": { "str": "Overheat safety" },
"description": "This weapon will attempt to enter a cooling cycle when overheated.",
"flags": [ "JAMMED_GUN" ]
"flags": [ "OVERHEATED_GUN" ]
},
{
"id": "fault_fail_to_feed",
"type": "fault",
"//": "gun_mechanical_simple can be fixed on the fly",
"fault_type": "gun_mechanical_simple",
"name": { "str": "Fail to feed" },
"description": "This gun did not load the round in the chamber properly.",
"item_prefix": "jammed"
},
{
"id": "fault_gun_chamber_spent",
"//": "aka fail to extract",
"type": "fault",
"fault_type": "gun_mechanical_simple",
"name": { "str": "Spent casing in chamber" },
"description": "This gun currently has an empty casing in the chamber.",
"item_prefix": "jammed"
},
{
"id": "fault_stovepipe",
"//": "only closed bolt",
"type": "fault",
"fault_type": "gun_mechanical_simple",
"name": { "str": "Stovepipe" },
"description": "Casing of the bullet stuck without being properly ejected.",
"item_prefix": "jammed"
},
{
"id": "fault_double_feed",
"//": "only magazine-fed firearms",
"type": "fault",
"fault_type": "gun_mechanical_simple",
"name": { "str": "Double feed" },
"description": "Magazine of the gun tried to put two rounds in the chamber at once.",
"item_prefix": "jammed"
}
]
32 changes: 30 additions & 2 deletions data/json/faults/fixes_gun.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,42 @@
"time_save_profs": { "prof_gun_cleaning": 0.5 },
"time_save_flags": { "EASY_CLEAN": 0.5 }
},
{
"type": "fault_fix",
"id": "mend_fault_fail_to_feed_manual_feed",
"name": "Manual cycle",
"success_msg": "You manually cycle your %s to put round in the chamber.",
"time": "10 s",
"set_variables": { "u_know_round_in_chamber": "true" },
"faults_removed": [ "fault_fail_to_feed" ]
},
{
"type": "fault_fix",
"id": "mend_fault_gun_chamber_spent_eject",
"name": "Eject spent casing",
"success_msg": "You eject the spent casing from the %s.",
"time": "1 s",
"success_msg": "You eject the spent casing from the %s's chamber.",
"time": "10 s",
"set_variables": { "u_know_round_in_chamber": "true" },
"faults_removed": [ "fault_gun_chamber_spent" ]
},
{
"type": "fault_fix",
"id": "mend_fault_stovepipe_eject",
"name": "Eject spent casing",
"success_msg": "You eject the spent casing, stuck in %s's slide.",
"time": "10 s",
"set_variables": { "u_know_round_in_chamber": "true" },
"faults_removed": [ "fault_stovepipe" ]
},
{
"type": "fault_fix",
"id": "mend_fault_double_feed_clean",
"name": "Clean double feed",
"success_msg": "You eject the second round stuck in %s's chamber.",
"time": "10 s",
"set_variables": { "u_know_round_in_chamber": "true" },
"faults_removed": [ "fault_double_feed" ]
},
{
"type": "fault_fix",
"id": "mend_fault_gun_unlubricated",
Expand Down
65 changes: 65 additions & 0 deletions data/json/items/tool/debug_tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,70 @@
"symbol": ";",
"color": "light_gray",
"use_action": [ "DBG_LUX_METER" ]
},
{
"id": "debug_item_damager",
"type": "TOOL",
"category": "tools",
"name": { "str_sp": "debug item damager (simple)" },
"description": "Deals 1 full bar of damage to an item you wield.",
"weight": "1 g",
"volume": "1 ml",
"material": [ "plastic" ],
"symbol": ";",
"color": "light_gray",
"use_action": {
"type": "effect_on_conditions",
"menu_text": "Damage item",
"effect_on_conditions": [
{
"id": "EOC_FIND_ITEM_simple",
"effect": {
"u_run_inv_eocs": "all",
"search_data": [ { "wielded_only": true } ],
"true_eocs": {
"id": "EOC_DAMAGE_ITEM_simple",
"effect": [
{ "math": [ "_hp_before", "=", "n_hp('ALL')" ] },
{ "math": [ "n_hp('ALL')", "-=", "1000" ] },
{ "math": [ "_hp_after", "=", "n_hp('ALL')" ] },
{ "u_message": "<npc_name> have had <context_val:hp_before> hp, now has <context_val:hp_after> hp." }
]
}
}
}
]
}
},
{
"id": "debug_item_damager_adv",
"type": "TOOL",
"category": "tools",
"name": { "str_sp": "debug item damager (advanced)" },
"description": "Deals damage to items you pick.",
"weight": "1 g",
"volume": "1 ml",
"material": [ "plastic" ],
"symbol": ";",
"color": "light_gray",
"use_action": {
"type": "effect_on_conditions",
"menu_text": "Damage item",
"effect_on_conditions": [
{
"id": "EOC_FIND_ITEM",
"effect": {
"u_run_inv_eocs": "manual_mult",
"true_eocs": {
"id": "EOC_DAMAGE_ITEM",
"effect": [
{ "math": [ "n_hp('ALL')", "-=", "num_input('Amount of damage, 1000 is one bar of damage.', 1000)" ] },
{ "u_message": "Dealt damage to all items." }
]
}
}
}
]
}
}
]
6 changes: 3 additions & 3 deletions data/json/mapgen/house/house01.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
"object": {
"fill_ter": "t_floor",
"rows": [
"...::::::M..............",
"...::::::cccccc.........",
"...::::::CC.CCcCC..CC...",
"...ccccccM..............",
"...cccccccccccc.........",
"...ccccccCC.CCcCC..CC...",
".C#``````##o##*##oo##...",
".C#``````|X,,|,|,,,,#...",
".C#``````|,,,|,+,,,,o...",
Expand Down
12 changes: 4 additions & 8 deletions data/mods/Sky_Island/dialog_statue.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@
"and": [
{ "not": { "u_has_mission": "SKYISLAND_UPGRADE_security2" } },
{ "math": [ "securitylevel", "==", "1" ] },
{ "math": [ "islandrank", ">=", "2" ] },
{ "math": [ "debug_never_achievable", "==", "1" ] }
{ "math": [ "islandrank", ">=", "2" ] }
]
},
"effect": [ { "assign_mission": "SKYISLAND_UPGRADE_security2" } ],
Expand All @@ -216,8 +215,7 @@
"and": [
{ "not": { "u_has_mission": "SKYISLAND_UPGRADE_security3" } },
{ "math": [ "securitylevel", "==", "2" ] },
{ "math": [ "islandrank", ">=", "4" ] },
{ "math": [ "debug_never_achievable", "==", "1" ] }
{ "math": [ "islandrank", ">=", "4" ] }
]
},
"effect": [ { "assign_mission": "SKYISLAND_UPGRADE_security3" } ],
Expand All @@ -229,8 +227,7 @@
"and": [
{ "not": { "u_has_mission": "SKYISLAND_UPGRADE_security4" } },
{ "math": [ "securitylevel", "==", "3" ] },
{ "math": [ "islandrank", ">=", "4" ] },
{ "math": [ "debug_never_achievable", "==", "1" ] }
{ "math": [ "islandrank", ">=", "4" ] }
]
},
"effect": [ { "assign_mission": "SKYISLAND_UPGRADE_security4" } ],
Expand All @@ -242,8 +239,7 @@
"and": [
{ "not": { "u_has_mission": "SKYISLAND_UPGRADE_security5" } },
{ "math": [ "securitylevel", "==", "4" ] },
{ "math": [ "islandrank", ">=", "4" ] },
{ "math": [ "debug_never_achievable", "==", "1" ] }
{ "math": [ "islandrank", ">=", "4" ] }
]
},
"effect": [ { "assign_mission": "SKYISLAND_UPGRADE_security5" } ],
Expand Down
20 changes: 12 additions & 8 deletions data/mods/Sky_Island/upgrade_missions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3406,7 +3406,7 @@
"id": "SKYISLAND_UPGRADE_security2",
"type": "mission_definition",
"name": "Upgrade: Security Beta",
"description": "With the supplied recipe, you will be able to expand the capacity of your secure container.\n\nEMPTY YOUR SECURE CONTAINER FIRST! Anything left inside when upgrading will be lost forever!",
"description": "With the supplied recipe, you will be able to expand the capacity of your secure container.",
"goal": "MGOAL_FIND_ITEM",
"item": "secure_container_2",
"count": 1,
Expand All @@ -3417,7 +3417,7 @@
"effect": [
{ "u_learn_recipe": "secure_container_2" },
{
"u_message": "With the supplied recipe, you will be able to expand the capacity of your secure container.\n\nEMPTY YOUR SECURE CONTAINER FIRST! Anything left inside when upgrading will be lost forever!",
"u_message": "With the supplied recipe, you will be able to expand the capacity of your secure container.",
"popup": true
}
]
Expand All @@ -3426,6 +3426,7 @@
"effect": [
{ "math": [ "securitylevel", "=", "2" ] },
{ "u_forget_recipe": "secure_container_2" },
{ "u_lose_trait": "mut_secure_container_1" },
{ "u_add_trait": "mut_secure_container_2" },
{
"u_message": "The strange metaphysical container churns inward with violent force, grinding loudly before suddenly expanding. Your secure container can now carry more.",
Expand All @@ -3452,7 +3453,7 @@
"id": "SKYISLAND_UPGRADE_security3",
"type": "mission_definition",
"name": "Upgrade: Security Gamma",
"description": "With the supplied recipe, you will be able to expand the capacity of your secure container.\n\nEMPTY YOUR SECURE CONTAINER FIRST! Anything left inside when upgrading will be lost forever!",
"description": "With the supplied recipe, you will be able to expand the capacity of your secure container.",
"goal": "MGOAL_FIND_ITEM",
"item": "secure_container_3",
"count": 1,
Expand All @@ -3463,7 +3464,7 @@
"effect": [
{ "u_learn_recipe": "secure_container_3" },
{
"u_message": "With the supplied recipe, you will be able to expand the capacity of your secure container.\n\nEMPTY YOUR SECURE CONTAINER FIRST! Anything left inside when upgrading will be lost forever!",
"u_message": "With the supplied recipe, you will be able to expand the capacity of your secure container.",
"popup": true
}
]
Expand All @@ -3472,6 +3473,7 @@
"effect": [
{ "math": [ "securitylevel", "=", "3" ] },
{ "u_forget_recipe": "secure_container_3" },
{ "u_lose_trait": "mut_secure_container_2" },
{ "u_add_trait": "mut_secure_container_3" },
{
"u_message": "The strange metaphysical container churns inward with violent force, grinding loudly before suddenly expanding. Your secure container can now carry more.",
Expand All @@ -3498,7 +3500,7 @@
"id": "SKYISLAND_UPGRADE_security4",
"type": "mission_definition",
"name": "Upgrade: Security Epsilon",
"description": "With the supplied recipe, you will be able to expand the capacity of your secure container.\n\nEMPTY YOUR SECURE CONTAINER FIRST! Anything left inside when upgrading will be lost forever!",
"description": "With the supplied recipe, you will be able to expand the capacity of your secure container.",
"goal": "MGOAL_FIND_ITEM",
"item": "secure_container_4",
"count": 1,
Expand All @@ -3509,7 +3511,7 @@
"effect": [
{ "u_learn_recipe": "secure_container_4" },
{
"u_message": "With the supplied recipe, you will be able to expand the capacity of your secure container.\n\nEMPTY YOUR SECURE CONTAINER FIRST! Anything left inside when upgrading will be lost forever!",
"u_message": "With the supplied recipe, you will be able to expand the capacity of your secure container.",
"popup": true
}
]
Expand All @@ -3518,6 +3520,7 @@
"effect": [
{ "math": [ "securitylevel", "=", "4" ] },
{ "u_forget_recipe": "secure_container_4" },
{ "u_lose_trait": "mut_secure_container_3" },
{ "u_add_trait": "mut_secure_container_4" },
{
"u_message": "The strange metaphysical container churns inward with violent force, grinding loudly before suddenly expanding. Your secure container can now carry more.",
Expand All @@ -3544,7 +3547,7 @@
"id": "SKYISLAND_UPGRADE_security5",
"type": "mission_definition",
"name": "Upgrade: Security Kappa",
"description": "With the supplied recipe, you will be able to expand the capacity of your secure container to its maximum size.\n\nEMPTY YOUR SECURE CONTAINER FIRST! Anything left inside when upgrading will be lost forever!",
"description": "With the supplied recipe, you will be able to expand the capacity of your secure container to its maximum size.",
"goal": "MGOAL_FIND_ITEM",
"item": "secure_container_5",
"count": 1,
Expand All @@ -3555,7 +3558,7 @@
"effect": [
{ "u_learn_recipe": "secure_container_5" },
{
"u_message": "With the supplied recipe, you will be able to expand the capacity of your secure container to its maximum size.\n\nEMPTY YOUR SECURE CONTAINER FIRST! Anything left inside when upgrading will be lost forever!",
"u_message": "With the supplied recipe, you will be able to expand the capacity of your secure container to its maximum size.",
"popup": true
}
]
Expand All @@ -3564,6 +3567,7 @@
"effect": [
{ "math": [ "securitylevel", "=", "5" ] },
{ "u_forget_recipe": "secure_container_5" },
{ "u_lose_trait": "mut_secure_container_4" },
{ "u_add_trait": "mut_secure_container_5" },
{
"u_message": "The strange metaphysical container churns inward with violent force, grinding loudly before suddenly expanding. Your secure container can now carry more.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@
"id": "HOMULLUS_EAT_DEMIHUMANS",
"name": { "str": "The Top of the Food Chain" },
"points": 5,
"description": "Humanity are omnivores in the most literal sense. You can eat anything not human without any moral qualms.",
"description": "Humanity are omnivores in the most literal sense. You can eat anything not human without any moral qualms. However, the food that pre-Cataclysm humanity would slowly poison themselves with is anathema to you, and you will eat only good-tasting food unless you are starving.",
"types": [ "DIET" ],
"prereqs": [ "HOMULLUS_THE_HUNTER", "HOMULLUS_THE_HUNTER2" ],
"category": [ "HOMULLUS" ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,55 @@
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_HOMULLUS_FAE_BAN_DIDNT_SLEEP_NEAR_HUMANS",
"eoc_type": "EVENT",
"required_event": "character_wakes_up",
"condition": {
"and": [
{
"or": [
{ "and": [ { "u_has_trait": "HOMULLUS_BACKSTAGE" }, { "u_has_trait": "HOMULLUS_REGEN_STAMINA" } ] },
{ "u_has_trait": "THRESH_HOMULLUS" }
]
},
{ "math": [ "u_characters_nearby('radius': 45, 'attitude': 'any')", "==", "0" ] }
]
},
"effect": [
{ "run_eocs": "EOC_PARACLESIAN_BROKE_FAE_BAN" },
{
"u_message": "You awaken with a start as a terrible feeling of crushing loneliness grips you. You were meant to live in close contact with humans, not wake up to an empty home.",
"type": "bad"
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_HOMULLUS_FAE_BAN_PICKY_EATER",
"eoc_type": "EVENT",
"required_event": "gains_mutation",
"//": "Automatically gain the Picky Eater and Junkfood Intolerance traits when gaining the The Top of the Food Chain trait",
"condition": {
"and": [ { "compare_string": [ "HOMULLUS_EAT_DEMIHUMANS", { "context_val": "trait" } ] }, { "u_has_trait": "HOMULLUS" } ]
},
"effect": [ { "u_add_trait": "PICKYEATER" }, { "u_add_trait": "ANTIJUNK" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_HOMULLUS_FAE_BAN_KEEP_FOOD_TRAITS",
"//": "This is to prevent the Homullus from purifying those traits away as long as they have The Top of the Food Chain, or are post-threshold.",
"eoc_type": "EVENT",
"required_event": "character_wakes_up",
"condition": {
"and": [
{ "or": [ { "u_has_trait": "HOMULLUS_EAT_DEMIHUMANS" }, { "u_has_trait": "THRESH_HOMULLUS" } ] },
{ "or": [ { "not": { "u_has_trait": "PICKYEATER" } }, { "not": { "u_has_trait": "ANTIJUNK" } } ] }
]
},
"effect": [ { "u_add_trait": "PICKYEATER" }, { "u_add_trait": "ANTIJUNK" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_SALAMANDER_FAE_BAN_GET_WET",
Expand Down
Loading

0 comments on commit c8dd3b1

Please sign in to comment.