Skip to content

Commit

Permalink
Merge pull request #72813 from tenmillimaster/5.45
Browse files Browse the repository at this point in the history
Kord in another castle, 5.45 can't be exchanged
  • Loading branch information
I-am-Erk authored Apr 4, 2024
2 parents 1b3186f + 11edae5 commit 5dd5c2c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 58 deletions.
16 changes: 16 additions & 0 deletions data/json/items/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,22 @@
"weight": "725 g",
"volume": "750 ml"
},
{
"type": "GENERIC",
"id": "broken_kord",
"looks_like": "kord",
"symbol": "(",
"color": "light_gray",
"name": { "str": "Kord 6P67 rifle (Demilled)", "str_pl": "Kord 6P67 rifles (Demilled)" },
"weight": "3250 g",
"volume": "2418 ml",
"longest_side": "96 cm",
"price": 25000,
"to_hit": -2,
"description": "A special forces Russian rifle chambered in 5.45 that someone has taken a plasma cutter to, cutting it in three places to comply with import restrictions. This thing would have been hard to source, and thankfully its unique complex recoil balance system remains intact, unlike the receiver and barrel. The telltale rainbow patterns of torch cuts mar the otherwise beautiful receiver. A well-equipped gunsmith with time and materials could probably build a new one out of this…",
"flags": [ "TRADER_AVOID", "NO_REPAIR", "MISSION_ITEM" ],
"melee_damage": { "bash": 6 }
},
{
"type": "GENERIC",
"id": "broken_robofac_camspy",
Expand Down
6 changes: 3 additions & 3 deletions data/json/items/gun/545x39.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
"copy-from": "rifle_auto",
"looks_like": "modular_ar15",
"type": "GUN",
"name": { "str": "Kord 6P67" },
"name": { "str": "Kord 6P67 rifle" },
"//": "An exceptionally new AK style gun found illicitly as part of a quest.",
"description": "A special forces Russian rifle chambered in 5.45. This version uses standard Picatinny rails, has modern lightweight furniture and a unique complex recoil balance system for high fire rate with minimal recoil. It combines the reliability of the AK series with the high-velocity, lightweight 5.45x39mm cartridge and accepts standard AK-74M magazines.",
"weight": "3250 g",
"volume": "2418 ml",
"longest_side": "96 cm",
"barrel_length": "415 mm",
"price": 390000,
"price": 3900000,
"price_postapoc": 4000,
"to_hit": -1,
"material": [ "steel", "plastic" ],
Expand All @@ -88,7 +88,7 @@
[ "stock", 1 ],
[ "underbarrel", 1 ]
],
"flags": [ "NEVER_JAMS", "MISSION_ITEM" ],
"flags": [ "MISSION_ITEM" ],
"weapon_category": [ "AUTOMATIC_RIFLES" ],
"pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "ak74mag", "rpk74mag", "casket74mag" ] } ],
"melee_damage": { "bash": 11 }
Expand Down
4 changes: 2 additions & 2 deletions data/json/npcs/isolated_road/isolated_road_item_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
{ "group": "ammo_rifle_common", "count": 1, "prob": 100 },
{ "group": "guns_rifle_milspec", "count": 1, "prob": 100 },
{ "group": "gunsmith_basic_ammo", "count": [ 4, 16 ], "prob": 100 },
{ "group": "gunsmith_repack_ammo", "count": [ 9, 18 ], "prob": 100 }
{ "group": "gunsmith_repack_ammo", "count": [ 9, 18 ], "prob": 100 },
{ "group": "ammo_rifle_obscure", "count": 1, "prob": 5 }
]
},
{
Expand Down Expand Up @@ -154,7 +155,6 @@
{ "item": "3006", "prob": 1 },
{ "item": "762_m87", "prob": 3 },
{ "item": "556", "prob": 3 },
{ "item": "545", "prob": 3 },
{ "item": "762_51", "prob": 1 }
]
},
Expand Down
51 changes: 2 additions & 49 deletions data/json/npcs/isolated_road/isolated_road_jay_convert.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "TALK_BULLET_EXCHANGE_INFO",
"type": "talk_topic",
"dynamic_line": [
"You hit the nail on the head. You bring me bullets - 5.56, 7.62, 5.45, or .300 - and I'll convert between 'em. I take a 10% cut, just so you know."
"You hit the nail on the head. You bring me bullets - 5.56, .308, 7.62x39, or .300 - and I'll convert between 'em. I take a 10% cut, just so you know."
],
"responses": [
{ "text": "Thanks for filling me in.", "topic": "TALK_GUNSMITH_SERVICES" },
Expand All @@ -15,7 +15,7 @@
"//": "this is all the dialogue related to converting bullets with Jay",
"type": "talk_topic",
"dynamic_line": [
"Yup, what would you like to convert? As a reminder, I do 5.56, 7.62, 5.45, or .300. You want anything else, we can just trade 'em directly over the counter."
"Yup, what would you like to convert? As a reminder, I do 5.56, .308, 7.62x39, or .300. You want anything else, we can just trade 'em directly over the counter."
],
"responses": [
{ "text": "Nothing for now.", "topic": "TALK_GUNSMITH_SERVICES" },
Expand Down Expand Up @@ -61,13 +61,6 @@
{ "set_string_var": "300blk", "target_var": { "u_val": "artisans_gunsmith_ammo_source_item" } }
]
},
{
"case": 545,
"effect": [
{ "set_string_var": "5.45x39", "target_var": { "u_val": "artisans_gunsmith_ammo_source_name" }, "i18n": true },
{ "set_string_var": "545", "target_var": { "u_val": "artisans_gunsmith_ammo_source_item" } }
]
},
{
"case": 556,
"effect": [
Expand Down Expand Up @@ -135,15 +128,6 @@
],
"topic": "TALK_GUNSMITH_CONVERT_TO_TYPE"
},
{
"text": "5.45x39.",
"condition": { "u_has_items": { "item": "545", "count": { "u_val": "number_artisans_gunsmith_ammo_amount" } } },
"effect": [
{ "run_eoc_with": "EOC_gunsmith_set_source_type", "variables": { "key1": "545" } },
{ "run_eocs": "EOC_gunsmith_take_source" }
],
"topic": "TALK_GUNSMITH_CONVERT_TO_TYPE"
},
{
"text": ".300 AAC.",
"condition": { "u_has_items": { "item": "300blk", "count": { "u_val": "number_artisans_gunsmith_ammo_amount" } } },
Expand Down Expand Up @@ -203,17 +187,6 @@
"effect": { "run_eoc_with": "EOC_gunsmith_set_convert_target", "variables": { "key1": "76239" } },
"topic": "TALK_GUNSMITH_CONVERT_CONFIRM"
},
{
"text": "5.45x39.",
"condition": {
"and": [
{ "math": [ "u_number_artisans_gunsmith_ammo_from", "!=", "545" ] },
{ "math": [ "u_number_artisans_failed_to_convert_ammo", "==", "0" ] }
]
},
"effect": { "run_eoc_with": "EOC_gunsmith_set_convert_target", "variables": { "key1": "545" } },
"topic": "TALK_GUNSMITH_CONVERT_CONFIRM"
},
{
"text": ".300 AAC.",
"condition": {
Expand Down Expand Up @@ -265,19 +238,6 @@
"effect": {
"switch": { "math": [ "u_number_artisans_gunsmith_ammo_to" ] },
"cases": [
{ "case": 545, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "180" ] } },
{ "case": 556, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "270" ] } },
{ "case": 76239, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "135" ] } },
{ "case": 76251, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "135" ] } }
]
}
},
{
"case": 545,
"effect": {
"switch": { "math": [ "u_number_artisans_gunsmith_ammo_to" ] },
"cases": [
{ "case": 300, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "180" ] } },
{ "case": 556, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "270" ] } },
{ "case": 76239, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "135" ] } },
{ "case": 76251, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "135" ] } }
Expand All @@ -290,7 +250,6 @@
"switch": { "math": [ "u_number_artisans_gunsmith_ammo_to" ] },
"cases": [
{ "case": 300, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "120" ] } },
{ "case": 545, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "120" ] } },
{ "case": 76239, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "90" ] } },
{ "case": 76251, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "90" ] } }
]
Expand All @@ -302,7 +261,6 @@
"switch": { "math": [ "u_number_artisans_gunsmith_ammo_to" ] },
"cases": [
{ "case": 300, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "240" ] } },
{ "case": 545, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "240" ] } },
{ "case": 556, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "360" ] } },
{ "case": 76251, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "180" ] } }
]
Expand All @@ -314,7 +272,6 @@
"switch": { "math": [ "u_number_artisans_gunsmith_ammo_to" ] },
"cases": [
{ "case": 300, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "240" ] } },
{ "case": 545, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "240" ] } },
{ "case": 556, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "360" ] } },
{ "case": 76239, "effect": { "math": [ "u_number_artisans_gunsmith_ammo_convert_coeff", "=", "180" ] } }
]
Expand All @@ -333,10 +290,6 @@
"case": 300,
"effect": { "set_string_var": "300blk", "target_var": { "u_val": "artisans_gunsmith_ammo_convert_target" } }
},
{
"case": 545,
"effect": { "set_string_var": "545", "target_var": { "u_val": "artisans_gunsmith_ammo_convert_target" } }
},
{
"case": 556,
"effect": { "set_string_var": "556", "target_var": { "u_val": "artisans_gunsmith_ammo_convert_target" } }
Expand Down
5 changes: 3 additions & 2 deletions data/json/npcs/isolated_road/isolated_road_jay_dialogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"text": "Hey. Cody wanted to say that she's sorry. She thought that you would want to see this.",
"condition": {
"and": [
{ "u_has_items": { "item": "kord", "count": 1 } },
{ "u_has_items": { "item": "broken_kord", "count": 1 } },
{
"not": { "u_has_var": "gunsmith_mentioned_quest", "type": "dialogue", "context": "artisans", "value": "yes" }
}
Expand Down Expand Up @@ -195,14 +195,15 @@
"id": "TALK_GUNSMITH_KORD",
"type": "talk_topic",
"dynamic_line": [
"Where did you… I- I don't know what to say.\" Jay takes the rifle reverently. He turns it over so carefully that you could mistake him for holding a child instead of a gun. \"This thing is is beautiful. Modern rails, ergonomic furniture, recoil balancing system. I know Cody thinks that she did something wrong, but all I remember is being so angry… just blindingly furious. Then I was running. When I woke up, everything was fine.\"\n\nJay hands back the Kord. \"Thank you for letting me see this, and for getting Cody and I talking. If you could help me out with something for Cody, I'll hook you up with a casket mag for that thing and a box of the good ammo. Stuff from my reserves."
"Where did you… I- I don't know what to say.\" Jay takes the rifle reverently. \"What did they do to this thing? The receiver's all chopped up!\" He turns it over so carefully that you could mistake him for holding a child instead of a gun. \"This thing was beautiful. Modern rails, ergonomic furniture, recoil balancing system… At least it's all still here. I know Cody thinks that she did something wrong, but all I remember is being so angry… just blindingly furious. Then I was running. When I woke up, everything was fine.\"\n\n\"Thank you for letting me see this, and for getting Cody and I talking. If you could help me out with something for Cody, I'll make this rifle right, and hook you up with a casket mag and a box of the good ammo for it. Stuff from my reserves."
],
"speaker_effect": { "effect": [ { "u_add_var": "gunsmith_mentioned_quest", "type": "dialogue", "context": "artisans", "value": "yes" } ] },
"responses": [
{
"text": "I'm listening.",
"effect": [
{ "add_mission": "MISSION_GUNSMITH_1" },
{ "u_sell_item": "broken_kord" },
{ "u_add_var": "gunsmith_accepted_quest", "type": "dialogue", "context": "artisans", "value": "yes" }
],
"topic": "TALK_GUNSMITH_Q1_DETAILS"
Expand Down
5 changes: 3 additions & 2 deletions data/json/npcs/isolated_road/isolated_road_missions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"name": { "str": "Find the gun" },
"description": "Cody wants you to go to a gun show and find a rare gun that Jay wanted to see. It was an AK of some kind with a weird name… something like CARD or CORE.",
"goal": "MGOAL_CONDITION",
"goal_condition": { "u_has_items": { "item": "kord", "count": 1 } },
"goal_condition": { "u_has_items": { "item": "broken_kord", "count": 1 } },
"difficulty": 5,
"item": "kord",
"item": "broken_kord",
"value": 1000,
"start": {
"assign_mission_target": { "om_special": "gun_show", "om_terrain": "gunshow_0", "reveal_radius": 2, "random": true, "search_range": 400 }
Expand Down Expand Up @@ -74,6 +74,7 @@
"effect": [
{ "u_spawn_item": "casket74mag", "count": 1 },
{ "u_spawn_item": "545_ap", "count": 200 },
{ "u_spawn_item": "kord", "count": 1 },
{ "u_add_var": "artisans_made_up", "type": "dialogue", "context": "artisans", "value": "yes" }
]
},
Expand Down

0 comments on commit 5dd5c2c

Please sign in to comment.