I searched forum for more information or examples of hero.hasEffect(“effect”) method usage, but didn’t found any helpful topic.
Am I understand wrong something about this method or my code is bad or something else?
The level is “Backwoods treasure” in Backwood forest, language is Python and my code is:
`def RingOn(): if self.canCast("invisibility", self): self.cast("invisibility", self) loop: item = hero.findNearest(hero.findItems()) RingOn() if hero.hasEffect("invisibility"): if item: hero.move(item.pos) `
I supposed that hero would became invisible and pick up coins while invisibility effect duration, but Anya does only the first part)) She became invisible and stands still till running out of time.
Any hint or advice would be highly appreciated.