xhads/source/unit.ads

242 lines
16 KiB
Ada

with core, effect, faction;
package unit is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type animation is (
idle, wounded, dead, moving, toggle_moving, attack
);
type codex is (
azure_dragon, boar, crystal_dragon, enchanter, faerie_dragon, gold_golem,
halfing, mummy, nomad, peasant, rogue, rust_dragon,
sharpshooter, troll,
--
pikeman, halberdier, archer, marksman, griffin, royal_griffin,
swordsman, crusader, monk, zealot, cavalier, champion,
angel, arch_angel,
--
goblin, hobgoblin, wolf_rider, wolf_raider, orc, orc_chieftain,
ogre, ogre_magi, roc, thunderbird, cyclops, cyclops_king,
behemoth, ancient_behemoth,
--
imp, familiar, gog, magog, hell_hound, cerberus,
demon, horned_demon, pit_fiend, pit_lord, efreet, efreet_sultan,
devil, arch_devil,
--
gremlin, master_gremlin, stone_gargoyle, obsidian_gargoyle, stone_golem, iron_golem,
mage, arch_mage, geany, master_geany, naga, naga_queen,
giant, titan,
--
pixie, spirit, air_elemental, storm_elemental, water_elemental, ice_elemental,
fire_elemental, energy_elemental, earth_elemental, magma_elemental, psychic_elemental, magic_elemental,
fire_bird, phoenix,
--
skeleton, skeleton_warrior, walking_dead, zombie, wight, wraith,
vampire, vampire_lord, lich, power_lich, black_knight, dread_knight,
bone_dragon, ghost_dragon,
--
centaur, centaur_captain, dwarf, battle_dwarf, wood_elf, grand_elf,
pegasus, silver_pegasus, dendroid_guard, dendroid_soldier, unicorn, war_unicorn,
green_dragon, gold_dragon,
--
gnoll, gnoll_marauder, lizardman, lizard_warrior, serpentfly, dragonfly,
basilisk, greater_basilisk, gorgon, mighty_gorgon, wyvern, wyvern_monarch,
hydra, chaos_hydra,
--
troglodyte, infernal_troglodyte, harpy, harpy_hag, evil_eye, beholder,
medusa, medusa_queen, minotaur, minotaur_king, manticore, scorpicore,
red_dragon, black_dragon
);
------------------------------------------------------------------------------------------
subtype level_limit is natural range 1 .. 6;
subtype health_limit is natural range 1 .. 12;
subtype damage_limit is natural range 1 .. 12;
subtype growth_limit is natural range 1 .. 12;
type information is
record
name : core.short_string;
kind : faction.codex;
level : level_limit;
health : health_limit;
damage : damage_limit;
growth : growth_limit;
evoke : effect.codex;
end record;
type trait_array is array (codex) of information;
------------------------------------------------------------------------------------------
count : constant natural := codex'pos (codex'last) + 1;
trait : constant trait_array := (
("Azure Dragon ", faction.neutral, 1, 2, 1, 9, effect.none),
("Boar ", faction.neutral, 1, 2, 1, 9, effect.none),
("Crystal Dragon ", faction.neutral, 1, 2, 1, 9, effect.none),
("Enchanter ", faction.neutral, 1, 2, 1, 9, effect.none),
("Faerie Dragon ", faction.neutral, 1, 2, 1, 9, effect.none),
("Gold Golem ", faction.neutral, 1, 2, 1, 9, effect.none),
("Halfing ", faction.neutral, 1, 2, 1, 9, effect.none),
("Mummy ", faction.neutral, 1, 2, 1, 9, effect.none),
("Nomad ", faction.neutral, 1, 2, 1, 9, effect.none),
("Peasant ", faction.neutral, 1, 2, 1, 9, effect.none),
("Rogue ", faction.neutral, 1, 2, 1, 9, effect.none),
("Rust Dragon ", faction.neutral, 1, 2, 1, 9, effect.none),
("Sharpshooter ", faction.neutral, 1, 2, 1, 9, effect.none),
("Troll ", faction.neutral, 1, 2, 1, 9, effect.none),
--
("Pikeman ", faction.castle, 1, 2, 1, 9, effect.none),
("Halberdier ", faction.castle, 1, 3, 2, 9, effect.none),
("Archer ", faction.castle, 1, 1, 1, 7, effect.none),
("Crossbowman ", faction.castle, 1, 2, 2, 7, effect.none),
("Griffin ", faction.castle, 2, 3, 2, 4, effect.none),
("Royal Griffin ", faction.castle, 2, 4, 3, 4, effect.none),
("Swordsman ", faction.castle, 3, 2, 3, 5, effect.none),
("Crusader ", faction.castle, 3, 3, 4, 5, effect.none),
("Monk ", faction.castle, 3, 2, 5, 3, effect.none),
("Zealot ", faction.castle, 3, 3, 6, 3, effect.none),
("Cavalier ", faction.castle, 4, 6, 7, 2, effect.none),
("Champion ", faction.castle, 4, 8, 8, 2, effect.none),
("Angel ", faction.castle, 5, 8, 9, 1, effect.none),
("Arch-Angel ", faction.castle, 5, 10, 10, 1, effect.none),
--
("Goblin ", faction.stronghold, 1, 2, 1, 9, effect.none),
("Hobgoblin ", faction.stronghold, 1, 3, 2, 9, effect.none),
("Wolf Rider ", faction.stronghold, 1, 1, 1, 7, effect.none),
("Wolf Raider ", faction.stronghold, 1, 2, 2, 7, effect.none),
("Orc ", faction.stronghold, 2, 3, 2, 4, effect.none),
("Orc Chieftain ", faction.stronghold, 2, 4, 3, 4, effect.none),
("Orge ", faction.stronghold, 3, 2, 3, 5, effect.none),
("Ogre Magi ", faction.stronghold, 3, 3, 4, 5, effect.none),
("Roc ", faction.stronghold, 3, 2, 5, 3, effect.none),
("Thunderbird ", faction.stronghold, 3, 3, 6, 3, effect.none),
("Cyclops ", faction.stronghold, 4, 6, 7, 2, effect.none),
("Cyclops King ", faction.stronghold, 4, 8, 8, 2, effect.none),
("Behemoth ", faction.stronghold, 5, 8, 9, 1, effect.none),
("Ancient Behemoth ", faction.stronghold, 5, 10, 10, 1, effect.none),
--
("Imp ", faction.inferno, 1, 2, 1, 9, effect.none),
("Familiar ", faction.inferno, 1, 3, 2, 9, effect.none),
("Gog ", faction.inferno, 1, 1, 1, 7, effect.none),
("Magog ", faction.inferno, 1, 2, 2, 7, effect.none),
("Hell Hound ", faction.inferno, 2, 3, 2, 4, effect.none),
("Cerberus ", faction.inferno, 2, 4, 3, 4, effect.none),
("Demon ", faction.inferno, 3, 2, 3, 5, effect.none),
("Horned Demon ", faction.inferno, 3, 3, 4, 5, effect.none),
("Pit Fiend ", faction.inferno, 3, 2, 5, 3, effect.none),
("Pit Lord ", faction.inferno, 3, 3, 6, 3, effect.none),
("Efreeti ", faction.inferno, 4, 6, 7, 2, effect.none),
("Efreet Sultan ", faction.inferno, 4, 8, 8, 2, effect.none),
("Devil ", faction.inferno, 5, 8, 9, 1, effect.none),
("Arch Devil ", faction.inferno, 5, 10, 10, 1, effect.none),
--
("Gremlin ", faction.tower, 1, 2, 1, 9, effect.none),
("Master Gremlin ", faction.tower, 1, 3, 2, 9, effect.none),
("Stone Gargoyle ", faction.tower, 1, 1, 1, 7, effect.none),
("Obisidian Gargoyle ", faction.tower, 1, 2, 2, 7, effect.none),
("Stone Golem ", faction.tower, 2, 3, 2, 4, effect.none),
("Iron Golem ", faction.tower, 2, 4, 3, 4, effect.none),
("Mage ", faction.tower, 3, 2, 3, 5, effect.none),
("Arch Mage ", faction.tower, 3, 3, 4, 5, effect.none),
("Geany ", faction.tower, 3, 2, 5, 3, effect.none),
("Master Geany ", faction.tower, 3, 3, 6, 3, effect.none),
("Naga ", faction.tower, 4, 6, 7, 2, effect.none),
("Naga Queen ", faction.tower, 4, 8, 8, 2, effect.none),
("Giant ", faction.tower, 5, 8, 9, 1, effect.none),
("Titan ", faction.tower, 5, 10, 10, 1, effect.none),
--
("Pixie ", faction.conflux, 1, 2, 1, 9, effect.none),
("Spirit ", faction.conflux, 1, 3, 2, 9, effect.none),
("Air Elemental ", faction.conflux, 1, 1, 1, 7, effect.none),
("Storm Elemental ", faction.conflux, 1, 2, 2, 7, effect.none),
("Water Elemental ", faction.conflux, 2, 3, 2, 4, effect.none),
("Ice Elemental ", faction.conflux, 2, 4, 3, 4, effect.none),
("Fire Elemental ", faction.conflux, 3, 2, 3, 5, effect.none),
("Energy Elemental ", faction.conflux, 3, 3, 4, 5, effect.none),
("Earth Elemental ", faction.conflux, 3, 2, 5, 3, effect.none),
("Magma Elemental ", faction.conflux, 3, 3, 6, 3, effect.none),
("Psychic Elemental ", faction.conflux, 4, 6, 7, 2, effect.none),
("Magic Elemental ", faction.conflux, 4, 8, 8, 2, effect.none),
("Fire Bird ", faction.conflux, 5, 8, 9, 1, effect.none),
("Phoenix ", faction.conflux, 5, 10, 10, 1, effect.none),
--
("Skeleton ", faction.necropolis, 1, 2, 1, 9, effect.none),
("Skeleton Warrior ", faction.necropolis, 1, 3, 2, 9, effect.none),
("Walking Dead ", faction.necropolis, 1, 1, 1, 7, effect.none),
("Zombie ", faction.necropolis, 1, 2, 2, 7, effect.none),
("Wight ", faction.necropolis, 2, 3, 2, 4, effect.none),
("Wraith ", faction.necropolis, 2, 4, 3, 4, effect.none),
("Vampire ", faction.necropolis, 3, 2, 3, 5, effect.none),
("Vampire Lord ", faction.necropolis, 3, 3, 4, 5, effect.none),
("Lich ", faction.necropolis, 3, 2, 5, 3, effect.none),
("Power Lich ", faction.necropolis, 3, 3, 6, 3, effect.none),
("Black Knight ", faction.necropolis, 4, 6, 7, 2, effect.none),
("Dread Knight ", faction.necropolis, 4, 8, 8, 2, effect.none),
("Bone Dragon ", faction.necropolis, 5, 8, 9, 1, effect.none),
("Ghost Dragon ", faction.necropolis, 5, 10, 10, 1, effect.none),
--
("Centaur ", faction.rampart, 1, 2, 1, 9, effect.none),
("Centaur Captain ", faction.rampart, 1, 3, 2, 9, effect.none),
("Dwarf ", faction.rampart, 1, 1, 1, 7, effect.none),
("Battle Dwarf ", faction.rampart, 1, 2, 2, 7, effect.none),
("Wood Elf ", faction.rampart, 2, 3, 2, 4, effect.none),
("Grand Elf ", faction.rampart, 2, 4, 3, 4, effect.none),
("Pegasus ", faction.rampart, 3, 2, 3, 5, effect.none),
("Silver Pegasus ", faction.rampart, 3, 3, 4, 5, effect.none),
("Dendroid Guard ", faction.rampart, 3, 2, 5, 3, effect.none),
("Dendroid Soldier ", faction.rampart, 3, 3, 6, 3, effect.none),
("Unicorn ", faction.rampart, 4, 6, 7, 2, effect.none),
("War Unicorn ", faction.rampart, 4, 8, 8, 2, effect.none),
("Green Dragon ", faction.rampart, 5, 8, 9, 1, effect.none),
("Gold Dragon ", faction.rampart, 5, 10, 10, 1, effect.none),
--
("Gnoll ", faction.fortress, 1, 2, 1, 9, effect.none),
("Gnoll Marauder ", faction.fortress, 1, 3, 2, 9, effect.none),
("Lizardman ", faction.fortress, 1, 1, 1, 7, effect.none),
("Lizard Warrior ", faction.fortress, 1, 2, 2, 7, effect.none),
("Serpentfly ", faction.fortress, 2, 3, 2, 4, effect.none),
("Dragonfly ", faction.fortress, 2, 4, 3, 4, effect.none),
("Basilisk ", faction.fortress, 3, 2, 3, 5, effect.none),
("Greater Basilisk ", faction.fortress, 3, 3, 4, 5, effect.none),
("Gorgon ", faction.fortress, 3, 2, 5, 3, effect.none),
("Mighty Gorgon ", faction.fortress, 3, 3, 6, 3, effect.none),
("Wyvern ", faction.fortress, 4, 6, 7, 2, effect.none),
("Wyvern Monarch ", faction.fortress, 4, 8, 8, 2, effect.none),
("Hydra ", faction.fortress, 5, 8, 9, 1, effect.none),
("Chaos Hydra ", faction.fortress, 5, 10, 10, 1, effect.none),
--
("Troglodyte ", faction.dungeon, 1, 2, 1, 9, effect.none),
("Infernal Troglodyte ", faction.dungeon, 1, 3, 2, 9, effect.none),
("Harpy ", faction.dungeon, 1, 1, 1, 7, effect.none),
("Harpy Hag ", faction.dungeon, 1, 2, 2, 7, effect.none),
("Evil Eye ", faction.dungeon, 2, 3, 2, 4, effect.none),
("Beholder ", faction.dungeon, 2, 4, 3, 4, effect.none),
("Medusa ", faction.dungeon, 3, 2, 3, 5, effect.none),
("Medusa Queen ", faction.dungeon, 3, 3, 4, 5, effect.none),
("Minotaur ", faction.dungeon, 3, 2, 5, 3, effect.none),
("Minotaur King ", faction.dungeon, 3, 3, 6, 3, effect.none),
("Manticore ", faction.dungeon, 4, 6, 7, 2, effect.none),
("Scorpicore ", faction.dungeon, 4, 8, 8, 2, effect.none),
("Red Dragon ", faction.dungeon, 5, 8, 9, 1, effect.none),
("Black Dragon ", faction.dungeon, 5, 10, 10, 1, effect.none)
);
------------------------------------------------------------------------------------------
procedure configure;
procedure draw (index : in codex; state : in animation; x, y : in integer);
procedure icon (index : in codex; x, y : in integer);
procedure view (index : in codex; x, y : in integer);
procedure menu (x, y : in integer; center : in boolean);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end unit;