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

Create splash attacks and give them to Boomers #71964

Merged
merged 28 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a198c12
justbile
worm-girl Feb 25, 2024
3a1c308
monsters
worm-girl Feb 25, 2024
81d7f16
Update character_attire.cpp
worm-girl Feb 25, 2024
8d06945
fix
worm-girl Feb 25, 2024
bb4efca
string fix
worm-girl Feb 25, 2024
ad72131
Update character_attire.cpp
worm-girl Feb 25, 2024
002086f
uh oh, stinky
worm-girl Feb 25, 2024
18ec013
Update character_attire.cpp
worm-girl Feb 25, 2024
8caa96b
Update magic_spell_effect.cpp
worm-girl Feb 25, 2024
7831419
Update data/json/mutations/mutations.json
worm-girl Feb 25, 2024
70617fa
Update effects_eocs.json
worm-girl Feb 25, 2024
94fbc1b
Update data/json/effects_on_condition/effects_eocs.json
worm-girl Feb 25, 2024
cc37f49
Update character_attire.cpp
worm-girl Feb 25, 2024
1062419
Merge branch 'justbile' of https://github.com/fairyarmadillo/Cataclys…
worm-girl Feb 25, 2024
e01b226
huge boomers still glow for now
worm-girl Feb 25, 2024
62d6213
reduce bile explosion size
worm-girl Feb 25, 2024
6f63864
Update data/json/effects_on_condition/effects_eocs.json
worm-girl Feb 25, 2024
9bfb47e
Update zed_explosive.json
worm-girl Feb 25, 2024
d93fb98
add std::max failsafe in case of weird breathability values
worm-girl Feb 25, 2024
8018969
redundant parentheses
worm-girl Feb 26, 2024
07b41b7
static casts for clarity
worm-girl Feb 26, 2024
bff29ee
Update magic_spell_effect.cpp
worm-girl Feb 26, 2024
e6d2670
Update magic_spell_effect.cpp
worm-girl Feb 26, 2024
315c212
Merge branch 'master' into justbile
worm-girl Feb 28, 2024
6510c5c
Update data/json/monsters/zed_explosive.json
Maleclypse Feb 28, 2024
251f3f9
Merge branch 'master' into justbile
worm-girl Feb 28, 2024
3eea4d8
conflictsss
worm-girl Feb 28, 2024
06c78c0
more conflicts
worm-girl Feb 28, 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
25 changes: 22 additions & 3 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -2034,16 +2034,35 @@
"id": "boomered",
"name": [ "Boomered" ],
"desc": [ "Your vision is obscured by a disgusting splatter of bile." ],
"apply_message": "You're covered in bile!",
"apply_message": "Bile gets in your eyes!",
"rating": "bad",
"base_mods": { "per_mod": [ -3 ], "vomit_chance": [ 500 ] },
"resist_traits": [ "SAPROVORE", "SAPROPHAGE", "EATDEAD" ],
"base_mods": {
"per_mod": [ -3, -3 ],
"vomit_chance": [ 500, 0 ],
"health_chance": [ 1 ],
"health_min": [ -1 ],
"health_chance_bot": [ 300, 0 ]
},
"max_duration": "30 s",
"limb_score_mods": [
{ "limb_score": "vision", "modifier": 0.1 },
{ "limb_score": "night_vis", "modifier": 0.0 },
{ "limb_score": "reaction", "modifier": 0.2 }
],
"flags": [ "EFFECT_LIMB_SCORE_MOD" ]
"flags": [ "EFFECT_LIMB_SCORE_MOD", "BILE_AFFLICTED" ]
},
{
"type": "effect_type",
"id": "bile",
"name": [ "Bile Splashed" ],
"desc": [ "You're splattered with a greasy layer of liquified putrescence." ],
"apply_message": "You're covered in bile!",
"rating": "bad",
"resist_traits": [ "SAPROVORE", "SAPROPHAGE", "EATDEAD" ],
"base_mods": { "vomit_chance": [ 500, 0 ], "health_chance": [ 1 ], "health_min": [ -1 ], "health_chance_bot": [ 300, 0 ] },
"max_duration": "30 s",
"flags": [ "BILE_AFFLICTED" ]
},
{
"type": "effect_type",
Expand Down
35 changes: 35 additions & 0 deletions data/json/effects_on_condition/effects_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,40 @@
}
],
"false_effect": [ { "u_lose_morale": "morale_asocial_dissatisfied" } ]
},
{
"type": "effect_on_condition",
"id": "bile_in_eyes",
"recurrence": [ "1 seconds", "1 seconds" ],
"condition": {
"and": [
{ "u_has_effect": "bile", "bodypart": "eyes" },
{
"and": [
{ "not": { "u_has_trait": "COMPOUND_EYES" } },
{ "not": { "u_has_trait": "PER_SLIME_OK" } },
{ "not": { "u_has_bionics": "bio_armor_eyes" } }
]
}
]
},
"effect": [
{ "u_add_effect": "boomered", "target_part": "eyes", "duration": "9 seconds" },
{ "u_lose_effect": "bile", "target_part": "eyes" }
]
},
{
"type": "effect_on_condition",
"id": "bile_stink",
"recurrence": [ "1 seconds", "1 seconds" ],
"condition": { "and": [ { "u_has_flag": "BILE_AFFLICTED" }, { "not": { "u_has_trait": "BILE_STINK" } }, { "not": { "u_has_trait": "CHLOROMORPH" } } ] },
worm-girl marked this conversation as resolved.
Show resolved Hide resolved
"effect": [ { "u_add_trait": "BILE_STINK" } ]
},
{
"type": "effect_on_condition",
"id": "bile_unstink",
"recurrence": [ "3 minutes", "10 minutes" ],
"condition": { "not": { "u_has_flag": "BILE_AFFLICTED" } },
"effect": [ { "u_lose_trait": "BILE_STINK" } ]
}
]
5 changes: 5 additions & 0 deletions data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -2437,5 +2437,10 @@
"id": "HEARING_PROTECTION",
"type": "json_flag",
"//": "This character treats received sounds as half as loud for the purposes of determing hearing damage."
},
{
"id": "BILE_AFFLICTED",
"type": "json_flag",
"//": "The character is afflicted with boomer bile."
}
]
40 changes: 25 additions & 15 deletions data/json/monster_special_attacks/monster_deaths.json
Original file line number Diff line number Diff line change
Expand Up @@ -492,26 +492,36 @@
"max_aoe": 2
},
{
"id": "death_boomer",
"type": "SPELL",
"id": "death_boomer",
"name": { "str": "Boomer Death" },
"description": "Vomitous explosion.",
"valid_targets": [ "ground", "hostile", "ally", "self" ],
"flags": [ "NO_EXPLOSION_SFX", "LIQUID" ],
"description": "An explosion of disgusting corpse bile.",
"valid_targets": [ "hostile", "ground", "ally", "hostile" ],
"max_level": 10,
"flags": [ "SILENT", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX", "LIQUID", "MAKE_FILTHY", "DODGEABLE", "NON_MAGICAL" ],
"min_accuracy": 15,
"accuracy_increment": 15,
"max_accuracy": 150,
"max_dodge_training": 1,
"min_liquid_volume": 14,
"liquid_volume_increment": 14,
"max_liquid_volume": 140,
"min_aoe": 1,
"max_aoe": 2,
"aoe_increment": 1,
"max_level": 1,
"min_duration": 2400,
"max_duration": 2400,
"shape": "blast",
"aoe_increment": 0.6,
"max_aoe": 4,
"min_duration": 800,
"duration_increment": 800,
"max_duration": 3000,
"max_range": 0,
"effect": "attack",
"effect_str": "boomered",
"field_chance": 1,
"effect_str": "bile",
"shape": "blast",
"field_id": "fd_bile",
"max_field_intensity": 2,
"min_field_intensity": 2,
"affected_body_parts": [ "eyes" ],
"field_chance": 1.8,
"field_intensity_variance": 1,
"min_field_intensity": 1,
"field_intensity_increment": 0.2,
"max_field_intensity": 3,
"extra_effects": [ { "id": "death_explosion", "hit_self": true } ]
},
{
Expand Down
35 changes: 35 additions & 0 deletions data/json/monster_special_attacks/spells.json
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,41 @@
"min_damage": 9999,
"max_damage": 9999
},
{
"type": "SPELL",
"id": "bile_spew",
"name": { "str": "Bile Spew" },
"description": "Vomit a mouthful of corpse bile at your enemies.",
"valid_targets": [ "hostile", "ground", "ally" ],
"max_level": 10,
"flags": [ "SILENT", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX", "LIQUID", "MAKE_FILTHY", "DODGEABLE", "NON_MAGICAL" ],
"min_accuracy": 15,
"accuracy_increment": 15,
"max_accuracy": 150,
"max_dodge_training": 1,
"min_liquid_volume": 11,
"liquid_volume_increment": 11,
"max_liquid_volume": 110,
"min_aoe": 5,
"aoe_increment": 5,
"max_aoe": 50,
"base_casting_time": 75,
"min_range": 3,
"range_increment": 0.4,
"max_range": 7,
"min_duration": 800,
"duration_increment": 800,
"max_duration": 3000,
"effect": "attack",
"effect_str": "bile",
"shape": "cone",
"field_id": "fd_bile",
"field_chance": 1.9,
"field_intensity_variance": 1,
"min_field_intensity": 1,
"field_intensity_increment": 0.2,
"max_field_intensity": 3
},
{
"type": "SPELL",
"id": "mon_twisting_blade_attack",
Expand Down
48 changes: 41 additions & 7 deletions data/json/monsters/zed_explosive.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,24 @@
"vision_night": 3,
"harvest": "exempt",
"grab_strength": 25,
"special_attacks": [ [ "BOOMER", 20 ], { "id": "grab" }, { "id": "bite_humanoid" }, { "id": "scratch_humanoid" } ],
"special_attacks": [
{
"type": "spell",
"spell_data": { "id": "bile_spew", "min_level": 3 },
"monster_message": "The %s spews bile!",
"cooldown": 20,
"condition": { "and": [ { "not": { "u_is_underwater": "true" } }, { "not": { "npc_is_underwater": "true" } } ] }
},
{ "id": "grab" },
{ "id": "bite_humanoid" },
{ "id": "scratch_humanoid" }
],
"death_function": {
"effect": { "id": "death_boomer", "hit_self": true, "min_level": 3 },
"message": "A %s explodes!",
"corpse_type": "NO_CORPSE"
},
"death_drops": "explode_zed",
"death_function": { "effect": { "id": "death_boomer", "hit_self": true }, "message": "The %s explodes!", "corpse_type": "NO_CORPSE" },
"upgrades": { "half_life": 42, "into_group": "GROUP_ZOMBIE_BOOMER_UPGRADE" },
"fungalize_into": "mon_boomer_fungus",
"flags": [
Expand All @@ -52,7 +67,7 @@
"id": "mon_boomer_huge",
"type": "MONSTER",
"name": { "str": "huge boomer" },
"description": "This boomer, normally swollen and ready to burst, has strengthened and solidified. The bile dribbling from its mouth also appears to have changed…",
"description": "This boomer, normally swollen and ready to burst, has strengthened and solidified.",
"default_faction": "zombie",
"bodytype": "human",
"species": [ "ZOMBIE", "HUMAN" ],
Expand All @@ -77,10 +92,21 @@
"harvest": "zombie",
"fungalize_into": "mon_boomer_fungus",
"grab_strength": 30,
"special_attacks": [ [ "BOOMER_GLOW", 20 ], { "id": "grab" }, { "id": "bite_humanoid" }, { "id": "scratch_humanoid" } ],
"special_attacks": [
{
"type": "spell",
"spell_data": { "id": "bile_spew", "min_level": 5 },
"monster_message": "The %s spews bile!",
"cooldown": 20,
"condition": { "and": [ { "not": { "u_is_underwater": "true" } }, { "not": { "npc_is_underwater": "true" } } ] }
},
{ "id": "grab" },
{ "id": "bite_humanoid" },
{ "id": "scratch_humanoid" }
],
"death_drops": "explode_zed",
"death_function": {
"effect": { "id": "death_boomer_glow", "hit_self": true, "min_level": 1 },
"effect": { "id": "death_boomer", "hit_self": true, "min_level": 5 },
"message": "A %s explodes!",
"corpse_type": "NO_CORPSE"
},
Expand Down Expand Up @@ -300,7 +326,11 @@
}
],
"death_drops": "explode_zed",
"death_function": { "effect": { "id": "death_boomer", "hit_self": true }, "message": "The %s explodes!", "corpse_type": "NO_CORPSE" },
"death_function": {
"effect": { "id": "death_boomer", "hit_self": true, "min_level": 6 },
"message": "A %s explodes!",
"corpse_type": "NO_CORPSE"
},
"flags": [
"SEES",
"HEARS",
Expand Down Expand Up @@ -348,7 +378,11 @@
}
],
"death_drops": "explode_zed",
"death_function": { "effect": { "id": "death_boomer", "hit_self": true }, "message": "The %s explodes!", "corpse_type": "NO_CORPSE" },
"death_function": {
"effect": { "id": "death_boomer", "hit_self": true, "min_level": 4 },
"message": "A %s explodes!",
"corpse_type": "NO_CORPSE"
},
"flags": [ "SEES", "HEARS", "SMELLS", "STUMBLES", "WARM", "POISON", "NO_BREATHE", "REVIVES", "FILTHY" ],
"armor": { "bash": 10, "cut": 5, "bullet": 5, "electric": 2 }
}
Expand Down
13 changes: 13 additions & 0 deletions data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -9742,5 +9742,18 @@
"starting_trait": true,
"valid": false,
"no_cbm_on_bp": [ "torso", "head", "eyes", "mouth", "arm_l", "arm_r", "hand_l", "hand_r", "leg_l", "leg_r", "foot_l", "foot_r" ]
},
{
"type": "mutation",
"id": "BILE_STINK",
"name": { "str": "Bile Stink" },
"points": -2,
"visibility": 5,
"ugliness": 6,
"description": "You absolutely reek. The bile you were splashed with seems to be reacting with your body chemistry to produce a smell that's somehow even worse. If anything that hunts by scent is around, it's sure to notice you.",
"scent_intensity": 1600,
"prevented_by": [ "CHLOROMORPH" ],
"valid": false,
"purifiable": false
}
]
8 changes: 8 additions & 0 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10073,6 +10073,14 @@ void Character::on_worn_item_washed( const item &it )
}
}

void Character::on_worn_item_soiled( const item &it )
{
if( is_worn( it ) ) {
morale->on_worn_item_soiled( it );
}
}


void Character::on_item_wear( const item &it )
{
invalidate_inventory_validity_cache();
Expand Down
2 changes: 2 additions & 0 deletions src/character.h
Original file line number Diff line number Diff line change
Expand Up @@ -3116,6 +3116,8 @@ class Character : public Creature, public visitable
void enchantment_wear_change();
/** Called when an item is washed */
void on_worn_item_washed( const item &it );
/** Called when an item becomes filthy */
void on_worn_item_soiled( const item &it );
/** Called when an item is acquired (picked up, worn, or wielded) */
void on_item_acquire( const item &it );
/** Called when effect intensity has been changed */
Expand Down
Loading
Loading