|
163 | 163 | (assert-at 'E "jar of poison")
|
164 | 164 | (assert (= G.player.hp 100))
|
165 | 165 | (if use-bomb?
|
166 |
| - (use-item "poison-gas bomb" 1 2) |
| 166 | + (use-item "poison-gas bomb" 'E) |
167 | 167 | (shoot 'E))
|
168 | 168 | (assert-at 'E (if use-bomb? "jar of poison" 'floor))
|
169 | 169 | ; The player takes 20 damage.
|
|
493 | 493 |
|
494 | 494 | ; Unlike IQ, walls can be added regardless of what's already on the
|
495 | 495 | ; target square.
|
496 |
| - (use-item "wall-making wand" 0 0) |
| 496 | + (use-item "wall-making wand" [0 0]) |
497 | 497 | (assert-at [0 0] "wall" 'player)
|
498 |
| - (use-item "wall-making wand" 1 0) |
| 498 | + (use-item "wall-making wand" [1 0]) |
499 | 499 | (assert-at [1 0] "wall" "orc")
|
500 |
| - (use-item "wall-making wand" 2 0) |
| 500 | + (use-item "wall-making wand" [2 0]) |
501 | 501 | (assert-at [2 0] "wall" "wall")
|
502 |
| - (use-item "wall-making wand" 3 0) |
| 502 | + (use-item "wall-making wand" [3 0]) |
503 | 503 | (assert-at [3 0] "wall"))
|
504 | 504 |
|
505 | 505 |
|
506 | 506 | (defn test-wand-phase []
|
507 | 507 | (init [])
|
508 | 508 | (defn phase [start end]
|
509 | 509 | (set-square 'E #* start)
|
510 |
| - (use-item "phase wand" 1 0) |
| 510 | + (use-item "phase wand" 'E) |
511 | 511 | (assert-at 'E #* end))
|
512 | 512 |
|
513 | 513 | (phase
|
|
532 | 532 | (init
|
533 | 533 | [:tiles ["orc" "wall" "pillar"]])
|
534 | 534 |
|
535 |
| - (cant (use-item "wall-destroying wand" 1 0) "There isn't a destructible tile there.") |
536 |
| - (use-item "wall-destroying wand" 2 0) |
| 535 | + (cant (use-item "wall-destroying wand" 'E) "There isn't a destructible tile there.") |
| 536 | + (use-item "wall-destroying wand" [2 0]) |
537 | 537 | (assert-at [2 0] 'floor)
|
538 |
| - (use-item "wall-destroying wand" 3 0) |
| 538 | + (use-item "wall-destroying wand" [3 0]) |
539 | 539 | (assert-at [3 0] 'floor)
|
540 | 540 | (set-square [3 0] "wall" "wall")
|
541 | 541 | (assert-at [3 0] "wall" "wall")
|
542 |
| - (use-item "wall-destroying wand" 3 0) |
| 542 | + (use-item "wall-destroying wand" [3 0]) |
543 | 543 | (assert-at [3 0] "wall"))
|
544 | 544 |
|
545 | 545 |
|
|
549 | 549 | []
|
550 | 550 | [])
|
551 | 551 |
|
552 |
| - (cant (use-item "wand of exit" 1 0) "You can only make an exit on an empty square.") |
553 |
| - (use-item "wand of exit" 0 1) |
| 552 | + (cant (use-item "wand of exit" 'E) "You can only make an exit on an empty square.") |
| 553 | + (use-item "wand of exit" 'N) |
554 | 554 | (wk 'N)
|
555 | 555 | (assert (= G.level-n 3)))
|
556 | 556 |
|
|
596 | 596 | :if (= (% (+ x y) 2) 0)]
|
597 | 597 | (setv (. (top [x y]) hp) hp))
|
598 | 598 |
|
599 |
| - (use-item "wand of death" 2 2) |
| 599 | + (use-item "wand of death" [2 2]) |
600 | 600 | ; Undead, undead generators, cracked walls, and (contra IQ) negatons
|
601 | 601 | ; are immune to wands of death. The rightmost column is outside the
|
602 | 602 | ; burst radius.
|
|
616 | 616 | (set-square 'E
|
617 | 617 | "orc" "wall" "exit" "pile of gold" "negaton" "Void" "hole")
|
618 | 618 | ; Everything except the Void is destroyed by annihilation.
|
619 |
| - (use-item "wand of annihilation" 1 0) |
| 619 | + (use-item "wand of annihilation" 'E) |
620 | 620 | (assert-at 'E "Void")
|
621 | 621 | ; Contra IQ, we allow the player to kill herself with a wand of
|
622 | 622 | ; annihilation, because it's funny.
|
623 |
| - (use-item "wand of annihilation" 0 0) |
| 623 | + (use-item "wand of annihilation" 'here) |
624 | 624 | (cant (wk 'E) "You're dead. You can undo or load a saved game."))
|
625 | 625 |
|
626 | 626 |
|
|
630 | 630 | :tiles ["wall" ["orc" :hp 10] ["orc" :hp 10] "web" "wall" ["orc" :hp 10]]])
|
631 | 631 |
|
632 | 632 | (assert (= G.player.hp 100))
|
633 |
| - (use-item "wand of flame" 2 0) |
| 633 | + (use-item "wand of flame" [2 0]) |
634 | 634 | ; The player is unhurt.
|
635 | 635 | (assert (= G.player.hp 100))
|
636 | 636 | ; The wall is unaffected.
|
|
652 | 652 | "pile of gold" "treasure chest" "key"
|
653 | 653 | "phase trigger" "phasing wall (in phase)" "cracked wall" "orc"]])
|
654 | 654 | (defn remote [x]
|
655 |
| - (use-item "wand of remote action" x 0)) |
| 655 | + (use-item "wand of remote action" [x 0])) |
656 | 656 | (setv G.rules.reality-bubble-size 20)
|
657 | 657 | (setv nothing "There isn't anything you can affect there.")
|
658 | 658 |
|
|
700 | 700 | (ecase usage
|
701 | 701 | 'use (do
|
702 | 702 | ; Actually use the bomb.
|
703 |
| - (use-item item-stem 1 0)) |
| 703 | + (use-item item-stem 'E)) |
704 | 704 | 'shoot (do
|
705 | 705 | ; Shoot the bomb while it's on the floor. This creates a
|
706 | 706 | ; less impressive explosion.
|
707 |
| - (mk-tile [1 0] item-stem) |
| 707 | + (mk-tile 'E item-stem) |
708 | 708 | (shoot 'E)))
|
709 | 709 | (for [[i dmg] (enumerate damages)]
|
710 | 710 | (assert-hp [(+ i 1) 0] (- starting-orc-hp dmg))))
|
|
731 | 731 |
|
732 | 732 | ; An earthquake bomb does 3 damage to monsters and 2 to cracked
|
733 | 733 | ; walls.
|
734 |
| - (use-item "earthquake bomb" 1 1) |
| 734 | + (use-item "earthquake bomb" [1 1]) |
735 | 735 | (assert-textmap :map-marks {"##" "cracked wall"} :text "
|
736 | 736 | ##╷ . ##
|
737 | 737 | . ##. .
|
|
0 commit comments