OSDN Git Service

[Refactor] #39970 Moved world.c/h to world/
[hengband/hengband.git] / src / artifact.c
index a2e11e2..134f31b 100644 (file)
@@ -20,7 +20,7 @@
 #include "floor.h"
 #include "cmd-activate.h"
 #include "object.h"
-#include "objectkind.h"
+#include "object/object-kind.h"
 #include "object-boost.h"
 #include "object-curse.h"
 #include "object-ego.h"
 #include "files.h"
 #include "grid.h"
 #include "monster.h"
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
 #include "player-class.h"
 #include "player-personality.h"
-#include "world.h"
+#include "world/world.h"
 
  /*
   * The artifact arrays
@@ -1545,7 +1545,7 @@ static void give_activation_power(object_type *o_ptr)
        }
 
        /* A type was chosen... */
-       o_ptr->xtra2 = (byte_hack)type;
+       o_ptr->xtra2 = (byte)type;
        add_flag(o_ptr->art_flags, TR_ACTIVATE);
        o_ptr->timeout = 0;
 }
@@ -1569,13 +1569,13 @@ static void get_random_name(object_type *o_ptr, char *return_name, bool armour,
                get_table_sindarin(return_name);
                return;
        }
-       
+
        if (prob <= TABLE_NAME)
        {
                get_table_name(return_name);
                return;
        }
-       
+
        concptr filename;
        switch (armour)
        {
@@ -1845,7 +1845,7 @@ bool become_random_artifact(player_type *player_ptr, object_type *o_ptr, bool a_
 
        if (((o_ptr->artifact_bias == BIAS_MAGE) || (o_ptr->artifact_bias == BIAS_INT)) && (o_ptr->tval == TV_GLOVES)) add_flag(o_ptr->art_flags, TR_FREE_ACT);
 
-       if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
+       if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_POISON_NEEDLE))
        {
                o_ptr->to_h = 0;
                o_ptr->to_d = 0;
@@ -1903,12 +1903,12 @@ bool become_random_artifact(player_type *player_ptr, object_type *o_ptr, bool a_
                object_known(o_ptr);
 
                /* Mark the item as fully known */
-               o_ptr->ident |= (IDENT_MENTAL);
+               o_ptr->ident |= (IDENT_FULL_KNOWN);
 
                /* For being treated as random artifact in screen_object() */
                o_ptr->art_name = quark_add("");
 
-               (void)screen_object(o_ptr, 0L);
+               (void)screen_object(player_ptr, o_ptr, 0L);
 
                if (!get_string(ask_msg, dummy_name, sizeof dummy_name)
                        || !dummy_name[0])
@@ -2233,17 +2233,17 @@ static bool has_extreme_damage_rate(object_type *o_ptr)
                {
                        return TRUE;
                }
-               
+
                if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 43))
                {
                        return TRUE;
                }
-               
+
                if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 33))
                {
                        return TRUE;
                }
-               
+
                if (calc_arm_avgdamage(o_ptr) > 63)
                {
                        return TRUE;
@@ -2256,17 +2256,17 @@ static bool has_extreme_damage_rate(object_type *o_ptr)
        {
                return TRUE;
        }
-       
+
        if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 52))
        {
                return TRUE;
        }
-       
+
        if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 40))
        {
                return TRUE;
        }
-       
+
        if (calc_arm_avgdamage(o_ptr) > 75)
        {
                return TRUE;
@@ -2289,19 +2289,19 @@ static bool weakening_artifact(object_type *o_ptr)
                add_flag(o_ptr->art_flags, TR_SLAY_EVIL);
                return TRUE;
        }
-       
+
        if (k_ptr->dd < o_ptr->dd)
        {
                o_ptr->dd--;
                return TRUE;
        }
-       
+
        if (k_ptr->ds < o_ptr->ds)
        {
                o_ptr->ds--;
                return TRUE;
        }
-       
+
        if (o_ptr->to_d > 10)
        {
                o_ptr->to_d = o_ptr->to_d - damroll(1, 6);