-#include "mspell/mspell-damage-calculator.h"
+#include "mspell/mspell-damage-calculator.h"
#include "game-option/birth-options.h"
#include "inventory/inventory-slot-types.h"
#include "monster-race/monster-race.h"
#include "monster/monster-status.h"
#include "player-info/equipment-info.h"
#include "system/floor-type-definition.h"
-#include "system/monster-race-definition.h"
-#include "system/monster-type-definition.h"
-#include "system/object-type-definition.h"
+#include "system/item-entity.h"
+#include "system/monster-entity.h"
+#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
dice_num = 10;
dice_side = 10;
break;
+ case MonsterAbilityType::BA_METEOR:
+ dam = 50 + rlev / 2;
+ dice_num = rlev * 5 / 2;
+ dice_side = 2;
+ break;
case MonsterAbilityType::DRAIN_MANA:
dam = rlev;
div = 1;
dice_num = 13;
dice_side = 14;
break;
+ case MonsterAbilityType::BO_METEOR:
+ dam = 30 + rlev * 2;
+ dice_num = 1;
+ dice_side = rlev;
+ break;
+ case MonsterAbilityType::BO_LITE:
+ dam = powerful ? 60 : 40;
+ dice_num = 1;
+ dice_side = powerful ? rlev * 4 : rlev * 2;
+ break;
case MonsterAbilityType::MISSILE:
dam = (rlev / 3);
dice_num = 2;
return -1;
case MonsterAbilityType::S_UNIQUE:
return -1;
+ case MonsterAbilityType::S_DEAD_UNIQUE:
+ return -1;
case MonsterAbilityType::MAX:
return -1;
}
* @param dd ダイス数への参照ポインタ
* @param ds ダイス面への参照ポインタ
*/
-void monspell_shoot_dice(monster_race *r_ptr, int *dd, int *ds)
+void monspell_shoot_dice(MonsterRaceInfo *r_ptr, int *dd, int *ds)
{
int p = -1; /* Position of SHOOT */
int n = 0; /* Number of blows */
const int max_blows = 4;
for (int m = 0; m < max_blows; m++) {
- if (r_ptr->blow[m].method != RaceBlowMethodType::NONE) {
+ if (r_ptr->blows[m].method != RaceBlowMethodType::NONE) {
n++;
} /* Count blows */
- if (r_ptr->blow[m].method == RaceBlowMethodType::SHOOT) {
+ if (r_ptr->blows[m].method == RaceBlowMethodType::SHOOT) {
p = m; /* Remember position */
break;
}
(*dd) = 0;
(*ds) = 0;
} else {
- (*dd) = r_ptr->blow[p].d_dice;
- (*ds) = r_ptr->blow[p].d_side;
+ (*dd) = r_ptr->blows[p].d_dice;
+ (*ds) = r_ptr->blows[p].d_side;
}
}
{
auto *floor_ptr = player_ptr->current_floor_ptr;
auto *m_ptr = &floor_ptr->m_list[m_idx];
- auto *r_ptr = &r_info[m_ptr->r_idx];
+ auto *r_ptr = &m_ptr->get_monrace();
DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
int hp = (TYPE == DAM_ROLL) ? m_ptr->hp : m_ptr->max_maxhp;
int shoot_dd, shoot_ds;
*/
int monspell_race_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MonsterRaceId r_idx, int TYPE)
{
- auto *r_ptr = &r_info[r_idx];
+ auto *r_ptr = &monraces_info[r_idx];
DEPTH rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
bool powerful = any_bits(r_ptr->flags2, RF2_POWERFUL);
int hp = r_ptr->hdice * (ironman_nightmare ? 2 : 1) * r_ptr->hside;
{
int hp = player_ptr->chp;
int shoot_dd = 1, shoot_ds = 1, shoot_base = 0;
- ObjectType *o_ptr = nullptr;
+ ItemEntity *o_ptr = nullptr;
if (has_melee_weapon(player_ptr, INVEN_MAIN_HAND)) {
o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND];