Blobbus ZTS Notes

From CoIWiki
Revision as of 04:18, 27 February 2010 by Blobbus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

General: ZTS Fundamental Structure

There will exist a concept known as a "Time Queue".
There will exist a concept known as a "Queued Event".
The Time Queue can contain Zero or More Queued Events
An action exists known as "Enqueueing an Event", this action creates a new Queued Event, sets all of its Associated Values, and then places it into the Time Queue.
An action exists known as "Dequeueing an Event", this action removes an existing Queued Event that is located in the Time Queue from the Time Queue, then destroys the Queued Event.
Every Queued Event will have a concept known as a Payload.
The Payload will specify what actions are to be taken when the Queued Event is performed.
Every Queued Event will have Associated Values.
One of these Associated Values is the Event Timer of the Queued Event.
The Event Timer will be set to an Initial Value by whatever entity places that Queued Event into the Time Queue.
The Event Timer can also be reset to a new Initial Value by some other entity if permitted.
One of these Associated Values is the Speed Rating of the Queued Event.
The Speed Rating will be set to an Initial Value by whatever entity places that Queued Event into the Time Queue.
This Speed Rating Initial Value can be derived from Stats, Bonuses, and/or any Specific Values that are appropriate.

There will exist a concept known as a "Time Tick", also known as a "Tick".
A Time Tick is a generic measurement of time not anchored to any other particular measurement.
An action exists known as "Activating the Time Queue" or "Resuming the Time Queue", this action causes the Time Queue to repeatedly generate Time Ticks at regular intervals, and can only be performed when the Time Queue is Paused.
An action exists known as "Pausing the Time Queue", this action causes the Time Queue to cease repeatedly generating Time Ticks at regular intervals, and can only be performed when the Time Queue is Paused.
A Time Queue, when active, will repeatedly generate Time Ticks at regular intervals.
For each Time Tick that occurs, the Speed Rating is subtracted from the Event Timer.

If an Event Timer is Less Than or Equal to Zero, then that Queued Event occurs during this Time Tick.
If multiple Queued Events occur during one single Time Tick, then they are considered to occur in a specific order as defined by the rules below:
1. Create an Active Event List by placing all Queued Events that have Event Timers that are Less Than or Equal to Zero into it.
2. Create a Temporary Event List by placing all Queued Events from the Active Event List into it.
3. Perform the following Elimination Steps on the Temporary Event List, in order, until only one Queued Event is left in the Temporary Event List. When only one Queued Event is left in the Temporary Event List, skip directly past any remaining Elimination Steps to arrive at Step 4.
    A. Eleminate any item in the Temporary Event List that has an Event Timer with a value Greater Than the value of the Event Timer of any Queued Event that still exists in the Temporary Event List.
    B. Eliminate any item in the Temporary Event List that has a Speed Rating with a value Greater Than the value of the Speed Rating of any Queued Event that still exists in the Temporary Event List.
    C. Roll dice to determine the Temporary Roll Value for each item still in the Temporary Event List, eliminate any item in the Temporary Event List that has a Temporary Roll Value with a value Greater Than the value of the Temporary Roll Value of any Queued Event that still exists in the Temporary Event List.
    D. Repeat Elimination Step C until only one Queued Event is left in the Temporary Event List.
4. At the time that only one Queued Event is left in the Temporary Event List, that one Queued Event becomes the Current Event.
5. Remove the Current Event from the Temporary Event List and discard the now empty Temporary Event List.
6. Remove the Current Event from the Active Event List.
7. Perform the Payload of the Current Event by following the actions specified by the Payload of the Current Event.
8. If Queued Events still exist in the Active Event List, jump to Step 2 and continue from there.
9. At the time that zero Queued Events are left in the Active Event List, discard the now empty Active Event List.
10. Perform the next Time Tick and then jump to Step 1.

General: ZTS and Combat

1. All Combat Entities such as Players, Enemies, and NPCs who will be participating shall be selected.
2. All Combat Entities shall be either Individual Entities or part of a Combat Party.
3. When combat is started, all Combat Entities will Enqueue an Event into the Time Queue with the Initial Value of the Event Timer set to a Predetermined Value, the Speed Rating derived from their Base Stats, and the Payload set to the "Active Turn" payload.
4. The Time Queue shall be activated and it will start the Time Tick sequence.
5. Combat will end when only one Combat Entity or Combat Party remains active, all remaining Combat Entities or Combat Parties agree to cease hostilities, or a judge declares Combat to be over.

Payload: Active Turn

The Time Queue shall be Paused.
The Combat Entity who's turn it is shall have their "Active Turn" Queued Event Dequeued.
The Combat Entity who's turn it currently is shall be notified of their turn occurring.
The Combat Entity will specify an Action which will come with a Payload.
The Payload of the Action specified by the Combat Entity shall be performed.
The Time Queue shall be Resumed.

Action Payload: Attacking

The Combat Entity who's turn it currently is shall be known as the Attacker.
The Attacker shall declare an Attack to perform as the Chosen Attack.
The Attacker shall declare one or more Combat Entities as Defenders.
Each Defender shall declare a Defense to perform as the Chosen Defense.
At any point after the Attacker has declared the Defenders, either the Attackers or the Defenders can declare a Redo.
When a Redo has been declared, all other Attackers or Defenders can either Agree or Disagree.
If all eligible Attackers and Defenders chose to Agree, then the process followed so far in this payload will be cancelled out and the Attacker who's turn that it is currently will start their turn over from immediately before they declared this Attack Action.
If there are one or more Attackers or Defenders that choose to Disagree, then the Redo process is completed and cannot be called again for this Attack Action.
Proceedings will not continue until either all Attackers and Defenders have chosen to Agree, or until one Attacker or Defender has chosen to Disagree.
An "Attack Begins" event shall be Enqueued with the Initial Value of the Event Timer set to a Predetermined Value as set by the Chosen Attack. (Charge Time)

Action Payload: Attack Begins

This "Attack Begins" event shall be Dequeued.
All calculations pertaining to the Chosen Attack and Chosen Defense shall be performed.
An "Attack Ends" event shall be Enqueued with the Initial Value of the Event Timer set to a Predetermined Value as set by the Chosen Attack. (Attack Duration)

Action Payload: Attack Ends

This "Attack Ends" event shall be Dequeued.
The effects as described by the calculations performed during the "Attack Begins" event shall be applied and notified.
An "Active Turn" event shall be Enqueued with the Initial Value of the Event Timer set to a Predetermined Value as set by the Chosen Attack. (Cooldown Time)