Changeset 158
- Timestamp:
- 06/06/07 11:49:02 (1 year ago)
- Files:
-
- trunk/src/cmd5.c (modified) (2 diffs)
- trunk/src/cmd6.c (modified) (8 diffs)
- trunk/src/defines.h (modified) (1 diff)
- trunk/src/melee2.c (modified) (1 diff)
- trunk/src/spells2.c (modified) (1 diff)
- trunk/src/use-obj.c (modified) (3 diffs)
- trunk/src/xtra1.c (modified) (1 diff)
- trunk/src/xtra2.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd5.c
r155 r158 914 914 } 915 915 916 /* Check for amnesia */ 917 else if (rand_int(3) != 0 && p_ptr->timed[TMD_AMNESIA]) 918 { 919 /* Can't remember how */ 920 if (flush_failure) flush(); 921 msg_print("The words are meaningless; you cannot remember how to read."); 922 } 923 916 924 /* Process spell */ 917 925 else … … 1084 1092 } 1085 1093 1094 /* Check for amnesia */ 1095 else if (rand_int(3) != 0 && p_ptr->timed[TMD_AMNESIA]) 1096 { 1097 /* Can't remember how */ 1098 if (flush_failure) flush(); 1099 msg_print("The words are meaningless; you cannot remember how to read."); 1100 } 1101 1086 1102 /* Success */ 1087 1103 else trunk/src/cmd6.c
r156 r158 258 258 return; 259 259 } 260 260 261 if (p_ptr->timed[TMD_CONFUSED]) 261 262 { … … 263 264 return; 264 265 } 265 266 266 267 267 /* Restrict choices to scrolls */ … … 289 289 p_ptr->energy_use = 100; 290 290 291 /* Check for amnesia */ 292 if (rand_int(4) != 0 && p_ptr->timed[TMD_AMNESIA]) 293 { 294 /* Can't remember how */ 295 msg_print("You can't remember how to read!"); 296 return; 297 } 298 291 299 /* Not identified yet */ 292 300 ident = FALSE; … … 385 393 /* Take a turn */ 386 394 p_ptr->energy_use = 100; 395 396 /* Check for amnesia */ 397 if (rand_int(4) != 0 && p_ptr->timed[TMD_AMNESIA]) 398 { 399 /* Can't remember how */ 400 msg_print("You can't remember how to use the staff!"); 401 return; 402 } 387 403 388 404 /* Not identified yet */ … … 525 541 } 526 542 543 /* Check for amnesia */ 544 if (rand_int(4) != 0 && p_ptr->timed[TMD_AMNESIA]) 545 { 546 /* Can't remember how */ 547 p_ptr->energy_use = 100; 548 msg_print("You can't remember how to activate the wand!"); 549 return; 550 } 551 552 527 553 /* Aim the wand */ 528 554 if (!use_object(o_ptr, &ident)) return; … … 571 597 572 598 /* 573 * Activate (zap)a Rod599 * Zap a Rod 574 600 * 575 601 * Unstack fully charged rods as needed. … … 694 720 p_ptr->energy_use = 100; 695 721 722 /* Check for amnesia */ 723 if (rand_int(3) && p_ptr->timed[TMD_AMNESIA]) 724 { 725 /* Can't remember how */ 726 if (flush_failure) flush(); 727 msg_print("You can't remember how to activate that."); 728 return; 729 } 730 696 731 /* Extract the item level */ 697 732 lev = k_info[o_ptr->k_idx].level; … … 708 743 /* High level objects are harder */ 709 744 chance = chance - ((lev > 50) ? 50 : lev); 745 710 746 711 747 /* Give everyone a (slight) chance */ trunk/src/defines.h
r156 r158 450 450 TMD_INVULN, TMD_HERO, TMD_SHERO, TMD_SHIELD, TMD_BLESSED, TMD_SINVIS, 451 451 TMD_SINFRA, TMD_OPP_ACID, TMD_OPP_ELEC, TMD_OPP_FIRE, TMD_OPP_COLD, 452 TMD_OPP_POIS, 452 TMD_OPP_POIS, TMD_AMNESIA, 453 453 454 454 TMD_MAX trunk/src/melee2.c
r112 r158 1959 1959 1960 1960 if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 1961 {1962 1961 msg_print("You resist the effects!"); 1963 } 1964 else if (lose_all_info()) 1965 { 1966 msg_print("Your memories fade away."); 1967 } 1962 else 1963 inc_timed(TMD_AMNESIA, 25); 1964 1968 1965 break; 1969 1966 } trunk/src/spells2.c
r156 r158 863 863 /* Load screen */ 864 864 screen_load(); 865 }866 867 868 869 870 871 872 /*873 * Forget everything874 */875 bool lose_all_info(void)876 {877 int i;878 879 /* Forget info about objects */880 for (i = 0; i < INVEN_TOTAL; i++)881 {882 object_type *o_ptr = &inventory[i];883 884 /* Skip non-objects */885 if (!o_ptr->k_idx) continue;886 887 /* Allow "protection" by the MENTAL flag */888 if (o_ptr->ident & (IDENT_MENTAL)) continue;889 890 /* Remove special inscription, if any */891 if (o_ptr->pseudo) o_ptr->pseudo = 0;892 893 /* Hack -- Clear the "felt" flag */894 o_ptr->ident &= ~(IDENT_SENSE);895 896 /* Hack -- Clear the "known" flag */897 o_ptr->ident &= ~(IDENT_KNOWN);898 899 /* Hack -- Clear the "empty" flag */900 o_ptr->ident &= ~(IDENT_EMPTY);901 }902 903 /* Recalculate bonuses */904 p_ptr->update |= (PU_BONUS);905 906 /* Combine / Reorder the pack (later) */907 p_ptr->notice |= (PN_COMBINE | PN_REORDER);908 909 /* Window stuff */910 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1);911 912 /* Mega-Hack -- Forget the map */913 wiz_dark();914 915 /* It worked */916 return (TRUE);917 865 } 918 866 trunk/src/use-obj.c
r112 r158 503 503 if (clear_timed(TMD_STUN)) *ident = TRUE; 504 504 if (clear_timed(TMD_CUT)) *ident = TRUE; 505 if (clear_timed(TMD_AMNESIA)) *ident = TRUE; 505 506 break; 506 507 } … … 514 515 if (clear_timed(TMD_STUN)) *ident = TRUE; 515 516 if (clear_timed(TMD_CUT)) *ident = TRUE; 517 if (clear_timed(TMD_AMNESIA)) *ident = TRUE; 516 518 break; 517 519 } … … 527 529 (void)clear_timed(TMD_STUN); 528 530 (void)clear_timed(TMD_CUT); 531 (void)clear_timed(TMD_AMNESIA); 529 532 (void)do_res_stat(A_STR); 530 533 (void)do_res_stat(A_CON); trunk/src/xtra1.c
r136 r158 685 685 static void prt_confused(int row, int col) 686 686 { 687 if (p_ptr->timed[TMD_CONFUSED]) 688 { 689 c_put_str(TERM_ORANGE, "Confused", row, col); 690 } 691 else 692 { 693 put_str(" ", row, col); 694 } 687 bool confused = p_ptr->timed[TMD_CONFUSED] ? TRUE : FALSE; 688 bool forget = p_ptr->timed[TMD_AMNESIA] ? TRUE : FALSE; 689 690 const char *text = " "; 691 692 if (confused && !forget) 693 text = "Confused"; 694 else if (confused && forget) 695 text = "Conf Amn"; 696 else if (!confused && forget) 697 text = "Amnesiac"; 698 699 c_put_str(TERM_ORANGE, text, row, col); 695 700 } 696 701 trunk/src/xtra2.c
r152 r158 58 58 { "Your eyes begin to tingle!", "Your eyes stop tingling.", 0, 0, (PU_BONUS | PU_MONSTERS), MSG_INFRARED }, 59 59 { "You feel resistant to poison!", "You feel less resistant to poison", PR_OPPOSE_ELEMENTS, 0, 0, MSG_RES_POIS }, 60 { "You feel your memories fade.", "Suddenly you can remember things again.", PR_CONFUSED, 0, 0, MSG_GENERIC }, 60 61 }; 61 62
