Monday, November 25, 2013

Dungeon Diving 9

Overhauling the combat system today. On the user side it won't be a noticeable change, but on the backend it'll make things much easier. General outline:

-Player enters combat with an enemy, combat starts.
-While in combat, player's skills gain time, when time = requiredtime (per the skill), the button is clickable
-When button is clicked, the skill is fed into the skillQueue class. This skill holds the current skill being used by a player. Before being added, it makes sure that #1 there's currently nothing in the queue (I don't know why I called it a queue, it's not a queue at all...) and #2 player can afford it. If it passes, the costs are paid and it's put into the queue.

Queue is where the magic happens -- if there's anything in the queue, it'll add time to the casting count. Once the casting count is greater or equal to the casting time (which would be instantly if there was no casting time), the skill will execute. The queue will also look for things such as block/dodge/powerups, and have the ability for skills to be removed via stun (and not be added until it's over). Should make for a lot of interesting skills.


No comments:

Post a Comment