~nckmccnnll/faangband/trunk

« back to all changes in this revision

Viewing changes to src/attack.c

  • Committer: Nick McConnell
  • Date: 2010-12-07 08:09:49 UTC
  • mfrom: (125.1.16 bug-fix)
  • Revision ID: nckmccnnll@yahoo.com.au-20101207080949-x6pnlwvotoa83r0i
Bugfixes from LostTemplar

Show diffs side-by-side

added added

removed removed

Lines of Context:
414
414
                notice_ring = TRUE;
415
415
              }
416
416
          }
417
 
        
 
417
          /* temporary elemental brands */
 
418
          if (p_ptr->special_attack & (ATTACK_ACID)) 
 
419
            brand[P_BRAND_ACID] = MAX(brand[P_BRAND_ACID],BRAND_BOOST_NORMAL);
 
420
          if (p_ptr->special_attack & (ATTACK_ELEC)) 
 
421
            brand[P_BRAND_ELEC] = MAX(brand[P_BRAND_ELEC],BRAND_BOOST_NORMAL);
 
422
          if (p_ptr->special_attack & (ATTACK_FIRE)) 
 
423
            brand[P_BRAND_FIRE] = MAX(brand[P_BRAND_FIRE],BRAND_BOOST_NORMAL);
 
424
          if (p_ptr->special_attack & (ATTACK_COLD)) 
 
425
            brand[P_BRAND_COLD] = MAX(brand[P_BRAND_COLD],BRAND_BOOST_NORMAL);
 
426
          if (p_ptr->special_attack & (ATTACK_POIS)) 
 
427
            brand[P_BRAND_POIS] = MAX(brand[P_BRAND_POIS],BRAND_BOOST_NORMAL);
418
428
        break;
419
429
      }
420
430
    }
1273
1283
      
1274
1284
      /* Stunning. */
1275
1285
      if (bash_quality + p_ptr->lev > randint(200 + r_ptr->level * 4))
1276
 
        {
1277
 
          message_format(MSG_HIT, 0, "%^s is stunned.", m_name);
1278
 
          
1279
 
          m_ptr->stunned += rand_int(p_ptr->lev / 5) + 4;
1280
 
          if (m_ptr->stunned > 24) m_ptr->stunned = 24;
 
1286
        {
 
1287
          if (r_ptr->flags3 & (RF3_NO_STUN))
 
1288
            {
 
1289
              if (m_ptr->ml) l_ptr->flags3 |= (RF3_NO_STUN);
 
1290
            }
 
1291
          else
 
1292
            {
 
1293
              message_format(MSG_HIT, 0, "%^s is stunned.", m_name);
 
1294
              m_ptr->stunned += rand_int(p_ptr->lev / 5) + 4;
 
1295
              if (m_ptr->stunned > 24) m_ptr->stunned = 24;
 
1296
            }
1281
1297
        }
1282
1298
      
1283
1299
      /* Confusion. */
1284
 
      if (bash_quality + p_ptr->lev > randint(300 + r_ptr->level * 6) && 
1285
 
          !(r_ptr->flags3 & (RF3_NO_CONF)))
1286
 
        {
1287
 
          message_format(MSG_HIT, 0, "%^s appears confused.", m_name);
1288
 
          
1289
 
          m_ptr->confused += rand_int(p_ptr->lev / 5) + 4;
 
1300
      if (bash_quality + p_ptr->lev > randint(300 + r_ptr->level * 6))
 
1301
        {
 
1302
          if (r_ptr->flags3 & (RF3_NO_CONF))
 
1303
            {
 
1304
              if (m_ptr->ml) l_ptr->flags3 |= (RF3_NO_CONF);
 
1305
            }
 
1306
          else
 
1307
            {
 
1308
              message_format(MSG_HIT, 0, "%^s appears confused.", m_name);
 
1309
              m_ptr->confused += rand_int(p_ptr->lev / 5) + 4;
 
1310
            }
1290
1311
        }
1291
1312
      
1292
1313
      /* The player will sometimes stumble. */