OSDN Git Service

[Refactor] #37285 Separated monster-attach-lose.c/h from monster-attack-switcher.c
[hengband/hengband.git] / src / racial / racial-util.c
1 #include "racial/racial-util.h"
2 #include "io/input-key-requester.h"
3
4 rc_type *initialize_rc_type(player_type *creature_ptr, rc_type *rc_ptr)
5 {
6     rc_ptr->num = 0;
7     rc_ptr->command_code = 0;
8     rc_ptr->ask = TRUE;
9     rc_ptr->lvl = creature_ptr->lev;
10     rc_ptr->cast = FALSE;
11     rc_ptr->is_warrior = (creature_ptr->pclass == CLASS_WARRIOR || creature_ptr->pclass == CLASS_BERSERKER);
12     rc_ptr->menu_line = use_menu ? 1 : 0;
13     for (int i = 0; i < MAX_RACIAL_POWERS; i++) {
14         strcpy(rc_ptr->power_desc[i].racial_name, "");
15         rc_ptr->power_desc[i].number = 0;
16     }
17
18     return rc_ptr;
19 }