File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 132132 (+= G.player.hp (refactor-hp @hp-effect)))))
133133
134134(setv (get Tile.types-by-iq-ix 21) (fn [pos _ te-v2]
135- ; IQ's three types of unknown potion are mapped to items with fixed
136- ; HP effects equal to the mean HP effect of the given type.
137- [(
138- (get Tile.types
139- (get [" meal" " empty platter" " rotten food" ] (- te-v2 1)))
140- :pos pos)]))
135+ [(unknown-potion pos te-v2)]))
136+
137+ (defn unknown-potion [pos i]
138+ " IQ's three types of unknown potion are mapped to items with fixed
139+ HP effects equal to the mean HP effect of the given type."
140+ ((get Tile.types
141+ (get [" meal" " empty platter" " rotten food" ] (- i 1)))
142+ :pos pos))
141143
142144(deftile " % " " a meal" Food
143145 :color 'red
Original file line number Diff line number Diff line change 278278 ; on top of the item contained within.
279279 [
280280 ((get Tile.types " treasure chest" ) :pos pos)
281- #* (if (= te-v1 21 ) ; An unknown potion
282- (( get Tile.types-by-iq-ix te-v1) pos None te-v2)
283- [ ((get Tile.types-by-iq-ix te-v1) :pos pos)] )]))
281+ (if (= te-v1 21 ) ; An unknown potion
282+ ( hy.I.simalq/tile/item.unknown-potion pos te-v2)
283+ ((get Tile.types-by-iq-ix te-v1) :pos pos))]))
284284
285285;; --------------------------------------------------------------
286286;; ** Metal doors
You can’t perform that action at this time.
0 commit comments