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

added status msg to oil splatter knockdown #47850

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,15 @@
"rating": "bad",
"show_in_info": true
},
{
"type": "effect_type",
"id": "downed_oil",
"name": [ "Slipped" ],
"desc": [ "You slip on the oil and are knocked to the ground. You have to get up before you can move." ],
"apply_message": "You slip and are knocked to the floor!",
"rating": "bad",
"show_in_info": true
},
{
"type": "effect_type",
"id": "assisted",
Expand Down
1 change: 1 addition & 0 deletions data/mods/Chibi_Ultica/mod_tileset.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
{ "id": [ "overlay_effect_deaf", "overlay_effect_earphones" ], "fg": 21 },
{ "id": "overlay_effect_docile", "fg": 24 },
{ "id": "overlay_effect_downed", "fg": 6 },
{ "id": "overlay_effect_downed_oil", "fg": 6 },
{ "id": "overlay_effect_drunk", "fg": 33 },
{ "id": [ "overlay_effect_evil", "overlay_effect_attention", "overlay_effect_teleglow" ], "fg": 3 },
{ "id": [ "overlay_effect_flu", "overlay_effect_Influenza" ], "fg": 17 },
Expand Down
1 change: 1 addition & 0 deletions gfx/BrownLikeBears/tile_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8842,6 +8842,7 @@
{ "id": "overlay_effect_cold", "fg": 2692 },
{ "id": "overlay_effect_deaf", "fg": 2693 },
{ "id": "overlay_effect_downed", "fg": 2694 },
{ "id": "overlay_effect_downed_oil", "fg": 2694 },
{ "id": "overlay_effect_frostbite", "fg": 2695 },
{ "id": "overlay_effect_fungus", "fg": 2696 },
{ "id": "overlay_effect_grabbed", "fg": 2697 },
Expand Down
1 change: 1 addition & 0 deletions gfx/ChibiUltica/tile_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2287,6 +2287,7 @@
{ "id": "overlay_effect_dazed", "fg": 1532 },
{ "id": [ "overlay_effect_deaf", "overlay_effect_earphones" ], "fg": 1533 },
{ "id": "overlay_effect_downed", "fg": 1534 },
{ "id": "overlay_effect_downed_oil", "fg": 1534 },
{ "id": "overlay_effect_drunk", "fg": 1535 },
{ "id": [ "overlay_effect_flu", "overlay_effect_Influenza" ], "fg": 1536 },
{ "id": [ "overlay_effect_foodpoison", "overlay_effect_nausea" ], "fg": 1537 },
Expand Down
1 change: 1 addition & 0 deletions gfx/MshockXotto+/tile_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8492,6 +8492,7 @@
{ "id": "overlay_effect_dazed", "fg": 4162 },
{ "id": [ "overlay_effect_deaf", "overlay_effect_earphones" ], "fg": 4163 },
{ "id": "overlay_effect_downed", "fg": 4164 },
{ "id": "overlay_effect_downed_oil", "fg": 4164 },
{ "id": "overlay_effect_drunk", "fg": 4165 },
{ "id": [ "overlay_effect_flu", "overlay_effect_Influenza" ], "fg": 4166 },
{ "id": [ "overlay_effect_foodpoison", "overlay_effect_nausea" ], "fg": 4167 },
Expand Down
1 change: 1 addition & 0 deletions gfx/UltimateCataclysm/tile_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,7 @@
{ "id": "overlay_effect_bleed", "fg": 1172 },
{ "id": "overlay_effect_deaf", "fg": 1174 },
{ "id": "overlay_effect_downed", "fg": 1175 },
{ "id": "overlay_effect_downed_oil", "fg": 1175 },
{ "id": "overlay_effect_grabbed", "fg": 1176 },
{ "id": "overlay_effect_winded", "fg": 1178 },
{ "id": "overlay_effect_hot", "fg": 1177 },
Expand Down
13 changes: 8 additions & 5 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ static const efftype_id effect_mute( "mute" );
static const efftype_id effect_disinfected( "disinfected" );
static const efftype_id effect_disrupted_sleep( "disrupted_sleep" );
static const efftype_id effect_downed( "downed" );
static const efftype_id effect_downed_oil( "downed_oil" );
static const efftype_id effect_drunk( "drunk" );
static const efftype_id effect_earphones( "earphones" );
static const efftype_id effect_flu( "flu" );
Expand Down Expand Up @@ -1549,6 +1550,7 @@ void Character::try_remove_downed()
add_msg_player_or_npc( m_good, _( "You stand up." ),
_( "<npcname> stands up." ) );
remove_effect( effect_downed );
remove_effect( effect_downed_oil );
}
}

Expand Down Expand Up @@ -1769,7 +1771,7 @@ void Character::try_remove_impeding_effect()

bool Character::move_effects( bool attacking )
{
if( has_effect( effect_downed ) ) {
if( has_effect( effect_downed ) || has_effect( effect_downed_oil ) ) {
try_remove_downed();
return false;
}
Expand Down Expand Up @@ -1821,7 +1823,7 @@ bool Character::move_effects( bool attacking )

void Character::wait_effects( bool attacking )
{
if( has_effect( effect_downed ) ) {
if( has_effect( effect_downed ) || has_effect( effect_downed_oil ) ) {
try_remove_downed();
return;
}
Expand Down Expand Up @@ -7455,7 +7457,7 @@ nc_color Character::symbol_color() const
{
nc_color basic = basic_symbol_color();

if( has_effect( effect_downed ) ) {
if( has_effect( effect_downed ) || has_effect( effect_downed_oil ) ) {
return hilite( basic );
} else if( has_effect( effect_grabbed ) ) {
return cyan_background( basic );
Expand Down Expand Up @@ -7540,7 +7542,7 @@ bool Character::is_elec_immune() const

bool Character::is_immune_effect( const efftype_id &eff ) const
{
if( eff == effect_downed ) {
if( eff == effect_downed || eff == effect_downed_oil ) {
return is_throw_immune() || ( has_trait( trait_LEG_TENT_BRACE ) && footwear_factor() == 0 );
} else if( eff == effect_onfire ) {
return is_immune_damage( damage_type::HEAT );
Expand Down Expand Up @@ -9995,7 +9997,8 @@ void Character::on_hit( Creature *source, bodypart_id bp_hit,
source->add_effect( effect_blind, 2_turns );
}
}
if( worn_with_flag( flag_REQUIRES_BALANCE ) && !has_effect( effect_downed ) ) {
if( worn_with_flag( flag_REQUIRES_BALANCE ) && !has_effect( effect_downed ) &&
!has_effect( effect_downed_oil ) ) {
int rolls = 4;
if( worn_with_flag( flag_ROLLER_ONE ) ) {
rolls += 2;
Expand Down
2 changes: 2 additions & 0 deletions src/effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static const efftype_id effect_beartrap( "beartrap" );
static const efftype_id effect_crushed( "crushed" );
static const efftype_id effect_disinfected( "disinfected" );
static const efftype_id effect_downed( "downed" );
static const efftype_id effect_downed_oil( "downed_oil" );
static const efftype_id effect_grabbed( "grabbed" );
static const efftype_id effect_heavysnare( "heavysnare" );
static const efftype_id effect_in_pit( "in_pit" );
Expand Down Expand Up @@ -1244,6 +1245,7 @@ static const std::unordered_set<efftype_id> hardcoded_movement_impairing = {{
effect_beartrap,
effect_crushed,
effect_downed,
effect_downed_oil,
effect_grabbed,
effect_heavysnare,
effect_in_pit,
Expand Down
3 changes: 2 additions & 1 deletion src/map_field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static const efftype_id effect_badpoison( "badpoison" );
static const efftype_id effect_blind( "blind" );
static const efftype_id effect_corroding( "corroding" );
static const efftype_id effect_downed( "downed" );
static const efftype_id effect_downed_oil( "downed_oil" );
static const efftype_id effect_fungus( "fungus" );
static const efftype_id effect_onfire( "onfire" );
static const efftype_id effect_poison( "poison" );
Expand Down Expand Up @@ -1708,7 +1709,7 @@ void map::player_in_field( player &u )
}
if( ft == fd_mechanical_fluid ) {
if( !u.in_vehicle && x_in_y( cur.get_field_intensity(), 20 ) ) {
u.add_effect( effect_downed, 2_turns );
u.add_effect( effect_downed_oil, 2_turns );
}
}

Expand Down