Changeset 899 for trunk

Show
Ignore:
Timestamp:
05/16/08 10:57:27 (4 months ago)
Author:
takkaria
Message:
  • Add "terror" timed effect. This is fear + small speed boost.
  • Add "stoneskin" timed effect. This is +40AC + small speed penalty.
  • (#351) Mushrooms of Clear Mind now cures hallu and gives temp rConf.
  • (#522, #369) Tone down CSW and CCW.
  • Add "deep descent" effect, which lowers recall depth by 2 dungeon levels and teleports/recalls there.
  • Add "line of sight confusion" effect, analagous to the slow/sleep effects.
  • Add few new effects for mushrooms, one commented out.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/attack.c

    r895 r899  
    450450 
    451451        /* Handle player fear */ 
    452         if (p_ptr->timed[TMD_AFRAID]
     452        if (p_ptr->afraid
    453453        { 
    454454                /* Message */ 
  • trunk/src/defines.h

    r898 r899  
    435435        TMD_INVULN, TMD_HERO, TMD_SHERO, TMD_SHIELD, TMD_BLESSED, TMD_SINVIS, 
    436436        TMD_SINFRA, TMD_OPP_ACID, TMD_OPP_ELEC, TMD_OPP_FIRE, TMD_OPP_COLD, 
    437         TMD_OPP_POIS, TMD_OPP_CONF, TMD_AMNESIA, TMD_TELEPATHY, 
     437        TMD_OPP_POIS, TMD_OPP_CONF, TMD_AMNESIA, TMD_TELEPATHY, TMD_STONESKIN, 
     438        TMD_TERROR, 
    438439 
    439440        TMD_MAX 
  • trunk/src/dungeon.c

    r895 r899  
    10731073                            !p_ptr->timed[TMD_BLIND] && !p_ptr->timed[TMD_CONFUSED] && 
    10741074                            !p_ptr->timed[TMD_POISONED] && !p_ptr->timed[TMD_AFRAID] && 
     1075                            !p_ptr->timed[TMD_TERROR] && 
    10751076                            !p_ptr->timed[TMD_STUN] && !p_ptr->timed[TMD_CUT] && 
    10761077                            !p_ptr->timed[TMD_SLOW] && !p_ptr->timed[TMD_PARALYZED] && 
  • trunk/src/effects.c

    r895 r899  
    242242                        if (clear_timed(TMD_CONFUSED)) *ident = TRUE; 
    243243                        if (clear_timed(TMD_AFRAID)) *ident = TRUE; 
     244                        if (clear_timed(TMD_IMAGE)) *ident = TRUE; 
     245                        if (!p_ptr->resist_confu && inc_timed(TMD_OPP_CONF, damroll(4, 10))) 
    244246                        return TRUE; 
    245247                } 
     
    267269                case EF_CURE_SERIOUS: 
    268270                { 
    269                         if (heal_player(25, 25)) *ident = TRUE; 
     271                        if (heal_player(20, 25)) *ident = TRUE; 
    270272                        if (clear_timed(TMD_CUT)) *ident = TRUE; 
    271273                        if (clear_timed(TMD_BLIND)) *ident = TRUE; 
     
    277279                case EF_CURE_CRITICAL: 
    278280                { 
    279                         if (heal_player(33, 33)) *ident = TRUE; 
     281                        if (heal_player(25, 30)) *ident = TRUE; 
    280282                        if (clear_timed(TMD_BLIND)) *ident = TRUE; 
    281283                        if (clear_timed(TMD_CONFUSED)) *ident = TRUE; 
     
    961963                } 
    962964 
     965                case EF_DEEP_DESCENT: 
     966                { 
     967                        int i = 2; 
     968                        int new_max = p_ptr->max_depth; 
     969 
     970                        do 
     971                        { 
     972                                if (is_quest(new_max)) continue; 
     973                                if (new_max >= MAX_DEPTH-1) continue; 
     974                                new_max++; 
     975                        } while (--i); 
     976 
     977                        if (new_max == p_ptr->max_depth) 
     978                                return TRUE; 
     979 
     980                        p_ptr->max_depth = new_max; 
     981                        *ident = TRUE; 
     982 
     983                        if (p_ptr->depth == 0) 
     984                        { 
     985                                set_recall(); 
     986                                msg_print("The lower reaches of the dungeon beckon."); 
     987                        } 
     988                        else 
     989                        { 
     990                                message(MSG_TPLEVEL, 0, "You sink through the floor..."); 
     991                                p_ptr->depth = p_ptr->max_depth; 
     992                                p_ptr->leaving = TRUE; 
     993                        } 
     994 
     995                        *ident = TRUE; 
     996                        return TRUE; 
     997                } 
     998 
    963999                case EF_LOSHASTE: 
    9641000                { 
     
    9761012                { 
    9771013                        if (slow_monsters()) *ident = TRUE; 
     1014                        return TRUE; 
     1015                } 
     1016 
     1017                case EF_LOSCONF: 
     1018                { 
     1019                        if (confuse_monsters()) *ident = TRUE; 
    9781020                        return TRUE; 
    9791021                } 
     
    15751617                } 
    15761618 
     1619                case EF_SHROOM_EMERGENCY: 
     1620                { 
     1621                        (void)set_timed(TMD_IMAGE, rand_spread(250, 50)); 
     1622                        (void)set_timed(TMD_OPP_FIRE, rand_spread(30, 10)); 
     1623                        (void)set_timed(TMD_OPP_COLD, rand_spread(30, 10)); 
     1624                        (void)hp_player(200); 
     1625                        *ident = TRUE; 
     1626                        return TRUE; 
     1627                } 
     1628 
     1629                case EF_SHROOM_TERROR: 
     1630                { 
     1631                        if (set_timed(TMD_TERROR, rand_spread(100, 20))) 
     1632                                *ident = TRUE; 
     1633                        return TRUE; 
     1634                } 
     1635 
     1636                case EF_SHROOM_STONE: 
     1637                { 
     1638                        if (set_timed(TMD_STONESKIN, rand_spread(80, 20))) 
     1639                                *ident = TRUE; 
     1640                        return TRUE; 
     1641                } 
     1642 
     1643                case EF_SHROOM_DEBILITY: 
     1644                { 
     1645                        int stat = one_in_(2) ? A_STR : A_CON; 
     1646 
     1647                        if (p_ptr->csp < p_ptr->msp) 
     1648                        { 
     1649                                p_ptr->csp = p_ptr->msp; 
     1650                                p_ptr->csp_frac = 0; 
     1651                                msg_print("Your feel your head clear."); 
     1652                                p_ptr->redraw |= (PR_MANA); 
     1653                                *ident = TRUE; 
     1654                        } 
     1655 
     1656                        (void)do_dec_stat(stat, FALSE); 
     1657 
     1658                        *ident = TRUE; 
     1659                } 
     1660 
     1661#if 0 
     1662                case EF_SHROOM_MANIA: 
     1663                { 
     1664EFFECT(SHROOM_MANIA,     FALSE, "makes you subject to manic fits") 
     1665                        of mania (see Sangband) 
     1666                } 
     1667#endif 
     1668 
    15771669                case EF_RING_ACID: 
    15781670                { 
  • trunk/src/externs.h

    r891 r899  
    493493extern bool speed_monsters(void); 
    494494extern bool slow_monsters(void); 
     495extern bool confuse_monsters(void); 
    495496extern bool sleep_monsters(void); 
    496497extern bool banish_evil(int dist); 
  • trunk/src/list-effects.h

    r783 r899  
    1818EFFECT(CURE_PARANOIA,  FALSE, "removes your fear") 
    1919EFFECT(CURE_CONFUSION, FALSE, "cures confusion") 
    20 EFFECT(CURE_MIND,      FALSE, "cures confusion and removes fear") 
     20EFFECT(CURE_MIND,      FALSE, "cures confusion and hallucination, removes fear and grants you temporary resistance to confusion") 
    2121EFFECT(CURE_BODY,      FALSE, "heals cut damage, and cures stunning, poison and blindness") 
    2222 
    2323EFFECT(CURE_LIGHT,     FALSE, "heals you a little (15% of your wounds, minimum 15HP), heals some cut damage, makes you a little less confused, and cures blindness") 
    24 EFFECT(CURE_SERIOUS,   FALSE, "heals you a little (1/4 of your wounds, minimum 25HP), heals cut damage, and cures blindness and confusion") 
    25 EFFECT(CURE_CRITICAL,  FALSE, "heals you a little (1/3 of your wounds, minimum 33HP), heals cut damage, and cures poisoning, blindness, and confusion") 
     24EFFECT(CURE_SERIOUS,   FALSE, "heals you a little (1/5 of your wounds, minimum 25HP), heals cut damage, and cures blindness and confusion") 
     25EFFECT(CURE_CRITICAL,  FALSE, "heals you a little (1/4 of your wounds, minimum 30HP), heals cut damage, and cures stunning, poisoning, blindness, and confusion") 
    2626EFFECT(CURE_FULL,      FALSE, "restores 300 hit points, heals cut damage, and cures stunning, poisoning, blindness, and confusion") 
    2727EFFECT(CURE_FULL2,     FALSE, "restores 1200 hit points, heals cut damage, and cures stunning, poisoning, blindness, and confusion") 
     
    127127EFFECT(BLESSING3,      FALSE, "increases your AC and to-hit bonus for 1d48+24 turns") 
    128128EFFECT(RECALL,         FALSE, "returns you from the dungeon or takes you to the dungeon after a short delay") 
     129EFFECT(DEEP_DESCENT,   FALSE, "transports you two or three levels below your maximum dungeon depth") 
    129130 
    130131EFFECT(EARTHQUAKES,    FALSE, "causes an earthquake around you") 
     
    134135EFFECT(LOSSLOW,        FALSE, "slows all non-unique monsters within line of sight") 
    135136EFFECT(LOSSLEEP,       FALSE, "sleeps all non-unique creatures within line of sight") 
     137EFFECT(LOSCONF,        FALSE, "confuses all non-unique creatures within line of sight") 
    136138EFFECT(LOSKILL,        FALSE, "removes all non-unique monsters within 20 squares, dealing you damage in the process") 
    137139EFFECT(ILLUMINATION,   FALSE, "lights up the surrounding area, hurting light-sensitive creatures") 
     
    218220EFFECT(FOOD_GOOD,      FALSE, NULL) 
    219221EFFECT(FOOD_WAYBREAD,  FALSE, "restores 4d8 hit points and neutralizes poison") 
    220  
     222EFFECT(SHROOM_EMERGENCY, FALSE, "grants temporary resistance to fire and cold, cures 200HP, but also makes you hallucinate wildly") 
     223EFFECT(SHROOM_TERROR,    FALSE, "speeds up you temporarily but also makes you mortally afraid") 
     224EFFECT(SHROOM_STONE,     FALSE, "turns your skin to stone briefly, which grants an extra 40AC but slows you down") 
     225EFFECT(SHROOM_DEBILITY,  FALSE, "restores some mana but also drains either your strength or constitution") 
     226EFFECT(SHROOM_MANIA,     FALSE, "makes you subject to manic fits") 
    221227EFFECT(RING_ACID,      TRUE,  "grants acid resistance for d20+20 turns and creates an acid ball of damage 70") 
    222228EFFECT(RING_FLAMES,    TRUE,  "grants fire resistance for d20+20 turns and creates a fire ball of damage 80") 
  • trunk/src/spells2.c

    r895 r899  
    467467                info[i++] = "You are terrified."; 
    468468        } 
     469        if (p_ptr->timed[TMD_TERROR]) 
     470        { 
     471                info[i++] = "You are terrified and feel the need to run away."; 
     472        } 
    469473        if (p_ptr->timed[TMD_CUT]) 
    470474        { 
     
    21092113{ 
    21102114        return (project_los(GF_OLD_SLEEP, p_ptr->lev)); 
     2115} 
     2116 
     2117/* 
     2118 * Confuse monsters 
     2119 */ 
     2120bool confuse_monsters(void) 
     2121{ 
     2122        return (project_los(GF_OLD_CONF, p_ptr->lev)); 
    21112123} 
    21122124 
  • trunk/src/types.h

    r888 r899  
    959959        bool free_act;          /* Free action */ 
    960960        bool hold_life;         /* Hold life */ 
     961        bool afraid;            /* Afraid */ 
    961962 
    962963        bool impact;            /* Earthquake blows */ 
  • trunk/src/xtra1.c

    r898 r899  
    769769        p_ptr->ffall = FALSE; 
    770770        p_ptr->hold_life = FALSE; 
     771        p_ptr->afraid = FALSE; 
    771772        p_ptr->telepathy = FALSE; 
    772773        p_ptr->sustain_str = FALSE; 
     
    10811082        } 
    10821083 
     1084        /* Temporary stoneskin */ 
     1085        if (p_ptr->timed[TMD_STONESKIN]) 
     1086        { 
     1087                p_ptr->to_a += 40; 
     1088                p_ptr->dis_to_a += 40; 
     1089                p_ptr->pspeed -= 5; 
     1090        } 
     1091 
    10831092        /* Temporary "Hero" */ 
    10841093        if (p_ptr->timed[TMD_HERO]) 
     
    11241133                p_ptr->resist_confu = TRUE; 
    11251134 
     1135        /* Fear */ 
     1136        if (p_ptr->timed[TMD_AFRAID] || p_ptr->timed[TMD_TERROR]) 
     1137                p_ptr->afraid = TRUE; 
     1138 
     1139        if (p_ptr->timed[TMD_TERROR]) 
     1140                p_ptr->pspeed += 5; 
    11261141 
    11271142 
  • trunk/src/xtra2.c

    r898 r899  
    7373        { "You feel your memories fade.", "Your memories come flooding back.", 0, 0, MSG_GENERIC }, 
    7474        { "Your mind expands.", "Your horizons are once more limited.", 0, PU_BONUS, MSG_GENERIC }, 
     75        { "Your skin turns to stone.", "A fleshy shade returns to your skin.", 0, PU_BONUS, MSG_GENERIC }, 
     76        { "You feel the need to run away, and fast!", "The urge to run dissipates.", 0, PU_BONUS, MSG_AFRAID }, 
    7577}; 
    7678 
  • trunk/src/xtra3.c

    r898 r899  
    651651        { TMD_CONFUSED,  S("Confused"),   TERM_ORANGE }, 
    652652        { TMD_AFRAID,    S("Afraid"),     TERM_ORANGE }, 
     653        { TMD_AFRAID,    S("Terror"),     TERM_ORANGE }, 
    653654        { TMD_IMAGE,     S("Halluc"),     TERM_ORANGE }, 
    654655        { TMD_POISONED,  S("Poisoned"),   TERM_ORANGE }, 
     
    658659        { TMD_HERO,      S("Hero"),       TERM_L_GREEN }, 
    659660        { TMD_SHERO,     S("Berserk"),    TERM_L_GREEN }, 
     661        { TMD_STONESKIN, S("Stone"),      TERM_L_GREEN }, 
    660662        { TMD_SHIELD,    S("Shield"),     TERM_L_GREEN }, 
    661663        { TMD_BLESSED,   S("Blssd"),      TERM_L_GREEN },