xabina/plant.ads

63 lines
4.1 KiB
Ada
Raw Normal View History

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
-- 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.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Experimental minimal terminal rogue-like game in Ada programming language. I used to write a lot of Ada programs some time ago, then went in full C and assembly mode, and came
-- back to Ada, but realized that I keep my folders messy... Since it's bothersome to find my old Ada projects and share them here, I decided that the most easy thing to do is to
-- write a new program in Ada, a tiny game. Work in progress, it's messy and ugly for now...
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
with core;
package plant is
------------------------------------------------------------------------------------------
type plant_list is (
2023-10-15 12:56:21 -04:00
oak_tree, pine_tree, birch_tree, acacia_tree, apple_tree, peach_tree, orange_tree, pear_tree,
bush, thorny_bush, tall_grass, reed
);
type plant_mark is mod 72;
------------------------------------------------------------------------------------------
2023-10-15 10:01:21 -04:00
type plant_constant_type is new core.entity_constant_type with
record
health_limit : natural := 0;
end record;
2023-10-15 10:01:21 -04:00
type plant_variable_type is new core.entity_variable_type with
record
health : natural := 0;
end record;
type plant_constant_list is array (plant_list) of plant_constant_type;
type plant_variable_list is array (plant_mark) of plant_variable_type;
------------------------------------------------------------------------------------------
plant_constant_data : constant plant_constant_list := (
2023-10-15 12:40:35 -04:00
(core.entity_plant, "Oak Tree ", 'T', core.colour.green, core.effect.bold, 11),
(core.entity_plant, "Pine Tree ", 'T', core.colour.green, core.effect.bold, 23),
(core.entity_plant, "Birch Tree ", 'T', core.colour.green, core.effect.bold, 13),
(core.entity_plant, "Acacia Tree ", 'T', core.colour.green, core.effect.bold, 19),
(core.entity_plant, "Apple Tree ", 'T', core.colour.green, core.effect.bold, 17),
(core.entity_plant, "Peach Tree ", 'T', core.colour.green, core.effect.bold, 13),
(core.entity_plant, "Orange Tree ", 'T', core.colour.green, core.effect.bold, 11),
(core.entity_plant, "Pear Tree ", 'T', core.colour.green, core.effect.bold, 13),
(core.entity_plant, "Bush ", '&', core.colour.green, core.effect.normal, 5),
(core.entity_plant, "Thorny Bush ", '&', core.colour.green, core.effect.normal, 7),
(core.entity_plant, "Tall Grass ", '%', core.colour.green, core.effect.normal, 3),
(core.entity_plant, "Reed ", '%', core.colour.green, core.effect.normal, 3)
);
plant_variable_data : plant_variable_list;
------------------------------------------------------------------------------------------
end plant;