83 lines
5.8 KiB
Ada
83 lines
5.8 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 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 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 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 := (
|
|
(ENTITY_WEAPON, "Iron Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
|
|
(ENTITY_WEAPON, "Iron Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
|
|
(ENTITY_WEAPON, "Iron Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
|
|
(ENTITY_WEAPON, "Iron Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
|
|
(ENTITY_WEAPON, "Iron Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
|
|
(ENTITY_WEAPON, "Iron Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
|
|
(ENTITY_WEAPON, "Iron Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
|
|
(ENTITY_WEAPON, "Iron Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1),
|
|
(ENTITY_WEAPON, "Bronze Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
|
|
(ENTITY_WEAPON, "Bronze Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
|
|
(ENTITY_WEAPON, "Bronze Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
|
|
(ENTITY_WEAPON, "Bronze Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
|
|
(ENTITY_WEAPON, "Bronze Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
|
|
(ENTITY_WEAPON, "Bronze Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
|
|
(ENTITY_WEAPON, "Bronze Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
|
|
(ENTITY_WEAPON, "Bronze Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1),
|
|
(ENTITY_WEAPON, "Brass Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
|
|
(ENTITY_WEAPON, "Brass Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
|
|
(ENTITY_WEAPON, "Brass Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
|
|
(ENTITY_WEAPON, "Brass Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
|
|
(ENTITY_WEAPON, "Brass Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
|
|
(ENTITY_WEAPON, "Brass Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
|
|
(ENTITY_WEAPON, "Brass Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
|
|
(ENTITY_WEAPON, "Brass Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1)
|
|
);
|
|
|
|
weapon_variable_data : weapon_variable_list;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
end weapon;
|