3 #include "market/bounty-type-definition.h"
4 #include "player-info/class-types.h"
5 #include "system/angband.h"
6 #include "util/flag-group.h"
7 #include "util/rng-xoshiro.h"
10 constexpr auto MAX_BOUNTY = 20;
15 enum class PlayerRaceType;
18 AngbandWorld() = default;
20 POSITION max_wild_x{}; /*!< Maximum size of the wilderness */
21 POSITION max_wild_y{}; /*!< Maximum size of the wilderness */
22 GAME_TURN game_turn{}; /*!< 画面表示上のゲーム時間基準となるターン / Current game turn */
23 GAME_TURN game_turn_limit{}; /*!< game_turnの最大値 / Limit of game_turn */
24 GAME_TURN dungeon_turn{}; /*!< NASTY生成の計算に関わる内部ターン値 / Game turn in dungeon */
25 GAME_TURN dungeon_turn_limit{}; /*!< dungeon_turnの最大値 / Limit of game_turn in dungeon */
26 GAME_TURN arena_start_turn{}; /*!< 闘技場賭博の開始ターン値 */
27 uint32_t start_time{};
28 uint16_t noscore{}; /* Cheating flags */
29 uint16_t total_winner{}; /* Total winner */
31 MONSTER_IDX timewalk_m_idx{}; /*!< 現在時間停止を行っているモンスターのID */
33 bounty_type bounties[MAX_BOUNTY]{};
34 MonsterRaceId today_mon{}; //!< 実際の日替わり賞金首
36 uint32_t play_time{}; /*!< 実プレイ時間 */
38 Xoshiro128StarStar rng; //!< Uniform random bit generator for <random>
40 uint32_t seed_flavor{}; /* Hack -- consistent object colors */
41 uint32_t seed_town{}; /* Hack -- consistent town layout */
43 bool is_loading_now{}; /*!< ロード処理中フラグ...ロード直後にcalc_bonus()時の徳変化、及びsanity_blast()による異常を抑止する */
45 byte h_ver_major{}; //!< 変愚蛮怒バージョン(メジャー番号) / Hengband version (major ver.)
46 byte h_ver_minor{}; //!< 変愚蛮怒バージョン(マイナー番号) / Hengband version (minor ver.)
47 byte h_ver_patch{}; //!< 変愚蛮怒バージョン(パッチ番号) / Hengband version (patch ver.)
48 byte h_ver_extra{}; //!< 変愚蛮怒バージョン(エクストラ番号) / Hengband version (extra ver.)
50 byte sf_extra{}; //!< セーブファイルエンコードキー(XOR)
52 uint32_t sf_system{}; //!< OS情報 / OS information
53 uint32_t sf_when{}; //!< 作成日時 / Created Date
54 uint16_t sf_lives{}; //!< このセーブファイルで何人プレイしたか / Number of past "lives" with this file
55 uint16_t sf_saves{}; //!< 現在のプレイで何回セーブしたか / Number of "saves" during this life
56 uint32_t sf_play_time{}; //!< このセーブファイルで遊んだ合計のプレイ時間
57 EnumClassFlagGroup<PlayerClassType> sf_winner{}; //!< このセーブファイルで*勝利*した職業
58 EnumClassFlagGroup<PlayerClassType> sf_retired{}; //!< このセーブファイルで引退した職業
60 bool character_generated{}; /* The character exists */
61 bool character_dungeon{}; /* The character has a dungeon */
62 bool character_loaded{}; /* The character was loaded from a savefile */
63 bool character_saved{}; /* The character was just saved to a savefile */
65 byte character_icky_depth{}; /* The game is in an icky full screen mode */
66 bool character_xtra{}; /* The game is in an icky startup mode */
68 bool creating_savefile{}; /* New savefile is currently created */
70 bool wizard{}; /* This world under wizard mode */
72 OBJECT_IDX max_o_idx = 1024; /*!< 1フロアに存在可能な最大アイテム数 */
73 MONSTER_IDX max_m_idx = 1024; /*!< 1フロアに存在可能な最大モンスター数 */
75 void set_arena(const bool new_status);
76 bool get_arena() const;
77 std::tuple<int, int, int> extract_date_time(PlayerRaceType start_race) const;
78 bool is_daytime() const;
79 void update_playtime();
80 void add_winner_class(PlayerClassType c);
81 void add_retired_class(PlayerClassType c);
82 bool is_winner_class(PlayerClassType c) const;
85 bool is_out_arena = false; // アリーナ外部にいる時だけtrue.
88 extern AngbandWorld *w_ptr;
90 bool is_retired_class(PlayerClassType c);