Difference between revisions of "User:AVS/Battle Mechanics Redesign"

From VCMI Project Wiki
Jump to: navigation, search
(Links)
 
Line 1: Line 1:
 +
= Main abstractions =
 +
 +
== Action ==
 +
Actor (player, AI) request.
 +
''(Current Battle::ActionType, BattleAction)''
 +
 +
*{{todo}} Move all serializable data into packets. (Should be client only.)
 +
 +
*{{todo}} (?) Separate factories for GUI client and AI. Client`s variants handles also GUI-related logic.
 +
**{{todo}} hierarchy. Functional branch - Attack, Defend etc. Scope branch: AIAction, ClientAction. Leaf classes with 2 parents for each branch.
 +
Factory instantiates leaf class, passes to environment as base from Scope Branch (may be subscription or visitor pattern for client-side logic), then returns as Functional branch object.
 +
 +
 +
== Effect ==
 +
Result of request. Server side class. Descendants encapsulate all battle logic such as damage, movement, timed effects.
 +
* JSON-serializable: used as configuration for spell effects
 +
 
= Links =
 
= Links =
  
 
* [[User:AVS/Spellcasting]]
 
* [[User:AVS/Spellcasting]]
 
* [[User:AVS/Spell Format Version2]]
 
* [[User:AVS/Spell Format Version2]]

Latest revision as of 03:40, 2 April 2014

Main abstractions

Action

Actor (player, AI) request. (Current Battle::ActionType, BattleAction)

  • [Todo] Move all serializable data into packets. (Should be client only.)
  • [Todo] (?) Separate factories for GUI client and AI. Client`s variants handles also GUI-related logic.
    • [Todo] hierarchy. Functional branch - Attack, Defend etc. Scope branch: AIAction, ClientAction. Leaf classes with 2 parents for each branch.

Factory instantiates leaf class, passes to environment as base from Scope Branch (may be subscription or visitor pattern for client-side logic), then returns as Functional branch object.


Effect

Result of request. Server side class. Descendants encapsulate all battle logic such as damage, movement, timed effects.

  • JSON-serializable: used as configuration for spell effects

Links