- Timestamp:
- 05/12/08 00:21:54 (5 days ago)
- Files:
-
- trunk/src/defines.h (modified) (4 diffs)
- trunk/src/xtra1.c (modified) (1 diff)
- trunk/src/xtra2.c (modified) (4 diffs)
- trunk/src/xtra3.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/defines.h
r891 r898 230 230 * 231 231 * STORE_MAX_KEEP must be < STORE_INVEN_MAX. 232 *233 232 */ 234 233 #define STORE_INVEN_MAX 24 /* Max number of discrete objs in inven */ … … 436 435 TMD_INVULN, TMD_HERO, TMD_SHERO, TMD_SHIELD, TMD_BLESSED, TMD_SINVIS, 437 436 TMD_SINFRA, TMD_OPP_ACID, TMD_OPP_ELEC, TMD_OPP_FIRE, TMD_OPP_COLD, 438 TMD_OPP_POIS, TMD_ AMNESIA, TMD_TELEPATHY,437 TMD_OPP_POIS, TMD_OPP_CONF, TMD_AMNESIA, TMD_TELEPATHY, 439 438 440 439 TMD_MAX … … 1810 1809 k_info[(T)->k_idx].aware)) 1811 1810 1811 1812 1812 /* 1813 1813 * Determine if the attr and char should consider the item's flavor … … 1875 1875 (flavor_info[k_info[(T)->k_idx].flavor].d_char) : \ 1876 1876 (k_info[(T)->k_idx].d_char)) 1877 1878 1877 1879 1878 /* trunk/src/xtra1.c
r887 r898 1120 1120 p_ptr->telepathy = TRUE; 1121 1121 1122 /* Temporary resist confusion */ 1123 if (p_ptr->timed[TMD_OPP_CONF]) 1124 p_ptr->resist_confu = TRUE; 1125 1122 1126 1123 1127 trunk/src/xtra2.c
r895 r898 33 33 static bool set_oppose_fire(int v); 34 34 static bool set_oppose_cold(int v); 35 static bool set_oppose_conf(int v); 35 36 static bool set_stun(int v); 36 37 static bool set_cut(int v); … … 68 69 { "", "", 0, 0, 0 }, /* fire -- handled seperately */ 69 70 { "", "", 0, 0, 0 }, /* cold -- handled seperately */ 71 { "", "", 0, 0, 0 }, /* conf -- handled seperately */ 70 72 { "You feel resistant to poison!", "You feel less resistant to poison.", 0, 0, MSG_RES_POIS }, 71 73 { "You feel your memories fade.", "Your memories come flooding back.", 0, 0, MSG_GENERIC }, … … 92 94 else if (idx == TMD_OPP_FIRE) return set_oppose_fire(v); 93 95 else if (idx == TMD_OPP_COLD) return set_oppose_cold(v); 96 else if (idx == TMD_OPP_CONF) return set_oppose_conf(v); 94 97 95 98 /* Find the effect */ … … 354 357 355 358 /* Redraw */ 359 p_ptr->redraw |= PR_STATUS; 360 361 /* Handle stuff */ 362 handle_stuff(); 363 364 /* Result */ 365 return (TRUE); 366 } 367 368 369 /* 370 * Set "p_ptr->timed[TMD_OPP_CONF]", notice observable changes 371 */ 372 static bool set_oppose_conf(int v) 373 { 374 bool notice = FALSE; 375 376 /* Hack -- Force good values */ 377 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; 378 379 /* Open */ 380 if (v) 381 { 382 if (!p_ptr->timed[TMD_OPP_CONF] && !p_ptr->resist_confu) 383 { 384 message(MSG_RES_ELEC, 0, "You feel remarkably clear-headed!"); 385 notice = TRUE; 386 } 387 } 388 389 /* Shut */ 390 else 391 { 392 if (p_ptr->timed[TMD_OPP_CONF] && !p_ptr->resist_confu) 393 { 394 message(MSG_RECOVER, 0, "You feel less clear-headed."); 395 notice = TRUE; 396 } 397 } 398 399 /* Use the value */ 400 p_ptr->timed[TMD_OPP_CONF] = v; 401 402 /* Nothing to notice */ 403 if (!notice) return (FALSE); 404 405 /* Disturb */ 406 if (disturb_state) disturb(0, 0); 407 408 /* Redraw */ 409 p_ptr->update |= PU_BONUS; 356 410 p_ptr->redraw |= PR_STATUS; 357 411 trunk/src/xtra3.c
r887 r898 1 1 /* 2 2 * File: xtra3.c 3 * Purpose: Handles the setting up updating, and cleaning up of the various 3 * Purpose: Handles the setting up updating, and cleaning up of the various 4 4 * things that are displayed by the game. 5 5 * … … 24 24 25 25 #include "tvalsval.h" 26 27 26 28 27 /* … … 668 667 { TMD_OPP_COLD, S("RCold"), TERM_WHITE }, 669 668 { TMD_OPP_POIS, S("RPois"), TERM_GREEN }, 669 { TMD_OPP_CONF, S("RConf"), TERM_VIOLET }, 670 670 { TMD_AMNESIA, S("Amnesiac"), TERM_ORANGE }, 671 671 };
