Changeset 45

Show
Ignore:
Timestamp:
04/13/07 06:02:11 (2 years ago)
Author:
takkaria
Message:

Elimated double-rate spellcasting. (Julian Lighton; from V CVS.)

Files:

Legend:

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

    r24 r45  
    696696        char ddesc[80]; 
    697697 
    698         bool no_innate = FALSE; 
    699  
    700698        /* Summon count */ 
    701699        int count = 0; 
     
    728726        if (!chance) return (FALSE); 
    729727 
    730 #ifdef MONSTER_AI 
    731  
    732         if (!smart_monsters) 
    733         { 
    734                 /* Only do spells occasionally */ 
    735                 if (rand_int(100) >= chance) return (FALSE); 
    736         } 
    737         else 
    738         { 
    739                 /* Do spells more often, because they can fail */ 
    740                 if (rand_int(100) >= 2 * chance) return (FALSE); 
    741  
    742                 /* Sometimes forbid innate attacks (breaths) */ 
    743                 if (rand_int(100) >= chance) no_innate = TRUE; 
    744         } 
    745  
    746 #else /* MONSTER_AI */ 
    747728 
    748729        /* Only do spells occasionally */ 
    749730        if (rand_int(100) >= chance) return (FALSE); 
    750  
    751 #endif /* MONSTER_AI */ 
    752  
    753731 
    754732 
     
    774752 
    775753 
    776 #ifdef MONSTER_AI 
    777  
    778         /* Forbid innate attacks sometimes */ 
    779         if (no_innate) 
    780         { 
    781                 f4 &= ~(RF4_INNATE_MASK); 
    782                 f5 &= ~(RF5_INNATE_MASK); 
    783                 f6 &= ~(RF6_INNATE_MASK); 
    784         } 
    785  
    786 #endif /* MONSTER_AI */ 
    787754 
    788755        /* Hack -- allow "desperate" spells */