Larkenx / Rotten-Soup

A roguelike built with Vue, Vuetify, Tiled, rot.js, and PixiJS! Playable at https://rottensoup.herokuapp.com/
GNU General Public License v3.0
383 stars 55 forks source link

[BUG] Reanimate Spell #63

Closed Moikapy closed 5 years ago

Moikapy commented 5 years ago

reanimate bug

Moikapy commented 5 years ago

Added console.log() around the undeadActor to see what values it returned.(BELOW) reanimate

Returned (BELOW) reanimate error

Moikapy commented 5 years ago

Added createActor to Skeletion item in Reanimate

Updated Spell

export const reanimate = corpse => { let ctile = Game.map.data[corpse.y][corpse.x] // remove the corpse from the ground ctile.removeActor(corpse) Game.display.removeChild(corpse) let undeadActor = corpse.id === corpseTypes.HUMANOID ? createActor('ZOMBIE', corpse.x, corpse.y) : createActor('SKELETON', corpse.x, corpse.y) undeadActor.chasing = true ctile.actors.push(undeadActor) Game.display.assignSprite(undeadActor) Game.scheduler.add(undeadActor, true) }