Skip to content

Commit 8d64e93

Browse files
committed
Implemented wands of webs.
1 parent 49cade8 commit 8d64e93

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

simalq/tile/item.hy

+15
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,21 @@
409409
410410
:flavor "This attempt to create a portable phase trigger didn't entirely succeed.")
411411
412+
(deftile "/ " "a wand of webs" Usable
413+
:color 'dark-gray
414+
:iq-ix 170
415+
:acquirement-points 150
416+
417+
:targeted F
418+
:use (meth []
419+
"Creates a web at every empty square in the reality bubble."
420+
(for [
421+
pos (burst G.player.pos G.rules.reality-bubble-size)
422+
:if (not (at pos))]
423+
(Tile.make pos "web")))
424+
425+
:flavor "Of all the wands you can find in the dungeon, this can truly be said to be one of them. It looks and feels awfully like a body part from an oversized arachnid, and it makes a huge mess, but it has its uses.")
426+
412427
(deftile "/ " "a wand of death" Usable
413428
:color 'blue
414429
:iq-ix 156

simalq/tile/unimplemented.hy

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
[164 "cyclops"]
3636
[165 "dark_prince"]
3737
[166 "blind_mage"]
38-
[170 "wand_of_webs"]
3938
[177 "doppelganger"]
4039
[178 "magical_barrier_generator"]
4140
[179 "magical_barrier_east"]

tests/test_item.hy

+20
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,26 @@
488488
(assert-at [3 0] "wall"))
489489

490490

491+
(defn test-wand-webs []
492+
(init [
493+
:height 1
494+
:tiles ['floor "pile of gold" 'floor "wall" "giant spider" "wall" 'floor 'floor]])
495+
496+
(setv G.rules.reality-bubble-size 7)
497+
(use-item "wand of webs")
498+
; Every free square in the reality bubble gets a web.
499+
; (The wand doesn't add a web under the spider, but the spider makes
500+
; one itself.)
501+
(assert-at [1 0] "web")
502+
(assert-at [2 0] "pile of gold")
503+
(assert-at [3 0] "web")
504+
(assert-at [4 0] "wall")
505+
(assert-at [5 0] "giant spider" "web")
506+
(assert-at [6 0] "wall")
507+
(assert-at [7 0] "web")
508+
(assert-at [8 0] 'floor))
509+
510+
491511
(defn test-wand-death []
492512
(setv map-marks {
493513
"s " "shade"

0 commit comments

Comments
 (0)