Go to the documentation of this file.
57 FAIL_UNLESS(floor != NULL,
"can't find archetype battleground");
60 FAIL_UNLESS(floor != NULL,
"can't find archetype battleground");
70 victim->stats.maxhp = 5000;
83 for (test = 0; test < 100; test++) {
87 FAIL_UNLESS(
victim->inv == NULL,
"kobold shouldn't have an inventory after attacked");
119 Suite *s = suite_create(
"attack");
120 TCase *tc_core = tcase_create(
"Core");
125 suite_add_tcase(s, tc_core);
126 tcase_add_test(tc_core, test_hit_player);
127 tcase_add_test(tc_core, test_fix_object_confused);
135 SRunner *sr = srunner_create(s);
144 srunner_set_xml(sr, LOGDIR
"/unit/server/attack.xml");
145 srunner_set_log(sr, LOGDIR
"/unit/server/attack.out");
146 srunner_run_all(sr, CK_ENV);
147 nf = srunner_ntests_failed(sr);
149 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
#define FREE_OBJ_NO_DESTROY_CALLBACK
static END_TEST Suite * attack_suite(void)
mapstruct * get_empty_map(int sizex, int sizey)
#define QUERY_FLAG(xyz, p)
void confuse_living(object *op, object *hitter, int dam)
object * arch_present_in_ob(const archetype *at, const object *op)
void fix_object(object *op)
sstring add_string(const char *str)
void object_free(object *ob, int flags)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
object * create_archetype(const char *name)
archetype * find_archetype(const char *name)
void init(int argc, char **argv)
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
static void teardown(void)
START_TEST(test_hit_player)