Skip to content

Commit 61d09a9

Browse files
mqrausemqrause
andauthored
Fix boomer bile EOC and remove !shouldfail test (#82593)
* fix boomer bile EOC * remove !shouldfail test --------- Co-authored-by: mqrause <[email protected]>
1 parent 1511f5e commit 61d09a9

File tree

2 files changed

+1
-50
lines changed

2 files changed

+1
-50
lines changed

data/json/effects_on_condition/misc_effect_on_condition.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
"u_add_morale": "morale_bile",
305305
"bonus": { "math": [ "MORALE_MULTIPLIER" ] },
306306
"max_bonus": { "math": [ "MORALE_MULTIPLIER * 2" ] },
307-
"duration": { "global_val": "BILE_STINK_DURATION / 2" },
307+
"duration": { "math": [ "BILE_STINK_DURATION / 2" ] },
308308
"decay_start": { "math": [ "BILE_STINK_DURATION / 4" ] }
309309
}
310310
]

tests/projectile_test.cpp

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <algorithm>
2-
#include <functional>
31
#include <memory>
42
#include <set>
53
#include <string>
@@ -11,24 +9,20 @@
119
#include "coordinates.h"
1210
#include "creature_tracker.h"
1311
#include "damage.h"
14-
#include "debug.h"
1512
#include "dispersion.h"
1613
#include "item.h"
1714
#include "item_location.h"
1815
#include "itype.h"
1916
#include "map.h"
2017
#include "map_helpers.h"
21-
#include "mutation.h"
2218
#include "npc.h"
2319
#include "player_helpers.h"
2420
#include "pocket_type.h"
2521
#include "point.h"
26-
#include "profession.h"
2722
#include "projectile.h"
2823
#include "ret_val.h"
2924
#include "type_id.h"
3025
#include "value_ptr.h"
31-
#include "worldfactory.h"
3226

3327
static const efftype_id effect_bile_stink( "bile_stink" );
3428

@@ -37,10 +31,6 @@ static const itype_id itype_boomer_head( "boomer_head" );
3731
static const itype_id itype_hazmat_suit( "hazmat_suit" );
3832
static const itype_id itype_m1a( "m1a" );
3933

40-
static const mod_id MOD_INFORMATION_magiclysm( "magiclysm" );
41-
42-
static const profession_id profession_hobby_species_goblin( "hobby_species_goblin" );
43-
4434

4535
static tripoint_bub_ms projectile_end_point( const std::vector<tripoint_bub_ms> &range,
4636
const item &gun, int speed, int proj_range )
@@ -141,42 +131,3 @@ TEST_CASE( "liquid_projectiles_applies_effect", "[projectile_effect]" )
141131
CHECK( !dummy.has_effect( effect_bile_stink ) );
142132
}
143133
}
144-
145-
// we can't figure out why, but the goblin background causes a debugmsg when applying the effect, as it is applied with duration zero
146-
TEST_CASE( "liquid_projectiles_applies_effect_debugmsg", "[projectile_effect][!shouldfail]" )
147-
{
148-
const std::vector<mod_id> &loaded_mods = world_generator->active_world->active_mod_order;
149-
REQUIRE( std::find( loaded_mods.begin(), loaded_mods.end(),
150-
MOD_INFORMATION_magiclysm ) != loaded_mods.end() );
151-
152-
map &here = get_map();
153-
Character &player = get_player_character();
154-
npc &dummy = liquid_projectiles_setup( player );
155-
const item hazmat( itype_hazmat_suit );
156-
157-
for( const trait_and_var &trait : profession_hobby_species_goblin->get_locked_traits() ) {
158-
dummy.toggle_trait( trait.trait );
159-
}
160-
// must happen after because one of the traits gives an item
161-
dummy.clear_worn();
162-
163-
REQUIRE( dummy.top_items_loc().empty() );
164-
165-
//Fire on naked NPC and check that it got the effect
166-
SECTION( "Naked NPC gets the effect" ) {
167-
const std::string debug_msg = capture_debugmsg_during( [&]() {
168-
player.fire_gun( here, dummy.pos_bub(), 100, *player.get_wielded_item() );
169-
CHECK( dummy.has_effect( effect_bile_stink ) );
170-
} );
171-
CHECK( debug_msg.empty() );
172-
}
173-
174-
dummy.clear_effects();
175-
176-
//Fire on NPC with hazmat suit and check that it didn't get the effect
177-
SECTION( "Hazmat NPC doesn't get the effect" ) {
178-
dummy.wear_item( hazmat );
179-
player.fire_gun( here, dummy.pos_bub(), 100, *player.get_wielded_item() );
180-
CHECK( !dummy.has_effect( effect_bile_stink ) );
181-
}
182-
}

0 commit comments

Comments
 (0)