Changeset 532
- Timestamp:
- 08/18/07 19:30:35 (1 year ago)
- Files:
-
- trunk/src/cmd4.c (modified) (1 diff)
- trunk/src/defines.h (modified) (2 diffs)
- trunk/src/effects.c (modified) (1 diff)
- trunk/src/effects.h (modified) (1 diff)
- trunk/src/externs.h (modified) (1 diff)
- trunk/src/files.c (modified) (3 diffs)
- trunk/src/obj-info.c (modified) (2 diffs)
- trunk/src/object1.c (modified) (3 diffs)
- trunk/src/object2.c (modified) (1 diff)
- trunk/src/spells2.c (modified) (5 diffs)
- trunk/src/wizard2.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd4.c
r522 r532 1227 1227 make_fake_artifact(o_ptr, a_idx); 1228 1228 o_ptr->ident |= (IDENT_STORE | IDENT_KNOWN); 1229 if (cheat_xtra) o_ptr->ident |= IDENT_MENTAL;1230 1229 1231 1230 /* Hack -- Handle stuff */ trunk/src/defines.h
r531 r532 1692 1692 #define IDENT_KNOWN 0x08 /* Item abilities are known */ 1693 1693 #define IDENT_STORE 0x10 /* Item is in the inventory of a store */ 1694 #define IDENT_MENTAL 0x20 /* Item information is known */1695 1694 /* ... */ 1696 1695 #define IDENT_BROKEN 0x80 /* Item is permanently worthless */ … … 2368 2367 */ 2369 2368 #define object_known_p(T) \ 2370 (((T)->ident & (IDENT_KNOWN)) || \2371 ((k_info[(T)->k_idx].flags3 & (TR3_EASY_KNOW)) && \2369 (((T)->ident & IDENT_KNOWN) || \ 2370 ((k_info[(T)->k_idx].flags3 & TR3_EASY_KNOW) && \ 2372 2371 k_info[(T)->k_idx].aware)) 2373 2372 trunk/src/effects.c
r522 r532 712 712 } 713 713 714 case EF_IDENTIFY2:715 {716 *ident = TRUE;717 if (!identify_fully()) return FALSE;718 return TRUE;719 }720 721 714 case EF_REMOVE_CURSE: 722 715 { trunk/src/effects.h
r453 r532 135 135 EFFECT(ENCHANT_ARMOR, FALSE, "attempts to magically enhance a piece of armour") 136 136 EFFECT(ENCHANT_ARMOR2, FALSE, "attempts to magically enhance a piece of armour with high chance of success") 137 EFFECT(IDENTIFY, FALSE, "reveals all unhidden powers of an object") 138 EFFECT(IDENTIFY2, FALSE, "reveals all powers of an object") 137 EFFECT(IDENTIFY, FALSE, "reveals to you the extent of an item's magical powers") 139 138 EFFECT(REMOVE_CURSE, FALSE, "removes all ordinary curses from all equipped items") 140 139 EFFECT(REMOVE_CURSE2, FALSE, "removes all curses from all equipped items") trunk/src/externs.h
r526 r532 549 549 extern void do_ident_item(int item, object_type *o_ptr); 550 550 extern bool ident_spell(void); 551 extern bool identify_fully(void);552 551 extern bool recharge(int num); 553 552 extern bool speed_monsters(void); trunk/src/files.c
r500 r532 2806 2806 2807 2807 /* Fully known */ 2808 o_ptr->ident |= (IDENT_ MENTAL);2808 o_ptr->ident |= (IDENT_KNOWN); 2809 2809 } 2810 2810 … … 2822 2822 2823 2823 /* Fully known */ 2824 o_ptr->ident |= (IDENT_ MENTAL);2824 o_ptr->ident |= (IDENT_KNOWN); 2825 2825 } 2826 2826 … … 2950 2950 2951 2951 /* Fully known */ 2952 o_ptr->ident |= (IDENT_ MENTAL);2952 o_ptr->ident |= (IDENT_KNOWN); 2953 2953 2954 2954 /* Describe */ trunk/src/obj-info.c
r531 r532 715 715 if (describe_ignores(o_ptr, f3)) something = TRUE; 716 716 717 /* Unknown extra powers (ego-item with random extras or artifact) */718 if (object_known_p(o_ptr) && (!(o_ptr->ident & IDENT_MENTAL)) &&719 (o_ptr->flags2 || o_ptr->flags3 || artifact_p(o_ptr)))720 {721 /* Hack -- Put this in a separate paragraph if screen dump */722 if (text_out_hook == text_out_to_screen)723 new_paragraph = TRUE;724 725 p_text_out("It might have hidden powers.");726 something = TRUE;727 }728 729 717 /* We are done. */ 730 718 return something; … … 815 803 new_paragraph = TRUE; 816 804 if (!object_known_p(o_ptr)) 817 p_text_out(" This item has not been identified.");805 p_text_out("You do not know the full extent of this item's powers."); 818 806 else if (!has_description && !has_info) 819 807 p_text_out("This item does not seem to possess any special abilities."); trunk/src/object1.c
r531 r532 334 334 static void object_flags_aux(int mode, const object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3) 335 335 { 336 object_kind *k_ptr; 337 338 if (mode != OBJECT_FLAGS_FULL) 339 { 340 /* Clear */ 341 (*f1) = (*f2) = (*f3) = 0L; 342 343 /* Must be identified */ 344 if (!object_known_p(o_ptr)) return; 345 } 336 object_kind *k_ptr = &k_info[o_ptr->k_idx]; 337 338 /* Clear */ 339 (*f1) = (*f2) = (*f3) = 0L; 340 341 /* Unless requesting full flags, the object must be known */ 342 if ((mode != OBJECT_FLAGS_FULL) && !object_known_p(o_ptr)) return; 346 343 347 344 if (mode != OBJECT_FLAGS_RANDOM) 348 345 { 349 k_ptr = &k_info[o_ptr->k_idx];350 351 346 /* Base object */ 352 347 (*f1) = k_ptr->flags1; … … 394 389 if (mode != OBJECT_FLAGS_FULL) 395 390 { 396 bool spoil = FALSE;397 398 #ifdef SPOIL_ARTIFACTS399 /* Full knowledge for some artifacts */400 if (artifact_p(o_ptr)) spoil = TRUE;401 #endif /* SPOIL_ARTIFACTS */402 403 #ifdef SPOIL_EGO_ITEMS404 /* Full knowledge for some ego-items */405 if (ego_item_p(o_ptr)) spoil = TRUE;406 #endif /* SPOIL_ARTIFACTS */407 408 /* Need full knowledge or spoilers */409 if (!spoil && !(o_ptr->ident & IDENT_MENTAL)) return;410 411 391 /* Artifact */ 412 392 if (o_ptr->name1) … … 424 404 } 425 405 } 426 427 /* Full knowledge for *identified* objects */428 if (!(o_ptr->ident & IDENT_MENTAL)) return;429 406 } 430 407 trunk/src/object2.c
r531 r532 1308 1308 if (j_ptr->ident & (IDENT_STORE)) o_ptr->ident |= (IDENT_STORE); 1309 1309 1310 /* Hack -- Blend "mental" status */1311 if (j_ptr->ident & (IDENT_MENTAL)) o_ptr->ident |= (IDENT_MENTAL);1312 1313 1310 /* Hack -- Blend "notes" */ 1314 1311 if (j_ptr->note != 0) o_ptr->note = j_ptr->note; trunk/src/spells2.c
r531 r532 414 414 * 415 415 * List various information about the player and/or his current equipment. 416 * See also "identify_fully()".417 416 * 418 417 * This tests the flags of the equipment being carried and the innate player … … 1650 1649 { 1651 1650 if (object_known_p(o_ptr)) 1652 return FALSE;1653 else1654 return TRUE;1655 }1656 1657 1658 static bool item_tester_unknown_star(const object_type *o_ptr)1659 {1660 if (o_ptr->ident & IDENT_MENTAL)1661 1651 return FALSE; 1662 1652 else … … 1928 1918 1929 1919 /* 1930 * Fully "identify" an object in the inventory1931 *1932 * This routine returns TRUE if an item was identified.1933 */1934 bool identify_fully(void)1935 {1936 int item;1937 1938 object_type *o_ptr;1939 1940 cptr q, s;1941 1942 1943 /* Only un-*id*'ed items */1944 item_tester_hook = item_tester_unknown_star;1945 1946 /* Get an item */1947 q = "Identify which item? ";1948 s = "You have nothing to identify.";1949 if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return (FALSE);1950 1951 /* Get the item (in the pack) */1952 if (item >= 0)1953 {1954 o_ptr = &inventory[item];1955 }1956 1957 /* Get the item (on the floor) */1958 else1959 {1960 o_ptr = &o_list[0 - item];1961 }1962 1963 /* Identify the object */1964 do_ident_item(item, o_ptr);1965 1966 /* Mark the item as fully known */1967 o_ptr->ident |= (IDENT_MENTAL);1968 1969 /* Handle stuff */1970 handle_stuff();1971 1972 /* Describe it fully */1973 object_info_screen(o_ptr);1974 1975 1976 /* Success */1977 return (TRUE);1978 }1979 1980 1981 1982 1983 /*1984 1920 * Hook for "get_item()". Determine if something is rechargable. 1985 1921 */ … … 2056 1992 reduce_charges(o_ptr, 1); 2057 1993 2058 /* *Identified* items keep the knowledge about the charges */2059 if (!(o_ptr->ident & IDENT_MENTAL))2060 {2061 /* We no longer "know" the item */2062 o_ptr->ident &= ~(IDENT_KNOWN);2063 }2064 2065 1994 /* Reduce and describe inventory */ 2066 1995 if (item >= 0) … … 2087 2016 /* Recharge based on the power */ 2088 2017 if (t > 0) o_ptr->pval += 2 + randint(t); 2089 2090 /* *Identified* items keep the knowledge about the charges */2091 if (!(o_ptr->ident & IDENT_MENTAL))2092 {2093 /* We no longer "know" the item */2094 o_ptr->ident &= ~(IDENT_KNOWN);2095 }2096 2018 2097 2019 /* We no longer think the item is empty */ trunk/src/wizard2.c
r522 r532 1547 1547 } 1548 1548 1549 /* View item info */1550 case 'f':1551 {1552 (void)identify_fully();1553 break;1554 }1555 1556 1549 /* Good Objects */ 1557 1550 case 'g':
