Changeset 849

Show
Ignore:
Timestamp:
04/28/08 18:45:39 (3 months ago)
Author:
takkaria
Message:

Move the monster spell flags into their own spell array. Patch by Kenneth Boyd. (Patch Message-ID: <47F2627D.7010300@zaimoni.com>)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/defines.h

    r823 r849  
    19311931/* 
    19321932 * number of 32-bit bitmaps used for monster race 
    1933  * actual RF flags are in raceflag.h 
    1934  */ 
    1935 #define RACE_FLAG_STRICT_UB 6 
    1936 #define RACE_FLAG_SPELL_START 3 
    1937 #define RACE_FLAG_SPELL_STRICT_UB (RACE_FLAG_STRICT_UB-RACE_FLAG_SPELL_START) 
     1933 */ 
     1934#define RACE_FLAG_STRICT_UB 3 
     1935#define RACE_FLAG_SPELL_STRICT_UB 3 
    19381936 
    19391937#define race_flags_differ(A,B) (0 != memcmp((A), (B), sizeof(u32b)*RACE_FLAG_STRICT_UB)) 
    19401938#define race_flags_assign(A,B) memmove((A), (B), sizeof(u32b)*RACE_FLAG_STRICT_UB) 
    1941 #define race_flags_assign_nonspell(A, B) memmove((A), (B), sizeof(u32b)*RACE_FLAG_SPELL_START) 
    19421939#define race_flags_assign_spell(A, B) memmove((A), (B), sizeof(u32b)*RACE_FLAG_SPELL_STRICT_UB) 
    19431940 
     
    20532050 * New monster race bit flags 
    20542051 */ 
    2055 #define RF3_SHRIEK          0x00000001 /* Shriek for help */ 
    2056 #define RF3_XXX2            0x00000002 /* (?) */ 
    2057 #define RF3_XXX3            0x00000004 /* (?) */ 
    2058 #define RF3_XXX4            0x00000008 /* (?) */ 
    2059 #define RF3_ARROW_1         0x00000010 /* Fire an arrow (light) */ 
    2060 #define RF3_ARROW_2         0x00000020 /* Fire an arrow (heavy) */ 
    2061 #define RF3_ARROW_3         0x00000040 /* Fire missiles (light) */ 
    2062 #define RF3_ARROW_4         0x00000080 /* Fire missiles (heavy) */ 
    2063 #define RF3_BR_ACID         0x00000100 /* Breathe Acid */ 
    2064 #define RF3_BR_ELEC         0x00000200 /* Breathe Elec */ 
    2065 #define RF3_BR_FIRE         0x00000400 /* Breathe Fire */ 
    2066 #define RF3_BR_COLD         0x00000800 /* Breathe Cold */ 
    2067 #define RF3_BR_POIS         0x00001000 /* Breathe Poison */ 
    2068 #define RF3_BR_NETH         0x00002000 /* Breathe Nether */ 
    2069 #define RF3_BR_LITE         0x00004000 /* Breathe Lite */ 
    2070 #define RF3_BR_DARK         0x00008000 /* Breathe Dark */ 
    2071 #define RF3_BR_CONF         0x00010000 /* Breathe Confusion */ 
    2072 #define RF3_BR_SOUN         0x00020000 /* Breathe Sound */ 
    2073 #define RF3_BR_CHAO         0x00040000 /* Breathe Chaos */ 
    2074 #define RF3_BR_DISE         0x00080000 /* Breathe Disenchant */ 
    2075 #define RF3_BR_NEXU         0x00100000 /* Breathe Nexus */ 
    2076 #define RF3_BR_TIME         0x00200000 /* Breathe Time */ 
    2077 #define RF3_BR_INER         0x00400000 /* Breathe Inertia */ 
    2078 #define RF3_BR_GRAV         0x00800000 /* Breathe Gravity */ 
    2079 #define RF3_BR_SHAR         0x01000000 /* Breathe Shards */ 
    2080 #define RF3_BR_PLAS         0x02000000 /* Breathe Plasma */ 
    2081 #define RF3_BR_WALL         0x04000000 /* Breathe Force */ 
    2082 #define RF3_BR_MANA         0x08000000 /* Breathe Mana */ 
    2083 #define RF3_XXX5            0x10000000 
    2084 #define RF3_XXX6            0x20000000 
    2085 #define RF3_XXX7            0x40000000 
    2086 #define RF3_BOULDER         0x80000000 /* Throw a boulder */ 
     2052#define RSF0_SHRIEK          0x00000001 /* Shriek for help */ 
     2053#define RSF0_XXX2            0x00000002 /* (?) */ 
     2054#define RSF0_XXX3            0x00000004 /* (?) */ 
     2055#define RSF0_XXX4            0x00000008 /* (?) */ 
     2056#define RSF0_ARROW_1         0x00000010 /* Fire an arrow (light) */ 
     2057#define RSF0_ARROW_2         0x00000020 /* Fire an arrow (heavy) */ 
     2058#define RSF0_ARROW_3         0x00000040 /* Fire missiles (light) */ 
     2059#define RSF0_ARROW_4         0x00000080 /* Fire missiles (heavy) */ 
     2060#define RSF0_BR_ACID         0x00000100 /* Breathe Acid */ 
     2061#define RSF0_BR_ELEC         0x00000200 /* Breathe Elec */ 
     2062#define RSF0_BR_FIRE         0x00000400 /* Breathe Fire */ 
     2063#define RSF0_BR_COLD         0x00000800 /* Breathe Cold */ 
     2064#define RSF0_BR_POIS         0x00001000 /* Breathe Poison */ 
     2065#define RSF0_BR_NETH         0x00002000 /* Breathe Nether */ 
     2066#define RSF0_BR_LITE         0x00004000 /* Breathe Lite */ 
     2067#define RSF0_BR_DARK         0x00008000 /* Breathe Dark */ 
     2068#define RSF0_BR_CONF         0x00010000 /* Breathe Confusion */ 
     2069#define RSF0_BR_SOUN         0x00020000 /* Breathe Sound */ 
     2070#define RSF0_BR_CHAO         0x00040000 /* Breathe Chaos */ 
     2071#define RSF0_BR_DISE         0x00080000 /* Breathe Disenchant */ 
     2072#define RSF0_BR_NEXU         0x00100000 /* Breathe Nexus */ 
     2073#define RSF0_BR_TIME         0x00200000 /* Breathe Time */ 
     2074#define RSF0_BR_INER         0x00400000 /* Breathe Inertia */ 
     2075#define RSF0_BR_GRAV         0x00800000 /* Breathe Gravity */ 
     2076#define RSF0_BR_SHAR         0x01000000 /* Breathe Shards */ 
     2077#define RSF0_BR_PLAS         0x02000000 /* Breathe Plasma */ 
     2078#define RSF0_BR_WALL         0x04000000 /* Breathe Force */ 
     2079#define RSF0_BR_MANA         0x08000000 /* Breathe Mana */ 
     2080#define RSF0_XXX5            0x10000000 
     2081#define RSF0_XXX6            0x20000000 
     2082#define RSF0_XXX7            0x40000000 
     2083#define RSF0_BOULDER         0x80000000 /* Throw a boulder */ 
    20872084 
    20882085/* 
    20892086 * New monster race bit flags 
    20902087 */ 
    2091 #define RF4_BA_ACID                   0x00000001      /* Acid Ball */ 
    2092 #define RF4_BA_ELEC                   0x00000002      /* Elec Ball */ 
    2093 #define RF4_BA_FIRE                   0x00000004      /* Fire Ball */ 
    2094 #define RF4_BA_COLD                   0x00000008      /* Cold Ball */ 
    2095 #define RF4_BA_POIS                   0x00000010      /* Poison Ball */ 
    2096 #define RF4_BA_NETH                   0x00000020      /* Nether Ball */ 
    2097 #define RF4_BA_WATE                   0x00000040      /* Water Ball */ 
    2098 #define RF4_BA_MANA                   0x00000080      /* Mana Storm */ 
    2099 #define RF4_BA_DARK                   0x00000100      /* Darkness Storm */ 
    2100 #define RF4_DRAIN_MANA                0x00000200      /* Drain Mana */ 
    2101 #define RF4_MIND_BLAST                0x00000400      /* Blast Mind */ 
    2102 #define RF4_BRAIN_SMASH               0x00000800      /* Smash Brain */ 
    2103 #define RF4_CAUSE_1                   0x00001000      /* Cause Light Wound */ 
    2104 #define RF4_CAUSE_2                   0x00002000      /* Cause Serious Wound */ 
    2105 #define RF4_CAUSE_3                   0x00004000      /* Cause Critical Wound */ 
    2106 #define RF4_CAUSE_4                   0x00008000      /* Cause Mortal Wound */ 
    2107 #define RF4_BO_ACID                   0x00010000      /* Acid Bolt */ 
    2108 #define RF4_BO_ELEC                   0x00020000      /* Elec Bolt (unused) */ 
    2109 #define RF4_BO_FIRE                   0x00040000      /* Fire Bolt */ 
    2110 #define RF4_BO_COLD                   0x00080000      /* Cold Bolt */ 
    2111 #define RF4_BO_POIS                   0x00100000      /* Poison Bolt (unused) */ 
    2112 #define RF4_BO_NETH                   0x00200000      /* Nether Bolt */ 
    2113 #define RF4_BO_WATE                   0x00400000      /* Water Bolt */ 
    2114 #define RF4_BO_MANA                   0x00800000      /* Mana Bolt */ 
    2115 #define RF4_BO_PLAS                   0x01000000      /* Plasma Bolt */ 
    2116 #define RF4_BO_ICEE                   0x02000000      /* Ice Bolt */ 
    2117 #define RF4_MISSILE                   0x04000000      /* Magic Missile */ 
    2118 #define RF4_SCARE                     0x08000000      /* Frighten Player */ 
    2119 #define RF4_BLIND                     0x10000000      /* Blind Player */ 
    2120 #define RF4_CONF                      0x20000000      /* Confuse Player */ 
    2121 #define RF4_SLOW                      0x40000000      /* Slow Player */ 
    2122 #define RF4_HOLD                      0x80000000      /* Paralyze Player */ 
     2088#define RSF1_BA_ACID                  0x00000001      /* Acid Ball */ 
     2089#define RSF1_BA_ELEC                  0x00000002      /* Elec Ball */ 
     2090#define RSF1_BA_FIRE                  0x00000004      /* Fire Ball */ 
     2091#define RSF1_BA_COLD                  0x00000008      /* Cold Ball */ 
     2092#define RSF1_BA_POIS                  0x00000010      /* Poison Ball */ 
     2093#define RSF1_BA_NETH                  0x00000020      /* Nether Ball */ 
     2094#define RSF1_BA_WATE                  0x00000040      /* Water Ball */ 
     2095#define RSF1_BA_MANA                  0x00000080      /* Mana Storm */ 
     2096#define RSF1_BA_DARK                  0x00000100      /* Darkness Storm */ 
     2097#define RSF1_DRAIN_MANA               0x00000200      /* Drain Mana */ 
     2098#define RSF1_MIND_BLAST               0x00000400      /* Blast Mind */ 
     2099#define RSF1_BRAIN_SMASH              0x00000800      /* Smash Brain */ 
     2100#define RSF1_CAUSE_1                  0x00001000      /* Cause Light Wound */ 
     2101#define RSF1_CAUSE_2                  0x00002000      /* Cause Serious Wound */ 
     2102#define RSF1_CAUSE_3                  0x00004000      /* Cause Critical Wound */ 
     2103#define RSF1_CAUSE_4                  0x00008000      /* Cause Mortal Wound */ 
     2104#define RSF1_BO_ACID                  0x00010000      /* Acid Bolt */ 
     2105#define RSF1_BO_ELEC                  0x00020000      /* Elec Bolt (unused) */ 
     2106#define RSF1_BO_FIRE                  0x00040000      /* Fire Bolt */ 
     2107#define RSF1_BO_COLD                  0x00080000      /* Cold Bolt */ 
     2108#define RSF1_BO_POIS                  0x00100000      /* Poison Bolt (unused) */ 
     2109#define RSF1_BO_NETH                  0x00200000      /* Nether Bolt */ 
     2110#define RSF1_BO_WATE                  0x00400000      /* Water Bolt */ 
     2111#define RSF1_BO_MANA                  0x00800000      /* Mana Bolt */ 
     2112#define RSF1_BO_PLAS                  0x01000000      /* Plasma Bolt */ 
     2113#define RSF1_BO_ICEE                  0x02000000      /* Ice Bolt */ 
     2114#define RSF1_MISSILE                  0x04000000      /* Magic Missile */ 
     2115#define RSF1_SCARE                    0x08000000      /* Frighten Player */ 
     2116#define RSF1_BLIND                    0x10000000      /* Blind Player */ 
     2117#define RSF1_CONF                     0x20000000      /* Confuse Player */ 
     2118#define RSF1_SLOW                     0x40000000      /* Slow Player */ 
     2119#define RSF1_HOLD                     0x80000000      /* Paralyze Player */ 
    21232120 
    21242121/* 
    21252122 * New monster race bit flags 
    21262123 */ 
    2127 #define RF5_HASTE           0x00000001 /* Speed self */ 
    2128 #define RF5_XXX1            0x00000002 /* Speed a lot (?) */ 
    2129 #define RF5_HEAL            0x00000004 /* Heal self */ 
    2130 #define RF5_XXX2            0x00000008 /* Heal a lot (?) */ 
    2131 #define RF5_BLINK           0x00000010 /* Teleport Short */ 
    2132 #define RF5_TPORT           0x00000020 /* Teleport Long */ 
    2133 #define RF5_XXX3            0x00000040 /* Move to Player (?) */ 
    2134 #define RF5_XXX4            0x00000080 /* Move to Monster (?) */ 
    2135 #define RF5_TELE_TO         0x00000100 /* Move player to monster */ 
    2136 #define RF5_TELE_AWAY       0x00000200 /* Move player far away */ 
    2137 #define RF5_TELE_LEVEL      0x00000400 /* Move player vertically */ 
    2138 #define RF5_XXX5            0x00000800 /* Move player (?) */ 
    2139 #define RF5_DARKNESS        0x00001000 /* Create Darkness */ 
    2140 #define RF5_TRAPS           0x00002000 /* Create Traps */ 
    2141 #define RF5_FORGET          0x00004000 /* Cause amnesia */ 
    2142 #define RF5_XXX6            0x00008000 /* (?) */ 
    2143 #define RF5_S_KIN           0x00010000 /* Summon Kin */ 
    2144 #define RF5_S_HI_DEMON      0x00020000 /* Summon Greater Demons */ 
    2145 #define RF5_S_MONSTER       0x00040000 /* Summon Monster */ 
    2146 #define RF5_S_MONSTERS      0x00080000 /* Summon Monsters */ 
    2147 #define RF5_S_ANIMAL        0x00100000 /* Summon Animals */ 
    2148 #define RF5_S_SPIDER        0x00200000 /* Summon Spiders */ 
    2149 #define RF5_S_HOUND         0x00400000 /* Summon Hounds */ 
    2150 #define RF5_S_HYDRA         0x00800000 /* Summon Hydras */ 
    2151 #define RF5_S_ANGEL         0x01000000 /* Summon Angel */ 
    2152 #define RF5_S_DEMON         0x02000000 /* Summon Demon */ 
    2153 #define RF5_S_UNDEAD        0x04000000 /* Summon Undead */ 
    2154 #define RF5_S_DRAGON        0x08000000 /* Summon Dragon */ 
    2155 #define RF5_S_HI_UNDEAD     0x10000000 /* Summon Greater Undead */ 
    2156 #define RF5_S_HI_DRAGON     0x20000000 /* Summon Ancient Dragon */ 
    2157 #define RF5_S_WRAITH        0x40000000 /* Summon Unique Wraith */ 
    2158 #define RF5_S_UNIQUE        0x80000000 /* Summon Unique Monster */ 
     2124#define RSF2_HASTE           0x00000001 /* Speed self */ 
     2125#define RSF2_XXX1            0x00000002 /* Speed a lot (?) */ 
     2126#define RSF2_HEAL            0x00000004 /* Heal self */ 
     2127#define RSF2_XXX2            0x00000008 /* Heal a lot (?) */ 
     2128#define RSF2_BLINK           0x00000010 /* Teleport Short */ 
     2129#define RSF2_TPORT           0x00000020 /* Teleport Long */ 
     2130#define RSF2_XXX3            0x00000040 /* Move to Player (?) */ 
     2131#define RSF2_XXX4            0x00000080 /* Move to Monster (?) */ 
     2132#define RSF2_TELE_TO         0x00000100 /* Move player to monster */ 
     2133#define RSF2_TELE_AWAY       0x00000200 /* Move player far away */ 
     2134#define RSF2_TELE_LEVEL      0x00000400 /* Move player vertically */ 
     2135#define RSF2_XXX5            0x00000800 /* Move player (?) */ 
     2136#define RSF2_DARKNESS        0x00001000 /* Create Darkness */ 
     2137#define RSF2_TRAPS           0x00002000 /* Create Traps */ 
     2138#define RSF2_FORGET          0x00004000 /* Cause amnesia */ 
     2139#define RSF2_XXX6            0x00008000 /* (?) */ 
     2140#define RSF2_S_KIN           0x00010000 /* Summon Kin */ 
     2141#define RSF2_S_HI_DEMON      0x00020000 /* Summon Greater Demons */ 
     2142#define RSF2_S_MONSTER       0x00040000 /* Summon Monster */ 
     2143#define RSF2_S_MONSTERS      0x00080000 /* Summon Monsters */ 
     2144#define RSF2_S_ANIMAL        0x00100000 /* Summon Animals */ 
     2145#define RSF2_S_SPIDER        0x00200000 /* Summon Spiders */ 
     2146#define RSF2_S_HOUND         0x00400000 /* Summon Hounds */ 
     2147#define RSF2_S_HYDRA         0x00800000 /* Summon Hydras */ 
     2148#define RSF2_S_ANGEL         0x01000000 /* Summon Angel */ 
     2149#define RSF2_S_DEMON         0x02000000 /* Summon Demon */ 
     2150#define RSF2_S_UNDEAD        0x04000000 /* Summon Undead */ 
     2151#define RSF2_S_DRAGON        0x08000000 /* Summon Dragon */ 
     2152#define RSF2_S_HI_UNDEAD     0x10000000 /* Summon Greater Undead */ 
     2153#define RSF2_S_HI_DRAGON     0x20000000 /* Summon Ancient Dragon */ 
     2154#define RSF2_S_WRAITH        0x40000000 /* Summon Unique Wraith */ 
     2155#define RSF2_S_UNIQUE        0x80000000 /* Summon Unique Monster */ 
    21592156 
    21602157 
     
    21822179 */ 
    21832180 
    2184 #define RF3_INT_MASK \ 
     2181#define RSF0_INT_MASK \ 
    21852182        (0L) 
    21862183 
    2187 #define RF4_INT_MASK \ 
    2188         (RF4_HOLD | RF4_SLOW | RF4_CONF | RF4_BLIND | RF4_SCARE) 
    2189  
    2190 #define RF5_INT_MASK \ 
    2191         (RF5_BLINK |  RF5_TPORT | RF5_TELE_LEVEL | RF5_TELE_AWAY | \ 
    2192          RF5_HEAL | RF5_HASTE | RF5_TRAPS | \ 
    2193          RF5_S_ANIMAL | RF5_S_KIN | RF5_S_MONSTER | RF5_S_MONSTERS | \ 
    2194          RF5_S_SPIDER | RF5_S_HOUND | RF5_S_HYDRA | \ 
    2195          RF5_S_ANGEL | RF5_S_DRAGON | RF5_S_UNDEAD | RF5_S_DEMON | \ 
    2196          RF5_S_HI_DRAGON | RF5_S_HI_UNDEAD | RF5_S_HI_DEMON | \ 
    2197          RF5_S_WRAITH | RF5_S_UNIQUE) 
     2184#define RSF1_INT_MASK \ 
     2185        (RSF1_HOLD | RSF1_SLOW | RSF1_CONF | RSF1_BLIND | RSF1_SCARE) 
     2186 
     2187#define RSF2_INT_MASK \ 
     2188        (RSF2_BLINK |  RSF2_TPORT | RSF2_TELE_LEVEL | RSF2_TELE_AWAY | \ 
     2189         RSF2_HEAL | RSF2_HASTE | RSF2_TRAPS | \ 
     2190         RSF2_S_ANIMAL | RSF2_S_KIN | RSF2_S_MONSTER | RSF2_S_MONSTERS | \ 
     2191         RSF2_S_SPIDER | RSF2_S_HOUND | RSF2_S_HYDRA | \ 
     2192         RSF2_S_ANGEL | RSF2_S_DRAGON | RSF2_S_UNDEAD | RSF2_S_DEMON | \ 
     2193         RSF2_S_HI_DRAGON | RSF2_S_HI_UNDEAD | RSF2_S_HI_DEMON | \ 
     2194         RSF2_S_WRAITH | RSF2_S_UNIQUE) 
    21982195 
    21992196 
     
    22012198 * "Bolt" spells that may hurt fellow monsters 
    22022199 */ 
    2203 #define RF3_BOLT_MASK \ 
    2204         (RF3_ARROW_1 | RF3_ARROW_2 | RF3_ARROW_3 | RF3_ARROW_4 | \ 
    2205          RF3_BOULDER) 
    2206  
    2207 #define RF4_BOLT_MASK \ 
    2208         (RF4_BO_ACID | RF4_BO_ELEC | RF4_BO_FIRE | RF4_BO_COLD | \ 
    2209          RF4_BO_POIS | RF4_BO_NETH | RF4_BO_WATE | RF4_BO_MANA | \ 
    2210          RF4_BO_PLAS | RF4_BO_ICEE | RF4_MISSILE) 
    2211  
    2212 #define RF5_BOLT_MASK \ 
     2200#define RSF0_BOLT_MASK \ 
     2201        (RSF0_ARROW_1 | RSF0_ARROW_2 | RSF0_ARROW_3 | RSF0_ARROW_4 | \ 
     2202         RSF0_BOULDER) 
     2203 
     2204#define RSF1_BOLT_MASK \ 
     2205        (RSF1_BO_ACID | RSF1_BO_ELEC | RSF1_BO_FIRE | RSF1_BO_COLD | \ 
     2206         RSF1_BO_POIS | RSF1_BO_NETH | RSF1_BO_WATE | RSF1_BO_MANA | \ 
     2207         RSF1_BO_PLAS | RSF1_BO_ICEE | RSF1_MISSILE) 
     2208 
     2209#define RSF2_BOLT_MASK \ 
    22132210        (0L) 
    22142211 
     
    22162213 * Spells that allow the caster to escape 
    22172214 */ 
    2218 #define RF3_ESCAPE_MASK \ 
     2215#define RSF0_ESCAPE_MASK \ 
    22192216        (0L) 
    22202217 
    2221 #define RF4_ESCAPE_MASK \ 
     2218#define RSF1_ESCAPE_MASK \ 
    22222219        (0L) 
    22232220 
    2224 #define RF5_ESCAPE_MASK \ 
    2225         (RF5_BLINK | RF5_TPORT | RF5_TELE_AWAY | RF5_TELE_LEVEL) 
     2221#define RSF2_ESCAPE_MASK \ 
     2222        (RSF2_BLINK | RSF2_TPORT | RSF2_TELE_AWAY | RSF2_TELE_LEVEL) 
    22262223 
    22272224 
     
    22292226 * Spells that hurt the player directly 
    22302227 */ 
    2231 #define RF3_ATTACK_MASK \ 
    2232         (RF3_ARROW_1 | RF3_ARROW_2 | RF3_ARROW_3 | RF3_ARROW_4 | RF3_BOULDER | \ 
    2233          RF3_BR_ACID | RF3_BR_ELEC | RF3_BR_FIRE | RF3_BR_COLD | RF3_BR_POIS | \ 
    2234          RF3_BR_NETH | RF3_BR_LITE | RF3_BR_DARK | RF3_BR_CONF | RF3_BR_SOUN | \ 
    2235          RF3_BR_CHAO | RF3_BR_DISE | RF3_BR_NEXU | RF3_BR_TIME | RF3_BR_INER | \ 
    2236          RF3_BR_GRAV | RF3_BR_SHAR | RF3_BR_PLAS | RF3_BR_WALL | RF3_BR_MANA) 
    2237  
    2238 #define RF4_ATTACK_MASK \ 
    2239         (RF4_BA_ACID | RF4_BA_ELEC | RF4_BA_FIRE | RF4_BA_COLD | RF4_BA_POIS | \ 
    2240          RF4_BA_NETH | RF4_BA_WATE | RF4_BA_MANA | RF4_BA_DARK | \ 
    2241          RF4_MIND_BLAST | RF4_BRAIN_SMASH | RF4_CAUSE_1 | RF4_CAUSE_2 | \ 
    2242          RF4_CAUSE_3 | RF4_CAUSE_4 | RF4_BO_ACID | RF4_BO_ELEC | RF4_BO_FIRE | \ 
    2243          RF4_BO_COLD | RF4_BO_POIS | RF4_BO_NETH | RF4_BO_WATE | RF4_BO_MANA | \ 
    2244          RF4_BO_PLAS | RF4_BO_ICEE | RF4_MISSILE) 
    2245  
    2246 #define RF5_ATTACK_MASK \ 
     2228#define RSF0_ATTACK_MASK \ 
     2229        (RSF0_ARROW_1 | RSF0_ARROW_2 | RSF0_ARROW_3 | RSF0_ARROW_4 | RSF0_BOULDER | \ 
     2230         RSF0_BR_ACID | RSF0_BR_ELEC | RSF0_BR_FIRE | RSF0_BR_COLD | RSF0_BR_POIS | \ 
     2231         RSF0_BR_NETH | RSF0_BR_LITE | RSF0_BR_DARK | RSF0_BR_CONF | RSF0_BR_SOUN | \ 
     2232         RSF0_BR_CHAO | RSF0_BR_DISE | RSF0_BR_NEXU | RSF0_BR_TIME | RSF0_BR_INER | \ 
     2233         RSF0_BR_GRAV | RSF0_BR_SHAR | RSF0_BR_PLAS | RSF0_BR_WALL | RSF0_BR_MANA) 
     2234 
     2235#define RSF1_ATTACK_MASK \ 
     2236        (RSF1_BA_ACID | RSF1_BA_ELEC | RSF1_BA_FIRE | RSF1_BA_COLD | RSF1_BA_POIS | \ 
     2237         RSF1_BA_NETH | RSF1_BA_WATE | RSF1_BA_MANA | RSF1_BA_DARK | \ 
     2238         RSF1_MIND_BLAST | RSF1_BRAIN_SMASH | RSF1_CAUSE_1 | RSF1_CAUSE_2 | \ 
     2239         RSF1_CAUSE_3 | RSF1_CAUSE_4 | RSF1_BO_ACID | RSF1_BO_ELEC | RSF1_BO_FIRE | \ 
     2240         RSF1_BO_COLD | RSF1_BO_POIS | RSF1_BO_NETH | RSF1_BO_WATE | RSF1_BO_MANA | \ 
     2241         RSF1_BO_PLAS | RSF1_BO_ICEE | RSF1_MISSILE) 
     2242 
     2243#define RSF2_ATTACK_MASK \ 
    22472244        (0L) 
    22482245 
     
    22512248 * Summoning spells 
    22522249 */ 
    2253 #define RF3_SUMMON_MASK \ 
     2250#define RSF0_SUMMON_MASK \ 
    22542251        (0L) 
    22552252 
    2256 #define RF4_SUMMON_MASK \ 
     2253#define RSF1_SUMMON_MASK \ 
    22572254        (0L) 
    22582255 
    2259 #define RF5_SUMMON_MASK \ 
    2260         (RF5_S_KIN | RF5_S_MONSTER | RF5_S_MONSTERS | RF5_S_ANIMAL | \ 
    2261          RF5_S_SPIDER | RF5_S_HOUND | RF5_S_HYDRA | RF5_S_ANGEL | \ 
    2262          RF5_S_DEMON | RF5_S_UNDEAD | RF5_S_DRAGON | RF5_S_HI_UNDEAD | \ 
    2263          RF5_S_HI_DEMON | RF5_S_HI_DRAGON | RF5_S_WRAITH | RF5_S_UNIQUE) 
     2256#define RSF2_SUMMON_MASK \ 
     2257        (RSF2_S_KIN | RSF2_S_MONSTER | RSF2_S_MONSTERS | RSF2_S_ANIMAL | \ 
     2258         RSF2_S_SPIDER | RSF2_S_HOUND | RSF2_S_HYDRA | RSF2_S_ANGEL | \ 
     2259         RSF2_S_DEMON | RSF2_S_UNDEAD | RSF2_S_DRAGON | RSF2_S_HI_UNDEAD | \ 
     2260         RSF2_S_HI_DEMON | RSF2_S_HI_DRAGON | RSF2_S_WRAITH | RSF2_S_UNIQUE) 
    22642261 
    22652262 
     
    22672264 * Spells that improve the caster's tactical position 
    22682265 */ 
    2269 #define RF3_TACTIC_MASK \ 
     2266#define RSF0_TACTIC_MASK \ 
    22702267        (0L) 
    22712268 
    2272 #define RF4_TACTIC_MASK \ 
     2269#define RSF1_TACTIC_MASK \ 
    22732270        (0L) 
    22742271 
    2275 #define RF5_TACTIC_MASK \ 
    2276         (RF5_BLINK) 
     2272#define RSF2_TACTIC_MASK \ 
     2273        (RSF2_BLINK) 
    22772274 
    22782275 
     
    22802277 * Annoying spells 
    22812278 */ 
    2282 #define RF3_ANNOY_MASK \ 
    2283         (RF3_SHRIEK) 
    2284  
    2285 #define RF4_ANNOY_MASK \ 
    2286         (RF4_DRAIN_MANA | RF4_MIND_BLAST | RF4_BRAIN_SMASH | RF4_SCARE | \ 
    2287          RF4_BLIND | RF4_CONF | RF4_SLOW | RF4_HOLD) 
    2288  
    2289 #define RF5_ANNOY_MASK \ 
    2290         (RF5_TELE_TO | RF5_DARKNESS | RF5_TRAPS | RF5_FORGET) 
     2279#define RSF0_ANNOY_MASK \ 
     2280        (RSF0_SHRIEK) 
     2281 
     2282#define RSF1_ANNOY_MASK \ 
     2283        (RSF1_DRAIN_MANA | RSF1_MIND_BLAST | RSF1_BRAIN_SMASH | RSF1_SCARE | \ 
     2284         RSF1_BLIND | RSF1_CONF | RSF1_SLOW | RSF1_HOLD) 
     2285 
     2286#define RSF2_ANNOY_MASK \ 
     2287        (RSF2_TELE_TO | RSF2_DARKNESS | RSF2_TRAPS | RSF2_FORGET) 
    22912288 
    22922289 
     
    22942291 * Spells that increase the caster's relative speed 
    22952292 */ 
    2296 #define RF3_HASTE_MASK \ 
     2293#define RSF0_HASTE_MASK \ 
    22972294        (0L) 
    22982295 
    2299 #define RF4_HASTE_MASK \ 
    2300         (RF4_SLOW | RF4_HOLD) 
    2301  
    2302 #define RF5_HASTE_MASK \ 
    2303         (RF5_HASTE) 
     2296#define RSF1_HASTE_MASK \ 
     2297        (RSF1_SLOW | RSF1_HOLD) 
     2298 
     2299#define RSF2_HASTE_MASK \ 
     2300        (RSF2_HASTE) 
    23042301 
    23052302 
     
    23072304 * Healing spells 
    23082305 */ 
    2309 #define RF3_HEAL_MASK \ 
     2306#define RSF0_HEAL_MASK \ 
    23102307        (0L) 
    23112308 
    2312 #define RF4_HEAL_MASK \ 
     2309#define RSF1_HEAL_MASK \ 
    23132310        (0L) 
    23142311 
    2315 #define RF5_HEAL_MASK \ 
    2316         (RF5_HEAL) 
     2312#define RSF2_HEAL_MASK \ 
     2313        (RSF2_HEAL) 
    23172314 
    23182315 
     
    23202317 * Innate spell-like effects 
    23212318 */ 
    2322 #define RF3_INNATE_MASK \ 
    2323         (RF3_SHRIEK | RF3_ARROW_1 | RF3_ARROW_2 | RF3_ARROW_3 | RF3_ARROW_4 | \ 
    2324          RF3_BR_ACID | RF3_BR_ELEC | RF3_BR_FIRE | RF3_BR_COLD | RF3_BR_POIS | \ 
    2325          RF3_BR_NETH | RF3_BR_LITE | RF3_BR_DARK | RF3_BR_CONF | RF3_BR_SOUN | \ 
    2326          RF3_BR_CHAO | RF3_BR_DISE | RF3_BR_NEXU | RF3_BR_TIME | RF3_BR_INER | \ 
    2327          RF3_BR_GRAV | RF3_BR_SHAR | RF3_BR_PLAS | RF3_BR_WALL | RF3_BR_MANA | \ 
    2328          RF3_BOULDER) 
    2329  
    2330 #define RF4_INNATE_MASK \ 
     2319#define RSF0_INNATE_MASK \ 
     2320        (RSF0_SHRIEK | RSF0_ARROW_1 | RSF0_ARROW_2 | RSF0_ARROW_3 | RSF0_ARROW_4 | \ 
     2321         RSF0_BR_ACID | RSF0_BR_ELEC | RSF0_BR_FIRE | RSF0_BR_COLD | RSF0_BR_POIS | \ 
     2322         RSF0_BR_NETH | RSF0_BR_LITE | RSF0_BR_DARK | RSF0_BR_CONF | RSF0_BR_SOUN | \ 
     2323         RSF0_BR_CHAO | RSF0_BR_DISE | RSF0_BR_NEXU | RSF0_BR_TIME | RSF0_BR_INER | \ 
     2324         RSF0_BR_GRAV | RSF0_BR_SHAR | RSF0_BR_PLAS | RSF0_BR_WALL | RSF0_BR_MANA | \ 
     2325         RSF0_BOULDER) 
     2326 
     2327#define RSF1_INNATE_MASK \ 
    23312328        (0L) 
    23322329 
    2333 #define RF5_INNATE_MASK \ 
     2330#define RSF2_INNATE_MASK \ 
    23342331        (0L) 
    23352332 
  • trunk/src/generate.c

    r823 r849  
    15931593 * Hack -- breath type for "vault_aux_dragon()" 
    15941594 */ 
    1595 static u32b vault_aux_dragon_mask3
     1595static u32b vault_aux_dragon_mask0
    15961596 
    15971597 
     
    16101610 
    16111611        /* Hack -- Require correct "breath attack" */ 
    1612         if (r_ptr->flags[3] != vault_aux_dragon_mask3) return (FALSE); 
     1612        if (r_ptr->spell_flags[0] != vault_aux_dragon_mask0) return (FALSE); 
    16131613 
    16141614        /* Okay */ 
     
    19301930 
    19311931                                /* Restrict dragon breath type */ 
    1932                                 vault_aux_dragon_mask3 = RF3_BR_ACID; 
     1932                                vault_aux_dragon_mask0 = RSF0_BR_ACID; 
    19331933 
    19341934                                /* Done */ 
     
    19431943 
    19441944                                /* Restrict dragon breath type */ 
    1945                                 vault_aux_dragon_mask3 = RF3_BR_ELEC; 
     1945                                vault_aux_dragon_mask0 = RSF0_BR_ELEC; 
    19461946 
    19471947                                /* Done */ 
     
    19561956 
    19571957                                /* Restrict dragon breath type */ 
    1958                                 vault_aux_dragon_mask3 = RF3_BR_FIRE; 
     1958                                vault_aux_dragon_mask0 = RSF0_BR_FIRE; 
    19591959 
    19601960                                /* Done */ 
     
    19691969 
    19701970                                /* Restrict dragon breath type */ 
    1971                                 vault_aux_dragon_mask3 = RF3_BR_COLD; 
     1971                                vault_aux_dragon_mask0 = RSF0_BR_COLD; 
    19721972 
    19731973                                /* Done */ 
     
    19821982 
    19831983                                /* Restrict dragon breath type */ 
    1984                                 vault_aux_dragon_mask3 = RF3_BR_POIS; 
     1984                                vault_aux_dragon_mask0 = RSF0_BR_POIS; 
    19851985 
    19861986                                /* Done */ 
     
    19951995 
    19961996                                /* Restrict dragon breath type */ 
    1997                                 vault_aux_dragon_mask3 = (RF3_BR_ACID | RF3_BR_ELEC | 
    1998                                                           RF3_BR_FIRE | RF3_BR_COLD | 
    1999                                                           RF3_BR_POIS); 
     1997                                vault_aux_dragon_mask0 = (RSF0_BR_ACID | RSF0_BR_ELEC | 
     1998                                                          RSF0_BR_FIRE | RSF0_BR_COLD | 
     1999                                                          RSF0_BR_POIS); 
    20002000 
    20012001                                /* Done */ 
  • trunk/src/init1.c

    r789 r849  
    143143 * Monster race flags 
    144144 */ 
    145 static cptr r_info_flags1[] = 
     145static cptr r_info_flags0[] = 
    146146{ 
    147147        "UNIQUE", 
     
    182182 * Monster race flags 
    183183 */ 
    184 static cptr r_info_flags2[] = 
     184static cptr r_info_flags1[] = 
    185185{ 
    186186        "STUPID", 
     
    221221 * Monster race flags 
    222222 */ 
    223 static cptr r_info_flags3[] = 
     223static cptr r_info_flags2[] = 
    224224{ 
    225225        "ORC", 
     
    260260 * Monster race flags 
    261261 */ 
    262 static cptr r_info_flags4[] = 
     262static cptr r_info_spell_flags0[] = 
    263263{ 
    264264        "SHRIEK", 
     
    299299 * Monster race flags 
    300300 */ 
    301 static cptr r_info_flags5[] = 
     301static cptr r_info_spell_flags1[] = 
    302302{ 
    303303        "BA_ACID", 
     
    338338 * Monster race flags 
    339339 */ 
    340 static cptr r_info_flags6[] = 
     340static cptr r_info_spell_flags2[] = 
    341341{ 
    342342        "HASTE", 
     
    19271927static errr grab_one_basic_flag(monster_race *r_ptr, cptr what) 
    19281928{ 
    1929         if (grab_one_flag(&r_ptr->flags[0], r_info_flags1, what) == 0) 
     1929        if (grab_one_flag(&r_ptr->flags[0], r_info_flags0, what) == 0) 
    19301930                return (0); 
    19311931 
    1932         if (grab_one_flag(&r_ptr->flags[1], r_info_flags2, what) == 0) 
     1932        if (grab_one_flag(&r_ptr->flags[1], r_info_flags1, what) == 0) 
    19331933                return (0); 
    19341934 
    1935         if (grab_one_flag(&r_ptr->flags[2], r_info_flags3, what) == 0) 
     1935        if (grab_one_flag(&r_ptr->flags[2], r_info_flags2, what) == 0) 
    19361936                return (0); 
    19371937 
     
    19491949static errr grab_one_spell_flag(monster_race *r_ptr, cptr what) 
    19501950{ 
    1951         if (grab_one_flag(&r_ptr->flags[3], r_info_flags4, what) == 0) 
     1951        if (grab_one_flag(&r_ptr->spell_flags[0], r_info_spell_flags0, what) == 0) 
    19521952                return (0); 
    19531953 
    1954         if (grab_one_flag(&r_ptr->flags[4], r_info_flags5, what) == 0) 
     1954        if (grab_one_flag(&r_ptr->spell_flags[1], r_info_spell_flags1, what) == 0) 
    19551955                return (0); 
    19561956 
    1957         if (grab_one_flag(&r_ptr->flags[5], r_info_flags6, what) == 0) 
     1957        if (grab_one_flag(&r_ptr->spell_flags[2], r_info_spell_flags2, what) == 0) 
    19581958                return (0); 
    19591959 
  • trunk/src/load.c

    r816 r849  
    721721        for (i = 0; i < RACE_FLAG_STRICT_UB; i++) 
    722722                rd_u32b(&l_ptr->flags[i]); 
     723        for (i = 0; i < RACE_FLAG_SPELL_STRICT_UB; i++) 
     724                rd_u32b(&l_ptr->spell_flags[i]); 
    723725 
    724726 
     
    735737        for (i = 0; i < RACE_FLAG_STRICT_UB; i++) 
    736738                l_ptr->flags[i] &= r_ptr->flags[i]; 
     739        for (i = 0; i < RACE_FLAG_SPELL_STRICT_UB; i++) 
     740                l_ptr->spell_flags[i] &= r_ptr->spell_flags[i]; 
    737741} 
    738742 
  • trunk/src/loadsave.c

    r789 r849  
    14111411        for (i = 0; i < RACE_FLAG_STRICT_UB; i++) 
    14121412                smap_put_u32b(s, flag_names[i], l_ptr->flags[i]); 
     1413        for (i = 0; i < RACE_FLAG_SPELL_STRICT_UB; i++) 
     1414                smap_put_u32b(s, flag_names[i+RACE_FLAG_STRICT_UB], l_ptr->spell_flags[i]); 
    14131415 
    14141416        smap_put_byte(s, "max_num", r_ptr->max_num); 
     
    14451447        for (i = 0; i < RACE_FLAG_STRICT_UB; i++) 
    14461448                l_ptr->flags[i] = smap_get_u32b(s, flag_names[i]) & r_ptr->flags[i]; 
     1449        for (i = 0; i < RACE_FLAG_SPELL_STRICT_UB; i++) 
     1450                l_ptr->spell_flags[i] = smap_get_u32b(s, flag_names[i+RACE_FLAG_STRICT_UB]) & r_ptr->spell_flags[i]; 
    14471451 
    14481452        /* This should be stored elsewhere. */ 
  • trunk/src/melee2.c

    r823 r849  
    143143        if (smart & (SM_IMM_ACID)) 
    144144        { 
    145                 if (int_outof(r_ptr, 100)) f2[0] &= ~(RF3_BR_ACID); 
    146                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BA_ACID); 
    147                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BO_ACID); 
     145                if (int_outof(r_ptr, 100)) f2[0] &= ~(RSF0_BR_ACID); 
     146                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BA_ACID); 
     147                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BO_ACID); 
    148148        } 
    149149        else if ((smart & (SM_OPP_ACID)) && (smart & (SM_RES_ACID))) 
    150150        { 
    151                 if (int_outof(r_ptr, 80)) f2[0] &= ~(RF3_BR_ACID); 
    152                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BA_ACID); 
    153                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BO_ACID); 
     151                if (int_outof(r_ptr, 80)) f2[0] &= ~(RSF0_BR_ACID); 
     152                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BA_ACID); 
     153                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BO_ACID); 
    154154        } 
    155155        else if ((smart & (SM_OPP_ACID)) || (smart & (SM_RES_ACID))) 
    156156        { 
    157                 if (int_outof(r_ptr, 30)) f2[0] &= ~(RF3_BR_ACID); 
    158                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BA_ACID); 
    159                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BO_ACID); 
     157                if (int_outof(r_ptr, 30)) f2[0] &= ~(RSF0_BR_ACID); 
     158                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BA_ACID); 
     159                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BO_ACID); 
    160160        } 
    161161 
     
    163163        if (smart & (SM_IMM_ELEC)) 
    164164        { 
    165                 if (int_outof(r_ptr, 100)) f2[0] &= ~(RF3_BR_ELEC); 
    166                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BA_ELEC); 
    167                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BO_ELEC); 
     165                if (int_outof(r_ptr, 100)) f2[0] &= ~(RSF0_BR_ELEC); 
     166                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BA_ELEC); 
     167                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BO_ELEC); 
    168168        } 
    169169        else if ((smart & (SM_OPP_ELEC)) && (smart & (SM_RES_ELEC))) 
    170170        { 
    171                 if (int_outof(r_ptr, 80)) f2[0] &= ~(RF3_BR_ELEC); 
    172                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BA_ELEC); 
    173                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BO_ELEC); 
     171                if (int_outof(r_ptr, 80)) f2[0] &= ~(RSF0_BR_ELEC); 
     172                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BA_ELEC); 
     173                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BO_ELEC); 
    174174        } 
    175175        else if ((smart & (SM_OPP_ELEC)) || (smart & (SM_RES_ELEC))) 
    176176        { 
    177                 if (int_outof(r_ptr, 30)) f2[0] &= ~(RF3_BR_ELEC); 
    178                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BA_ELEC); 
    179                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BO_ELEC); 
     177                if (int_outof(r_ptr, 30)) f2[0] &= ~(RSF0_BR_ELEC); 
     178                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BA_ELEC); 
     179                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BO_ELEC); 
    180180        } 
    181181 
     
    183183        if (smart & (SM_IMM_FIRE)) 
    184184        { 
    185                 if (int_outof(r_ptr, 100)) f2[0] &= ~(RF3_BR_FIRE); 
    186                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BA_FIRE); 
    187                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BO_FIRE); 
     185                if (int_outof(r_ptr, 100)) f2[0] &= ~(RSF0_BR_FIRE); 
     186                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BA_FIRE); 
     187                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BO_FIRE); 
    188188        } 
    189189        else if ((smart & (SM_OPP_FIRE)) && (smart & (SM_RES_FIRE))) 
    190190        { 
    191                 if (int_outof(r_ptr, 80)) f2[0] &= ~(RF3_BR_FIRE); 
    192                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BA_FIRE); 
    193                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BO_FIRE); 
     191                if (int_outof(r_ptr, 80)) f2[0] &= ~(RSF0_BR_FIRE); 
     192                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BA_FIRE); 
     193                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BO_FIRE); 
    194194        } 
    195195        else if ((smart & (SM_OPP_FIRE)) || (smart & (SM_RES_FIRE))) 
    196196        { 
    197                 if (int_outof(r_ptr, 30)) f2[0] &= ~(RF3_BR_FIRE); 
    198                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BA_FIRE); 
    199                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BO_FIRE); 
     197                if (int_outof(r_ptr, 30)) f2[0] &= ~(RSF0_BR_FIRE); 
     198                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BA_FIRE); 
     199                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BO_FIRE); 
    200200        } 
    201201 
     
    203203        if (smart & (SM_IMM_COLD)) 
    204204        { 
    205                 if (int_outof(r_ptr, 100)) f2[0] &= ~(RF3_BR_COLD); 
    206                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BA_COLD); 
    207                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BO_COLD); 
    208                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BO_ICEE); 
     205                if (int_outof(r_ptr, 100)) f2[0] &= ~(RSF0_BR_COLD); 
     206                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BA_COLD); 
     207                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BO_COLD); 
     208                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BO_ICEE); 
    209209        } 
    210210        else if ((smart & (SM_OPP_COLD)) && (smart & (SM_RES_COLD))) 
    211211        { 
    212                 if (int_outof(r_ptr, 80)) f2[0] &= ~(RF3_BR_COLD); 
    213                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BA_COLD); 
    214                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BO_COLD); 
    215                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BO_ICEE); 
     212                if (int_outof(r_ptr, 80)) f2[0] &= ~(RSF0_BR_COLD); 
     213                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BA_COLD); 
     214                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BO_COLD); 
     215                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BO_ICEE); 
    216216        } 
    217217        else if ((smart & (SM_OPP_COLD)) || (smart & (SM_RES_COLD))) 
    218218        { 
    219                 if (int_outof(r_ptr, 30)) f2[0] &= ~(RF3_BR_COLD); 
    220                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BA_COLD); 
    221                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BO_COLD); 
    222                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BO_ICEE); 
     219                if (int_outof(r_ptr, 30)) f2[0] &= ~(RSF0_BR_COLD); 
     220                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BA_COLD); 
     221                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BO_COLD); 
     222                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BO_ICEE); 
    223223        } 
    224224 
     
    226226        if ((smart & (SM_OPP_POIS)) && (smart & (SM_RES_POIS))) 
    227227        { 
    228                 if (int_outof(r_ptr, 80)) f2[0] &= ~(RF3_BR_POIS); 
    229                 if (int_outof(r_ptr, 80)) f2[1] &= ~(RF4_BA_POIS); 
     228                if (int_outof(r_ptr, 80)) f2[0] &= ~(RSF0_BR_POIS); 
     229                if (int_outof(r_ptr, 80)) f2[1] &= ~(RSF1_BA_POIS); 
    230230        } 
    231231        else if ((smart & (SM_OPP_POIS)) || (smart & (SM_RES_POIS))) 
    232232        { 
    233                 if (int_outof(r_ptr, 30)) f2[0] &= ~(RF3_BR_POIS); 
    234                 if (int_outof(r_ptr, 30)) f2[1] &= ~(RF4_BA_POIS); 
     233                if (int_outof(r_ptr, 30)) f2[0] &= ~(RSF0_BR_POIS); 
     234                if (int_outof(r_ptr, 30)) f2[1] &= ~(RSF1_BA_POIS); 
    235235        } 
    236236 
     
    238238        if (smart & (SM_RES_FEAR)) 
    239239        { 
    240                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_SCARE); 
     240                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_SCARE); 
    241241        } 
    242242 
    243243        if (smart & (SM_RES_LITE)) 
    244244        { 
    245                 if (int_outof(r_ptr, 50)) f2[0] &= ~(RF3_BR_LITE); 
     245                if (int_outof(r_ptr, 50)) f2[0] &= ~(RSF0_BR_LITE); 
    246246        } 
    247247 
    248248        if (smart & (SM_RES_DARK)) 
    249249        { 
    250                 if (int_outof(r_ptr, 50)) f2[0] &= ~(RF3_BR_DARK); 
    251                 if (int_outof(r_ptr, 50)) f2[1] &= ~(RF4_BA_DARK); 
     250                if (int_outof(r_ptr, 50)) f2[0] &= ~(RSF0_BR_DARK); 
     251                if (int_outof(r_ptr, 50)) f2[1] &= ~(RSF1_BA_DARK); 
    252252        } 
    253253 
    254254        if (smart & (SM_RES_BLIND)) 
    255255        { 
    256                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_BLIND); 
     256                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_BLIND); 
    257257        } 
    258258 
    259259        if (smart & (SM_RES_CONFU)) 
    260260        { 
    261                 if (int_outof(r_ptr, 100)) f2[1] &= ~(RF4_CONF); 
    262                 if (int_outof(r_ptr, 50)) f2[0] &= ~(RF3_BR_CONF); 
     261                if (int_outof(r_ptr, 100)) f2[1] &= ~(RSF1_CONF); 
     262                if (int_outof(r_ptr, 50)) f2[0] &= ~(RSF0_BR_CONF); 
    263263        } 
    264264 
    265265        if (smart & (SM_RES_SOUND)) 
    266266        { 
    267                 if (int_outof(r_ptr, 50)) f2[0] &= ~(RF3_BR_SOUN); 
     267                if (int_outof(r_ptr, 50)) f2[0] &= ~(RSF0_BR_SOUN); 
    268268        } 
    269269 
    270270        if (smart & (SM_RES_SHARD)) 
    271271        { 
    272                 if (int_outof(r_ptr, 50)) f2[0] &= ~(RF3_BR_SHAR); 
     272                if (int_outof(r_ptr, 50)) f2[0] &= ~(RSF0_BR_SHAR); 
    273273        } 
    274274 
    275275        if (smart & (SM_RES_NEXUS)) 
    276276        { 
    277                 if (int_outof(r_ptr, 50)) f2[0] &= ~(RF3_BR_NEXU); 
    278                 if (int_outof(r_ptr, 50)) f2[2] &= ~(RF5_TELE_LEVEL); 
     277                if (int_outof(r_ptr, 50)) f2[0] &= ~(RSF0_BR_NEXU); 
     278                if (int_outof(r_ptr, 50)) f2[2] &= ~(RSF2_TELE_LEVEL); 
    279279        } 
    280280 
    28128