mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Fixed a couple of the bugs with marks.
This commit is contained in:
parent
5b11e132b2
commit
a4edb76c98
1 changed files with 2 additions and 1 deletions
|
@ -410,13 +410,14 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
|
|||
@effectInterval = setInterval @rotateEffect, 1500
|
||||
|
||||
else if @effectInterval and @thang.effectNames.length <= 1
|
||||
@clearInterval @effectInterval
|
||||
clearInterval @effectInterval
|
||||
@effectInterval = null
|
||||
|
||||
@previousEffectNames = @thang.effectNames
|
||||
|
||||
rotateEffect: =>
|
||||
effects = (m.name for m in _.values(@marks) when m.on and m.statusEffect and m.mark)
|
||||
return unless effects.length
|
||||
effects.sort()
|
||||
@effectIndex ?= 0
|
||||
@effectIndex = (@effectIndex + 1) % effects.length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue