Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONize yugg gene sting #74352

Merged
merged 25 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
23d1515
JSONize yugg gene sting
Maleclypse Jun 6, 2024
a32179b
Update data/json/monster_special_attacks/monster_gun.json
Maleclypse Jun 6, 2024
9c64493
Update generic_guns_validator.py
Maleclypse Jun 6, 2024
3373a62
Merge branch 'JSONIZE-Yugg-attack' of https://github.com/Maleclypse/C…
Maleclypse Jun 6, 2024
01e6612
Apply suggestions from code review
Maleclypse Jun 6, 2024
495114a
Apply suggestions from code review
Maleclypse Jun 6, 2024
608f94f
Update tools/json_tools/generic_guns_validator.py
Maleclypse Jun 6, 2024
543d2c2
Apply suggestions from code review
Maleclypse Jun 6, 2024
0475396
Update data/json/monster_special_attacks/spells.json
Maleclypse Jun 6, 2024
50466db
Update data/json/monsters/nether.json
Maleclypse Jun 6, 2024
d06248d
Apply suggestions from code review
Maleclypse Jun 6, 2024
48c5058
Update data/json/monster_special_attacks/spells.json
Maleclypse Jun 6, 2024
c94fbec
Update nether.json
Maleclypse Jun 7, 2024
5518106
Apply suggestions from code review
Maleclypse Jun 7, 2024
51a5f4b
Update data/json/monster_special_attacks/spells.json
Maleclypse Jun 7, 2024
535d6bb
fix
Maleclypse Jun 7, 2024
d8f38a3
Update data/json/monster_special_attacks/spells.json
Maleclypse Jun 7, 2024
76aec00
Update spells.json
Maleclypse Jun 8, 2024
e2a8d57
Merge branch 'JSONIZE-Yugg-attack' of https://github.com/Maleclypse/C…
Maleclypse Jun 8, 2024
59b002e
Update data/json/monster_special_attacks/spells.json
Maleclypse Jun 12, 2024
d034527
Apply suggestions from code review
Maleclypse Jun 12, 2024
c09e319
Update data/json/monster_special_attacks/spells.json
Maleclypse Jun 12, 2024
753546d
Update data/json/monster_special_attacks/spells.json
GuardianDll Jun 13, 2024
4837839
Update spells.json
Maleclypse Jun 15, 2024
4f3d7c5
Stop Mutation Selector from firing
Maleclypse Jun 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions data/json/monster_special_attacks/spells.json
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,85 @@
"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",
"min_damage": 1,
"max_damage": 1,
"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_sting_selector",
"shape": "blast",
"max_level": 1
},
{
"type": "effect_on_condition",
"id": "EOC_random_mutate",
"condition": "u_is_character",
"effect": [ { "u_mutate": "random_category", "snippet": true, "use_vitamins": false } ]
Maleclypse marked this conversation as resolved.
Show resolved Hide resolved
},
{
"type": "snippet",
Maleclypse marked this conversation as resolved.
Show resolved Hide resolved
"id": "random_category",
Maleclypse marked this conversation as resolved.
Show resolved Hide resolved


}
{
"type": "effect_on_condition",
"id": "EOC_sting_selector",
"condition": "u_is_character",
"effect": [
{ "u_message": "The Yugg's barb injects you with something!", "type": "bad" },
{ "u_message": "Mutation rips through your body changing you in improbable ways!", "type": "bad" },
{
"weighted_list_eocs": [
[ { "id": "sting_chimera", "effect": { "u_mutate_category": "CHIMERA", "use_vitamins": false } }, 6 ],
[ { "id": "sting_insect", "effect": { "u_mutate_category": "INSECT", "use_vitamins": false } }, 2 ],
[ { "id": "sting_alpha", "effect": { "u_mutate_category": "ALPHA", "use_vitamins": false } }, 1 ],
[ { "id": "sting_ursine", "effect": { "u_mutate_category": "URSINE", "use_vitamins": false } }, 2 ],
[ { "id": "sting_chiropteran", "effect": { "u_mutate_category": "CHIROPTERAN", "use_vitamins": false } }, 2 ],
[ { "id": "sting_bird", "effect": { "u_mutate_category": "BIRD", "use_vitamins": false } }, 2 ],
[ { "id": "sting_medical", "effect": { "u_mutate_category": "MEDICAL", "use_vitamins": false } }, 1 ],
[ { "id": "sting_lupine", "effect": { "u_mutate_category": "LUPINE", "use_vitamins": false } }, 2 ],
[ { "id": "sting_rat", "effect": { "u_mutate_category": "RAT", "use_vitamins": false } }, 2 ],
[ { "id": "sting_slime", "effect": { "u_mutate_category": "SLIME", "use_vitamins": false } }, 1 ],
[ { "id": "sting_plant", "effect": { "u_mutate_category": "PLANT", "use_vitamins": false } }, 2 ],
[ { "id": "sting_batrachian", "effect": { "u_mutate_category": "BATRACHIAN", "use_vitamins": false } }, 2 ],
[ { "id": "sting_raptor", "effect": { "u_mutate_category": "RAPTOR", "use_vitamins": false } }, 1 ],
[ { "id": "sting_mouse", "effect": { "u_mutate_category": "MOUSE", "use_vitamins": false } }, 2 ],
[ { "id": "sting_cephalopod", "effect": { "u_mutate_category": "CEPHALOPOD", "use_vitamins": false } }, 2 ],
[ { "id": "sting_elfa", "effect": { "u_mutate_category": "ELFA", "use_vitamins": false } }, 1 ],
[ { "id": "sting_fish", "effect": { "u_mutate_category": "FISH", "use_vitamins": false } }, 2 ],
[ { "id": "sting_human", "effect": { "u_mutate_category": "HUMAN", "use_vitamins": false } }, 1 ],
[ { "id": "sting_rabbit", "effect": { "u_mutate_category": "RABBIT", "use_vitamins": false } }, 2 ],
[ { "id": "sting_gastropod", "effect": { "u_mutate_category": "GASTROPOD", "use_vitamins": false } }, 2 ],
[ { "id": "sting_beast", "effect": { "u_mutate_category": "BEAST", "use_vitamins": false } }, 2 ],
[ { "id": "sting_feline", "effect": { "u_mutate_category": "FELINE", "use_vitamins": false } }, 2 ],
[ { "id": "sting_cattle", "effect": { "u_mutate_category": "CATTLE", "use_vitamins": false } }, 2 ],
[ { "id": "sting_lizard", "effect": { "u_mutate_category": "LIZARD", "use_vitamins": false } }, 2 ],
[ { "id": "sting_troglobite", "effect": { "u_mutate_category": "TROGLOBITE", "use_vitamins": false } }, 2 ],
[ { "id": "sting_crustacean", "effect": { "u_mutate_category": "CRUSTACEAN", "use_vitamins": false } }, 2 ]
]
}
]
},
{
"type": "SPELL",
"id": "base_portal",
Expand Down
2 changes: 1 addition & 1 deletion data/json/monsters/nether.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
},
Expand Down
21 changes: 0 additions & 21 deletions src/monattack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>( 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<Character *>( target )->mutate();
}

return true;
}

bool mattack::para_sting( monster *z )
{
const float range = 4.0f;
Expand Down
1 change: 0 additions & 1 deletion src/monattack.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
1 change: 0 additions & 1 deletion src/monstergenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
Loading