xhads/source/ai.ads

92 lines
3.1 KiB
Ada

-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
--
-- GNU General Public Licence (version 3 or later)
with core;
package ai is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type action is (
none, walk, talk, find
);
type action_data is record
base : data_limit;
data : core.pointer;
name : core.short_string;
end record;
type actor_data is record
name : name_limit;
clan : clan_limit;
soul : data_limit;
mind : data_limit;
work : action;
x : natural;
y : natural;
end record;
------------------------------------------------------------------------------------------
procedure action_none;
procedure action_walk;
procedure action_talk;
procedure action_find;
actor_digit : constant natural := 8;
actor_state : constant natural := 2;
actor_count : constant natural := 4;
envy : constant data_limit := 2#00000001#;
gluttony : constant data_limit := 2#00000010#;
greed : constant data_limit := 2#00000100#;
lust : constant data_limit := 2#00001000#;
pride : constant data_limit := 2#00010000#;
sloth : constant data_limit := 2#00100000#;
wrath : constant data_limit := 2#01000000#;
thirst : constant data_limit := 2#00000001#;
hunger : constant data_limit := 2#00000010#;
fatigue : constant data_limit := 2#00000100#;
solitude : constant data_limit := 2#00001000#;
health : constant data_limit := 2#00010000#;
joy : constant data_limit := 2#00100000#;
boredom : constant data_limit := 2#01000000#;
action_array : constant array (action) of action_data := (
(2#00000000#, action_none'access, "standing "),
(2#00000000#, action_walk'access, "walking "),
(2#00000000#, action_talk'access, "talking "),
(2#00000000#, action_find'access, "finding ")
);
actor : array (1 .. actor_count) of actor_data := (
(0, 0, 3, 3, talk, 0, 0), -- Ignore
others => (0, 0, 1, 1, walk, 0, 0)
);
active : natural := 1;
------------------------------------------------------------------------------------------
function actor_is_envious return boolean; -- wtf
function actor_is_glutton return boolean; -- wtf
function actor_is_greedy return boolean; -- wtf
function actor_is_slutty return boolean; -- wtf
function actor_is_proud return boolean; -- wtf
function actor_is_lazy return boolean; -- wtf
function actor_is_angry return boolean; -- wtf
function actor_is_thirsty return boolean;
function actor_is_hungry return boolean;
function actor_is_tired return boolean; -- wtf
function actor_is_lonely return boolean;
function actor_is_healthy return boolean;
function actor_is_happy return boolean; -- wtf
function actor_is_bored return boolean; -- wtf
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end ai;