Skip to content

Commit

Permalink
Implemented wands of webs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodiologist committed Feb 12, 2024
1 parent 49cade8 commit 8d64e93
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
15 changes: 15 additions & 0 deletions simalq/tile/item.hy
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,21 @@
:flavor "This attempt to create a portable phase trigger didn't entirely succeed.")
(deftile "/ " "a wand of webs" Usable
:color 'dark-gray
:iq-ix 170
:acquirement-points 150
:targeted F
:use (meth []
"Creates a web at every empty square in the reality bubble."
(for [
pos (burst G.player.pos G.rules.reality-bubble-size)
:if (not (at pos))]
(Tile.make pos "web")))
: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.")
(deftile "/ " "a wand of death" Usable
:color 'blue
:iq-ix 156
Expand Down
1 change: 0 additions & 1 deletion simalq/tile/unimplemented.hy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
[164 "cyclops"]
[165 "dark_prince"]
[166 "blind_mage"]
[170 "wand_of_webs"]
[177 "doppelganger"]
[178 "magical_barrier_generator"]
[179 "magical_barrier_east"]
Expand Down
20 changes: 20 additions & 0 deletions tests/test_item.hy
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,26 @@
(assert-at [3 0] "wall"))


(defn test-wand-webs []
(init [
:height 1
:tiles ['floor "pile of gold" 'floor "wall" "giant spider" "wall" 'floor 'floor]])

(setv G.rules.reality-bubble-size 7)
(use-item "wand of webs")
; Every free square in the reality bubble gets a web.
; (The wand doesn't add a web under the spider, but the spider makes
; one itself.)
(assert-at [1 0] "web")
(assert-at [2 0] "pile of gold")
(assert-at [3 0] "web")
(assert-at [4 0] "wall")
(assert-at [5 0] "giant spider" "web")
(assert-at [6 0] "wall")
(assert-at [7 0] "web")
(assert-at [8 0] 'floor))


(defn test-wand-death []
(setv map-marks {
"s " "shade"
Expand Down

0 comments on commit 8d64e93

Please sign in to comment.