LOG 22: POISON ITEM, BATTLE LOG, MAIN LOOP AND ITEM SELECTION REWORK
POISON ITEM
A new item that does 3 tick damage every enemy turn, for 2 turns. Its the rarest item in the game as of right now and was somewhat complex to add (because of the tick damage and tracking how many turns have passed)
BATTLE LOG
A log that tracks the last two actions that have happened in the game. It currently only tracks damage and attacks but will track item usage and more detailed information in the future. It was a real headache to implement because i had contradictory logic between the log and my main loop and i had to reimplement it multiple times. But went well overall :)
REWORKS
MAIN LOOP REWORK
I reworked the main loop a bit because even though it worked well in theory it was not really optimized and it was prone to bugs in the future which is why i felt like redoing it a bit. Now instead of every function handling their own init, every changing gamestate instantly also inits the state it was changed to. Because of this there are less possible bugs and its overall easier to do for future gamestates
ITEM PICKUP REWORK
I noticed that the logic for my items wasn’t really perfect and seemed unoptimized which is why i felt like changing it a bit. Because when picking up items there are only two possible things to do (which both result in the same exit scenario) i swapped my if/else if logic for a switch statement which made the code shorter, and more optimal
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.