@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with ada.text_io; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with ada.text_io; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with ada.text_io; | |||
@@ -41,11 +37,11 @@ package body core is | |||
ada.text_io.put (carriage_return & line_feed); | |||
end screen_new_line; | |||
procedure render_character (symbol : character := ' '; | |||
colour : character := '7'; | |||
effect : character := '0'; | |||
y : screen_height := 0; | |||
x : screen_width := 0) is | |||
procedure render_character (symbol : character; | |||
colour : character; | |||
effect : character; | |||
y : screen_height; | |||
x : screen_width) is | |||
begin | |||
screen_symbol (y, x) := symbol; | |||
screen_colour (y, x) := colour; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with ada.text_io; | |||
@@ -63,7 +59,7 @@ package core is | |||
type constant_type is tagged | |||
record | |||
entity : list := core.none; -- Entity identifier. | |||
entity : list := core.none; -- Entity identifier. | |||
name : string (1 .. 20) := "- "; -- Entity general name. | |||
symbol : character := ' '; -- Entity ASCII character representation. | |||
colour : character := '7'; -- Entity VT100 escape sequence colour. | |||
@@ -89,18 +85,7 @@ package core is | |||
wrath : natural := 0; | |||
end record; | |||
type mind_type is | |||
record | |||
fear : natural := 0; | |||
pain : natural := 0; | |||
thirst : natural := 0; | |||
hunger : natural := 0; | |||
exhaustion : natural := 0; | |||
solitude : natural := 0; | |||
faith : natural := 0; | |||
end record; | |||
type body_type is | |||
type health_type is | |||
record | |||
head : natural := 0; | |||
chest : natural := 0; | |||
@@ -111,6 +96,17 @@ package core is | |||
right_leg : natural := 0; | |||
end record; | |||
type mana_type is | |||
record | |||
stamina : natural := 0; | |||
fear : natural := 0; | |||
pain : natural := 0; | |||
thirst : natural := 0; | |||
hunger : natural := 0; | |||
exhaustion : natural := 0; | |||
solitude : natural := 0; | |||
end record; | |||
------------------------------------------------------------------------------------------ | |||
colour : colour_type; | |||
@@ -128,11 +124,11 @@ package core is | |||
procedure screen_show_cursor; | |||
procedure screen_new_line; | |||
procedure render_character (symbol : character := ' '; | |||
colour : character := '7'; | |||
effect : character := '0'; | |||
y : screen_height := 0; | |||
x : screen_width := 0); | |||
procedure render_character (symbol : character; | |||
colour : character; | |||
effect : character; | |||
y : screen_height; | |||
x : screen_width); | |||
procedure render_buffer; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core, game, action, map, item, magic, ammunition, weapon, armour, plant, animal, monster, player; | |||
@@ -18,7 +14,7 @@ begin | |||
------------------------------------------------------------------------------------------ | |||
action.bind ('q', action.game_exit'access); | |||
action.bind ('Q', action.game_exit'access); | |||
action.bind ('w', player.move_up'access); | |||
action.bind ('s', player.move_down'access); | |||
action.bind ('a', player.move_left'access); | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -26,23 +22,34 @@ package monster is | |||
type constant_type is new core.constant_type with | |||
record | |||
health_limit : natural := 0; | |||
armour_limit : natural := 0; | |||
mana_limit : natural := 0; | |||
stamina_limit : natural := 0; | |||
attack_range : natural := 0; | |||
attack_range : natural := 0; | |||
end record; | |||
type variable_type is new core.variable_type with | |||
record | |||
health : natural := 0; | |||
armour : natural := 0; | |||
mana : natural := 0; | |||
stamina : natural := 0; | |||
soul : core.soul_type; | |||
health : core.health_type; | |||
mana : core.mana_type; | |||
end record; | |||
type constant_list is array (list) of constant_type; | |||
type variable_list is array (mark) of variable_type; | |||
------------------------------------------------------------------------------------------ | |||
constant_data : constant constant_list := ( | |||
(core.monster, "Goblin Slave ", 'S', core.colour.green, core.effect.bold, 2), | |||
(core.monster, "Goblin Worker ", 'R', core.colour.green, core.effect.bold, 3), | |||
(core.monster, "Goblin Warrior ", 'W', core.colour.green, core.effect.bold, 5), | |||
(core.monster, "Goblin Boar Rider ", 'B', core.colour.green, core.effect.bold, 11), | |||
(core.monster, "Goblin Shaman ", 'H', core.colour.green, core.effect.bold, 3), | |||
(core.monster, "Goblin Chief ", 'C', core.colour.green, core.effect.bold, 7), | |||
(core.monster, "Goblin King ", 'K', core.colour.green, core.effect.bold, 13), | |||
(core.monster, "Goblin Ogre ", 'O', core.colour.green, core.effect.bold, 23) | |||
); | |||
variable_data : variable_list; | |||
------------------------------------------------------------------------------------------ | |||
end monster; |
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||
@@ -5,10 +5,6 @@ | |||
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |||
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
with core; | |||