Changeset 318
- Timestamp:
- 07/10/07 11:11:21 (2 years ago)
- Files:
-
- trunk/lib/edit/object.txt (modified) (43 diffs)
- trunk/src/effects.c (modified) (2 diffs)
- trunk/src/effects.h (modified) (1 diff)
- trunk/src/load.c (modified) (1 diff)
- trunk/src/use-obj.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/edit/object.txt
r317 r318 254 254 A:15/1 255 255 F:EASY_KNOW 256 D:It cures 4d8 points of damage. 256 E:CW_SERIOUS 257 257 258 258 259 ##### Normal Food ##### … … 1447 1448 A:15/1 1448 1449 F:EASY_KNOW 1449 D:It attempts to magically enhance a weapon's to-hit bonus once. 1450 E:ENCHANT_TOHIT 1450 1451 1451 1452 N:174:Enchant Weapon To-Dam … … 1455 1456 A:15/1 1456 1457 F:EASY_KNOW 1457 D:It attempts to magically enhance a weapon's to-dam bonus once. 1458 E:ENCHANT_TODAM 1458 1459 1459 1460 N:175:Enchant Armor … … 1463 1464 A:15/1 1464 1465 F:EASY_KNOW 1465 D:It attempts to enchant a piece of armor once. 1466 E:ENCHANT_ARMOR 1466 1467 1467 1468 N:176:Identify … … 1471 1472 A:1/1:5/1:10/1:30/1 1472 1473 F:EASY_KNOW 1473 D:It reveals all normal (magical but non-hidden) powers of one object. 1474 D: (The spell may be aborted without using up the scroll.) 1474 E:IDENTIFY 1475 1475 1476 1476 N:177:*Identify* … … 1480 1480 A:25/1:40/1:70/1 1481 1481 F:EASY_KNOW 1482 D:It reveals all normal and hidden powers of one object, and also 1483 D: permanently implants this knowledge into your mind, so that you will 1484 D: never forget it even if hit by magical amnesia. 1485 D: (The spell may be aborted without using up the scroll.) 1482 E:IDENTIFY2 1486 1483 1487 1484 ## XXX 178 XXX ## … … 1495 1492 A:10/1 1496 1493 F:EASY_KNOW 1497 D:It removes all ordinary curses from all equipped items. 1498 D: Heavy or permanent curses are unaffected. 1494 E:REMOVE_CURSE 1499 1495 1500 1496 N:181:Light … … 1504 1500 A:0/1:3/1:10/1 1505 1501 F:EASY_KNOW 1506 D:It lights up an area with a radius of 2 squares, plus the entire room 1507 D: if you are currently in one. 1508 D: This inflicts 2d8 points of damage on any light-sensitive creatures 1509 D: within the radius of the spell. 1502 E:LIGHT 1510 1503 1511 1504 ## XXX 182 XXX ## … … 1519 1512 A:1/1 1520 1513 F:EASY_KNOW 1521 D:It summons 1d3 monsters that are generated at the current dungeon 1522 D: level. 1523 D: If a monster normally appears in groups, a whole group will appear. 1524 D: If a monster normally has escorts, it will appear with escorts. 1514 E:SUMMON_MON 1525 1515 1526 1516 N:185:Phase Door … … 1530 1520 A:1/1 1531 1521 F:EASY_KNOW 1532 D:It teleports you randomly up to 10 squares away. 1522 E:TELE_PHASE 1533 1523 1534 1524 N:186:Teleportation … … 1538 1528 A:10/1 1539 1529 F:EASY_KNOW 1540 D:It teleports you randomly up to 100 squares away. 1530 E:TELE_LONG 1541 1531 1542 1532 N:187:Teleport Level … … 1546 1536 A:20/1 1547 1537 F:EASY_KNOW 1548 D:It teleports you 1 level up or down (chosen at random). 1549 D: The direction will always be down from the town level, and up from 1550 D: level 99 if Sauron has not been killed or level 100 if Morgoth has 1551 D: not been killed. 1552 D: This scroll has no effect when the "Ironman" option is set. 1538 E:TELE_LEVEL 1553 1539 1554 1540 N:188:Monster Confusion … … 1558 1544 A:5/1 1559 1545 F:EASY_KNOW 1560 D:It enchants you with an aura of confusion that causes your hands to 1561 D: glow red. The enchantment is dissipated when you strike a monster; 1562 D: at that moment an attempt is made to confuse the monster. 1546 E:CONFUSING 1563 1547 1564 1548 N:189:Magic Mapping … … 1568 1552 A:5/1 1569 1553 F:EASY_KNOW 1570 D:It maps out a portion of the level centered on you. 1554 E:MAPPING 1571 1555 1572 1556 N:190:Rune of Protection … … 1576 1560 A:60/4:90/1 1577 1561 F:EASY_KNOW 1578 D:It inscribes a glyph of warding beneath you. Monsters can't move onto 1579 D: the glyph, though they do have a (monster level) in 550 chance of 1580 D: breaking the glyph when they try to move there. Note that you can 1581 D: still be attacked if you are standing on the glyph! 1562 E:RUNE 1582 1563 1583 1564 N:191:*Remove Curse* … … 1587 1568 A:50/2:95/1 1588 1569 F:EASY_KNOW 1589 D:It removes all ordinary and heavy curses from all equipped objects. 1590 D: Permanent curses are unaffected. 1570 E:REMOVE_CURSE2 1591 1571 1592 1572 N:192:Treasure Detection … … 1596 1576 A:0/1 1597 1577 F:EASY_KNOW 1598 D:It detects all treasure in the immediate area. 1578 E:DET_GOLD 1599 1579 1600 1580 N:193:Object Detection … … 1604 1584 A:0/1 1605 1585 F:EASY_KNOW 1606 D:It detects all objects in the immediate area. 1586 E:DET_OBJ 1607 1587 1608 1588 N:194:Trap Detection … … 1612 1592 A:5/1:10/1 1613 1593 F:EASY_KNOW 1614 D: It detects all traps in the immediate area.1594 D:DET_TRAPS 1615 1595 1616 1596 ## XXX 195 XXX ## … … 1624 1604 A:5/1:10/1:15/1 1625 1605 F:EASY_KNOW 1626 D:It detects all stairs and doors in the immediate area. 1606 E:DET_DOORSTAIR 1627 1607 1628 1608 N:198:Acquirement … … 1632 1612 A:20/8 1633 1613 F:EASY_KNOW 1634 D:It creates one good object on the floor near you. 1614 E:ACQUIRE 1635 1615 1636 1616 N:199:*Acquirement* … … 1640 1620 A:60/16 1641 1621 F:EASY_KNOW 1642 D:It creates 1+1d2 good objects on the ground near you. 1622 E:ACQUIRE2 1643 1623 1644 1624 N:200:Mass Banishment … … 1648 1628 A:50/4:95/4 1649 1629 F:EASY_KNOW 1650 D:It removes all monsters within 20 squares of you. 1651 D: Uniques are unaffected. 1652 D: You take 1d3 points of damage for every monster removed. 1630 E:LOSKILL 1653 1631 1654 1632 N:201:Detect Invisible … … 1658 1636 A:1/1 1659 1637 F:EASY_KNOW 1660 D:It detects all invisible monsters in the immediate area. 1638 E:DET_INVIS 1661 1639 1662 1640 N:202:Aggravate Monster … … 1666 1644 A:5/1 1667 1645 F:EASY_KNOW 1668 D:It awakens all sleeping monsters within 40 squares of you, and hastes 1669 D: all monsters within line of sight unless they are already hasted. 1646 E:ANNOY_MON 1670 1647 1671 1648 N:203:Trap Creation … … 1675 1652 A:10/1 1676 1653 F:EASY_KNOW 1677 D:It creates traps on all empty squares within a 1-square radius of you. 1654 E:CREATE_TRAP 1678 1655 1679 1656 N:204:Trap/Door Destruction … … 1683 1660 A:10/1 1684 1661 F:EASY_KNOW 1685 D:It destroys all traps and doors within a 1-square radius of you. 1662 E:DESTROY_TDOORS 1686 1663 1687 1664 ## XXX 205 XXX ## … … 1693 1670 A:40/1 1694 1671 F:EASY_KNOW 1695 D:It recharges a wand or a staff. 1696 D: If successful, a wand or staff gains 2+1d(60/((level of 1697 D: wand/staff)+2)+1) charges; failure occurs 1 time in (160-(level of 1698 D: wand/staff)-(10*(# of charges)))/15, and uncharges the wand or staff. 1672 E:RECHARGE 1699 1673 1700 1674 N:207:Banishment … … 1704 1678 A:40/4:80/2 1705 1679 F:EASY_KNOW 1706 D:It removes all monsters represented by a chosen symbol from the level. 1707 D: Uniques are unaffected. 1708 D: You take 1d4 points of damage for every monster removed. 1680 E:BANISHMENT 1709 1681 1710 1682 N:208:Darkness … … 1714 1686 A:1/1 1715 1687 F:EASY_KNOW 1716 D:It darkens all squares within 3 squares of you, plus the entire room 1717 D: if you are currently in one; and blinds you for 3+1d5 turns unless 1718 D: you have resistance to blindness. 1688 E:DARKNESS 1719 1689 1720 1690 N:209:Protection from Evil … … 1724 1694 A:30/1 1725 1695 F:EASY_KNOW 1726 D:It grants you the enchantment of protection from evil for a duration 1727 D: equal to 1d25 plus three times your character level. 1696 E:PROTEVIL 1728 1697 1729 1698 N:210:Satisfy Hunger … … 1733 1702 A:5/1 1734 1703 F:EASY_KNOW 1735 D:It magically renders you well-fed (but not satiated). 1736 D: This will also cure a bloated stomach. 1704 E:SATISFY 1737 1705 1738 1706 N:211:Dispel Undead … … 1742 1710 A:40/1 1743 1711 F:EASY_KNOW 1744 D:It inflicts 60 points of damage on all undead creatures within line of 1745 D: sight. 1712 E:DISPEL_UNDEAD 1746 1713 1747 1714 N:212:*Enchant Weapon* … … 1751 1718 A:50/1 1752 1719 F:EASY_KNOW 1753 D:It attempts to magically enhance a weapon's to-dam and to-hit bonuses 1754 D: 1d3 times each. 1720 E:ENCHANT_WEAPON 1755 1721 1756 1722 N:213:Curse Weapon … … 1760 1726 A:50/1 1761 1727 F:EASY_KNOW 1762 D:It curses the currently wielded melee weapon, removing all of its 1763 D: special powers and changing the weapon's to-hit and to-dam bonuses 1764 D: both to -2d5. 1765 D: Artifacts have a 1 in 2 chance to resist. 1728 E:CURSE_WEAPON 1766 1729 1767 1730 N:214:*Enchant Armor* … … 1771 1734 A:50/1:50/1 1772 1735 F:EASY_KNOW 1773 D:It attempts to enchant a piece of armor 2+1d3 times. 1736 E:ENCHANT_ARMOR2 1774 1737 1775 1738 N:215:Curse Armor … … 1779 1742 A:50/1 1780 1743 F:EASY_KNOW 1781 D:It curses the currently equipped body armor, removing all of its 1782 D: special powers, reducing the base AC of the armor to 0, and changing 1783 D: the magical AC bonus of the armor to -2d5. 1784 D: Artifacts have a 1 in 2 chance to resist. 1744 E:CURSE_ARMOR 1785 1745 1786 1746 N:216:Summon Undead … … 1790 1750 A:15/1 1791 1751 F:EASY_KNOW 1792 D:It summons 1d3 non-unique undead monsters that are generated at the 1793 D: current dungeon level. 1794 D: If a monster normally appears in groups, a whole group will appear. 1795 D: If a monster normally has escorts, it will appear with escorts. 1752 E:SUMMON_UNDEAD 1796 1753 1797 1754 N:217:Blessing … … 1801 1758 A:1/1 1802 1759 F:EASY_KNOW 1803 D:It blesses you (a bonus of +5 to armor class and +10 to-hit) for 1804 D: 6+1d12 turns. 1760 E:BLESSING 1805 1761 1806 1762 N:218:Holy Chant … … 1810 1766 A:10/1 1811 1767 F:EASY_KNOW 1812 D:It blesses you (a bonus of +5 to armor class and +10 to-hit) for 1813 D: 12+1d24 turns. 1768 E:BLESSING2 1814 1769 1815 1770 N:219:Holy Prayer … … 1819 1774 A:25/1 1820 1775 F:EASY_KNOW 1821 D:It blesses you (a bonus of +5 to armor class and +10 to-hit) for 1822 D: 24+1d48 turns. 1776 E:BLESSING3 1823 1777 1824 1778 N:220:Word of Recall … … 1828 1782 A:5/1 1829 1783 F:EASY_KNOW 1830 D:It invokes the spell of recall, which takes you from the dungeon to 1831 D: the town or from the town to the deepest level you have visited in 1832 D: the dungeon. It takes a while for the spell to act. Until then, the 1833 D: spell can be canceled by reading a second scroll. 1784 E:RECALL 1834 1785 1835 1786 N:221:*Destruction* … … 1839 1790 A:40/1 1840 1791 F:EASY_KNOW 1841 D:It destroys a circular area centered at you with a radius of 15 1842 D: squares, randomly placing new walls and floor space (stairs are 1843 D: immune). All monsters and objects (excluding artifacts) are removed 1844 D: from the affected area. 1845 D: This effect will also cause blindness lasting for 10+1d10 turns 1846 D: unless you have resistance to either blindness or light. 1792 E:DESTRUCTION2 1793 1847 1794 1848 1795 ##### Potions ##### trunk/src/effects.c
r317 r318 48 48 { 49 49 effect_type effect = k_info[o_ptr->k_idx].effect; 50 int py = p_ptr->py; 51 int px = p_ptr->px; 50 52 51 53 switch (effect) … … 209 211 } 210 212 213 case EF_ENCHANT_TOHIT: 214 { 215 *ident = TRUE; 216 if (!enchant_spell(1, 0, 0)) return FALSE; 217 return TRUE; 218 } 219 220 case EF_ENCHANT_TODAM: 221 { 222 *ident = TRUE; 223 if (!enchant_spell(0, 1, 0)) return FALSE; 224 return TRUE; 225 } 226 227 case EF_ENCHANT_WEAPON: 228 { 229 *ident = TRUE; 230 if (!enchant_spell(randint(3), randint(3), 0)) return FALSE; 231 return TRUE; 232 } 233 234 case EF_ENCHANT_ARMOR: 235 { 236 if (!enchant_spell(0, 0, 1)) return FALSE; 237 *ident = TRUE; 238 return TRUE; 239 } 240 241 case EF_ENCHANT_ARMOR2: 242 { 243 *ident = TRUE; 244 if (!enchant_spell(0, 0, randint(3) + 2)) return FALSE; 245 return TRUE; 246 } 247 248 case EF_IDENTIFY: 249 { 250 *ident = TRUE; 251 if (!ident_spell()) return FALSE; 252 return TRUE; 253 } 254 255 case EF_IDENTIFY2: 256 { 257 *ident = TRUE; 258 if (!identify_fully()) return FALSE; 259 return TRUE; 260 } 261 262 case EF_REMOVE_CURSE: 263 { 264 if (remove_curse()) 265 { 266 msg_print("You feel as if someone is watching over you."); 267 *ident = TRUE; 268 } 269 return TRUE; 270 } 271 272 case EF_REMOVE_CURSE2: 273 { 274 remove_all_curse(); 275 *ident = TRUE; 276 return TRUE; 277 } 278 279 case EF_LIGHT: 280 { 281 if (lite_area(damroll(2, 8), 2)) *ident = TRUE; 282 return TRUE; 283 } 284 285 case EF_SUMMON_MON: 286 { 287 int i; 288 sound(MSG_SUM_MONSTER); 289 290 for (i = 0; i < randint(3); i++) 291 { 292 if (summon_specific(py, px, p_ptr->depth, 0)) 293 *ident = TRUE; 294 } 295 return TRUE; 296 } 297 298 case EF_SUMMON_UNDEAD: 299 { 300 int i; 301 sound(MSG_SUM_UNDEAD); 302 303 for (i = 0; i < randint(3); i++) 304 { 305 if (summon_specific(py, px, p_ptr->depth, SUMMON_UNDEAD)) 306 *ident = TRUE; 307 } 308 return TRUE; 309 } 310 311 case EF_TELE_PHASE: 312 { 313 teleport_player(10); 314 *ident = TRUE; 315 return TRUE; 316 } 317 318 case EF_TELE_LONG: 319 { 320 teleport_player(100); 321 *ident = TRUE; 322 return TRUE; 323 } 324 325 case EF_TELE_LEVEL: 326 { 327 (void)teleport_player_level(); 328 *ident = TRUE; 329 return TRUE; 330 } 331 332 case EF_CONFUSING: 333 { 334 if (p_ptr->confusing == 0) 335 { 336 msg_print("Your hands begin to glow."); 337 p_ptr->confusing = TRUE; 338 *ident = TRUE; 339 } 340 return TRUE; 341 } 342 343 case EF_MAPPING: 344 { 345 map_area(); 346 *ident = TRUE; 347 return TRUE; 348 } 349 350 case EF_RUNE: 351 { 352 warding_glyph(); 353 *ident = TRUE; 354 return TRUE; 355 } 356 357 case EF_DET_GOLD: 358 { 359 if (detect_treasure()) *ident = TRUE; 360 if (detect_objects_gold()) *ident = TRUE; 361 return TRUE; 362 } 363 364 case EF_DET_OBJ: 365 { 366 if (detect_objects_normal()) *ident = TRUE; 367 return TRUE; 368 } 369 370 case EF_DET_TRAP: 371 { 372 if (detect_traps()) *ident = TRUE; 373 return TRUE; 374 } 375 376 case EF_DET_DOORSTAIR: 377 { 378 if (detect_doors()) *ident = TRUE; 379 if (detect_stairs()) *ident = TRUE; 380 return TRUE; 381 } 382 383 case EF_DET_INVIS: 384 { 385 if (detect_monsters_invis()) *ident = TRUE; 386 return TRUE; 387 } 388 389 case EF_ACQUIRE: 390 { 391 acquirement(py, px, 1, TRUE); 392 *ident = TRUE; 393 return TRUE; 394 } 395 396 case EF_ACQUIRE2: 397 { 398 acquirement(py, px, randint(2) + 1, TRUE); 399 *ident = TRUE; 400 return TRUE; 401 } 402 403 case EF_LOSKILL: 404 { 405 (void)mass_banishment(); 406 *ident = TRUE; 407 return TRUE; 408 } 409 case EF_ANNOY_MON: 410 { 411 msg_print("There is a high pitched humming noise."); 412 aggravate_monsters(0); 413 *ident = TRUE; 414 return TRUE; 415 } 416 417 case EF_CREATE_TRAP: 418 { 419 if (trap_creation()) *ident = TRUE; 420 return TRUE; 421 } 422 423 case EF_DESTROY_TDOORS: 424 { 425 if (destroy_doors_touch()) *ident = TRUE; 426 return TRUE; 427 } 428 429 case EF_RECHARGE: 430 { 431 *ident = TRUE; 432 if (!recharge(60)) return FALSE; 433 return TRUE; 434 } 435 436 case EF_BANISHMENT: 437 { 438 *ident = TRUE; 439 if (!banishment()) return FALSE; 440 return TRUE; 441 } 442 443 case EF_DARKNESS: 444 { 445 if (!p_ptr->resist_blind) 446 { 447 (void)inc_timed(TMD_BLIND, 3 + randint(5)); 448 } 449 if (unlite_area(10, 3)) *ident = TRUE; 450 return TRUE; 451 } 452 453 case EF_PROTEVIL: 454 { 455 if (inc_timed(TMD_PROTEVIL, randint(25) + 3 * p_ptr->lev)) *ident = TRUE; 456 return TRUE; 457 } 458 459 case EF_SATISFY: 460 { 461 if (set_food(PY_FOOD_MAX - 1)) *ident = TRUE; 462 return TRUE; 463 } 464 case EF_DISPEL_UNDEAD: 465 { 466 if (dispel_undead(60)) *ident = TRUE; 467 return TRUE; 468 } 469 470 case EF_CURSE_WEAPON: 471 { 472 if (curse_weapon()) *ident = TRUE; 473 return TRUE; 474 } 475 476 case EF_CURSE_ARMOR: 477 { 478 if (curse_armor()) *ident = TRUE; 479 return TRUE; 480 } 481 482 case EF_BLESSING: 483 { 484 if (inc_timed(TMD_BLESSED, randint(12) + 6)) *ident = TRUE; 485 return TRUE; 486 } 487 488 case EF_BLESSING2: 489 { 490 if (inc_timed(TMD_BLESSED, randint(24) + 12)) *ident = TRUE; 491 return TRUE; 492 } 493 494 case EF_BLESSING3: 495 { 496 if (inc_timed(TMD_BLESSED, randint(48) + 24)) *ident = TRUE; 497 return TRUE; 498 } 499 500 case EF_RECALL: 501 { 502 set_recall(); 503 *ident = TRUE; 504 return TRUE; 505 } 506 507 case EF_DESTRUCTION2: 508 { 509 destroy_area(py, px, 15, TRUE); 510 *ident = TRUE; 511 return TRUE; 512 } 513 514 211 515 212 516 case EF_FOOD_GOOD: trunk/src/effects.h
r317 r318 62 62 EFFECT(RESTORE_CON, FALSE, "restores your constitution") 63 63 EFFECT(RESTORE_ALL, FALSE, "restores all your stats") 64 EFFECT(FOOD_GOOD, FALSE, "nourishes you") 65 EFFECT(FOOD_WAYBREAD, FALSE, "restores 4d8 hit points and neutralizes poison") 64 65 EFFECT(ENCHANT_TOHIT, FALSE, "attempts to magically enhance a weapon's to-hit bonus") 66 EFFECT(ENCHANT_TODAM, FALSE, "attempts to magically enhance a weapon's to-dam bonus") 67 EFFECT(ENCHANT_WEAPON, FALSE, "attempts to magically enhance a weapon both to-hit and to-dam") 68 EFFECT(ENCHANT_ARMOR, FALSE, "attempts to magically enhance a piece of armour") 69 EFFECT(ENCHANT_ARMOR2, FALSE, "attempts to magically enhance a piece of armour with high chance of success") 70 EFFECT(IDENTIFY, FALSE, "reveals all unhidden powers of an object") 71 EFFECT(IDENTIFY2, FALSE, "reveals all powers of an object") 72 EFFECT(REMOVE_CURSE, FALSE, "removes all ordinary curses from all equipped items") 73 EFFECT(REMOVE_CURSE2, FALSE, "removes all curses from all equipped items") 74 EFFECT(LIGHT, FALSE, "lights up an area and inflicts 2d8 damage on light-sensitive creatures") 75 EFFECT(SUMMON_MON, FALSE, "summons monsters at the current dungeon level") 76 EFFECT(SUMMON_UNDEAD, FALSE, "summons undead monsters at the current dungeon level") 77 EFFECT(TELE_PHASE, FALSE, "teleports you randomly up to 10 squares away") 78 EFFECT(TELE_LONG, FALSE, "teleports you randomly up to 100 squares away") 79 EFFECT(TELE_LEVEL, FALSE, "teleports you one level up or down") 80 EFFECT(CONFUSING, FALSE, "causes your next attack upon a monster to confuse it") 81 EFFECT(MAPPING, FALSE, "maps the area around you in a 30-radius circle") 82 EFFECT(RUNE, FALSE, "inscribes a glyph of warding beneath you, which monsters cannot move onto") 83 EFFECT(DET_GOLD, FALSE, "detects all treasure in the surrounding area") 84 EFFECT(DET_OBJ, FALSE, "detects all objects in the surrounding area") 85 EFFECT(DET_TRAP, FALSE, "detects all traps in the surrounding area") 86 EFFECT(DET_DOORSTAIR, FALSE, "detects all doors and stairs in the surrounding area") 87 EFFECT(DET_INVIS, FALSE, "detects all invisible monsters in the surrounding area") 88 EFFECT(ACQUIRE, FALSE, "creates a good object nearby") 89 EFFECT(ACQUIRE2, FALSE, "creates a few good items nearby") 90 EFFECT(LOSKILL, FALSE, "removes all non-unique monsters within 20 squares, dealing you damage in the process") 91 EFFECT(ANNOY_MON, FALSE, "awakens all nearby sleeping monsters and hastens all monsters within line of sight") 92 EFFECT(CREATE_TRAP, FALSE, "creates traps surrounding you") 93 EFFECT(DESTROY_TDOORS, FALSE, "destroys all traps and doors surrounding you") 94 EFFECT(RECHARGE, FALSE, "tries to recharge a wand or staff, destroying the wand or staff on failure") 95 EFFECT(BANISHMENT, FALSE, "removes all non-unique monsters represented by a chosen symbol from the level, dealing you damage in the process") 96 EFFECT(DARKNESS, FALSE, "darkens the nearby area and blinds you for 1d5+3 turns") 97 EFFECT(PROTEVIL, FALSE, "grants you protection from evil for 1d25 plus 3 times your character level turns") 98 EFFECT(SATISFY, FALSE, "magically renders you well-fed, curing any gastrointestinal problems") 99 EFFECT(DISPEL_UNDEAD, FALSE, "deals 60 damge to all undead creatures that you can see") 100 EFFECT(CURSE_WEAPON, FALSE, "curses your currently wielded melee weapon") 101 EFFECT(CURSE_ARMOR, FALSE, "curses your currently worn body armor") 102 EFFECT(BLESSING, FALSE, "increases your AC and to-hit bonus for 1d12+6 turns") 103 EFFECT(BLESSING2, FALSE, "increases your AC and to-hit bonus for 1d24+12 turns") 104 EFFECT(BLESSING3, FALSE, "increases your AC and to-hit bonus for 1d48+24 turns") 105 EFFECT(RECALL, FALSE, "returns you from the dungeon or takes you to the dungeon after a short delay") 106 EFFECT(DESTRUCTION2, FALSE, "destroys an area around you in the shape of a circle radius 15, and blinds you for 1d10+10 turns") 107 108 EFFECT(FOOD_GOOD, FALSE, NULL) 109 EFFECT(FOOD_WAYBREAD, FALSE, "restores 4d8 hit points and neutralizes poison") 66 110 END 67 111 trunk/src/load.c
r305 r318 267 267 rd_byte(&o_ptr->sval); 268 268 rd_s16b(&o_ptr->pval); 269 270 #if 0 271 /* This can wait until object reorganisation */ 272 o_ptr->k_idx = lookup_kind(o_ptr->tval, o_ptr->sval); 273 #endif 269 274 270 275 /* Pseudo-ID bit */ trunk/src/use-obj.c
r317 r318 488 488 489 489 return (TRUE); 490 }491 492 493 static bool read_scroll(object_type *o_ptr, bool *ident)494 {495 int py = p_ptr->py;496 int px = p_ptr->px;497 498 int k;499 500 bool used_up = TRUE;501 502 503 /* Analyze the scroll */504 switch (o_ptr->sval)505 {506 case SV_SCROLL_DARKNESS:507 {508 if (!p_ptr->resist_blind)509 {510 (void)inc_timed(TMD_BLIND, 3 + randint(5));511 }512 if (unlite_area(10, 3)) *ident = TRUE;513 break;514 }515 516 case SV_SCROLL_AGGRAVATE_MONSTER:517 {518 msg_print("There is a high pitched humming noise.");519 aggravate_monsters(0);520 *ident = TRUE;521 break;522 }523 524 case SV_SCROLL_CURSE_ARMOR:525 {526 if (curse_armor()) *ident = TRUE;527 break;528 }529 530 case SV_SCROLL_CURSE_WEAPON:531 {532 if (curse_weapon()) *ident = TRUE;533 break;534 }535 536 case SV_SCROLL_SUMMON_MONSTER:537 {538 sound(MSG_SUM_MONSTER);539 for (k = 0; k < randint(3); k++)540 {541 if (summon_specific(py, px, p_ptr->depth, 0))542 {543 *ident = TRUE;544 }545 }546 break;547 }548 549 case SV_SCROLL_SUMMON_UNDEAD:550 {551 sound(MSG_SUM_UNDEAD);552 for (k = 0; k < randint(3); k++)553 {554 if (summon_specific(py, px, p_ptr->depth, SUMMON_UNDEAD))555 {556 *ident = TRUE;557 }558 }559 break;560 }561 562 case SV_SCROLL_TRAP_CREATION:563 {564 if (trap_creation()) *ident = TRUE;565 break;566 }567 568 case SV_SCROLL_PHASE_DOOR:569 {570 teleport_player(10);571 *ident = TRUE;572 break;573 }574 575 case SV_SCROLL_TELEPORT:576 {577 teleport_player(100);578 *ident = TRUE;579 break;580 }581 582 case SV_SCROLL_TELEPORT_LEVEL:583 {584 (void)teleport_player_level();585 *ident = TRUE;586 break;587 }588 589 case SV_SCROLL_WORD_OF_RECALL:590 {591 set_recall();592 *ident = TRUE;593 break;594 }595 596 case SV_SCROLL_IDENTIFY:597 {598 *ident = TRUE;599 if (!ident_spell()) used_up = FALSE;600 break;601 }602 603 case SV_SCROLL_STAR_IDENTIFY:604 {605 *ident = TRUE;606 if (!identify_fully()) used_up = FALSE;607 break;608 }609 610 case SV_SCROLL_REMOVE_CURSE:611 {612 if (remove_curse())613 {614 msg_print("You feel as if someone is watching over you.");615 *ident = TRUE;616 }617 break;618 }619 620 case SV_SCROLL_STAR_REMOVE_CURSE:621 {622 remove_all_curse();623 *ident = TRUE;624 break;625 }626 627 case SV_SCROLL_ENCHANT_ARMOR:628 {629 *ident = TRUE;630 if (!enchant_spell(0, 0, 1)) used_up = FALSE;631 break;632 }633 634 case SV_SCROLL_ENCHANT_WEAPON_TO_HIT:635 {636 if (!enchant_spell(1, 0, 0)) used_up = FALSE;637 *ident = TRUE;638 break;639 }640 641 case SV_SCROLL_ENCHANT_WEAPON_TO_DAM:642 {643 if (!enchant_spell(0, 1, 0)) used_up = FALSE;644 *ident = TRUE;645 break;646 }647 648 case SV_SCROLL_STAR_ENCHANT_ARMOR:649 {650 if (!enchant_spell(0, 0, randint(3) + 2)) used_up = FALSE;651 *ident = TRUE;652 break;653 }654 655 case SV_SCROLL_STAR_ENCHANT_WEAPON:656 {657 if (!enchant_spell(randint(3), randint(3), 0)) used_up = FALSE;658 *ident = TRUE;659 break;660 }661 662 case SV_SCROLL_RECHARGING:663 {664 if (!recharge(60)) used_up = FALSE;665 *ident = TRUE;666 break;667 }668 669 case SV_SCROLL_LIGHT:670 {671 if (lite_area(damroll(2, 8), 2)) *ident = TRUE;672 break;673 }674 675 case SV_SCROLL_MAPPING:676 {677 map_area();678 *ident = TRUE;679 break;680
