From 8c4a6d0954721d8c285771dbd1f5fff672b13ebe Mon Sep 17 00:00:00 2001 From: xolatile Date: Wed, 13 Mar 2024 17:06:13 -0400 Subject: [PATCH] Added skill descriptions and die procedure... --- source/core.adb | 1 + source/core.ads | 2 ++ source/skill.ads | 73 +++++++++++++++++++------------------------------------- source/system.c | 6 +++++ 4 files changed, 33 insertions(+), 49 deletions(-) diff --git a/source/core.adb b/source/core.adb index bf1b11b..b9a2d2e 100644 --- a/source/core.adb +++ b/source/core.adb @@ -31,6 +31,7 @@ package body core is dash; echo (comment, "Immediately terminating the program, no memory management clean-up."); dash; + die; end if; end echo; diff --git a/source/core.ads b/source/core.ads index ef53425..c606e09 100644 --- a/source/core.ads +++ b/source/core.ads @@ -85,6 +85,8 @@ package core is -- C + procedure die with import => true, convention => c; + function random_integer (minimum, maximum : in integer) return integer with import => true, convention => c; procedure engine_configure with import => true, convention => c; diff --git a/source/skill.ads b/source/skill.ads index 97c0f19..e1ce1ce 100644 --- a/source/skill.ads +++ b/source/skill.ads @@ -4,31 +4,6 @@ package skill is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---~Archery: Improves the effectiveness of ranged attacks. ---~Offense: Enhances the damage dealt in combat. ---~Armourer: Better at maintaining and repairing equipment. ---~Resistance: Provides protection against various types of magic. ---~Tactics: Enhances tactical decisions in battles. ---~First Aid: Ability to heal wounded units on the battlefield. ---~Logistics: Increases movement speed on the map. ---~Path Finding: Improves travel speed and reduces chances of ambush. ---~Navigation: Better at traveling by sea, improving sea voyages. ---~Scouting: Increases visibility range on the map. ---~Leadership: Allows for the command of larger armies. ---~Scholar: Improves learning from various sources of knowledge. ---~Fire Magic: Focuses on spells related to fire elements. ---~Water Magic: Mastery over spells involving water elements. ---~Air Magic: Command over spells related to air and wind. ---~Earth Magic: Manipulation of spells involving earth and nature. ---~Mysticism: Enhances magical energy and resource management. ---~Necromancy: Ability to raise and control undead units. ---~Sorcery: Mastery over a wide range of magical spells. ---~Wisdom: Increases overall knowledge and understanding. ---~Intelligence: Enhances magical prowess and spellcasting ability. ---~Learning: Speeds up the rate of acquiring new skills. ---~Diplomacy: Improves relationships with other factions. ---~Estates: Manages and grows your domain, relations and wealth. - type codex is ( archery, offense, armourer, resistance, tactics, first_aid, logistics, path_finding, navigation, scouting, leadership, scholar, @@ -58,30 +33,30 @@ package skill is count : constant natural := codex'pos (codex'last) + 1; trait : constant trait_array := ( - ("Archery ", 0, "Archery: Improves the effectiveness of ranged attacks. "), - ("Offense ", 0, "Offense: Enhances the damage dealt in combat. "), - ("Armourer ", 0, "Armourer: Better at maintaining and repairing equipment. "), - ("Resistance ", 0, "Resistance: Provides protection against various types of magic. "), - ("Tactics ", 0, "Tactics: Enhances tactical decisions in battles. "), - ("First Aid ", 0, "First Aid: Ability to heal wounded units on the battlefield. "), - ("Logistics ", 0, "Logistics: Increases movement speed on the map. "), - ("Path Finding ", 0, "Path Finding: Improves travel speed and reduces chances of ambush. "), - ("Navigation ", 0, "Navigation: Better at traveling by sea, improving sea voyages. "), - ("Scouting ", 0, "Scouting: Increases visibility range on the map. "), - ("Leadership ", 0, "Leadership: Allows for the command of larger armies. "), - ("Scholar ", 0, "Scholar: Improves learning from various sources of knowledge. "), - ("Fire Magic ", 0, "Fire Magic: Focuses on spells related to fire elements. "), - ("Water Magic ", 0, "Water Magic: Mastery over spells involving water elements. "), - ("Air Magic ", 0, "Air Magic: Command over spells related to air and wind. "), - ("Earth Magic ", 0, "Earth Magic: Manipulation of spells involving earth and nature. "), - ("Mysticism ", 0, "Mysticism: Enhances magical energy and resource management. "), - ("Necromancy ", 0, "Necromancy: Ability to raise and control undead units. "), - ("Sorcery ", 0, "Sorcery: Mastery over a wide range of magical spells. "), - ("Wisdom ", 0, "Wisdom: Increases overall knowledge and understanding. "), - ("Intelligence ", 0, "Intelligence: Enhances magical prowess and spellcasting ability. "), - ("Learning ", 0, "Learning: Speeds up the rate of acquiring new skills. "), - ("Diplomacy ", 0, "Diplomacy: Improves relationships with other factions. "), - ("Estates ", 0, "Estates: Manages and grows your domain, relations and wealth. ") + ("Archery ", 0, "Improves the effectiveness of ranged attacks. "), + ("Offense ", 0, "Enhances the damage dealt in combat. "), + ("Armourer ", 0, "Better at maintaining and repairing equipment. "), + ("Resistance ", 0, "Provides protection against various types of magic. "), + ("Tactics ", 0, "Enhances tactical decisions in battles. "), + ("First Aid ", 0, "Ability to heal wounded units on the battlefield. "), + ("Logistics ", 0, "Increases movement speed on the map. "), + ("Path Finding ", 0, "Improves travel speed and reduces chances of ambush. "), + ("Navigation ", 0, "Better at traveling by sea, improving sea voyages. "), + ("Scouting ", 0, "Increases visibility range on the map. "), + ("Leadership ", 0, "Allows for the command of larger armies. "), + ("Scholar ", 0, "Improves learning from various sources of knowledge. "), + ("Fire Magic ", 0, "Focuses on spells related to fire elements. "), + ("Water Magic ", 0, "Mastery over spells involving water elements. "), + ("Air Magic ", 0, "Command over spells related to air and wind. "), + ("Earth Magic ", 0, "Manipulation of spells involving earth and nature. "), + ("Mysticism ", 0, "Enhances magical energy and resource management. "), + ("Necromancy ", 0, "Ability to raise and control undead units. "), + ("Sorcery ", 0, "Mastery over a wide range of magical spells. "), + ("Wisdom ", 0, "Increases overall knowledge and understanding. "), + ("Intelligence ", 0, "Enhances magical prowess and spellcasting ability. "), + ("Learning ", 0, "Speeds up the rate of acquiring new skills. "), + ("Diplomacy ", 0, "Improves relationships with other factions. "), + ("Estates ", 0, "Manages and grows your domain, relations and wealth. ") ); ------------------------------------------------------------------------------------------ diff --git a/source/system.c b/source/system.c index cd091bc..f9eac4e 100644 --- a/source/system.c +++ b/source/system.c @@ -50,6 +50,8 @@ enum { static void out (void * data, int size); +extern void die (void); + extern void echo (char * data); extern void fatal_failure (int condition, char * message); @@ -141,6 +143,10 @@ void out (void * data, int size) { (void) write (STDOUT_FILENO, data, (unsigned long int) size); } +void die (void) { + exit (-1); +} + void echo (char * data) { if (data == null) { return;