Open Assemberist opened 7 months ago
There is several structures which used by an object to check external situation: "npc_state", planned "allies" and "card "class. They partially duplicate planned behavior.
1) npc_state not usefull since there not logic where last action is used. 2) without that npc_state will duplicate information in "allies" structs. 3) last action is not important if signal mechanism will be implemented.
4) Fraction field in object can be changed to link to parent "allies" struct since "allies" have fraction field. 5) Since all objects are creatures the class can be renamed. 6) Using of "allies" (get, set, send_event) can be added to object class as parent class.
Save commit created. Changes pushed to issue branch.
Creatures should behave first according to they state and second according to external situation. So new entity 'Event queue' can be implemented. It allows to provide to creature what changed anround.
And allies can be done to incapsulate some logic that related to a group of creatures (from one party or fraction, i'm not sure right now).