From e0e334aa205b5bc3e0854cb28fa81c5b3a2e599a Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:01:41 +0200 Subject: [PATCH 1/7] remove yugg barb damage type --- data/json/ammo_effects.json | 6 ++++++ data/json/damage_types.json | 21 ------------------- data/json/items/ammo/barb.json | 3 ++- data/json/monster_special_attacks/spells.json | 2 +- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/data/json/ammo_effects.json b/data/json/ammo_effects.json index 82c3eccf89c7e..d57f44c4fea0a 100644 --- a/data/json/ammo_effects.json +++ b/data/json/ammo_effects.json @@ -421,5 +421,11 @@ "type": "ammo_effect", "//": "Creates a trail of laser", "trail": { "field_type": "fd_laser", "intensity_min": 2, "intensity_max": 2 } + }, + { + "id": "GENE_STING_BARB", + "type": "ammo_effect", + "//": "runs EoC that cause you to mutate", + "eoc": [ "EOC_random_mutate" ] } ] diff --git a/data/json/damage_types.json b/data/json/damage_types.json index d4d40f5be26a4..e4c944d594687 100644 --- a/data/json/damage_types.json +++ b/data/json/damage_types.json @@ -164,27 +164,6 @@ "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 7111324d3dc1b..dec758c1cc418 100644 --- a/data/json/items/ammo/barb.json +++ b/data/json/items/ammo/barb.json @@ -31,7 +31,8 @@ "volume": "250 ml", "weight": "30 g", "ammo_type": "gene_sting", - "damage": { "damage_type": "genetic_damage_ballistic", "amount": 5, "armor_penetration": 5 }, + "damage": { "damage_type": "bullet", "amount": 5, "armor_penetration": 5 }, + "effects": [ "GENE_STING_BARB" ], "dispersion": 120, "loudness": 0, "count": 10, diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index 55f9524ad9b24..f981579ffcd9c 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -617,7 +617,7 @@ { "type": "effect_on_condition", "id": "EOC_random_mutate", - "condition": { "and": [ { "math": [ "_damage_taken", ">", "0" ] }, "u_is_npc" ] }, + "condition": { "and": [ { "math": [ "_proj_damage", ">", "0" ] }, "u_is_npc" ] }, "effect": [ { "set_string_var": "", "target_var": { "context_val": "dart_mutation_category" }, "parse_tags": true }, { "npc_mutate_category": { "context_val": "dart_mutation_category" }, "use_vitamins": false } From a64d78865ef078099a4cdddb77ce71195574abbb Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:12:57 +0200 Subject: [PATCH 2/7] remove genetic_damage_pierce damage type --- data/json/damage_types.json | 24 -------------- data/json/monster_special_attacks/spells.json | 32 ++----------------- .../monster_special_attacks.json | 3 +- 3 files changed, 5 insertions(+), 54 deletions(-) diff --git a/data/json/damage_types.json b/data/json/damage_types.json index e4c944d594687..630175ffd8da3 100644 --- a/data/json/damage_types.json +++ b/data/json/damage_types.json @@ -140,30 +140,6 @@ "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 } - }, { "//": "e.g. fire, plasma", "id": "heat", diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index f981579ffcd9c..afcfcd7ea6e1c 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -586,38 +586,12 @@ "min_field_intensity": 1, "max_field_intensity": 2 }, - { - "type": "SPELL", - "id": "spell_gene_sting", - "name": { "str": "Gene Sting" }, - "description": "Yugg attack which causes random mutation.", - "effect": "attack", - "shape": "blast", - "valid_targets": [ "hostile" ], - "min_range": 24, - "max_range": 24, - "sound_description": "ssszziiipp", - "damage_type": "biological", - "min_damage": 0, - "extra_effects": [ { "id": "spell_gene_sting_selector" } ] - }, - { - "id": "spell_gene_sting_selector", - "type": "SPELL", - "name": "Gene Sting Selector", - "description": "The spell fires the EOC for the yugg gene sting. It's a bug if you have it.", - "message": "", - "valid_targets": [ "hostile" ], - "flags": [ "NO_FAIL", "SILENT", "NO_HANDS", "NO_LEGS" ], - "effect": "effect_on_condition", - "effect_str": "EOC_random_mutate", - "shape": "blast", - "max_level": 1 - }, { "type": "effect_on_condition", "id": "EOC_random_mutate", - "condition": { "and": [ { "math": [ "_proj_damage", ">", "0" ] }, "u_is_npc" ] }, + "condition": { + "and": [ { "or": [ { "math": [ "_proj_damage", ">", "0" ] }, { "math": [ "_damage", ">", "0" ] } ] }, "u_is_npc", "has_beta" ] + }, "effect": [ { "set_string_var": "", "target_var": { "context_val": "dart_mutation_category" }, "parse_tags": true }, { "npc_mutate_category": { "context_val": "dart_mutation_category" }, "use_vitamins": false } diff --git a/data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json b/data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json index 4e59c1aaf6396..390ffb8f76600 100644 --- a/data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json +++ b/data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json @@ -24,7 +24,7 @@ "id": "inject_warping_poison", "cooldown": 25, "move_cost": 150, - "damage_max_instance": [ { "damage_type": "genetic_damage_pierce", "amount": 15, "armor_penetration": 8, "armor_multiplier": 0.5 } ], + "damage_max_instance": [ { "damage_type": "pierce", "amount": 15, "armor_penetration": 8, "armor_multiplier": 0.5 } ], "hitsize_min": 4, "hit_dmg_u": "%1$s bites and injects poison into your %2$s!", "hit_dmg_npc": "%1$s bites and injects poison into your !", @@ -32,6 +32,7 @@ "miss_msg_npc": "%1$s tries to bite , but they dodge!", "no_dmg_msg_u": "%1$s tries to bite your %2$s, but fails to penetrate your armor.", "no_dmg_msg_npc": "%1$s tries to bite , but fails to penetrate their armor.", + "eoc": [ "EOC_random_mutate" ], "dodgeable": true, "blockable": true }, From 83ab326e2946222983799082347c8b2182cf5561 Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:17:20 +0200 Subject: [PATCH 3/7] confirm that beta can mutate, not alpha --- data/json/monster_special_attacks/spells.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index afcfcd7ea6e1c..60a948d39cd8e 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -590,7 +590,11 @@ "type": "effect_on_condition", "id": "EOC_random_mutate", "condition": { - "and": [ { "or": [ { "math": [ "_proj_damage", ">", "0" ] }, { "math": [ "_damage", ">", "0" ] } ] }, "u_is_npc", "has_beta" ] + "and": [ + { "or": [ { "math": [ "_proj_damage", ">", "0" ] }, { "math": [ "_damage", ">", "0" ] } ] }, + "npc_is_npc", + "has_beta" + ] }, "effect": [ { "set_string_var": "", "target_var": { "context_val": "dart_mutation_category" }, "parse_tags": true }, From c9292356aaf7f8e4b3f3b98f0a8554217f92083a Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:36:43 +0200 Subject: [PATCH 4/7] whitelist gene_sting in GG validator properly --- tools/json_tools/generic_guns_validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/json_tools/generic_guns_validator.py b/tools/json_tools/generic_guns_validator.py index 6cbd15d72c5b1..099a6f0587583 100755 --- a/tools/json_tools/generic_guns_validator.py +++ b/tools/json_tools/generic_guns_validator.py @@ -25,7 +25,7 @@ 'chemical_spray', 'fishspear', 'flammable', - 'gene_sting_barb', + 'gene_sting', 'm235', # Rocket 'metal_rail', 'nail', From 6362ffc5db9651b0128f98eeb6ca2977c50f93e3 Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:58:35 +0200 Subject: [PATCH 5/7] Update data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json --- .../monster_special_attacks/monster_special_attacks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json b/data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json index 390ffb8f76600..e39f1ec98ebe7 100644 --- a/data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json +++ b/data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json @@ -24,7 +24,7 @@ "id": "inject_warping_poison", "cooldown": 25, "move_cost": 150, - "damage_max_instance": [ { "damage_type": "pierce", "amount": 15, "armor_penetration": 8, "armor_multiplier": 0.5 } ], + "damage_max_instance": [ { "damage_type": "stab", "amount": 15, "armor_penetration": 8, "armor_multiplier": 0.5 } ], "hitsize_min": 4, "hit_dmg_u": "%1$s bites and injects poison into your %2$s!", "hit_dmg_npc": "%1$s bites and injects poison into your !", From 5688cc293876aac480962806b15ef47bd9e0a496 Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Wed, 7 Aug 2024 09:04:42 +0200 Subject: [PATCH 6/7] simplify damage check --- data/json/monster_special_attacks/spells.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index 60a948d39cd8e..d1aa0ebc302a3 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -589,13 +589,7 @@ { "type": "effect_on_condition", "id": "EOC_random_mutate", - "condition": { - "and": [ - { "or": [ { "math": [ "_proj_damage", ">", "0" ] }, { "math": [ "_damage", ">", "0" ] } ] }, - "npc_is_npc", - "has_beta" - ] - }, + "condition": { "and": [ { "math": [ "_proj_damage + _damage > 0" ] }, "npc_is_npc", "has_beta" ] }, "effect": [ { "set_string_var": "", "target_var": { "context_val": "dart_mutation_category" }, "parse_tags": true }, { "npc_mutate_category": { "context_val": "dart_mutation_category" }, "use_vitamins": false } From 119c6a8ca50258659bfeb0404be6c6d09b0ffffb Mon Sep 17 00:00:00 2001 From: GuardianDll Date: Wed, 7 Aug 2024 18:35:55 +0200 Subject: [PATCH 7/7] fix mistake in EoC, document relation between different entities in the game --- data/json/monster_special_attacks/spells.json | 2 +- doc/EFFECT_ON_CONDITION.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index d1aa0ebc302a3..696dc475faf48 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -589,7 +589,7 @@ { "type": "effect_on_condition", "id": "EOC_random_mutate", - "condition": { "and": [ { "math": [ "_proj_damage + _damage > 0" ] }, "npc_is_npc", "has_beta" ] }, + "condition": { "and": [ { "math": [ "_proj_damage + _damage > 0" ] }, "npc_is_character", "has_beta" ] }, "effect": [ { "set_string_var": "", "target_var": { "context_val": "dart_mutation_category" }, "parse_tags": true }, { "npc_mutate_category": { "context_val": "dart_mutation_category" }, "use_vitamins": false } diff --git a/doc/EFFECT_ON_CONDITION.md b/doc/EFFECT_ON_CONDITION.md index 06543eaba0995..ab6606a650be4 100644 --- a/doc/EFFECT_ON_CONDITION.md +++ b/doc/EFFECT_ON_CONDITION.md @@ -327,6 +327,13 @@ return true if alpha talker is female - `npc` is any NPC, except Avatar - `character` is both NPC or Avatar +``` +Creature ---> Character ---> avatar + \ \ + \ \--> npc + \---> monster +``` + #### Valid talkers: | Avatar | Character | NPC | Monster | Furniture | Item |