2 * @file blue-magic-util.cpp
3 * @brief 青魔法の構造体、初期化処理定義
6 #include "blue-magic/blue-magic-util.h"
7 #include "monster-floor/place-monster-types.h"
8 #include "system/player-type-definition.h"
10 bmc_type *initialize_blue_magic_type(
11 PlayerType *player_ptr, bmc_type *bmc_ptr, const bool success, get_pseudo_monstetr_level_pf get_pseudo_monstetr_level)
13 bmc_ptr->plev = (*get_pseudo_monstetr_level)(player_ptr);
14 bmc_ptr->summon_lev = player_ptr->lev * 2 / 3 + randint1(player_ptr->lev / 2);
16 bmc_ptr->pet = success; // read-only.
17 bmc_ptr->no_trump = false;
18 bmc_ptr->p_mode = bmc_ptr->pet ? PM_FORCE_PET : PM_NO_PET;
20 bmc_ptr->g_mode = bmc_ptr->pet ? 0 : PM_ALLOW_GROUP;
21 if (!success || (randint1(50 + bmc_ptr->plev) < bmc_ptr->plev / 10)) {
22 bmc_ptr->u_mode = PM_ALLOW_UNIQUE;