143 lines
12 KiB
Ada
143 lines
12 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 animal is
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
type animal_list is (
|
||
|
ANIMAL_PIG, ANIMAL_COW, ANIMAL_CHICKEN, ANIMAL_SHEEP, ANIMAL_BOAR, ANIMAL_GOAT, ANIMAL_AUROCH, ANIMAL_DUCK,
|
||
|
ANIMAL_DOG, ANIMAL_CAT, ANIMAL_RABBIT, ANIMAL_HAMSTER, ANIMAL_HORSE, ANIMAL_DONKEY, ANIMAL_CAMEL, ANIMAL_ELEPHANT,
|
||
|
ANIMAL_OWL, ANIMAL_HAWK, ANIMAL_PIGEON, ANIMAL_VULTURE, ANIMAL_CROW, ANIMAL_PHEASANT, ANIMAL_SPARROW, ANIMAL_ALBATROSS,
|
||
|
ANIMAL_SARDINE, ANIMAL_HERRING, ANIMAL_CATFISH, ANIMAL_CARP, ANIMAL_WHALE, ANIMAL_SHARK, ANIMAL_SQUID, ANIMAL_SAWFISH,
|
||
|
ANIMAL_WORM, ANIMAL_BEE, ANIMAL_CENTIPEDE, ANIMAL_SPIDER, ANIMAL_FROG, ANIMAL_RAT, ANIMAL_BAT, ANIMAL_MOLE,
|
||
|
ANIMAL_WOLF, ANIMAL_FOX, ANIMAL_BEAR, ANIMAL_MAMMOTH, ANIMAL_ELK, ANIMAL_MOOSE, ANIMAL_DEER, ANIMAL_PEEBLES,
|
||
|
ANIMAL_LION, ANIMAL_HYENA, ANIMAL_BISON, ANIMAL_ZEBRA, ANIMAL_GIRAFFE, ANIMAL_CROCODILE, ANIMAL_MONKEY, ANIMAL_GNU,
|
||
|
ANIMAL_CARIBOU, ANIMAL_SEAL, ANIMAL_MORSE, ANIMAL_PENGUIN, ANIMAL_TURTLE, ANIMAL_CAYMAN, ANIMAL_OTTER, ANIMAL_SNAKE,
|
||
|
ANIMAL_LIZARD, ANIMAL_DAEODON, ANIMAL_SLIME, ANIMAL_AXOLOTL, ANIMAL_HEDGEHOG, ANIMAL_CATERPILLAR, ANIMAL_CRAB, ANIMAL_SCORPION,
|
||
|
ANIMAL_GIANT_LIZARD, ANIMAL_GIANT_CENTIPEDE, ANIMAL_GIANT_SPIDER, ANIMAL_GIANT_SLOTH,
|
||
|
ANIMAL_GIANT_OWL, ANIMAL_GIANT_SCORPION, ANIMAL_GIANT_AXOLOTL, ANIMAL_GIANT_WORM
|
||
|
);
|
||
|
|
||
|
type animal_mark is mod 72;
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
type animal_constant_type is new entity_constant_type with
|
||
|
record
|
||
|
health_limit : natural := 0;
|
||
|
attack_range : natural := 0;
|
||
|
defense_range : natural := 0;
|
||
|
end record;
|
||
|
|
||
|
type animal_variable_type is new entity_variable_type with
|
||
|
record
|
||
|
health : natural := 0;
|
||
|
end record;
|
||
|
|
||
|
type animal_constant_list is array (animal_list) of animal_constant_type;
|
||
|
type animal_variable_list is array (animal_mark) of animal_variable_type;
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
animal_constant_data : constant animal_constant_list := (
|
||
|
(ENTITY_ANIMAL, "Pig ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Cow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Chicken ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Sheep ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Boar ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Goat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Auroch ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Duck ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Dog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Cat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Rabbit ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Hamster ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Horse ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Donkey ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Camel ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Elephant ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Owl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Hawk ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Pigeon ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Vulture ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Crow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Pheasant ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Sparrow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Albatross ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Sardine ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Herring ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Catfish ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Carp ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Whale ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Shark ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Squid ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Sawfish ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Worm ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Bee ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Centipede ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Spider ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Frog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Rat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Bat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Mole ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Wolf ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Fox ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Bear ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Mammoth ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Elk ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Moose ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Deer ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Peebles ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Lion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Hyena ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Bison ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Zebra ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giraffe ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Crocodile ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Monkey ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Gnu ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Caribou ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Seal ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Morse ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Penguin ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Turtle ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Cayman ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Otter ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Snake ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Lizard ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Daeodon ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Slime ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Axolotl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Hedgehog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Caterpillar ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Crab ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Scorpion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giant Lizard ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giant Centipede ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giant Spider ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giant Sloth ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giant Owl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giant Scorpion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giant Axolotl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
|
||
|
(ENTITY_ANIMAL, "Giant Worm ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11)
|
||
|
);
|
||
|
|
||
|
animal_variable_data : animal_variable_list;
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
end animal;
|