diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index f34bf6bca9368..1c672121f4733 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -586,6 +586,76 @@ "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": 5, + "max_damage": 17, + "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": "u_is_character", + "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 } + ] + }, + { + "type": "snippet", + "category": "", + "text": [ + { "text": "CHIMERA", "weight": 6 }, + { "text": "INSECT", "weight": 2 }, + { "text": "ALPHA", "weight": 1 }, + { "text": "URSINE", "weight": 2 }, + { "text": "CHIROPTERAN", "weight": 2 }, + { "text": "BIRD", "weight": 2 }, + { "text": "MEDICAL", "weight": 1 }, + { "text": "LUPINE", "weight": 2 }, + { "text": "RAT", "weight": 2 }, + { "text": "SLIME", "weight": 1 }, + { "text": "PLANT", "weight": 2 }, + { "text": "BATRACHIAN", "weight": 2 }, + { "text": "RAPTOR", "weight": 1 }, + { "text": "MOUSE", "weight": 2 }, + { "text": "CEPHALOPOD", "weight": 2 }, + { "text": "ELFA", "weight": 1 }, + { "text": "FISH", "weight": 2 }, + { "text": "HUMAN", "weight": 1 }, + { "text": "RABBIT", "weight": 2 }, + { "text": "GASTROPOD", "weight": 2 }, + { "text": "BEAST", "weight": 1 }, + { "text": "FELINE", "weight": 1 }, + { "text": "CATTLE", "weight": 1 }, + { "text": "LIZARD", "weight": 1 }, + { "text": "TROGLOBITE", "weight": 1 }, + { "text": "CRUSTACEAN", "weight": 1 } + ] + }, { "type": "SPELL", "id": "base_portal", diff --git a/data/json/monsters/nether.json b/data/json/monsters/nether.json index 93826b17f1f60..87c0e415dfb70 100644 --- a/data/json/monsters/nether.json +++ b/data/json/monsters/nether.json @@ -1428,7 +1428,7 @@ "families": [ "prof_wp_netherium_abomination" ], "weakpoint_sets": [ "wps_netherium_abomination" ], "harvest": "meatslug", - "special_attacks": [ [ "GENE_STING", 20 ] ], + "special_attacks": [ { "type": "spell", "spell_data": { "id": "spell_gene_sting", "min_level": 5 }, "cooldown": 160 } ], "flags": [ "SEES", "SMELLS", "HEARS", "HAS_MIND", "BASHES", "DESTROYS", "POISON", "VENOM", "NO_BREATHE", "DIGS" ], "armor": { "bash": 6, "electric": 3 } }, diff --git a/src/monattack.cpp b/src/monattack.cpp index 57c539ba8919d..85a1d0d14119c 100644 --- a/src/monattack.cpp +++ b/src/monattack.cpp @@ -2745,27 +2745,6 @@ bool mattack::dogthing( monster *z ) return false; } -bool mattack::gene_sting( monster *z ) -{ - const float range = 7.0f; - Creature *target = sting_get_target( z, range ); - if( target == nullptr || !( target->is_avatar() || target->is_npc() ) ) { - return false; - } - - z->mod_moves( -to_moves( 1_seconds ) * 1.5 ); - - damage_instance dam = damage_instance(); - dam.add_damage( damage_stab, 6, 10, 0.6, 1 ); - bool hit = sting_shoot( z, target, dam, range ); - if( hit ) { - //Add checks if previous NPC/player conditions are removed - dynamic_cast( target )->mutate(); - } - - return true; -} - bool mattack::para_sting( monster *z ) { const float range = 4.0f; diff --git a/src/monattack.h b/src/monattack.h index ed5cfe5211416..5c8926f693686 100644 --- a/src/monattack.h +++ b/src/monattack.h @@ -57,7 +57,6 @@ bool jackson( monster *z ); bool dance( monster *z ); bool dogthing( monster *z ); bool vortex( monster *z ); -bool gene_sting( monster *z ); bool para_sting( monster *z ); bool triffid_growth( monster *z ); bool stare( monster *z ); diff --git a/src/monstergenerator.cpp b/src/monstergenerator.cpp index 33d76471a0693..e293c9b0f97d5 100644 --- a/src/monstergenerator.cpp +++ b/src/monstergenerator.cpp @@ -628,7 +628,6 @@ void MonsterGenerator::init_attack() add_hardcoded_attack( "JACKSON", mattack::jackson ); add_hardcoded_attack( "DANCE", mattack::dance ); add_hardcoded_attack( "DOGTHING", mattack::dogthing ); - add_hardcoded_attack( "GENE_STING", mattack::gene_sting ); add_hardcoded_attack( "PARA_STING", mattack::para_sting ); add_hardcoded_attack( "TRIFFID_GROWTH", mattack::triffid_growth ); add_hardcoded_attack( "PHOTOGRAPH", mattack::photograph ); diff --git a/src/mutation.cpp b/src/mutation.cpp index fd3d3a3fdf4c1..1041a7a5dfe72 100644 --- a/src/mutation.cpp +++ b/src/mutation.cpp @@ -1317,7 +1317,7 @@ void Character::mutate_category( const mutation_category_id &cat, const bool use } add_msg_debug( debugmode::DF_MUTATION, "mutate_category: mutate_towards category %s", cat.c_str() ); - if( select_mutation || mutation_selector( valid, cat, use_vitamins ) ) { + if( select_mutation && mutation_selector( valid, cat, use_vitamins ) ) { // Stop if mutation properly handled by mutation selector return; }