New: potions and spells. Bug fixes: combat. V0.3
I added logic to the potion and new spell items. Potions heal 2 hearts on use and do not trigger a player turn taken. Spells on use bring up a casting reticle based on the type of targeting the spell uses. Fireball brings up a + shaped reticle, and can be moved freely up to 6 manhattan spaces away from the player, LOS permitting. FairyFire will always target the closes enemy(within 7 tiles) and Missile can target any enemy in range. Spells on use will trigger a player turn, the same as passing(hitting spacebar), and can be canceled by hitting Esc while attempting to cast.
After uploading V0.2, I noticed a bug where hitting multiple enemies with a weapon that hits multiple tiles(spear, sword, or axe) sometimes didn't hit all enemies or even crashed the game. The issue occurred because I was looping through enemies in range of weapon and calling their take_damage function, resulting in their death and their removal from the array of enemies held in main. To fix this, I get the appropriate enemy indices in an array, and then sort it from greatest to least, and then call their damage functions. This way, when an enemy is removed from enemies, it won't effect the index of the subsequent enemies that need to take damage. I went ahead and did this for Fireball as well.
Get Roguelike Thingy
Roguelike Thingy
Simple turn based roguelike.
Status | In development |
Author | timmygobbles |
Genre | Action |
Tags | Roguelike |
Languages | English |
More posts
- Roguelike Thingy Update 0.597 days ago
Leave a comment
Log in with itch.io to leave a comment.