xabina/plant.ads

64 lines
3.9 KiB
Ada

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- 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;
use core;
package plant is
------------------------------------------------------------------------------------------
type plant_list is (
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;
------------------------------------------------------------------------------------------
type plant_constant_type is new entity_constant_type with
record
health_limit : natural := 0;
end record;
type plant_variable_type is new 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 := (
(ENTITY_PLANT, "Oak Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 11),
(ENTITY_PLANT, "Pine Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 23),
(ENTITY_PLANT, "Birch Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Acacia Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 19),
(ENTITY_PLANT, "Apple Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 17),
(ENTITY_PLANT, "Peach Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Orange Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 11),
(ENTITY_PLANT, "Pear Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Bush ", '&', COLOUR_GREEN, EFFECT_NORMAL, 5),
(ENTITY_PLANT, "Thorny Bush ", '&', COLOUR_GREEN, EFFECT_NORMAL, 7),
(ENTITY_PLANT, "Tall Grass ", '%', COLOUR_GREEN, EFFECT_NORMAL, 3),
(ENTITY_PLANT, "Reed ", '%', COLOUR_GREEN, EFFECT_NORMAL, 3)
);
plant_variable_data : plant_variable_list;
------------------------------------------------------------------------------------------
end plant;