Mostly planning
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
* I need to keep the documentation up to date. Namely, the GDD is getting out of date.
|
||||
* How many lookups is the map system using?
|
||||
* Add the serial packet to the network utility
|
||||
* I completely forgot about status ailments
|
||||
|
||||
--Naming conventions--
|
||||
|
||||
@@ -38,3 +39,47 @@ Room:
|
||||
EnemyFactory enemyFactory --this takes information on the room's data early in the room's construction
|
||||
list<CombatInstance>
|
||||
|
||||
--Requirements--
|
||||
|
||||
The enemies need AI scripts
|
||||
The scripts need to be able to generate other enemies (frog king).
|
||||
The characters need a flag to show if they're in a combat instance or not, to signify of they should be unloaded client-side
|
||||
On each game loop, the server should envoke each combat instance's update function
|
||||
Each combat instance invokes each enemy's and character's update functions
|
||||
These update functions increase the ATB guagues
|
||||
if an ATB guage is full
|
||||
than the stored command is executed
|
||||
the players issue their commands during the build up
|
||||
if there isn't a command ready, then the player is still choosing
|
||||
for the enemies, the stored commands are driven by scripts, so when the enemies need to attack, their attached scripts are called.
|
||||
after the commands are called, the ATB is reset to 0.
|
||||
etc...
|
||||
|
||||
--Enemy Tables--
|
||||
|
||||
enemyTables: The global store of enemy tables. Only accessed by C++ code (unless you want to break something).
|
||||
|
||||
table.logic: the AI logic. If null, simply attack
|
||||
table.ref: reference to the enemy itself, for use by API functions, set by constructor?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--NOTE: useful for copying tables
|
||||
function deepcopy(orig)
|
||||
local orig_type = type(orig)
|
||||
local copy
|
||||
if orig_type == 'table' then
|
||||
copy = {}
|
||||
for orig_key, orig_value in next, orig, nil do
|
||||
copy[deepcopy(orig_key)] = deepcopy(orig_value)
|
||||
end
|
||||
setmetatable(copy, deepcopy(getmetatable(orig)))
|
||||
else -- number, string, boolean, etc
|
||||
copy = orig
|
||||
end
|
||||
return copy
|
||||
end
|
||||
Reference in New Issue
Block a user