From f91e479d052847b6482d487c04de00e16e0de159 Mon Sep 17 00:00:00 2001 From: Maleclypse <54345792+Maleclypse@users.noreply.github.com> Date: Wed, 24 Jul 2024 08:52:42 -0500 Subject: [PATCH] Yugg Gun to fix issues with gene sting (#75079) * yugg gun * Update data/json/monster_special_attacks/monster_gun.json * Fix * Update generic_guns_validator.py * burrowing nether * Update tools/json_tools/generic_guns_validator.py * Update generic_guns_validator.py * Update monster_gun.json * Update monster_gun.json * Update monster_gun.json * fix * Update data/json/monster_special_attacks/monster_gun.json * Fixes * Fixes * Update data/json/species.json * Damage type * Update spells.json * Update spells.json * Update spells.json * It works! * Apply suggestions from code review * Update data/json/items/ammo/barb.json * Update data/json/items/ammo/barb.json * Update data/json/items/ammo/barb.json * Update data/json/items/ammo/barb.json * Update data/json/items/ammo/barb.json * Update data/json/ammo_effects.json * Update junk_dps.json --- data/json/damage_types.json | 45 +++++++++++++++++++ data/json/items/ammo/barb.json | 19 ++++++++ data/json/items/ammo_types.json | 6 +++ .../monster_special_attacks/monster_gun.json | 33 ++++++++++++++ data/json/monster_special_attacks/spells.json | 7 ++- data/json/monsters/nether.json | 16 ++++++- data/json/monsters/zed_fusion.json | 3 ++ data/json/species.json | 7 +++ .../TEST_DATA/expected_dps_data/junk_dps.json | 1 + tools/json_tools/generic_guns_validator.py | 2 + 10 files changed, 133 insertions(+), 6 deletions(-) diff --git a/data/json/damage_types.json b/data/json/damage_types.json index 630175ffd8da3..d4d40f5be26a4 100644 --- a/data/json/damage_types.json +++ b/data/json/damage_types.json @@ -140,6 +140,51 @@ "melee_combat_info": { "order": 600, "show_type": false }, "ablative_info": { "order": 600, "show_type": false } }, + { + "id": "genetic_damage_pierce", + "type": "damage_type", + "physical": true, + "edged": true, + "melee_only": true, + "magic_color": "light_green", + "name": "genetic pierce", + "skill": "stabbing", + "derived_from": [ "stab", 1 ], + "immune_flags": { "character": [ "STAB_IMMUNE" ] }, + "ondamage_eocs": [ "EOC_random_mutate" ] + }, + { + "id": "genetic_damage_pierce", + "type": "damage_info_order", + "info_display": "detailed", + "verb": "shocking", + "bionic_info": { "order": 601, "show_type": true }, + "protection_info": { "order": 701, "show_type": true }, + "pet_prot_info": { "order": 701, "show_type": false }, + "melee_combat_info": { "order": 601, "show_type": false }, + "ablative_info": { "order": 601, "show_type": false } + }, + { + "id": "genetic_damage_ballistic", + "type": "damage_type", + "physical": true, + "magic_color": "light_green", + "name": "genetic ballistic", + "derived_from": [ "bullet", 1 ], + "immune_flags": { "character": [ "BULLET_IMMUNE" ] }, + "ondamage_eocs": [ "EOC_random_mutate" ] + }, + { + "id": "genetic_damage_ballistic", + "type": "damage_info_order", + "info_display": "detailed", + "verb": "shocking", + "bionic_info": { "order": 601, "show_type": true }, + "protection_info": { "order": 701, "show_type": true }, + "pet_prot_info": { "order": 701, "show_type": false }, + "melee_combat_info": { "order": 601, "show_type": false }, + "ablative_info": { "order": 601, "show_type": false } + }, { "//": "e.g. fire, plasma", "id": "heat", diff --git a/data/json/items/ammo/barb.json b/data/json/items/ammo/barb.json index 04cb31719c8c4..7111324d3dc1b 100644 --- a/data/json/items/ammo/barb.json +++ b/data/json/items/ammo/barb.json @@ -18,5 +18,24 @@ "show_stats": true, "effects": [ "PARALYZEPOISON" ], "melee_damage": { "bash": 6, "cut": 2 } + }, + { + "type": "AMMO", + "id": "gene_sting_barb", + "price": "4 USD", + "name": { "str": "gene sting barb" }, + "symbol": "=", + "color": "cyan", + "description": "Tiny droplets of cyan venom trickle out of the sponge-like tissue of this sharp barb.", + "material": [ "bone" ], + "volume": "250 ml", + "weight": "30 g", + "ammo_type": "gene_sting", + "damage": { "damage_type": "genetic_damage_ballistic", "amount": 5, "armor_penetration": 5 }, + "dispersion": 120, + "loudness": 0, + "count": 10, + "show_stats": true, + "melee_damage": { "bash": 6, "cut": 2 } } ] diff --git a/data/json/items/ammo_types.json b/data/json/items/ammo_types.json index 9a0d870ee8340..6a4464e27b54d 100644 --- a/data/json/items/ammo_types.json +++ b/data/json/items/ammo_types.json @@ -71,6 +71,12 @@ "name": "barb", "default": "barb_paralysis" }, + { + "type": "ammunition_type", + "id": "gene_sting", + "name": "yugg stinger", + "default": "gene_sting_barb" + }, { "type": "ammunition_type", "id": "BB", diff --git a/data/json/monster_special_attacks/monster_gun.json b/data/json/monster_special_attacks/monster_gun.json index c2d18892f28b3..bb0f91cbf44a3 100644 --- a/data/json/monster_special_attacks/monster_gun.json +++ b/data/json/monster_special_attacks/monster_gun.json @@ -99,6 +99,39 @@ "durability": 8, "melee_damage": { "bash": 2 } }, + { + "id": "gene_sting_gun", + "type": "GUN", + "symbol": "%", + "color": "red", + "name": { "str": "viscous barb launcher" }, + "description": "A mutated organ capable of launching bony barbs at great speed.", + "material": [ "hflesh" ], + "flags": [ + "PRIMITIVE_RANGED_WEAPON", + "PSEUDO", + "NEVER_JAMS", + "NONCONDUCTIVE", + "NO_REPAIR", + "WATERPROOF_GUN", + "NO_SALVAGE", + "NO_UNLOAD", + "RELOAD_AND_SHOOT" + ], + "skill": "pistol", + "ammo": [ "gene_sting" ], + "clip_size": 1, + "weight": "540 g", + "volume": "750 ml", + "longest_side": "25 cm", + "reload_noise_volume": 2, + "loudness": 2, + "range": 12, + "dispersion": 100, + "durability": 8, + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gene_sting": 100 } } ], + "melee_damage": { "bash": 2 } + }, { "id": "feral_human_thrown_rock", "type": "GUN", diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index 1c672121f4733..55f9524ad9b24 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -598,8 +598,7 @@ "max_range": 24, "sound_description": "ssszziiipp", "damage_type": "biological", - "min_damage": 5, - "max_damage": 17, + "min_damage": 0, "extra_effects": [ { "id": "spell_gene_sting_selector" } ] }, { @@ -618,10 +617,10 @@ { "type": "effect_on_condition", "id": "EOC_random_mutate", - "condition": "u_is_character", + "condition": { "and": [ { "math": [ "_damage_taken", ">", "0" ] }, "u_is_npc" ] }, "effect": [ { "set_string_var": "", "target_var": { "context_val": "dart_mutation_category" }, "parse_tags": true }, - { "u_mutate_category": { "context_val": "dart_mutation_category" }, "use_vitamins": false } + { "npc_mutate_category": { "context_val": "dart_mutation_category" }, "use_vitamins": false } ] }, { diff --git a/data/json/monsters/nether.json b/data/json/monsters/nether.json index 593b6f51cae1e..b61f86bbfb041 100644 --- a/data/json/monsters/nether.json +++ b/data/json/monsters/nether.json @@ -1458,7 +1458,7 @@ "description": "A huge, slimy worm-like creature. Its pale, flattened head drips an oily mucus as it breaches the ground, searching for prey. Its pinkish mouth opens and closes, revealing long fangs glistening with ropey strands of saliva, which leave smoldering stains wherever they drip.", "default_faction": "nether", "bodytype": "snake", - "species": [ "NETHER" ], + "species": [ "NETHER_BURROWING" ], "diff": 10, "volume": "600 L", "weight": "800 kg", @@ -1474,11 +1474,23 @@ "melee_dice_sides": 5, "melee_damage": [ { "damage_type": "cut", "amount": 8 } ], "bleed_rate": 50, + "starting_ammo": { "gene_sting_barb": 100 }, "families": [ "prof_wp_netherium_abomination" ], "weakpoint_sets": [ "wps_netherium_abomination" ], "harvest": "exempt", "death_function": { "corpse_type": "NO_CORPSE", "eoc": "EOC_YUGG_DEATH" }, - "special_attacks": [ { "type": "spell", "spell_data": { "id": "spell_gene_sting", "min_level": 5 }, "cooldown": 160 } ], + "special_attacks": [ + { + "type": "gun", + "cooldown": 5, + "gun_type": "gene_sting_gun", + "ammo_type": "gene_sting_barb", + "no_ammo_sound": "SCREEE!!!!", + "require_targeting_player": false, + "ranges": [ [ 2, 18, "DEFAULT" ] ], + "description": "The yugg launches a viscous barb!" + } + ], "flags": [ "SEES", "HEARS", diff --git a/data/json/monsters/zed_fusion.json b/data/json/monsters/zed_fusion.json index cbd173d2ee258..c19c819287109 100644 --- a/data/json/monsters/zed_fusion.json +++ b/data/json/monsters/zed_fusion.json @@ -277,6 +277,9 @@ "type": "gun", "cooldown": 2, "gun_type": "barb_launcher", + "ammo_type": "barb_paralysis", + "no_ammo_sound": "unch", + "require_targeting_player": false, "ranges": [ [ 2, 12, "DEFAULT" ] ], "description": "The impaler launches a barb!" }, diff --git a/data/json/species.json b/data/json/species.json index 6bca1fae4c041..70473c998d88e 100644 --- a/data/json/species.json +++ b/data/json/species.json @@ -60,6 +60,13 @@ "description": "a nether creature", "flags": [ "DRACULIN_IMMUNE" ] }, + { + "type": "SPECIES", + "id": "NETHER_BURROWING", + "description": "a nether creature", + "footsteps": "rustling", + "flags": [ "DRACULIN_IMMUNE" ] + }, { "type": "SPECIES", "id": "NETHER_EMANATION", diff --git a/data/mods/TEST_DATA/expected_dps_data/junk_dps.json b/data/mods/TEST_DATA/expected_dps_data/junk_dps.json index 89d7f3c32dbd2..c0eab4023b5fe 100644 --- a/data/mods/TEST_DATA/expected_dps_data/junk_dps.json +++ b/data/mods/TEST_DATA/expected_dps_data/junk_dps.json @@ -73,6 +73,7 @@ "wizard_cane_on": 7.86, "modern_handguard": 7.94, "barb_paralysis": 6.12, + "gene_sting_barb": 6.37, "nitrogen_membrane_filter": 6.11, "pipe": 8.09, "sculpture_clay": 8.11, diff --git a/tools/json_tools/generic_guns_validator.py b/tools/json_tools/generic_guns_validator.py index e0ca14f781778..6cbd15d72c5b1 100755 --- a/tools/json_tools/generic_guns_validator.py +++ b/tools/json_tools/generic_guns_validator.py @@ -25,6 +25,7 @@ 'chemical_spray', 'fishspear', 'flammable', + 'gene_sting_barb', 'm235', # Rocket 'metal_rail', 'nail', @@ -56,6 +57,7 @@ 'ksg-25', 'raging_judge', 'american_180', + 'gene_sting_gun', 'ppsh', 'af2011a1_38super', # Magazines