Prototype game engine for Heroes of Might & Magic, featuring a gameplay plot-twist...
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

92 linhas
3.1KB

  1. -- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
  2. --
  3. -- GNU General Public Licence (version 3 or later)
  4. with core;
  5. package ai is
  6. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7. type action is (
  8. none, walk, talk, find
  9. );
  10. type action_data is record
  11. base : data_limit;
  12. data : core.pointer;
  13. name : core.short_string;
  14. end record;
  15. type actor_data is record
  16. name : name_limit;
  17. clan : clan_limit;
  18. soul : data_limit;
  19. mind : data_limit;
  20. work : action;
  21. x : natural;
  22. y : natural;
  23. end record;
  24. ------------------------------------------------------------------------------------------
  25. procedure action_none;
  26. procedure action_walk;
  27. procedure action_talk;
  28. procedure action_find;
  29. actor_digit : constant natural := 8;
  30. actor_state : constant natural := 2;
  31. actor_count : constant natural := 4;
  32. envy : constant data_limit := 2#00000001#;
  33. gluttony : constant data_limit := 2#00000010#;
  34. greed : constant data_limit := 2#00000100#;
  35. lust : constant data_limit := 2#00001000#;
  36. pride : constant data_limit := 2#00010000#;
  37. sloth : constant data_limit := 2#00100000#;
  38. wrath : constant data_limit := 2#01000000#;
  39. thirst : constant data_limit := 2#00000001#;
  40. hunger : constant data_limit := 2#00000010#;
  41. fatigue : constant data_limit := 2#00000100#;
  42. solitude : constant data_limit := 2#00001000#;
  43. health : constant data_limit := 2#00010000#;
  44. joy : constant data_limit := 2#00100000#;
  45. boredom : constant data_limit := 2#01000000#;
  46. action_array : constant array (action) of action_data := (
  47. (2#00000000#, action_none'access, "standing "),
  48. (2#00000000#, action_walk'access, "walking "),
  49. (2#00000000#, action_talk'access, "talking "),
  50. (2#00000000#, action_find'access, "finding ")
  51. );
  52. actor : array (1 .. actor_count) of actor_data := (
  53. (0, 0, 3, 3, talk, 0, 0), -- Ignore
  54. others => (0, 0, 1, 1, walk, 0, 0)
  55. );
  56. active : natural := 1;
  57. ------------------------------------------------------------------------------------------
  58. function actor_is_envious return boolean; -- wtf
  59. function actor_is_glutton return boolean; -- wtf
  60. function actor_is_greedy return boolean; -- wtf
  61. function actor_is_slutty return boolean; -- wtf
  62. function actor_is_proud return boolean; -- wtf
  63. function actor_is_lazy return boolean; -- wtf
  64. function actor_is_angry return boolean; -- wtf
  65. function actor_is_thirsty return boolean;
  66. function actor_is_hungry return boolean;
  67. function actor_is_tired return boolean; -- wtf
  68. function actor_is_lonely return boolean;
  69. function actor_is_healthy return boolean;
  70. function actor_is_happy return boolean; -- wtf
  71. function actor_is_bored return boolean; -- wtf
  72. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  73. end ai;