------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- 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 weapon is ------------------------------------------------------------------------------------------ type weapon_list is ( iron_sword, iron_greatsword, iron_axe, iron_battleaxe, iron_spear, iron_shield, iron_mace, iron_hammer, bronze_sword, bronze_greatsword, bronze_axe, bronze_battleaxe, bronze_spear, bronze_shield, bronze_mace, bronze_hammer, brass_sword, brass_greatsword, brass_axe, brass_battleaxe, brass_spear, brass_shield, brass_mace, brass_hammer ); type weapon_mark is mod 72; ------------------------------------------------------------------------------------------ type weapon_constant_type is new core.entity_constant_type with record dual_wield : boolean := false; value : natural := 0; weight : natural := 0; attack_range : natural := 0; defense_range : natural := 0; distance_range : natural := 0; end record; type weapon_variable_type is new core.entity_variable_type with record enchantment : natural := 0; condition : natural := 0; end record; type weapon_constant_list is array (weapon_list) of weapon_constant_type; type weapon_variable_list is array (weapon_mark) of weapon_variable_type; ------------------------------------------------------------------------------------------ weapon_constant_data : constant weapon_constant_list := ( (core.entity_weapon, "Iron Sword ", 'l', core.colour.red, core.effect.normal, true, 11, 31, 7, 2, 1), (core.entity_weapon, "Iron Greatsword ", 'L', core.colour.red, core.effect.bold, false, 23, 67, 11, 3, 2), (core.entity_weapon, "Iron Axe ", 'r', core.colour.red, core.effect.normal, true, 13, 43, 7, 2, 1), (core.entity_weapon, "Iron Battleaxe ", 'T', core.colour.red, core.effect.bold, false, 19, 73, 13, 2, 2), (core.entity_weapon, "Iron Spear ", 'I', core.colour.red, core.effect.bold, false, 17, 53, 10, 4, 2), (core.entity_weapon, "Iron Shield ", 'o', core.colour.red, core.effect.normal, true, 13, 37, 3, 9, 1), (core.entity_weapon, "Iron Mace ", 'i', core.colour.red, core.effect.normal, true, 11, 41, 8, 2, 1), (core.entity_weapon, "Iron Hammer ", 't', core.colour.red, core.effect.normal, true, 13, 47, 7, 3, 1), (core.entity_weapon, "Bronze Sword ", 'l', core.colour.red, core.effect.normal, true, 11, 31, 7, 2, 1), (core.entity_weapon, "Bronze Greatsword ", 'L', core.colour.red, core.effect.bold, false, 23, 67, 11, 3, 2), (core.entity_weapon, "Bronze Axe ", 'r', core.colour.red, core.effect.normal, true, 13, 43, 7, 2, 1), (core.entity_weapon, "Bronze Battleaxe ", 'T', core.colour.red, core.effect.bold, false, 19, 73, 13, 2, 2), (core.entity_weapon, "Bronze Spear ", 'I', core.colour.red, core.effect.bold, false, 17, 53, 10, 4, 2), (core.entity_weapon, "Bronze Shield ", 'o', core.colour.red, core.effect.normal, true, 13, 37, 3, 9, 1), (core.entity_weapon, "Bronze Mace ", 'i', core.colour.red, core.effect.normal, true, 11, 41, 8, 2, 1), (core.entity_weapon, "Bronze Hammer ", 't', core.colour.red, core.effect.normal, true, 13, 47, 7, 3, 1), (core.entity_weapon, "Brass Sword ", 'l', core.colour.red, core.effect.normal, true, 11, 31, 7, 2, 1), (core.entity_weapon, "Brass Greatsword ", 'L', core.colour.red, core.effect.bold, false, 23, 67, 11, 3, 2), (core.entity_weapon, "Brass Axe ", 'r', core.colour.red, core.effect.normal, true, 13, 43, 7, 2, 1), (core.entity_weapon, "Brass Battleaxe ", 'T', core.colour.red, core.effect.bold, false, 19, 73, 13, 2, 2), (core.entity_weapon, "Brass Spear ", 'I', core.colour.red, core.effect.bold, false, 17, 53, 10, 4, 2), (core.entity_weapon, "Brass Shield ", 'o', core.colour.red, core.effect.normal, true, 13, 37, 3, 9, 1), (core.entity_weapon, "Brass Mace ", 'i', core.colour.red, core.effect.normal, true, 11, 41, 8, 2, 1), (core.entity_weapon, "Brass Hammer ", 't', core.colour.red, core.effect.normal, true, 13, 47, 7, 3, 1) ); weapon_variable_data : weapon_variable_list; ------------------------------------------------------------------------------------------ end weapon;