From 7d04caad118c1d63cb166ca4a6bab2f071863f61 Mon Sep 17 00:00:00 2001 From: xolatile Date: Wed, 13 Mar 2024 19:34:55 -0400 Subject: [PATCH] Added magic descriptions... --- source/magic.adb | 4 +- source/magic.ads | 149 ++++++++++++++++++++++++++++--------------------------- source/main.adb | 2 +- source/unit.ads | 9 ++++ 4 files changed, 87 insertions(+), 77 deletions(-) diff --git a/source/magic.adb b/source/magic.adb index ab240ab..53a23dd 100644 --- a/source/magic.adb +++ b/source/magic.adb @@ -39,7 +39,7 @@ package body magic is procedure icon (index : in codex; x, y : in integer) is begin core.draw (icon_sprite (index), x + 2, y + 2); - ui.draw_overicon ("", x, y); + ui.draw_overicon (trait (index).text, x, y); end icon; ------------------------------------------------------------------------------------------ @@ -48,7 +48,7 @@ package body magic is offset : constant integer := 4; begin core.draw (view_sprite (index), x + offset, y + offset); - ui.draw_icon_menu ("", x, y, view_width + 2 * offset, view_height + 2 * offset); + ui.draw_icon_menu (trait (index).text, x, y, view_width + 2 * offset, view_height + 2 * offset); end view; ------------------------------------------------------------------------------------------ diff --git a/source/magic.ads b/source/magic.ads index a360a6d..c1ecae0 100644 --- a/source/magic.ads +++ b/source/magic.ads @@ -45,6 +45,7 @@ package magic is kind : school; level : level_limit; evoke : effect.codex; + text : core.long_string; end record; type trait_array is array (codex) of information; @@ -54,80 +55,80 @@ package magic is count : constant natural := codex'pos (codex'last) + 1; trait : constant trait_array := ( - ("Magic Arrow ", neutral, 0, effect.none), - ("Chain Magic Arrow ", neutral, 0, effect.none), - ("Blow Away ", air, 0, effect.none), - ("Chain Lightning ", air, 0, effect.none), - ("Grounded ", air, 0, effect.none), - ("Lightning ", air, 0, effect.none), - ("Storm Arrows ", air, 0, effect.none), - ("Storm Winds ", air, 0, effect.none), - ("Summon Air Elemental ", air, 0, effect.none), - ("Thunderclap ", air, 0, effect.none), - ("Agony Mass ", dark, 0, effect.none), - ("Agony ", dark, 0, effect.none), - ("Despair Mass ", dark, 0, effect.none), - ("Despair ", dark, 0, effect.none), - ("Life Drain Mass ", dark, 0, effect.none), - ("Life Drain ", dark, 0, effect.none), - ("Purge ", dark, 0, effect.none), - ("Summon Dark Elemental ", dark, 0, effect.none), - ("Terror ", dark, 0, effect.none), - ("Weakness Mass ", dark, 0, effect.none), - ("Weakness ", dark, 0, effect.none), - ("Earthquake ", earth, 0, effect.none), - ("Erosion ", earth, 0, effect.none), - ("Petrification ", earth, 0, effect.none), - ("Poison Cloud ", earth, 0, effect.none), - ("Regeneration Mass ", earth, 0, effect.none), - ("Regeneration ", earth, 0, effect.none), - ("Rockwalls ", earth, 0, effect.none), - ("Stone Skin Mass ", earth, 0, effect.none), - ("Stone Skin ", earth, 0, effect.none), - ("Summon Earth Elemental ", earth, 0, effect.none), - ("Determination Mass ", fire, 0, effect.none), - ("Determination ", fire, 0, effect.none), - ("Fireball ", fire, 0, effect.none), - ("Fire Bolt ", fire, 0, effect.none), - ("Fire Shield ", fire, 0, effect.none), - ("Fire Storm ", fire, 0, effect.none), - ("Frenzy ", fire, 0, effect.none), - ("Immolation ", fire, 0, effect.none), - ("Inner Fire Mass ", fire, 0, effect.none), - ("Inner Fire ", fire, 0, effect.none), - ("Summon Fire Elemental ", fire, 0, effect.none), - ("Blindness ", light, 0, effect.none), - ("Celestial Armor Mass ", light, 0, effect.none), - ("Celestial Armor ", light, 0, effect.none), - ("Heal Mass ", light, 0, effect.none), - ("Heal ", light, 0, effect.none), - ("Purify ", light, 0, effect.none), - ("Retribution Heal ", light, 0, effect.none), - ("Retribution Mana ", light, 0, effect.none), - ("Retribution Shot ", light, 0, effect.none), - ("Summon Light Elemental ", light, 0, effect.none), - ("Sunburst ", light, 0, effect.none), - ("Dispel Magic Mass ", prime, 0, effect.none), - ("Dispel Magic ", prime, 0, effect.none), - ("Disruption ", prime, 0, effect.none), - ("Haste Mass ", prime, 0, effect.none), - ("Haste ", prime, 0, effect.none), - ("Implosion ", prime, 0, effect.none), - ("Mana Drain ", prime, 0, effect.none), - ("Slow Mass ", prime, 0, effect.none), - ("Slow ", prime, 0, effect.none), - ("Teleport ", prime, 0, effect.none), - ("Time Statis ", prime, 0, effect.none), - ("Blizzard ", water, 0, effect.none), - ("Eternal Winter ", water, 0, effect.none), - ("Frozen Ground ", water, 0, effect.none), - ("Ice Armor Mass ", water, 0, effect.none), - ("Ice Armor ", water, 0, effect.none), - ("Ice Bolt ", water, 0, effect.none), - ("Ice Breaker ", water, 0, effect.none), - ("Ice Wall ", water, 0, effect.none), - ("Summon Water Elemental ", water, 0, effect.none), - ("Winter Circle ", water, 0, effect.none) + ("Magic Arrow ", neutral, 0, effect.none, "Primary spell that channels mana through the air in order to do damage. "), + ("Chain Magic Arrow ", neutral, 0, effect.none, "Advanced primary spell that chains mana to damage multiple foes. "), + ("Blow Away ", air, 0, effect.none, "Weak spell that creates a strong gust of wind to knock back enemies. "), + ("Chain Lightning ", air, 0, effect.none, "A spell that sends a bolt of lightning jumping from target to target. "), + ("Grounded ", air, 0, effect.none, "A protective spell that renders the target immune to electrical attacks."), + ("Lightning ", air, 0, effect.none, "This spell releases a bolt of lightning to strike a single target. "), + ("Storm Arrows ", air, 0, effect.none, "Enchants arrows with the power of a storm, enhancing their range. "), + ("Storm Winds ", air, 0, effect.none, "A spell that summons powerful winds to hinder enemies projectiles. "), + ("Summon Air Elemental ", air, 0, effect.none, "This spell calls forth a powerful elemental creature of magic winds. "), + ("Thunderclap ", air, 0, effect.none, "A spell that creates a sudden, deafening clap of thunder to disorient. "), + ("Agony Mass ", dark, 0, effect.none, "A spell that inflicts excruciating pain on multiple targets. "), + ("Agony ", dark, 0, effect.none, "This spell causes intense suffering and torment to a target. "), + ("Despair Mass ", dark, 0, effect.none, "Ordinary spell that spreads feelings of hopelessness and despair. "), + ("Despair ", dark, 0, effect.none, "A spell that overwhelms a target with feelings of profound sadness. "), + ("Life Drain Mass ", dark, 0, effect.none, "A spell that drains life force from multiple targets to heal the caster."), + ("Life Drain ", dark, 0, effect.none, "This spell allows the caster to drain the life essence of a foe. "), + ("Purge ", dark, 0, effect.none, "A spell that cleanses a target from curses, diseases, and negativity. "), + ("Summon Dark Elemental ", dark, 0, effect.none, "This spell summons a sinister creature of darkness to serve the caster. "), + ("Terror ", dark, 0, effect.none, "A spell that instills intense fear in the target, causing them to flee. "), + ("Weakness Mass ", dark, 0, effect.none, "A spell that reduces the strength and abilities of multiple targets. "), + ("Weakness ", dark, 0, effect.none, "This spell weakens the target, reducing their physical prowess. "), + ("Earthquake ", earth, 0, effect.none, "This spell causes the ground to shake violently, damaging the area. "), + ("Erosion ", earth, 0, effect.none, "A spell that gradually wears away and weakens the defenses of the foes. "), + ("Petrification ", earth, 0, effect.none, "A powerful spell that turns the target to stone, rendering them useless."), + ("Poison Cloud ", earth, 0, effect.none, "This spell creates a toxic cloud that poisons and harms all in it. "), + ("Regeneration Mass ", earth, 0, effect.none, "A spell that rapidly heals and rejuvenates multiple enemies. "), + ("Regeneration ", earth, 0, effect.none, "This spell accelerates the natural healing process of a single target. "), + ("Rockwalls ", earth, 0, effect.none, "A spell that summons sturdy walls of rock for defense or to block paths."), + ("Stone Skin Mass ", earth, 0, effect.none, "A spell that hardens the skin of multiple friends, increasing defense. "), + ("Stone Skin ", earth, 0, effect.none, "This spell encases one unit in tough stone armor, reducing damage taken."), + ("Summon Earth Elemental ", earth, 0, effect.none, "This spell summons a elemental creature of earth to aid the caster. "), + ("Determination Mass ", fire, 0, effect.none, "A spell that boosts the resolve and strength of multiple targets. "), + ("Determination ", fire, 0, effect.none, "This spell enhances the determination and willpower of a single target. "), + ("Fireball ", fire, 0, effect.none, "A powerful projectile of fiery energy that explodes on impact. "), + ("Fire Bolt ", fire, 0, effect.none, "A quick and focused bolt of fire that can be launched at a target. "), + ("Fire Shield ", fire, 0, effect.none, "This spell creates a protective barrier of flames around the caster. "), + ("Fire Storm ", fire, 0, effect.none, "A spell that unleashes a fierce rain of fire upon all foes in the area. "), + ("Frenzy ", fire, 0, effect.none, "This spell increases the speed and aggression of a target in combat. "), + ("Immolation ", fire, 0, effect.none, "A spell that engulfs the target in flames, causing continuous burning. "), + ("Inner Fire Mass ", fire, 0, effect.none, "A spell that ignites the inner fire of multiple targets. "), + ("Inner Fire ", fire, 0, effect.none, "This spell increases the inner strength and power of a single target. "), + ("Summon Fire Elemental ", fire, 0, effect.none, "A spell that calls forth a formidable elemental creature of flames. "), + ("Blindness ", light, 0, effect.none, "A spell that causes the target to be temporarily blinded. "), + ("Celestial Armor Mass ", light, 0, effect.none, "This spell grants multiple targets celestial protection. "), + ("Celestial Armor ", light, 0, effect.none, "A spell that bestows celestial armor upon a single target. "), + ("Heal Mass ", light, 0, effect.none, "A spell that heals multiple targets simultaneously. "), + ("Heal ", light, 0, effect.none, "This spell restores health to a single friendly target. "), + ("Purify ", light, 0, effect.none, "A spell that removes curse or misfortune from a single target. "), + ("Retribution Heal ", light, 0, effect.none, "A healing spell that also inflicts damage to attackers of a unit. "), + ("Retribution Mana ", light, 0, effect.none, "This spell damages enemies and replenishes the caster's mana. "), + ("Retribution Shot ", light, 0, effect.none, "A spell that deals damage to foes and heals the caster. "), + ("Summon Light Elemental ", light, 0, effect.none, "This spell summons a radiant elemental being to aid the caster. "), + ("Sunburst ", light, 0, effect.none, "A powerful spell that releases a blinding burst of light. "), + ("Dispel Magic Mass ", prime, 0, effect.none, "A spell that removes magical effects from multiple targets at once. "), + ("Dispel Magic ", prime, 0, effect.none, "This spell cancels out magical buffs and effects on a single target. "), + ("Disruption ", prime, 0, effect.none, "A spell that disrupts the flow of magic, causing chaos and instability. "), + ("Haste Mass ", prime, 0, effect.none, "This spell accelerates the movement and actions of multiple targets. "), + ("Haste ", prime, 0, effect.none, "A spell that boosts the speed and agility of a single target. "), + ("Implosion ", prime, 0, effect.none, "A powerful spell that collapses the target in on itself, dealing damage."), + ("Mana Drain ", prime, 0, effect.none, "This spell siphons mana from the target, depleting their magical energy."), + ("Slow Mass ", prime, 0, effect.none, "This spell reduces the speed and reaction time of multiple targets. "), + ("Slow ", prime, 0, effect.none, "A spell that decreases the speed and movement of a single target. "), + ("Teleport ", prime, 0, effect.none, "A spell that instantly transports the caster to another location. "), + ("Time Statis ", prime, 0, effect.none, "A spell that suspends a foe, rendering them temporarily unable to act. "), + ("Blizzard ", water, 0, effect.none, "A spell that conjures a fierce snowstorm, dealing cold damage. "), + ("Eternal Winter ", water, 0, effect.none, "This spell creates a perpetual winter environment in the targeted area. "), + ("Frozen Ground ", water, 0, effect.none, "A spell that freezes the ground, creating ice that hinders movement. "), + ("Ice Armor Mass ", water, 0, effect.none, "This spell envelops multiple targets in protective ice armor. "), + ("Ice Armor ", water, 0, effect.none, "A spell that forms a protective ice shield around a single target. "), + ("Ice Bolt ", water, 0, effect.none, "A basic spell that launches a bolt of ice towards a target. "), + ("Ice Breaker ", water, 0, effect.none, "A spell that shatters ice-based defenses and immunities on a target. "), + ("Ice Wall ", water, 0, effect.none, "This spell creates a barrier of solid ice, blocking movement and arrows."), + ("Summon Water Elemental ", water, 0, effect.none, "A spell that summons a powerful water elemental ally to aid in combat. "), + ("Winter Circle ", water, 0, effect.none, "This spell creates a magical circle that enhances ice-based spells. ") ); ------------------------------------------------------------------------------------------ diff --git a/source/main.adb b/source/main.adb index ae7ced9..8c2a772 100644 --- a/source/main.adb +++ b/source/main.adb @@ -106,7 +106,7 @@ begin --~unit.stat (unit.power_lich, 0, 0, true); -- --~might.menu (0, 0, true); - --~magic.menu (0, 0, true); + magic.menu (0, 0, true); -- ui.draw_text_box (0, core.window_height - 32, core.window_width, 32); end loop gameplay; diff --git a/source/unit.ads b/source/unit.ads index c596dbd..5b55a8a 100644 --- a/source/unit.ads +++ b/source/unit.ads @@ -82,6 +82,7 @@ package unit is ("Rust Dragon ", faction.neutral, (1, 1, 1, 1), effect.none, "Dragon with corrosive breath, capable of weakening enemies. "), ("Sharpshooter ", faction.neutral, (1, 1, 1, 1), effect.none, "Highly skilled ranged unit with exceptional accuracy. "), ("Troll ", faction.neutral, (1, 1, 1, 1), effect.none, "Regenerating and powerful brute, often used as a tank. "), + -- ("Pikeman ", faction.castle, (1, 1, 1, 1), effect.none, "Basic spear-wielding infantry unit with a defensive stance. "), ("Halberdier ", faction.castle, (1, 1, 1, 1), effect.none, "Advanced infantry unit armed with a versatile halberd. "), ("Archer ", faction.castle, (1, 1, 1, 1), effect.none, "Ranged unit proficient in shooting arrows at enemies. "), @@ -96,6 +97,7 @@ package unit is ("Champion ", faction.castle, (1, 1, 1, 1), effect.none, "Elite warrior with exceptional combat skills and resilience. "), ("Angel ", faction.castle, (1, 1, 1, 1), effect.none, "Divine being with powerful healing and offensive abilities. "), ("Arch-Angel ", faction.castle, (1, 1, 1, 1), effect.none, "Superior celestial being with extraordinary powers and influence. "), + -- ("Goblin ", faction.stronghold, (1, 1, 1, 1), effect.none, "Small and mischievous creature known for its cunning and traps. "), ("Hobgoblin ", faction.stronghold, (1, 1, 1, 1), effect.none, "Stronger and more vicious version of the goblin, often brave warriors. "), ("Wolf Rider ", faction.stronghold, (1, 1, 1, 1), effect.none, "Fast-moving unit mounted on wolves for quick strikes. "), @@ -110,6 +112,7 @@ package unit is ("Cyclops King ", faction.stronghold, (1, 1, 1, 1), effect.none, "Sovereign ruler among the cyclops race, commanding great respect. "), ("Behemoth ", faction.stronghold, (1, 1, 1, 1), effect.none, "Enormous and unstoppable monster wreaking havoc on the battlefield. "), ("Ancient Behemoth ", faction.stronghold, (1, 1, 1, 1), effect.none, "Legendary and exceptionally powerful behemoth with devastating attacks. "), + -- ("Imp ", faction.inferno, (1, 1, 1, 1), effect.none, "Small, agile demon known for its cunning and mischief. "), ("Familiar ", faction.inferno, (1, 1, 1, 1), effect.none, "Devilish creature bound to a sorcerer, aiding in magic and combat. "), ("Gog ", faction.inferno, (1, 1, 1, 1), effect.none, "Mighty and brutish humanoid warrior wielding a massive club. "), @@ -124,6 +127,7 @@ package unit is ("Efreet Sultan ", faction.inferno, (1, 1, 1, 1), effect.none, "Powerful and regal efreet lord commanding fire and magic. "), ("Devil ", faction.inferno, (1, 1, 1, 1), effect.none, "Cunning and manipulative fiend striking deals for souls and power. "), ("Arch Devil ", faction.inferno, (1, 1, 1, 1), effect.none, "Ultimate demon lord embodying darkness and corruption. "), + -- ("Gremlin ", faction.tower, (1, 1, 1, 1), effect.none, "Small, mischievous creature known for its trickery and cunning. "), ("Master Gremlin ", faction.tower, (1, 1, 1, 1), effect.none, "A more powerful version of the Gremlin with enhanced abilities. "), ("Stone Gargoyle ", faction.tower, (1, 1, 1, 1), effect.none, "Stone creature resembling a grotesque statue, often found in ruins. "), @@ -138,6 +142,7 @@ package unit is ("Naga Queen ", faction.tower, (1, 1, 1, 1), effect.none, "Powerful matriarch among the Naga, ruling with pride and confidence. "), ("Giant ", faction.tower, (1, 1, 1, 1), effect.none, "Enormous humanoid known for its immense strength and sheer size. "), ("Titan ", faction.tower, (1, 1, 1, 1), effect.none, "Colossal and ancient being of immense power throwing lightning. "), + -- ("Pixie ", faction.conflux, (1, 1, 1, 1), effect.none, "Tiny, sprite-like creature known for its magical abilities. "), ("Spirit ", faction.conflux, (1, 1, 1, 1), effect.none, "An actual sprite, but I used that name for image data sadly. "), ("Air Elemental ", faction.conflux, (1, 1, 1, 1), effect.none, "Elemental creature using the power of air, controling winds and storms. "), @@ -152,6 +157,7 @@ package unit is ("Magic Elemental ", faction.conflux, (1, 1, 1, 1), effect.none, "An elemental creature infused with pure arcane energy. "), ("Fire Bird ", faction.conflux, (1, 1, 1, 1), effect.none, "A mythical avian creature with feathers of flame, embodying the flames. "), ("Phoenix ", faction.conflux, (1, 1, 1, 1), effect.none, "Legendary bird of rebirth and renewal, reborn from its ashes. "), + -- ("Skeleton ", faction.necropolis, (1, 1, 1, 1), effect.none, "Animated pile of bones, devoid of flesh or soul, controlled by magic. "), ("Skeleton Warrior ", faction.necropolis, (1, 1, 1, 1), effect.none, "Reanimated skeletal being armed for battle, serving as undead soldiers. "), ("Walking Dead ", faction.necropolis, (1, 1, 1, 1), effect.none, "Reanimated corpses stumbling aimlessly, driven by dark magic or curses. "), @@ -166,6 +172,7 @@ package unit is ("Dread Knight ", faction.necropolis, (1, 1, 1, 1), effect.none, "Elite black knight of immense power and skill, feared on the front. "), ("Bone Dragon ", faction.necropolis, (1, 1, 1, 1), effect.none, "Undead dragon reanimated from ancient bones, breathing death and decay. "), ("Ghost Dragon ", faction.necropolis, (1, 1, 1, 1), effect.none, "Spectral dragon of ethereal essence, haunting the living beings. "), + -- ("Centaur ", faction.rampart, (1, 1, 1, 1), effect.none, "Half-human, half-horse creature known for archery and speed in combat. "), ("Centaur Captain ", faction.rampart, (1, 1, 1, 1), effect.none, "Distinguished centaur leader commanding troops with precision. "), ("Dwarf ", faction.rampart, (1, 1, 1, 1), effect.none, "Stout and sturdy underground-dwelling beings skilled in craftsmanship. "), @@ -180,6 +187,7 @@ package unit is ("War Unicorn ", faction.rampart, (1, 1, 1, 1), effect.none, "Armored unicorn charging into battle with unmatched strength and valor. "), ("Green Dragon ", faction.rampart, (1, 1, 1, 1), effect.none, "Powerful dragon associated with nature and known for fire breath. "), ("Gold Dragon ", faction.rampart, (1, 1, 1, 1), effect.none, "Noble and majestic dragon of great wisdom and power. "), + -- ("Gnoll ", faction.fortress, (1, 1, 1, 1), effect.none, "Agile and aggressive hyena-like humanoid known for their savagery. "), ("Gnoll Marauder ", faction.fortress, (1, 1, 1, 1), effect.none, "Ruthless and cunning gnoll leader skilled in hit-and-run tactics. "), ("Lizardman ", faction.fortress, (1, 1, 1, 1), effect.none, "Reptilian humanoid proficient in swamp and jungle environments. "), @@ -194,6 +202,7 @@ package unit is ("Wyvern Monarch ", faction.fortress, (1, 1, 1, 1), effect.none, "Sovereign wyvern of colossal size and power with its venomous breath. "), ("Hydra ", faction.fortress, (1, 1, 1, 1), effect.none, "Mythical multi-headed serpent known for its regenerative abilities. "), ("Chaos Hydra ", faction.fortress, (1, 1, 1, 1), effect.none, "Chaotic variant of the hydra with devastating attacks. "), + -- ("Troglodyte ", faction.dungeon, (1, 1, 1, 1), effect.none, "Primitive subterranean humanoid with a keen sense of smell. "), ("Infernal Troglodyte ", faction.dungeon, (1, 1, 1, 1), effect.none, "Corrupted troglodyte infused with infernal power and dark magic. "), ("Harpy ", faction.dungeon, (1, 1, 1, 1), effect.none, "Half-bird, half-human creature known for its aerial attacks. "),