Skip to content

Commit

Permalink
Merge pull request #79227 from PatrikLundell/bleed_test
Browse files Browse the repository at this point in the history
Ensure bleed test isn't failing due to clothing
  • Loading branch information
Maleclypse authored Jan 18, 2025
2 parents d21d5f2 + 327acb1 commit 87e7cfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/effect_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ TEST_CASE( "bleed_effect_attribution", "[effect][bleed][monster]" )
WHEN( "when player cuts npc" ) {

npc &test_npc = *spawn_npc( player.pos_bub().xy() + point::south_west, "thug" );
test_npc.clear_worn(); // Ensure the victim doesn't generate with too much protection.
REQUIRE( test_npc.get_hp() == test_npc.get_hp_max() );
THEN( "bleed effect gets attributed to player" ) {
test_npc.deal_damage( player.as_character(), body_part_torso, cut_damage );
Expand All @@ -669,6 +670,7 @@ TEST_CASE( "bleed_effect_attribution", "[effect][bleed][monster]" )
GIVEN( "two npcs" ) {
npc &npc_src = *spawn_npc( player.pos_bub().xy() + point::south, "bandit" );
npc &npc_dst = *spawn_npc( player.pos_bub().xy() + point::south_east, "thug" );
npc_dst.clear_worn(); // Ensure the victim doesn't generate with too much protection.
WHEN( "when npc_src cuts npc_dst" ) {
REQUIRE( npc_dst.get_hp() == npc_dst.get_hp_max() );
THEN( "bleed effect gets attributed to npc_src" ) {
Expand Down

0 comments on commit 87e7cfd

Please sign in to comment.