Showing
3 changed files
with
22 additions
and
1 deletions
... | ... | @@ -267,3 +267,24 @@ function _M:pickSpotRemove(filter) |
267 | 267 | table.remove(self.spots, s.idx) |
268 | 268 | return s.spot |
269 | 269 | end |
270 | + | |
271 | +--- Pick a random spot matching the given filter | |
272 | +function _M:pickSpotFrom(filter, spots) | |
273 | + local list = {} | |
274 | + for i, spot in ipairs(spots) do | |
275 | + if not filter or game.zone:checkFilter(spot, filter) then list[#list+1] = spot end | |
276 | + end | |
277 | + return rng.table(list), list | |
278 | +end | |
279 | + | |
280 | +--- Pick a random spot matching the given filter and remove it | |
281 | +function _M:pickSpotRemoveFrom(filter, spots) | |
282 | + local list = {} | |
283 | + for i, spot in ipairs(spots) do | |
284 | + if not filter or game.zone:checkFilter(spot, filter) then list[#list+1] = {spot=spot, idx=i} end | |
285 | + end | |
286 | + local s = rng.table(list) | |
287 | + if not s then return end | |
288 | + table.remove(spots, s.idx) | |
289 | + return s.spot | |
290 | +end | ... | ... |
... | ... | @@ -726,7 +726,7 @@ newTalent{ |
726 | 726 | reflectable = true, |
727 | 727 | requires_target = true, |
728 | 728 | proj_speed = 2, |
729 | - target = function(self, t) return {type="bolt", range=self:getTalentRange(t), talent=t, display={particle="bolt_void", trail="voidtrail"}} end, | |
729 | + target = function(self, t) return {type="beam", range=self:getTalentRange(t), talent=t, selffire=false, display={particle="bolt_void", trail="voidtrail"}} end, | |
730 | 730 | action = function(self, t) |
731 | 731 | local tg = self:getTalentTarget(t) |
732 | 732 | local x, y = self:getTarget(tg) | ... | ... |
No preview for this file type
-
Please register or login to post a comment