Changeset 321
- Timestamp:
- 07/10/07 20:32:26 (2 years ago)
- Files:
-
- trunk/lib/edit/object.txt (modified) (55 diffs)
- trunk/src/cmd6.c (modified) (5 diffs)
- trunk/src/effects.c (modified) (12 diffs)
- trunk/src/effects.h (modified) (5 diffs)
- trunk/src/obj-info.c (modified) (3 diffs)
- trunk/src/store.c (modified) (1 diff)
- trunk/src/use-obj.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/edit/object.txt
r320 r321 255 255 A:15/1 256 256 F:EASY_KNOW 257 E:C W_SERIOUS257 E:CURE_SERIOUS 258 258 259 259 … … 1803 1803 I:75:2:400 1804 1804 W:0:0:4:2 1805 A:0/1 1806 P:0:1d1:0:0:0 1807 F:EASY_KNOW 1808 D:It has no effect apart from providing nourishment (for about 200 turns 1809 D: under normal conditions). 1810 D: Note: These are always Icky Green Potions. 1805 P:0:1d1:0:0:0 1806 F:EASY_KNOW 1807 E:DRINK_GOOD 1811 1808 1812 1809 N:223:Apple Juice … … 1814 1811 I:75:1:250 1815 1812 W:0:0:4:1 1816 A:0/1 1817 P:0:1d1:0:0:0 1818 F:EASY_KNOW 1819 D:It has no effect apart from providing nourishment (for about 125 turns 1820 D: under normal conditions). 1821 D: Note: These are always Light Brown Potions. 1813 P:0:1d1:0:0:0 1814 F:EASY_KNOW 1815 E:DRINK_GOOD 1822 1816 1823 1817 N:224:Water … … 1825 1819 I:75:0:200 1826 1820 W:0:0:4:1 1827 A:0/1 1828 P:0:1d1:0:0:0 1829 F:EASY_KNOW 1830 D:It has no effect apart from providing nourishment (for about 100 turns 1831 D: under normal conditions). 1832 D: Note: These are always Clear Potions. 1821 P:0:1d1:0:0:0 1822 F:EASY_KNOW 1823 E:DRINK_GOOD 1833 1824 1834 1825 N:225:Strength … … 1839 1830 P:0:1d1:0:0:0 1840 1831 F:EASY_KNOW 1841 D:It first acts as a Potion of Restore Strength, then permanently 1842 D: increases strength. 1832 E:GAIN_STR 1843 1833 1844 1834 N:226:Weakness … … 1849 1839 P:0:1d1:0:0:0 1850 1840 F:EASY_KNOW 1851 D:It reduces strength (unless you have sustain strength). 1841 E:LOSE_STR 1852 1842 1853 1843 N:227:Restore Strength … … 1858 1848 P:0:1d1:0:0:0 1859 1849 F:EASY_KNOW 1860 D:It restores strength to maximum if it is currently below maximum. 1850 E:RESTORE_STR 1861 1851 1862 1852 N:228:Intelligence … … 1867 1857 P:0:1d1:0:0:0 1868 1858 F:EASY_KNOW 1869 D:It first acts as a Potion of Restore Intelligence, then permanently 1870 D: increases intelligence. 1859 E:GAIN_INT 1871 1860 1872 1861 N:229:Stupidity … … 1877 1866 P:0:1d1:0:0:0 1878 1867 F:EASY_KNOW 1879 D:It reduces intelligence (unless you have sustain intelligence). 1868 E:LOSE_INT 1880 1869 1881 1870 N:230:Restore Intelligence … … 1886 1875 P:0:1d1:0:0:0 1887 1876 F:EASY_KNOW 1888 D:It restores intelligence to maximum if it is currently below maximum. 1877 E:RESTORE_INT 1889 1878 1890 1879 N:231:Wisdom … … 1895 1884 P:0:1d1:0:0:0 1896 1885 F:EASY_KNOW 1897 D:It first acts as a Potion of Restore Wisdom, then permanently 1898 D: increases wisdom. 1886 E:GAIN_WIS 1899 1887 1900 1888 N:232:Naivety … … 1905 1893 P:0:1d1:0:0:0 1906 1894 F:EASY_KNOW 1907 D:It reduces wisdom (unless you have sustain wisdom). 1895 E:LOSE_WIS 1908 1896 1909 1897 N:233:Restore Wisdom … … 1914 1902 P:0:1d1:0:0:0 1915 1903 F:EASY_KNOW 1916 D:It restores wisdom to maximum if it is currently below maximum. 1904 E:RESTORE_WIS 1917 1905 1918 1906 N:234:Charisma … … 1923 1911 P:0:1d1:0:0:0 1924 1912 F:EASY_KNOW 1925 D:It first acts as a Potion of Restore Charisma, then permanently 1926 D: increases charisma. 1913 E:GAIN_CHR 1927 1914 1928 1915 N:235:Ugliness … … 1933 1920 P:0:1d1:0:0:0 1934 1921 F:EASY_KNOW 1935 D:It reduces charisma (unless you have sustain charisma). 1922 E:LOSE_CHR 1936 1923 1937 1924 N:236:Restore Charisma … … 1942 1929 P:0:1d1:0:0:0 1943 1930 F:EASY_KNOW 1944 D:It restores charisma to maximum if it is currently below maximum. 1931 E:RESTORE_CHR 1945 1932 1946 1933 N:237:Cure Light Wounds … … 1951 1938 P:0:1d1:0:0:0 1952 1939 F:EASY_KNOW 1953 D:It cures 2d8 points of damage, heals 10 points worth of cuts, and 1954 D: cures blindness. 1955 D: It also provides nourishment for about 25 turns under normal 1956 D: conditions. 1940 E:CURE_LIGHT 1957 1941 1958 1942 N:238:Clumsiness … … 1963 1947 P:0:1d1:0:0:0 1964 1948 F:EASY_KNOW 1965 D:It reduces dexterity (unless you have sustain dexterity). 1949 E:LOSE_DEX 1966 1950 1967 1951 N:239:Sickliness … … 1972 1956 P:0:1d1:0:0:0 1973 1957 F:EASY_KNOW 1974 D:It reduces constitution (unless you have sustain constitution). 1958 E:LOSE_CON 1975 1959 1976 1960 N:240:Cure Serious Wounds … … 1981 1965 P:0:1d1:0:0:0 1982 1966 F:EASY_KNOW 1983 D:It cures 4d8 points of damage, heals half of all cut damage plus 1984 D: another 50 points, and cures blindness and confusion. 1985 D: It also provides nourishment for about 50 turns under normal 1986 D: conditions. 1967 E:CURE_SERIOUS 1987 1968 1988 1969 N:241:Cure Critical Wounds … … 1993 1974 P:0:1d1:0:0:0 1994 1975 F:EASY_KNOW 1995 D:It cures 6d8 points of damage, cures all stunning, heals all cut 1996 D: damage, neutralizes poison, and cures blindness and confusion. 1997 D: It also provides nourishment for about 50 turns under normal 1998 D: conditions. 1976 E:CURE_CRITICAL 1999 1977 2000 1978 N:242:Healing … … 2005 1983 P:0:1d1:0:0:0 2006 1984 F:EASY_KNOW 2007 D:It cures 300 points of damage, cures all stunning, heals all cut 2008 D: damage, neutralizes poison, and cures blindness and confusion. 2009 D: It also provides nourishment for about 100 turns under normal 2010 D: conditions. 1985 E:CURE_FULL 2011 1986 2012 1987 N:243:Constitution … … 2017 1992 P:0:1d1:0:0:0 2018 1993 F:EASY_KNOW 2019 D:It first acts as a Potion of Restore Constitution, then permanently 2020 D: increases constitution. 1994 E:GAIN_CON 2021 1995 2022 1996 N:244:Experience … … 2027 2001 P:0:1d1:0:0:0 2028 2002 F:EASY_KNOW 2029 D:It grants either 100000 experience points or half the current 2030 D: experience point total plus 10, whichever is less. 2003 E:GAIN_EXP 2031 2004 2032 2005 N:245:Sleep … … 2037 2010 P:0:1d1:0:0:0 2038 2011 F:EASY_KNOW 2039 D:It induces paralyzation for 3+1d4 turns, unless you have free action. 2040 D: It also provides nourishment for about 50 turns under normal 2041 D: conditions. 2012 E:PARALYZE 2042 2013 2043 2014 N:246:Blindness … … 2048 2019 P:0:1d1:0:0:0 2049 2020 F:EASY_KNOW 2050 D:It induces blindness for 99+1d100 turns, unless you have resistance to 2051 D: blindness. 2021 E:BLIND 2052 2022 2053 2023 N:247:Confusion … … 2058 2028 P:0:1d1:0:0:0 2059 2029 F:EASY_KNOW 2060 D:It induces confusion for 14+1d20 turns, unless you have resistance to 2061 D: confusion. 2062 D: It also provides nourishment for about 25 turns under normal 2063 D: conditions. 2030 E:CONFUSE 2064 2031 2065 2032 N:248:Poison … … 2070 2037 P:0:1d1:0:0:0 2071 2038 F:EASY_KNOW 2072 D:It poisons you (adding 9+1d15 points to the poison counter), unless 2073 D: you have resistance to poison. 2039 E:POISON 2074 2040 2075 2041 N:249:Speed … … 2080 2046 P:0:1d1:0:0:0 2081 2047 F:EASY_KNOW 2082 D:It hastes you (+10 to speed) for 15+1d25 turns (or 5 additional turns 2083 D: if you already are under the effect of a temporary haste 2084 D: enchantment). 2048 E:HASTE 2085 2049 2086 2050 N:250:Slowness … … 2091 2055 P:0:1d1:0:0:0 2092 2056 F:EASY_KNOW 2093 D:It slows you down (-10 to speed) for 15+1d25 turns; this duration is 2094 D: cumulative with other temporary slowing enchantments. 2095 D: It also provides nourishment for about 25 turns under normal 2096 D: conditions. 2057 E:SLOW 2097 2058 2098 2059 N:251:Dexterity … … 2103 2064 P:0:1d1:0:0:0 2104 2065 F:EASY_KNOW 2105 D:It first acts as a Potion of Restore Dexterity, then permanently 2106 D: increases dexterity. 2066 E:GAIN_DEX 2107 2067 2108 2068 N:252:Restore Dexterity … … 2113 2073 P:0:1d1:0:0:0 2114 2074 F:EASY_KNOW 2115 D:It restores dexterity to maximum if it is currently below maximum. 2075 E:RESTORE_DEX 2116 2076 2117 2077 N:253:Restore Constitution … … 2122 2082 P:0:1d1:0:0:0 2123 2083 F:EASY_KNOW 2124 D:It restores constution to maximum if it is currently below maximum. 2084 E:RESTORE_CON 2125 2085 2126 2086 N:254:Lose Memories … … 2131 2091 P:0:1d1:0:0:0 2132 2092 F:EASY_KNOW 2133 D:It drains 25% of your experience total, unless you have hold life. 2093 E:LOSE_EXP 2134 2094 2135 2095 N:255:Salt Water … … 2140 2100 P:0:1d1:0:0:0 2141 2101 F:EASY_KNOW 2142 D:It induces vomiting, which will result in severe hunger but will also 2143 D: clear away all poison. 2144 D: This will also cause 4 turns of paralysis, even if you have free 2145 D: action. 2102 E:DRINK_SALT 2146 2103 2147 2104 N:256:Enlightenment … … 2152 2109 P:0:1d1:0:0:0 2153 2110 F:EASY_KNOW 2154 D:It completely lights up and magically maps the current dungeon level. 2111 E:ENLIGHTENMENT 2155 2112 2156 2113 N:257:Heroism … … 2161 2118 P:0:1d1:0:0:0 2162 2119 F:EASY_KNOW 2163 D:It cures 10 points of damage, removes fear and grants you heroism 2164 D: (resistance to fear, and a bonus of +12 to-hit) for 25+1d25 turns. 2120 E:HERO 2165 2121 2166 2122 N:258:Berserk Strength … … 2171 2127 P:0:1d1:0:0:0 2172 2128 F:EASY_KNOW 2173 D:It cures 30 points of damage, removes fear and grants you berserk 2174 D: strength (resistance to fear, a bonus of +12 to-hit, and a penalty of 2175 D: -10 to AC) for 25+1d25 turns. 2129 E:SHERO 2176 2130 2177 2131 N:259:Boldness … … 2182 2136 P:0:1d1:0:0:0 2183 2137 F:EASY_KNOW 2184 D:It removes fear. 2138 E:CURE_PARANOIA 2185 2139 2186 2140 N:260:Restore Life Levels … … 2191 2145 P:0:1d1:0:0:0 2192 2146 F:EASY_KNOW 2193 D:It restores experience to maximum if it is currently below maximum. 2147 E:RESTORE_EXP 2194 2148 2195 2149 N:261:Resist Heat … … 2200 2154 P:0:1d1:0:0:0 2201 2155 F:EASY_KNOW 2202 D:It grants you temporary resistance to fire for 10+1d10 turns. 2203 D: Temporary resistance is cumulative with permanent resistance, if one 2204 D: of your equipped items provides that. The duration is cumulative 2205 D: with other magic providing temporary fire resistance. 2156 E:RESIST_FIRE 2206 2157 2207 2158 N:262:Resist Cold … … 2212 2163 P:0:1d1:0:0:0 2213 2164 F:EASY_KNOW 2214 D:It grants you temporary resistance to cold for 10+1d10 turns. 2215 D: Temporary resistance is cumulative with permanent resistance, if one 2216 D: of your equipped items provides that. The duration is cumulative 2217 D: with other magic providing temporary cold resistance. 2218 2219 N:263:Detect Invisible 2165 E:RESIST_COLD 2166 2167 N:263:See Invisible 2220 2168 G:!:d 2221 2169 I:75:25:0 … … 2224 2172 P:0:1d1:0:0:0 2225 2173 F:EASY_KNOW 2226 D:It enables you to see invisible creatures for 12+1d12 turns. 2174 E:TMD_SINVIS 2227 2175 2228 2176 N:264:Slow Poison … … 2233 2181 P:0:1d1:0:0:0 2234 2182 F:EASY_KNOW 2235 D:It halves the severity of any current poisoning. 2183 E:CURE_POISON2 2236 2184 2237 2185 N:265:Neutralize Poison … … 2242 2190 P:0:1d1:0:0:0 2243 2191 F:EASY_KNOW 2244 D:It neutralizes poison. 2192 E:CURE_POISON 2245 2193 2246 2194 N:266:Restore Mana … … 2251 2199 P:0:1d1:0:0:0 2252 2200 F:EASY_KNOW 2253 D:It restores mana points to maximum if they are currently below 2254 D: maximum. 2201 E:RESTORE_MANA 2255 2202 2256 2203 N:267:Infravision … … 2261 2208 P:0:1d1:0:0:0 2262 2209 F:EASY_KNOW 2263 D:It extends the radius of your infravision by 50 feet for 100+1d100 2264 D: turns. 2210 E:TMD_INFRA 2265 2211 2266 2212 ## XXX 268 XXX ## … … 3652 3598 P:0:1d1:0:0:0 3653 3599 F:EASY_KNOW 3654 D:It inflicts 5000 points of damage. 3655 D: Death can only be avoided if you have magical invulnerability, which 3656 D: just happens to be unavailable in the current version of Angband. 3600 E:DRINK_DEATH 3657 3601 3658 3602 N:416:Ruination … … 3663 3607 P:0:1d1:0:0:0 3664 3608 F:EASY_KNOW 3665 D:It inflicts 10d10 points of damage and permanently decreases all stats 3666 D: (even if you have stat sustains). 3609 E:DRINK_RUIN 3667 3610 3668 3611 N:417:Detonations … … 3673 3616 P:0:25d25:0:0:0 3674 3617 F:EASY_KNOW 3675 D:It inflicts 50d20 points of damage from massive explosions, severe 3676 D: cuts (+5000 to the cut counter), and stunning (+75 to the stun 3677 D: counter). 3678 D: It can also be thrown for 25d25 points of damage. 3618 E:DRINK_DETONATE 3679 3619 3680 3620 N:418:Augmentation … … 3685 3625 P:0:1d1:0:0:0 3686 3626 F:EASY_KNOW 3687 D:It first restores to maximum any stats below maximum, then permanently 3688 D: increases all stats. 3627 E:GAIN_ALL 3689 3628 3690 3629 N:419:*Healing* … … 3695 3634 P:0:1d1:0:0:0 3696 3635 F:EASY_KNOW 3697 D:It cures 1200 points of damage, cures all stunning, heals all cut 3698 D: damage, neutralizes poison, and cures blindness and confusion. 3636 E:CURE_FULL2 3699 3637 3700 3638 N:420:Life … … 3705 3643 P:0:1d1:0:0:0 3706 3644 F:EASY_KNOW 3707 D:It restores experience and all stats to maximum, cures 5000 points of 3708 D: damage, cures all stunning, heals all cut damage, neutralizes poison, 3709 D: stops hallucination, and cures blindness and confusion. 3645 E:CURE_NONORLYBIG 3710 3646 3711 3647 N:421:Self Knowledge … … 3716 3652 P:0:1d1:0:0:0 3717 3653 F:EASY_KNOW 3718 D:It grants knowledge of all special powers (whether intrinsic, 3719 D: temporary, or provided by a magical item) that you currently possess. 3654 E:SELF_KNOW 3720 3655 3721 3656 N:422:*Enlightenment* … … 3726 3661 P:0:1d1:0:0:0 3727 3662 F:EASY_KNOW 3728 D:It has the powers of the Potions of Enlightenment, Intelligence, 3729 D: Wisdom, and Self Knowledge; also identifies all items you are 3730 D: carrying, and detects all treasure, objects, secret doors, stairs, 3731 D: and traps in the immediate area. 3663 E:ENLIGHTENMENT2 3732 3664 3733 3665 ##### Items 423 to 430 are new amulets thought up by JLE ##### trunk/src/cmd6.c
r320 r321 18 18 */ 19 19 #include "angband.h" 20 #include "effects.h" 20 21 #include "script.h" 21 22 … … 185 186 int item; 186 187 object_type *o_ptr; 188 int effect; 187 189 bool ident = FALSE, used; 188 190 int dir = 5; … … 196 198 else o_ptr = &o_list[0 - item]; 197 199 200 /* Figure out effect to use */ 201 if (o_ptr->name1) 202 effect = a_info[o_ptr->name1].effect; 203 else 204 effect = k_info[o_ptr->k_idx].effect; 205 198 206 /* If the item requires a direction, get one (allow cancelling) */ 199 if ((o_ptr->tval == TV_WAND) || 207 if (effect_aim(effect) || 208 (o_ptr->tval == TV_WAND) || 200 209 (o_ptr->tval == TV_ROD && (o_ptr->sval >= SV_ROD_MIN_DIRECTION || !object_aware_p(o_ptr)))) 201 210 { … … 215 224 } 216 225 217 /* Make a noise! */ 218 sound(snd); 219 220 /* Use the object */ 221 used = use_object(o_ptr, &ident, dir); 226 /* Special message for artifacts */ 227 if (artifact_p(o_ptr)) 228 { 229 message(snd, 0, "You activate it."); 230 msg_print(a_text + a_info[o_ptr->name1].effect_msg); 231 } 232 else 233 { 234 /* Make a noise! */ 235 sound(snd); 236 } 237 238 /* Use the object */ 239 if (effect) 240 { 241 /* Do effect */ 242 used = do_effect(effect, &ident, dir); 243 244 /* Food feeds the player */ 245 if (o_ptr->tval == TV_FOOD || o_ptr->tval == TV_POTION) 246 (void)set_food(p_ptr->food + o_ptr->pval); 247 } 248 else 249 { 250 /* Use the more prosaic method */ 251 used = use_object(o_ptr, &ident, dir); 252 } 253 222 254 if (!used && !ident) return; 223 255 … … 389 421 390 422 /* Use the object */ 391 do_cmd_use("Activate which item? ", "You have nothing to activate.", USE_EQUIP, MSG_ GENERIC, USE_TIMEOUT);392 } 423 do_cmd_use("Activate which item? ", "You have nothing to activate.", USE_EQUIP, MSG_ACT_ARTIFACT, USE_TIMEOUT); 424 } trunk/src/effects.c
r320 r321 59 59 60 60 61 62 61 /* 63 62 * Do an effect, given an object. 64 63 */ 65 bool do_effect( object_type *o_ptr, bool *ident, int dir)64 bool do_effect(int effect, bool *ident, int dir) 66 65 { 67 effect_type effect = k_info[o_ptr->k_idx].effect;68 66 int py = p_ptr->py; 69 67 int px = p_ptr->px; 70 68 71 if (o_ptr->name1) 72 effect = a_info[o_ptr->name1].effect; 69 if (effect < 1 || effect > EF_MAX) 70 { 71 msg_print("Bad effect passed to do_effect(). Please report this bug."); 72 return FALSE; 73 } 73 74 74 75 switch (effect) … … 78 79 if (!(p_ptr->resist_pois || p_ptr->timed[TMD_OPP_POIS])) 79 80 { 80 if (inc_timed(TMD_POISONED, rand_int(10) + 10))81 if (inc_timed(TMD_POISONED, damroll(2, 7) + 10)) 81 82 *ident = TRUE; 82 83 } … … 87 88 case EF_BLIND: 88 89 { 89 if (!p_ptr->resist_blind && inc_timed(TMD_BLIND, rand_int(200) + 200))90 if (!p_ptr->resist_blind && inc_timed(TMD_BLIND, damroll(4, 25) + 75)) 90 91 *ident = TRUE; 91 92 … … 103 104 case EF_CONFUSE: 104 105 { 105 if (!p_ptr->resist_confu && inc_timed(TMD_CONFUSED, rand_int(10) + 10))106 if (!p_ptr->resist_confu && inc_timed(TMD_CONFUSED, damroll(4, 5) + 10)) 106 107 *ident = TRUE; 107 108 … … 119 120 case EF_PARALYZE: 120 121 { 121 if (!p_ptr->free_act && inc_timed(TMD_PARALYZED, rand_int(10) + 10)) 122 *ident = TRUE; 123 124 return TRUE; 122 if (!p_ptr->free_act && inc_timed(TMD_PARALYZED, rand_int(5) + 5)) 123 *ident = TRUE; 124 125 return TRUE; 126 } 127 128 case EF_SLOW: 129 { 130 if (inc_timed(TMD_SLOW, randint(25) + 15)) *ident = TRUE; 131 break; 132 } 133 134 case EF_CURE_POISON: 135 { 136 if (clear_timed(TMD_POISONED)) *ident = TRUE; 137 return TRUE; 138 } 139 140 case EF_CURE_POISON2: 141 { 142 if (set_timed(TMD_POISONED, p_ptr->timed[TMD_POISONED] / 2)) *ident = TRUE; 143 return TRUE; 144 } 145 146 case EF_CURE_BLINDNESS: 147 { 148 if (clear_timed(TMD_BLIND)) *ident = TRUE; 149 return TRUE; 150 } 151 152 case EF_CURE_PARANOIA: 153 { 154 if (clear_timed(TMD_AFRAID)) *ident = TRUE; 155 return TRUE; 156 } 157 158 case EF_CURE_CONFUSION: 159 { 160 if (clear_timed(TMD_CONFUSED)) *ident = TRUE; 161 return TRUE; 162 } 163 164 case EF_CURE_LIGHT: 165 { 166 if (hp_player(damroll(2, 8))) *ident = TRUE; 167 if (clear_timed(TMD_BLIND)) *ident = TRUE; 168 if (dec_timed(TMD_CUT, 10)) *ident = TRUE; 169 break; 170 } 171 172 case EF_CURE_SERIOUS: 173 { 174 if (hp_player(damroll(4, 8))) *ident = TRUE; 175 if (set_timed(TMD_CUT, (p_ptr->timed[TMD_CUT] / 2) - 50)) *ident = TRUE; 176 if (clear_timed(TMD_BLIND)) *ident = TRUE; 177 if (clear_timed(TMD_CONFUSED)) *ident = TRUE; 178 179 return TRUE; 180 } 181 182 case EF_CURE_CRITICAL: 183 { 184 if (hp_player(damroll(6, 8))) *ident = TRUE; 185 if (clear_timed(TMD_BLIND)) *ident = TRUE; 186 if (clear_timed(TMD_CONFUSED)) *ident = TRUE; 187 if (clear_timed(TMD_POISONED)) *ident = TRUE; 188 if (clear_timed(TMD_STUN)) *ident = TRUE; 189 if (clear_timed(TMD_CUT)) *ident = TRUE; 190 if (clear_timed(TMD_AMNESIA)) *ident = TRUE; 191 return TRUE; 192 } 193 194 case EF_CURE_FULL: 195 { 196 if (hp_player(300)) *ident = TRUE; 197 if (clear_timed(TMD_BLIND)) *ident = TRUE; 198 if (clear_timed(TMD_CONFUSED)) *ident = TRUE; 199 if (clear_timed(TMD_POISONED)) *ident = TRUE; 200 if (clear_timed(TMD_STUN)) *ident = TRUE; 201 if (clear_timed(TMD_CUT)) *ident = TRUE; 202 if (clear_timed(TMD_AMNESIA)) *ident = TRUE; 203 return TRUE; 204 } 205 206 case EF_CURE_FULL2: 207 { 208 if (hp_player(1200)) *ident = TRUE; 209 if (clear_timed(TMD_BLIND)) *ident = TRUE; 210 if (clear_timed(TMD_CONFUSED)) *ident = TRUE; 211 if (clear_timed(TMD_POISONED)) *ident = TRUE; 212 if (clear_timed(TMD_STUN)) *ident = TRUE; 213 if (clear_timed(TMD_CUT)) *ident = TRUE; 214 if (clear_timed(TMD_AMNESIA)) *ident = TRUE; 215 return TRUE; 216 } 217 218 219 case EF_GAIN_EXP: 220 { 221 if (p_ptr->exp < PY_MAX_EXP) 222 { 223 s32b ee = (p_ptr->exp / 2) + 10; 224 if (ee > 100000L) ee = 100000L; 225 msg_print("You feel more experienced."); 226 gain_exp(ee); 227 *ident = TRUE; 228 } 229 return TRUE; 230 } 231 232 case EF_LOSE_EXP: 233 { 234 if (!p_ptr->hold_life && (p_ptr->exp > 0)) 235 { 236 msg_print("You feel your memories fade."); 237 lose_exp(p_ptr->exp / 4); 238 *ident = TRUE; 239 } 240 return TRUE; 241 } 242 243 case EF_RESTORE_EXP: 244 { 245 if (restore_level()) *ident = TRUE; 246 return TRUE; 247 } 248 249 case EF_RESTORE_MANA: 250 { 251 if (p_ptr->csp < p_ptr->msp) 252 { 253 p_ptr->csp = p_ptr->msp; 254 p_ptr->csp_frac = 0; 255 msg_print("Your feel your head clear."); 256 p_ptr->redraw |= (PR_MANA); 257 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 258 *ident = TRUE; 259 } 260 return TRUE; 261 } 262 263 case EF_GAIN_STR: 264 case EF_GAIN_INT: 265 case EF_GAIN_WIS: 266 case EF_GAIN_DEX: 267 case EF_GAIN_CON: 268 case EF_GAIN_CHR: 269 { 270 int stat = effect - EF_GAIN_STR; 271 if (do_inc_stat(stat)) *ident = TRUE; 272 return TRUE; 273 } 274 275 case EF_GAIN_ALL: 276 { 277 if (do_inc_stat(A_STR)) *ident = TRUE; 278 if (do_inc_stat(A_INT)) *ident = TRUE; 279 if (do_inc_stat(A_WIS)) *ident = TRUE; 280 if (do_inc_stat(A_DEX)) *ident = TRUE; 281 if (do_inc_stat(A_CON)) *ident = TRUE; 282 if (do_inc_stat(A_CHR)) *ident = TRUE; 283 break; 125 284 } 126 285 127 286 case EF_LOSE_STR: 128 { 129 take_hit(damroll(6, 6), "poisonous food"); 130 (void)do_dec_stat(A_STR); 287 case EF_LOSE_INT: 288 case EF_LOSE_WIS: 289 case EF_LOSE_DEX: 290 case EF_LOSE_CON: 291 case EF_LOSE_CHR: 292 { 293 int stat = effect - EF_LOSE_STR; 294 295 take_hit(damroll(5, 5), "stat drain"); 296 (void)do_dec_stat(stat); 131 297 *ident = TRUE; 132 298 … … 143 309 } 144 310 145 case EF_LOSE_CON:146 {147 take_hit(damroll(6, 6), "poisonous food");148 (void)do_dec_stat(A_CON);149 *ident = TRUE;150 151 return TRUE;152 }153 154 311 case EF_LOSE_CON2: 155 312 { … … 161 318 } 162 319 163 case EF_LOSE_INT:164 {165 take_hit(damroll(8, 8), "poisonous food");166 (void)do_dec_stat(A_INT);167 *ident = TRUE;168 169 return TRUE;170 }171 172 case EF_LOSE_WIS:173 {174 take_hit(damroll(8, 8), "poisonous food");175 (void)do_dec_stat(A_WIS);176 *ident = TRUE;177 178 return TRUE;179 }180 181 case EF_CURE_POISON:182 {183 if (clear_timed(TMD_POISONED)) *ident = TRUE;184 return TRUE;185 }186 187 case EF_CURE_BLINDNESS:188 {189 if (clear_timed(TMD_BLIND)) *ident = TRUE;190 return TRUE;191 }192 193 case EF_CURE_PARANOIA:194 {195 if (clear_timed(TMD_AFRAID)) *ident = TRUE;196 return TRUE;197 }198 199 case EF_CURE_CONFUSION:200 {201 if (clear_timed(TMD_CONFUSED)) *ident = TRUE;202 return TRUE;203 }204 205 case EF_CW_SERIOUS:206 {207 if (hp_player(damroll(4, 8))) *ident = TRUE;208 if (set_timed(TMD_CUT, (p_ptr->timed[TMD_CUT] / 2) - 50)) *ident = TRUE;209 return TRUE;210 }211 212 320 case EF_RESTORE_STR: 213 { 214 if (do_res_stat(A_STR)) *ident = TRUE; 215 return TRUE; 216 } 217 321 case EF_RESTORE_INT: 322 case EF_RESTORE_WIS: 323 case EF_RESTORE_DEX: 218 324 case EF_RESTORE_CON: 219 { 220 if (do_res_stat(A_CON)) *ident = TRUE; 221 return TRUE; 325 case EF_RESTORE_CHR: 326 { 327 int stat = effect - EF_RESTORE_STR; 328 if (do_res_stat(stat)) *ident = TRUE; 329 return TRUE; 330 } 331 332 case EF_CURE_NONORLYBIG: 333 { 334 msg_print("You feel life flow through your body!"); 335 restore_level(); 336 (void)clear_timed(TMD_POISONED); 337 (void)clear_timed(TMD_BLIND); 338 (void)clear_timed(TMD_CONFUSED); 339 (void)clear_timed(TMD_IMAGE); 340 (void)clear_timed(TMD_STUN); 341 (void)clear_timed(TMD_CUT); 342 (void)clear_timed(TMD_AMNESIA); 343 344 /* Recalculate max. hitpoints */ 345 update_stuff(); 346 347 hp_player(5000); 348 349 *ident = TRUE; 350 351 /* Now restore all */ 222 352 } 223 353 … … 233 363 } 234 364 365 366 case EF_TMD_INFRA: 367 { 368 if (inc_timed(TMD_SINFRA, 100 + damroll(4, 25))) 369 *ident = TRUE; 370 return TRUE; 371 } 372 373 case EF_TMD_SINVIS: 374 { 375 if (inc_timed(TMD_SINVIS, 12 + damroll(2, 6))) 376 *ident = TRUE; 377 return TRUE; 378 } 379 380 case EF_ENLIGHTENMENT: 381 { 382 msg_print("An image of your surroundings forms in your mind..."); 383 wiz_lite(); 384 *ident = TRUE; 385 break; 386 } 387 388 389 case EF_ENLIGHTENMENT2: 390 { 391 msg_print("You begin to feel more enlightened..."); 392 message_flush(); 393 wiz_lite(); 394 (void)do_inc_stat(A_INT); 395 (void)do_inc_stat(A_WIS); 396 (void)detect_traps(); 397 (void)detect_doors(); 398 (void)detect_stairs(); 399 (void)detect_treasure(); 400 (void)detect_objects_gold(); 401 (void)detect_objects_normal(); 402 identify_pack(); 403 self_knowledge(TRUE); 404 *ident = TRUE; 405 break; 406 } 407 408 case EF_SELF_KNOW: 409 { 410 msg_print("You begin to know yourself a little better..."); 411 message_flush(); 412 self_knowledge(TRUE); 413 *ident = TRUE; 414 break; 415 } 416 417 418 case EF_HERO: 419 { 420 if (hp_player(10)) *ident = TRUE; 421 if (clear_timed(TMD_AFRAID)) *ident = TRUE; 422 if (inc_timed(TMD_HERO, randint(25) + 25)) *ident = TRUE; 423 break; 424 } 425 426 case EF_SHERO: 427 { 428 if (hp_player(30)) *ident = TRUE; 429 if (clear_timed(TMD_AFRAID)) *ident = TRUE; 430 if (inc_timed(TMD_SHERO, randint(25) + 25)) *ident = TRUE; 431 break; 432 } 433 434 435 case EF_RESIST_FIRE: 436 { 437 if (inc_timed(TMD_OPP_FIRE, randint(10) + 10)) 438 *ident = TRUE; 439 return TRUE; 440 } 441 442 case EF_RESIST_COLD: 443 { 444 if (inc_timed(TMD_OPP_COLD, randint(10) + 10)) 445 *ident = TRUE; 446 return TRUE; 447 } 448 449 case EF_RESIST_ALL: 450 { 451 if (inc_timed(TMD_OPP_ACID, randint(20) + 20)) *ident = TRUE; 452 if (inc_timed(TMD_OPP_ELEC, randint(20) + 20)) *ident = TRUE; 453 if (inc_timed(TMD_OPP_FIRE, randint(20) + 20)) *ident = TRUE; 454 if (inc_timed(TMD_OPP_COLD, randint(20) + 20)) *ident = TRUE; 455 if (inc_timed(TMD_OPP_POIS, randint(20) + 20)) *ident = TRUE; 456 return TRUE; 457 } 458 459 235 460 case EF_ENCHANT_TOHIT: 236 461 { … … 557 782 } 558 783 559 case EF_HASTE2: 560 { 561 *ident = TRUE; 784 case EF_HASTE: 785
