OSDN Git Service

branch-mogami-TR をマージ。バージョンを1.3.0に上げた。
[hengband/hengband.git] / src / defines.h
index 8058341..6df4f31 100644 (file)
  */
 #define VERSION_NAME "Hengband"
 
-
-/*
- * Current version number of Angband: 2.8.1
- */
-#define VERSION_MAJOR   2
-#define VERSION_MINOR   8
-#define VERSION_PATCH   1
-
-#define SAVEFILE_VERSION 3
+/* Savefile version for Hengband 1.1.1 and later */
+#define H_VER_MAJOR 1
+#define H_VER_MINOR 3
+#define H_VER_PATCH 0
+#define H_VER_EXTRA 0
 
 /* Added for ZAngband */
 #define FAKE_VERSION   0
 #define FAKE_VER_MAJOR 11
-#define FAKE_VER_MINOR 0
-#define FAKE_VER_PATCH 14
+#define FAKE_VER_MINOR 3
+#define FAKE_VER_PATCH 0
 
 #define ANGBAND_2_8_1
 #define ZANGBAND
 #define VERSION_EXTRA   0
 
 
-#ifdef JP
- /*
-  * ÆüËܸìÈǤΥС¼¥¸¥ç¥ó
-  */
-#define JVERSION_MAJOR 0
-#define JVERSION_MINOR 9
-#define JVERSION_PATCH 4
-#define JVERSION_EXTRA 0
-
-#endif
 /*
  * Number of grids in each block (vertically)
  * Probably hard-coded to 11, see "generate.c"
 #define MAX_NLEN        160
 
 /*
+ * Special internal key
+ */
+#define SPECIAL_KEY_QUEST    255
+#define SPECIAL_KEY_BUILDING 254
+#define SPECIAL_KEY_STORE    253
+#define SPECIAL_KEY_QUIT     252
+
+/*
  * Store constants
  */
 #define STORE_INVEN_MAX 24              /* Max number of discrete objs in inven */
 #define CH_ARCANE       0x40
 #define CH_ENCHANT      0x80
 #define CH_DAEMON       0x100
-#define CH_HAJA         0x200
+#define CH_CRUSADE      0x200
 
 #define CH_MUSIC        0x10000
 #define CH_HISSATSU     0x20000
 #define REALM_ARCANE       7
 #define REALM_ENCHANT      8
 #define REALM_DAEMON       9
-#define REALM_HAJA         10
+#define REALM_CRUSADE      10
 #define MAX_MAGIC          10
-#define MIN_TECHNIC        15
+#define MIN_TECHNIC        16
 #define REALM_MUSIC        16
 #define REALM_HISSATSU     17
 #define MAX_REALM          17
 
-#define VALID_REALM        (MAX_REALM + MAX_MAGIC - MIN_TECHNIC)
-#define NUM_TECHNIC        (MAX_REALM - MIN_TECHNIC)
+#define VALID_REALM        (MAX_REALM + MAX_MAGIC - MIN_TECHNIC + 1)
+#define NUM_TECHNIC        (MAX_REALM - MIN_TECHNIC + 1)
 
 #define is_magic(A) ((A) < MAX_MAGIC + 1 ? TRUE : FALSE)
 #define tval2realm(A) ((A) - TV_LIFE_BOOK + 1)
-#define technic2magic(A)      (is_magic(A) ? (A) : (A) - MIN_TECHNIC + MAX_MAGIC)
-#define is_good_realm(REALM)   ((REALM) == REALM_LIFE || (REALM) == REALM_HAJA)
+#define technic2magic(A)      (is_magic(A) ? (A) : (A) - MIN_TECHNIC + 1 + MAX_MAGIC)
+#define is_good_realm(REALM)   ((REALM) == REALM_LIFE || (REALM) == REALM_CRUSADE)
 
 /*
  * Magic-books for the realms
 #define TV_ARCANE_BOOK  96
 #define TV_ENCHANT_BOOK 97
 #define TV_DAEMON_BOOK  98
-#define TV_HAJA_BOOK    99
+#define TV_CRUSADE_BOOK 99
 #define TV_MUSIC_BOOK   105
 #define TV_HISSATSU_BOOK 106
 #define TV_GOLD         127     /* Gold can only be picked up by players */
 #define CAVE_MASK (CAVE_FLOOR | CAVE_EXTRA | CAVE_INNER | CAVE_OUTER | CAVE_SOLID | CAVE_VAULT)
 
 /* Used only after cave generation */
