From 5bef40b21d3533cf0d851b35dab9d77e422944c2 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sun, 22 Aug 2021 10:16:03 -0700 Subject: Updated to 2021-08-22-0722 Remove no longer neccessary metal doors patch Remove now obsolete hunger patch Update restore infection immune patch to account for the removal of tetanus --- jc_restore-inf-immune.patch | 92 --------------------------------------------- 1 file changed, 92 deletions(-) (limited to 'jc_restore-inf-immune.patch') diff --git a/jc_restore-inf-immune.patch b/jc_restore-inf-immune.patch index 399702f..dd95626 100644 --- a/jc_restore-inf-immune.patch +++ b/jc_restore-inf-immune.patch @@ -1,95 +1,3 @@ ---- a/src/game.cpp -+++ b/src/game.cpp -@@ -224,6 +224,7 @@ - - static const trait_id trait_BADKNEES( "BADKNEES" ); - static const trait_id trait_ILLITERATE( "ILLITERATE" ); -+static const trait_id trait_INFIMMUNE( "INFIMMUNE" ); - static const trait_id trait_INFRESIST( "INFRESIST" ); - static const trait_id trait_LEG_TENT_BRACE( "LEG_TENT_BRACE" ); - static const trait_id trait_M_IMMUNE( "M_IMMUNE" ); -@@ -9443,8 +9444,11 @@ - body_part_name_accusative( bp->token ), - m.has_flag_ter( "SHARP", dest_loc ) ? m.tername( dest_loc ) : m.furnname( - dest_loc ) ); -- if( !u.has_trait( trait_INFRESIST ) ) { -- u.add_effect( effect_tetanus, 1_turns, num_bp ); -+ if( ( u.has_trait( trait_INFRESIST ) ) && ( one_in( 1024 ) ) ) { -+ u.add_effect( effect_tetanus, 1_turns, num_bp, true ); -+ } else if( ( !u.has_trait( trait_INFIMMUNE ) || !u.has_trait( trait_INFRESIST ) ) && -+ ( one_in( 256 ) ) ) { -+ u.add_effect( effect_tetanus, 1_turns, num_bp, true ); - } - } - } ---- a/src/trapfunc.cpp -+++ b/src/trapfunc.cpp -@@ -50,6 +50,7 @@ - static const efftype_id effect_slimed( "slimed" ); - static const efftype_id effect_tetanus( "tetanus" ); - -+static const trait_id trait_INFIMMUNE( "INFIMMUNE" ); - static const trait_id trait_INFRESIST( "INFRESIST" ); - static const trait_id trait_WINGS_BIRD( "WINGS_BIRD" ); - static const trait_id trait_WINGS_BUTTERFLY( "WINGS_BUTTERFLY" ); -@@ -161,8 +162,13 @@ - c->deal_damage( nullptr, hit, d ); - - player *n = dynamic_cast( c ); -- if( n != nullptr && !n->has_trait( trait_INFRESIST ) ) { -- n->add_effect( effect_tetanus, 1_turns, num_bp ); -+ if( n != nullptr ) { -+ if( ( n->has_trait( trait_INFRESIST ) ) && ( one_in( 512 ) ) ) { -+ n->add_effect( effect_tetanus, 1_turns, num_bp, true ); -+ } else if( ( !n->has_trait( trait_INFIMMUNE ) || !n->has_trait( trait_INFRESIST ) ) && -+ ( one_in( 128 ) ) ) { -+ n->add_effect( effect_tetanus, 1_turns, num_bp, true ); -+ } - } - c->check_dead_state(); - } else { -@@ -196,8 +202,11 @@ - } else { - c->deal_damage( nullptr, bodypart_id( "foot_l" ), damage_instance( DT_CUT, rng( 6, 10 ) ) ); - c->deal_damage( nullptr, bodypart_id( "foot_r" ), damage_instance( DT_CUT, rng( 6, 10 ) ) ); -- if( !n->has_trait( trait_INFRESIST ) ) { -- n->add_effect( effect_tetanus, 1_turns, num_bp ); -+ if( ( n->has_trait( trait_INFRESIST ) ) && ( one_in( 256 ) ) ) { -+ n->add_effect( effect_tetanus, 1_turns, num_bp, true ); -+ } else if( ( !n->has_trait( trait_INFIMMUNE ) || !n->has_trait( trait_INFRESIST ) ) && -+ ( one_in( 35 ) ) ) { -+ n->add_effect( effect_tetanus, 1_turns, num_bp, true ); - } - } - c->check_dead_state(); -@@ -855,8 +864,11 @@ - n->add_msg_if_player( m_bad, _( "The spikes impale your %s!" ), - body_part_name_accusative( hit->token ) ); - n->deal_damage( nullptr, hit, damage_instance( DT_CUT, damage ) ); -- if( !n->has_trait( trait_INFRESIST ) ) { -- n->add_effect( effect_tetanus, 1_turns, num_bp ); -+ if( ( n->has_trait( trait_INFRESIST ) ) && ( one_in( 256 ) ) ) { -+ n->add_effect( effect_tetanus, 1_turns, num_bp, true ); -+ } else if( ( !n->has_trait( trait_INFIMMUNE ) || !n->has_trait( trait_INFRESIST ) ) && -+ ( one_in( 35 ) ) ) { -+ n->add_effect( effect_tetanus, 1_turns, num_bp, true ); - } - } - } else if( z != nullptr ) { -@@ -939,8 +951,11 @@ - n->add_msg_if_player( m_bad, _( "The glass shards slash your %s!" ), - body_part_name_accusative( hit->token ) ); - n->deal_damage( nullptr, hit, damage_instance( DT_CUT, damage ) ); -- if( !n->has_trait( trait_INFRESIST ) ) { -- n->add_effect( effect_tetanus, 1_turns, num_bp ); -+ if( ( n->has_trait( trait_INFRESIST ) ) && ( one_in( 256 ) ) ) { -+ n->add_effect( effect_tetanus, 1_turns, num_bp, true ); -+ } else if( ( !n->has_trait( trait_INFIMMUNE ) || !n->has_trait( trait_INFRESIST ) ) && -+ ( one_in( 35 ) ) ) { -+ n->add_effect( effect_tetanus, 1_turns, num_bp, true ); - } - } - } else if( z != nullptr ) { --- a/src/player.cpp +++ b/src/player.cpp @@ -84,6 +84,7 @@ -- cgit v1.2.1