(void)set_stun(target_ptr, target_ptr->stun + randint1(20));
}
- if (target_ptr->resist_shard) {
- ep_ptr->dam /= 2;
- } else if (!check_multishadow(target_ptr)) {
+ ep_ptr->dam = ep_ptr->dam * calc_rocket_damage_rate(target_ptr, CALC_RAND) / 100;
+
+ if (!target_ptr->resist_shard && !check_multishadow(target_ptr)) {
(void)set_cut(target_ptr, target_ptr->cut + (ep_ptr->dam / 2));
}
return per;
}
+PERCENTAGE calc_rocket_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode)
+{
+ (mode); // unused
+ PERCENTAGE per = 100;
+
+ if (creature_ptr->resist_shard) {
+ per /= 2;
+ }
+
+ return per;
+}
+
PERCENTAGE calc_nether_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
-#include "player/player-status.h"
+#pragma once
+
+#include "system/angband.h"
+#include "player/player-status.h"
typedef enum rate_calc_type_mode {
CALC_RAND = 0,
PERCENTAGE calc_nether_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_disenchant_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_nexus_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_rocket_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_holy_fire_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_hell_fire_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);