From 7be91dc009761d20953c2a4cb45a9b43f040dde1 Mon Sep 17 00:00:00 2001 From: Venera3 <72006894+Venera3@users.noreply.github.com> Date: Mon, 28 Dec 2020 15:01:24 +0100 Subject: [PATCH] Message, balance --- src/melee.cpp | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/melee.cpp b/src/melee.cpp index 51198932c259a..6a65810b7f7d5 100644 --- a/src/melee.cpp +++ b/src/melee.cpp @@ -646,26 +646,33 @@ void Character::melee_attack( Creature &t, bool allow_special, const matec_id &f ( cur_weapon && cur_weapon->is_null() && ( dealt_dam.type_damage( damage_type::CUT ) > 0 || dealt_dam.type_damage( damage_type::STAB ) > 0 ) ) ) { if( has_trait( trait_POISONOUS ) ) { - add_msg_if_player( m_good, _( "You poison %s!" ), t.disp_name() ); - if( x_in_y( 1, 5 ) ) { - t.add_effect( effect_stunned, 1_turns ); - } if( t.is_monster() ) { t.add_effect( effect_venom_player1, 1_minutes ); } else { t.add_effect( effect_venom_dmg, 10_minutes ); } - } else if( has_trait( trait_POISONOUS2 ) ) { - add_msg_if_player( m_good, _( "You inject your venom into %s!" ), - t.disp_name() ); - if( x_in_y( 1, 5 ) ) { - t.add_effect( effect_downed, 1_turns ); - } - if( t.is_monster() ) { - t.add_effect( effect_venom_player2, 1_minutes ); + if( t.is_immune_effect( effect_venom_player1 ) ) { + add_msg_if_player( m_bad, _( "The %s is not affected by your venom" ), t.disp_name() ); } else { - t.add_effect( effect_venom_dmg, 15_minutes ); - t.add_effect( effect_venom_weaken, 5_minutes ); + add_msg_if_player( m_good, _( "You poison %s!" ), t.disp_name() ); + if( x_in_y( 1, 10 ) ) { + t.add_effect( effect_stunned, 1_turns ); + } + } + } else if( has_trait( trait_POISONOUS2 ) ) { + } + if( t.is_monster() ) { + t.add_effect( effect_venom_player2, 1_minutes ); + } else { + t.add_effect( effect_venom_dmg, 15_minutes ); + t.add_effect( effect_venom_weaken, 5_minutes ); + } + if( t.is_immune_effect( effect_venom_player2 ) ) { + add_msg_if_player( m_bad, _( "The %s is not affected by your venom" ), t.disp_name() ) ; + } else { + add_msg_if_player( m_good, _( "You inject your venom into %s!" ), t.disp_name() ); + if( x_in_y( 1, 4 ) ) { + t.add_effect( effect_stunned, 1_turns ); } } }