1
- #include < algorithm>
2
- #include < functional>
3
1
#include < memory>
4
2
#include < set>
5
3
#include < string>
11
9
#include " coordinates.h"
12
10
#include " creature_tracker.h"
13
11
#include " damage.h"
14
- #include " debug.h"
15
12
#include " dispersion.h"
16
13
#include " item.h"
17
14
#include " item_location.h"
18
15
#include " itype.h"
19
16
#include " map.h"
20
17
#include " map_helpers.h"
21
- #include " mutation.h"
22
18
#include " npc.h"
23
19
#include " player_helpers.h"
24
20
#include " pocket_type.h"
25
21
#include " point.h"
26
- #include " profession.h"
27
22
#include " projectile.h"
28
23
#include " ret_val.h"
29
24
#include " type_id.h"
30
25
#include " value_ptr.h"
31
- #include " worldfactory.h"
32
26
33
27
static const efftype_id effect_bile_stink ( " bile_stink" );
34
28
@@ -37,10 +31,6 @@ static const itype_id itype_boomer_head( "boomer_head" );
37
31
static const itype_id itype_hazmat_suit ( " hazmat_suit" );
38
32
static const itype_id itype_m1a ( " m1a" );
39
33
40
- static const mod_id MOD_INFORMATION_magiclysm ( " magiclysm" );
41
-
42
- static const profession_id profession_hobby_species_goblin ( " hobby_species_goblin" );
43
-
44
34
45
35
static tripoint_bub_ms projectile_end_point ( const std::vector<tripoint_bub_ms> &range,
46
36
const item &gun, int speed, int proj_range )
@@ -141,42 +131,3 @@ TEST_CASE( "liquid_projectiles_applies_effect", "[projectile_effect]" )
141
131
CHECK ( !dummy.has_effect ( effect_bile_stink ) );
142
132
}
143
133
}
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