Since this is a discussion about the battle system in an RPG, I would like to touch on the turn base aspect of it. LaMouche asked about it in the thread from Vegaseat here
http://www.daniweb.com/techtalkforums/thread59965.html.
Here is what I've come up with. In most standard RPGs where there is a battle between the player's team and a few monsters or boss, they each get a turn. Some games allow for a wait or active mode. The wait mode allows each entity in the fight to perform their action before the next one performs theirs. On the other hand you have an active battle system mode which others are performing their actions while you are deciding on what your character is to do. Active mode in my opinion is more fun and more difficult to program. So the question is how do I manage everyone's request during the fight and when they get to perform these actions.
The first thing that jumped in my mind was to create a queue. That way who ever was the fastest could add their action and move on. Just to step aside for a moment and talk about timing in the turn base system. Each entity will have their own statistics that determine how it interacts with its environment. For the turn base system you would use Agility to determine who acts first, second and so on. Sounds like it would work, but only for a basic approach. If you ever played Final Fantasy 7 and executed a limit break you might see where I'm going with this.
In FF7, whenever someone performs a limit break, it seems they skip the others requests to act in the battle and do their thing first. Lets say Tifa was first and has been assigned to attack MonsterA, but Cloud executes his limit break. Then all of a sudden Cloud goes before Tifa. Well a queue can't do this. Its function is First In First Out, so a queue is inadequate for the job. I would like to know what would be better. I've looked at a Deque in C++, but I'm not sure. It does act like a vector in the way you can access values via index and that it could be re-allocated during run-time. However, a vector is contiguous in memory where a deque isn't, so you can't use pointer arithmitics. The reason why I'm not sure about the deque is if you execute something in the middle, can you remove it without causing a gap in the queue?