-#define CAVE_UNSAFE     0x3000    /* Might have trap */
+#define CAVE_XXXX1      0x0200
+#define CAVE_XXXX2      0x0400
+#define CAVE_XXXX3      0x0800
+#define CAVE_IN_MIRROR  0x1000    /* mirror */
+#define CAVE_UNSAFE     0x2000    /* Might have trap */
 #define CAVE_IN_DETECT  0x4000    /* trap detected area (inner circle only) */
 
 
 #define PM_NO_KAGE        0x00000010
 #define PM_NO_PET         0x00000020
 #define PM_ALLOW_UNIQUE   0x00000040
+#define PM_IGNORE_TERRAIN 0x00000080
+#define PM_HASTE          0x00000100
 
 
 /*
 #define SUMMON_LOUSE                61
 #define SUMMON_GUARDIANS            62
 #define SUMMON_KNIGHTS              63
+#define SUMMON_EAGLES               64
 
 
 /*
 #define GF_STASIS_EVIL 115
 #define GF_WOUNDS      116
 
-#define MAX_GF                         116
+#define MAX_GF                         117
 
 /*
  * Some things which induce learning
  * powerful as actually granting resistance/immunity to the wearer.
  */
 
-#define TR1_STR                 0x00000001L     /* STR += "pval" */
-#define TR1_INT                 0x00000002L     /* INT += "pval" */
-#define TR1_WIS                 0x00000004L     /* WIS += "pval" */
-#define TR1_DEX                 0x00000008L     /* DEX += "pval" */
-#define TR1_CON                 0x00000010L     /* CON += "pval" */
-#define TR1_CHR                 0x00000020L     /* CHR += "pval" */
-#define TR1_MAGIC_MASTERY       0x00000040L     /* Later */
-#define TR1_FORCE_WEAPON        0x00000080L     /* Later */
-#define TR1_STEALTH             0x00000100L     /* Stealth += "pval" */
-#define TR1_SEARCH              0x00000200L     /* Search += "pval" */
-#define TR1_INFRA               0x00000400L     /* Infra += "pval" */
-#define TR1_TUNNEL              0x00000800L     /* Tunnel += "pval" */
-#define TR1_SPEED               0x00001000L     /* Speed += "pval" */
-#define TR1_BLOWS               0x00002000L     /* Blows += "pval" */
-#define TR1_CHAOTIC             0x00004000L
-#define TR1_VAMPIRIC            0x00008000L
-#define TR1_SLAY_ANIMAL         0x00010000L
-#define TR1_SLAY_EVIL           0x00020000L
-#define TR1_SLAY_UNDEAD         0x00040000L
-#define TR1_SLAY_DEMON          0x00080000L
-#define TR1_SLAY_ORC            0x00100000L
-#define TR1_SLAY_TROLL          0x00200000L
-#define TR1_SLAY_GIANT          0x00400000L
-#define TR1_SLAY_DRAGON         0x00800000L
-#define TR1_KILL_DRAGON         0x01000000L     /* Execute Dragon */
-#define TR1_VORPAL              0x02000000L     /* Later */
-#define TR1_IMPACT              0x04000000L     /* Cause Earthquakes */
-#define TR1_BRAND_POIS          0x08000000L
-#define TR1_BRAND_ACID          0x10000000L
-#define TR1_BRAND_ELEC          0x20000000L
-#define TR1_BRAND_FIRE          0x40000000L
-#define TR1_BRAND_COLD          0x80000000L
-
-#define TR2_SUST_STR            0x00000001L
-#define TR2_SUST_INT            0x00000002L
-#define TR2_SUST_WIS            0x00000004L
-#define TR2_SUST_DEX            0x00000008L
-#define TR2_SUST_CON            0x00000010L
-#define TR2_SUST_CHR            0x00000020L
-#define TR2_RIDING              0x00000040L     /* Later */
-#define TR2_XXX2                0x00000080L     /* Later */
-#define TR2_IM_ACID             0x00000100L
-#define TR2_IM_ELEC             0x00000200L
-#define TR2_IM_FIRE             0x00000400L
-#define TR2_IM_COLD             0x00000800L
-#define TR2_THROW               0x00001000L     /* Later */
-#define TR2_REFLECT             0x00002000L     /* Reflect 'bolts' */
-#define TR2_FREE_ACT            0x00004000L     /* Free Action */
-#define TR2_HOLD_LIFE           0x00008000L     /* Hold Life */
-#define TR2_RES_ACID            0x00010000L
-#define TR2_RES_ELEC            0x00020000L
-#define TR2_RES_FIRE            0x00040000L
-#define TR2_RES_COLD            0x00080000L
-#define TR2_RES_POIS            0x00100000L
-#define TR2_RES_FEAR            0x00200000L     /* Added for Zangband */
-#define TR2_RES_LITE            0x00400000L
-#define TR2_RES_DARK            0x00800000L
-#define TR2_RES_BLIND           0x01000000L
-#define TR2_RES_CONF            0x02000000L
-#define TR2_RES_SOUND           0x04000000L
-#define TR2_RES_SHARDS          0x08000000L
-#define TR2_RES_NETHER          0x10000000L
-#define TR2_RES_NEXUS           0x20000000L
-#define TR2_RES_CHAOS           0x40000000L
-#define TR2_RES_DISEN           0x80000000L
-
-
-#define TR3_SH_FIRE             0x00000001L     /* Immolation (Fire) */
-#define TR3_SH_ELEC             0x00000002L     /* Electric Sheath */
-#define TR3_SLAY_HUMAN          0x00000004L     /* Slay human */
-#define TR3_SH_COLD             0x00000008L     /* cold aura */
-#define TR3_NO_TELE             0x00000010L     /* Anti-teleportation */
-#define TR3_NO_MAGIC            0x00000020L     /* Anti-magic */
-#define TR3_DEC_MANA            0x00000040L     /* ??? */
-#define TR3_TY_CURSE            0x00000080L     /* The Ancient Curse */
-#define TR3_WARNING             0x00000100L     /* Warning */
-#define TR3_HIDE_TYPE           0x00000200L     /* Hide "pval" description */
-#define TR3_SHOW_MODS           0x00000400L     /* Always show Tohit/Todam */
-#define TR3_XXX1                0x00000800L     /* XXX1 */
-#define TR3_FEATHER             0x00001000L     /* Feather Falling */
-#define TR3_LITE                0x00002000L     /* Permanent Light */
-#define TR3_SEE_INVIS           0x00004000L     /* See Invisible */
-#define TR3_TELEPATHY           0x00008000L     /* Telepathy */
-#define TR3_SLOW_DIGEST         0x00010000L     /* Item slows down digestion */
-#define TR3_REGEN               0x00020000L     /* Item induces regeneration */
-#define TR3_XTRA_MIGHT          0x00040000L     /* Bows get extra multiplier */
-#define TR3_XTRA_SHOTS          0x00080000L     /* Bows get extra shots */
-#define TR3_IGNORE_ACID         0x00100000L     /* Item ignores Acid Damage */
-#define TR3_IGNORE_ELEC         0x00200000L     /* Item ignores Elec Damage */
-#define TR3_IGNORE_FIRE         0x00400000L     /* Item ignores Fire Damage */
-#define TR3_IGNORE_COLD         0x00800000L     /* Item ignores Cold Damage */
-#define TR3_ACTIVATE            0x01000000L     /* Item can be activated */
-#define TR3_DRAIN_EXP           0x02000000L     /* Item drains Experience */
-#define TR3_TELEPORT            0x04000000L     /* Item teleports player */
-#define TR3_AGGRAVATE           0x08000000L     /* Item aggravates monsters */
-#define TR3_BLESSED             0x10000000L     /* Item is Blessed */
+#define have_flag(ARRAY, INDEX) !!((ARRAY)[(INDEX)/32] & (1L << ((INDEX)%32)))
+#define add_flag(ARRAY, INDEX) ((ARRAY)[(INDEX)/32] |= (1L << ((INDEX)%32)))
+#define remove_flag(ARRAY, INDEX) ((ARRAY)[(INDEX)/32] &= ~(1L << ((INDEX)%32)))
+#define is_pval_flag(INDEX) ((TR_STR <= (INDEX) && (INDEX) <= TR_MAGIC_MASTERY) || (TR_STEALTH <= (INDEX) && (INDEX) <= TR_BLOWS))
+#define have_pval_flags(ARRAY) !!((ARRAY)[0] & (0x00003f7f))
+
+
+#define TR_STR                 0      /* STR += "pval" */
+#define TR_INT                 1      /* INT += "pval" */
+#define TR_WIS                 2      /* WIS += "pval" */
+#define TR_DEX                 3      /* DEX += "pval" */
+#define TR_CON                 4      /* CON += "pval" */
+#define TR_CHR                 5      /* CHR += "pval" */
+#define TR_MAGIC_MASTERY       6      /* Later */
+#define TR_FORCE_WEAPON        7      /* Later */
+#define TR_STEALTH             8      /* Stealth += "pval" */
+#define TR_SEARCH              9      /* Search += "pval" */
+#define TR_INFRA               10     /* Infra += "pval" */
+#define TR_TUNNEL              11     /* Tunnel += "pval" */
+#define TR_SPEED               12     /* Speed += "pval" */
+#define TR_BLOWS               13     /* Blows += "pval" */
+#define TR_CHAOTIC             14
+#define TR_VAMPIRIC            15
+#define TR_SLAY_ANIMAL         16
+#define TR_SLAY_EVIL           17
+#define TR_SLAY_UNDEAD         18
+#define TR_SLAY_DEMON          19
+#define TR_SLAY_ORC            20
+#define TR_SLAY_TROLL          21
+#define TR_SLAY_GIANT          22
+#define TR_SLAY_DRAGON         23
+#define TR_KILL_DRAGON         24     /* Execute Dragon */
+#define TR_VORPAL              25     /* Later */
+#define TR_IMPACT              26     /* Cause Earthquakes */
+#define TR_BRAND_POIS          27
+#define TR_BRAND_ACID          28
+#define TR_BRAND_ELEC          29
+#define TR_BRAND_FIRE          30
+#define TR_BRAND_COLD          31
+
+#define TR_SUST_STR            32
+#define TR_SUST_INT            33
+#define TR_SUST_WIS            34
+#define TR_SUST_DEX            35
+#define TR_SUST_CON            36
+#define TR_SUST_CHR            37
+#define TR_RIDING              38
+#define TR_XXX2                39     /* Later */
+#define TR_IM_ACID             40
+#define TR_IM_ELEC             41
+#define TR_IM_FIRE             42
+#define TR_IM_COLD             43
+#define TR_THROW               44     /* Later */
+#define TR_REFLECT             45     /* Reflect 'bolts' */
+#define TR_FREE_ACT            46     /* Free Action */
+#define TR_HOLD_LIFE           47     /* Hold Life */
+#define TR_RES_ACID            48
+#define TR_RES_ELEC            49
+#define TR_RES_FIRE            50
+#define TR_RES_COLD            51
+#define TR_RES_POIS            52
+#define TR_RES_FEAR            53     /* Added for Zangband */
+#define TR_RES_LITE            54
+#define TR_RES_DARK            55
+#define TR_RES_BLIND           56
+#define TR_RES_CONF            57
+#define TR_RES_SOUND           58
+#define TR_RES_SHARDS          59
+#define TR_RES_NETHER          60
+#define TR_RES_NEXUS           61
+#define TR_RES_CHAOS           62
+#define TR_RES_DISEN           63
+
+#define TR_SH_FIRE             64     /* Immolation (Fire) */
+#define TR_SH_ELEC             65     /* Electric Sheath */
+#define TR_SLAY_HUMAN          66     /* Slay human */
+#define TR_SH_COLD             67     /* cold aura */
+#define TR_NO_TELE             68     /* Anti-teleportation */
+#define TR_NO_MAGIC            69     /* Anti-magic */
+#define TR_DEC_MANA            70     /* ??? */
+#define TR_TY_CURSE            71     /* The Ancient Curse */
+#define TR_WARNING             72     /* Warning */
+#define TR_HIDE_TYPE           73     /* Hide "pval" description */
+#define TR_SHOW_MODS           74     /* Always show Tohit/Todam */
+#define TR_XXX1                75     /* XXX1 */
+#define TR_FEATHER             76     /* Feather Falling */
+#define TR_LITE                77     /* Permanent Light */
+#define TR_SEE_INVIS           78     /* See Invisible */
+#define TR_TELEPATHY           79     /* Telepathy */
+#define TR_SLOW_DIGEST         80     /* Item slows down digestion */
+#define TR_REGEN               81     /* Item induces regeneration */
+#define TR_XTRA_MIGHT          82     /* Bows get extra multiplier */
+#define TR_XTRA_SHOTS          83     /* Bows get extra shots */
+#define TR_IGNORE_ACID         84     /* Item ignores Acid Damage */
+#define TR_IGNORE_ELEC         85     /* Item ignores Elec Damage */
+#define TR_IGNORE_FIRE         86     /* Item ignores Fire Damage */
+#define TR_IGNORE_COLD         87     /* Item ignores Cold Damage */
+#define TR_ACTIVATE            88     /* Item can be activated */
+#define TR_DRAIN_EXP           89     /* Item drains Experience */
+#define TR_TELEPORT            90     /* Item teleports player */
+#define TR_AGGRAVATE           91     /* Item aggravates monsters */
+#define TR_BLESSED             92     /* Item is Blessed */
+#define TR_XXX3                93
+#define TR_XXX4                94
+#define TR_XXX5                95
+
+#define TR_KILL_ANIMAL         96
+#define TR_KILL_EVIL           97
+#define TR_KILL_UNDEAD         98
+#define TR_KILL_DEMON          99
+#define TR_KILL_ORC            100
+#define TR_KILL_TROLL          101
+#define TR_KILL_GIANT          102
+#define TR_KILL_HUMAN          103
+#define TR_ESP_ANIMAL          104
+#define TR_ESP_UNDEAD          105
+#define TR_ESP_DEMON           106
+#define TR_ESP_ORC             107
+#define TR_ESP_TROLL           108
+#define TR_ESP_GIANT           109
+#define TR_ESP_DRAGON          110
+#define TR_ESP_HUMAN           111
+#define TR_ESP_EVIL            112
+#define TR_ESP_GOOD            113
+#define TR_ESP_NONLIVING       114
+#define TR_ESP_UNIQUE          115
+#define TR_FULL_NAME           116
+
+#define TR_FLAG_MAX            117
+#define TR_FLAG_SIZE           4
 
 
 #define TRG_INSTA_ART           0x00000001L     /* Item must be an artifact */
 #define TRG_RANDOM_CURSE2       0x00008000L     /* Item is Random Cursed */
 
 
-/*
- * Hack -- flag set 1 -- mask for "pval-dependant" flags.
- * Note that all "pval" dependant flags must be in "flags1".
- */
-#define TR1_PVAL_MASK   \
-       (TR1_STR | TR1_INT | TR1_WIS | TR1_DEX | \
-     TR1_CON | TR1_CHR | \
-        TR1_MAGIC_MASTERY | TR1_STEALTH | TR1_SEARCH | TR1_INFRA | \
-        TR1_TUNNEL | TR1_SPEED | TR1_BLOWS)
-
-
 #define MAX_CURSE 17
 
 #define TRC_CURSED              0x00000001L
          (cave[Y][X].feat == FEAT_GRASS) || \
          (cave[Y][X].feat == FEAT_DIRT)) && \
          !(cave[Y][X].info & CAVE_TRAP) && \
+         !(cave[Y][X].info & CAVE_IN_MIRROR) && \
          (cave[Y][X].o_idx == 0))
 
 
@@ -4376,6 +4401,7 @@ extern int PlayerUID;
 #define NIKKI_GAMESTART   19
 #define NIKKI_WIZ_TELE    20
 #define NIKKI_NAMED_PET   21
+#define NIKKI_PAT_TELE    22
 
 #define MAX_MANE 16
 #define MAX_MONSPELLS 96
@@ -4525,11 +4551,14 @@ extern int PlayerUID;
 #define MON_ENERGY_VOR    359
 #define MON_JADE_MONK     370
 #define MON_HAGEN         383
+#define MON_MENELDOR      384
 #define MON_PHANTOM_B     385
+#define MON_GWAIHIR       410
 #define MON_ANGEL         417
 #define MON_ADAMANT_COINS 423
 #define MON_BARNEY        441
 #define MON_ARCHANGEL     456
+#define MON_THORONDOR     468
 #define MON_GHOST         477
 #define MON_NINJA         485
 #define MON_IVORY_MONK    492