<ClCompile Include="..\..\src\player-info\resistance-info.c" />\r
<ClCompile Include="..\..\src\player-info\self-info-util.c" />\r
<ClCompile Include="..\..\src\player-info\weapon-effect-info.c" />\r
+ <ClCompile Include="..\..\src\player\player-status-resist.c" />\r
<ClCompile Include="..\..\src\room\vault-builder.c" />\r
<ClCompile Include="..\..\src\specific-object\blade-turner.c" />\r
<ClCompile Include="..\..\src\specific-object\monster-ball.c" />\r
<ClInclude Include="..\..\src\player-info\resistance-info.h" />\r
<ClInclude Include="..\..\src\player-info\self-info-util.h" />\r
<ClInclude Include="..\..\src\player-info\weapon-effect-info.h" />\r
+ <ClInclude Include="..\..\src\player\player-status-resist.h" />\r
<ClInclude Include="..\..\src\room\vault-builder.h" />\r
<ClInclude Include="..\..\src\specific-object\blade-turner.h" />\r
<ClInclude Include="..\..\src\specific-object\monster-ball.h" />\r
<ClCompile Include="..\..\src\monster-floor\special-death-switcher.c">
<Filter>monster-floor</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\player\player-status-resist.c">
+ <Filter>player</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\combat\shoot.h">
<ClInclude Include="..\..\src\spell\summon-types.h">
<Filter>spell</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\player\player-status-resist.h">
+ <Filter>player</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
player/player-status.c player/player-status.h \
player/player-status-flags.c player/player-status-flags.h \
player/player-status-table.c player/player-status-table.h \
+ player/player-status-resist.c player/player-status-resist.h \
player/player-personalities-types.h \
player/player-sex.c player/player-sex.h \
player/player-view.c player/player-view.h \
#include "player/player-race-types.h"
#include "player/player-race.h"
#include "player/player-status-flags.h"
+#include "player/player-status-resist.h"
#include "spell-kind/spells-equipment.h"
#include "spell-kind/spells-teleport.h"
#include "spell/spells-status.h"
#include "player/player-race-types.h"
#include "player/special-defense-types.h"
#include "player/player-status-flags.h"
+#include "player/player-status-resist.h"
#include "spell/spell-types.h"
#include "status/element-resistance.h"
#include "system/floor-type-definition.h"
#include "player/race-info-table.h"
#include "player/special-defense-types.h"
#include "player/player-status-flags.h"
+#include "player/player-status-resist.h"
#include "racial/racial-android.h"
#include "save/save.h"
#include "status/base-status.h"
return result;
}
-PERCENTAGE calc_vuln_acid_rate(player_type *creature_ptr)
-{
- PERCENTAGE per = 100;
- int i;
- BIT_FLAGS flgs = is_vuln_acid(creature_ptr);
- for (i = 0; i < FLAG_CAUSE_MAX; i++) {
- if (flgs & (0x01 << i)) {
- if (i == FLAG_CAUSE_MUTATION) {
- per *= 2;
- } else {
- per += per / 3;
- }
- }
- }
- return per;
-}
-
BIT_FLAGS is_resist_elec(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-PERCENTAGE calc_vuln_elec_rate(player_type *creature_ptr)
-{
- PERCENTAGE per = 100;
- int i;
- BIT_FLAGS flgs = is_vuln_elec(creature_ptr);
- for (i = 0; i < FLAG_CAUSE_MAX; i++) {
- if (flgs & (0x01 << i)) {
- if (i == FLAG_CAUSE_MUTATION) {
- per *= 2;
- } else {
- per += per / 3;
- }
- }
- }
- return per;
-}
-
BIT_FLAGS is_resist_fire(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-PERCENTAGE calc_vuln_fire_rate(player_type *creature_ptr)
-{
- PERCENTAGE per = 100;
- int i;
- BIT_FLAGS flgs = is_vuln_fire(creature_ptr);
- for (i = 0; i < FLAG_CAUSE_MAX; i++) {
- if (flgs & (0x01 << i)) {
- if (i == FLAG_CAUSE_MUTATION) {
- per *= 2;
- } else {
- per += per / 3;
- }
- }
- }
- return per;
-}
-
BIT_FLAGS is_resist_cold(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-PERCENTAGE calc_vuln_cold_rate(player_type *creature_ptr)
-{
- PERCENTAGE per = 100;
- int i;
- BIT_FLAGS flgs = is_vuln_cold(creature_ptr);
- for (i = 0; i < FLAG_CAUSE_MAX; i++) {
- if (flgs & (0x01 << i)) {
- if (i == FLAG_CAUSE_MUTATION) {
- per *= 2;
- } else {
- per += per / 3;
- }
- }
- }
- return per;
-}
-
BIT_FLAGS is_resist_pois(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-PERCENTAGE calc_vuln_lite_rate(player_type *creature_ptr)
-{
- PERCENTAGE per = 100;
- if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || (creature_ptr->mimic_form == MIMIC_VAMPIRE)) {
- per *= 2;
- } else if (is_specific_player_race(creature_ptr, RACE_S_FAIRY)) {
- per = per * 4 / 3;
- }
-
- if (creature_ptr->wraith_form)
- per *= 2;
-
- return per;
-}
-
BIT_FLAGS is_resist_dark(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
void has_extra_blow(player_type *creature_ptr);
BIT_FLAGS is_resist_acid(player_type *creature_ptr);
BIT_FLAGS is_vuln_acid(player_type *creature_ptr);
-PERCENTAGE calc_vuln_acid_rate(player_type *creature_ptr);
BIT_FLAGS is_resist_elec(player_type *creature_ptr);
BIT_FLAGS is_vuln_elec(player_type *creature_ptr);
-PERCENTAGE calc_vuln_elec_rate(player_type *creature_ptr);
BIT_FLAGS is_resist_fire(player_type *creature_ptr);
BIT_FLAGS is_vuln_fire(player_type *creature_ptr);
-PERCENTAGE calc_vuln_fire_rate(player_type *creature_ptr);
BIT_FLAGS is_resist_cold(player_type *creature_ptr);
BIT_FLAGS is_vuln_cold(player_type *creature_ptr);
-PERCENTAGE calc_vuln_cold_rate(player_type *creature_ptr);
BIT_FLAGS is_resist_pois(player_type *creature_ptr);
BIT_FLAGS is_resist_conf(player_type *creature_ptr);
BIT_FLAGS is_resist_sound(player_type *creature_ptr);
BIT_FLAGS is_resist_lite(player_type *creature_ptr);
BIT_FLAGS is_vuln_lite(player_type *creature_ptr);
-PERCENTAGE calc_vuln_lite_rate(player_type *creature_ptr);
BIT_FLAGS is_resist_dark(player_type *creature_ptr);
BIT_FLAGS is_resist_chaos(player_type *creature_ptr);
BIT_FLAGS is_resist_disen(player_type *creature_ptr);
--- /dev/null
+#include "player/player-status-flags.h"
+#include "art-definition/art-sword-types.h"
+#include "grid/grid.h"
+#include "inventory/inventory-slot-types.h"
+#include "monster-race/monster-race.h"
+#include "monster-race/race-flags2.h"
+#include "monster-race/race-flags7.h"
+#include "mutation/mutation-flag-types.h"
+#include "object-enchant/object-ego.h"
+#include "object-enchant/tr-types.h"
+#include "object-enchant/trc-types.h"
+#include "object-hook/hook-checker.h"
+#include "object-hook/hook-weapon.h"
+#include "object/object-flags.h"
+#include "player/player-class.h"
+#include "player/player-race-types.h"
+#include "player/player-race.h"
+#include "player/player-skill.h"
+#include "player/player-status.h"
+#include "player/special-defense-types.h"
+#include "realm/realm-hex-numbers.h"
+#include "realm/realm-song-numbers.h"
+#include "realm/realm-types.h"
+#include "spell-realm/spells-hex.h"
+#include "sv-definition/sv-weapon-types.h"
+#include "system/floor-type-definition.h"
+#include "system/monster-type-definition.h"
+#include "system/object-type-definition.h"
+#include "util/bit-flags-calculator.h"
+#include "util/quarks.h"
+#include "util/string-processor.h"
+
+PERCENTAGE calc_vuln_acid_rate(player_type *creature_ptr)
+{
+ PERCENTAGE per = 100;
+ int i;
+ BIT_FLAGS flgs = is_vuln_acid(creature_ptr);
+ for (i = 0; i < FLAG_CAUSE_MAX; i++) {
+ if (flgs & (0x01 << i)) {
+ if (i == FLAG_CAUSE_MUTATION) {
+ per *= 2;
+ } else {
+ per += per / 3;
+ }
+ }
+ }
+ return per;
+}
+
+PERCENTAGE calc_vuln_elec_rate(player_type *creature_ptr)
+{
+ PERCENTAGE per = 100;
+ int i;
+ BIT_FLAGS flgs = is_vuln_elec(creature_ptr);
+ for (i = 0; i < FLAG_CAUSE_MAX; i++) {
+ if (flgs & (0x01 << i)) {
+ if (i == FLAG_CAUSE_MUTATION) {
+ per *= 2;
+ } else {
+ per += per / 3;
+ }
+ }
+ }
+ return per;
+}
+
+PERCENTAGE calc_vuln_fire_rate(player_type *creature_ptr)
+{
+ PERCENTAGE per = 100;
+ int i;
+ BIT_FLAGS flgs = is_vuln_fire(creature_ptr);
+ for (i = 0; i < FLAG_CAUSE_MAX; i++) {
+ if (flgs & (0x01 << i)) {
+ if (i == FLAG_CAUSE_MUTATION) {
+ per *= 2;
+ } else {
+ per += per / 3;
+ }
+ }
+ }
+ return per;
+}
+
+PERCENTAGE calc_vuln_cold_rate(player_type *creature_ptr)
+{
+ PERCENTAGE per = 100;
+ int i;
+ BIT_FLAGS flgs = is_vuln_cold(creature_ptr);
+ for (i = 0; i < FLAG_CAUSE_MAX; i++) {
+ if (flgs & (0x01 << i)) {
+ if (i == FLAG_CAUSE_MUTATION) {
+ per *= 2;
+ } else {
+ per += per / 3;
+ }
+ }
+ }
+ return per;
+}
+
+PERCENTAGE calc_vuln_lite_rate(player_type *creature_ptr)
+{
+ PERCENTAGE per = 100;
+ if (is_specific_player_race(creature_ptr, RACE_VAMPIRE) || (creature_ptr->mimic_form == MIMIC_VAMPIRE)) {
+ per *= 2;
+ } else if (is_specific_player_race(creature_ptr, RACE_S_FAIRY)) {
+ per = per * 4 / 3;
+ }
+
+ if (creature_ptr->wraith_form)
+ per *= 2;
+
+ return per;
+}
--- /dev/null
+#include "player/player-status.h"
+
+PERCENTAGE calc_vuln_acid_rate(player_type *creature_ptr);
+PERCENTAGE calc_vuln_elec_rate(player_type *creature_ptr);
+PERCENTAGE calc_vuln_fire_rate(player_type *creature_ptr);
+PERCENTAGE calc_vuln_cold_rate(player_type *creature_ptr);
+PERCENTAGE calc_vuln_lite_rate(player_type *creature_ptr);