Added skill explanation implementation...
This commit is contained in:
parent
c7ae66839f
commit
91c0073ce2
@ -210,7 +210,7 @@ package body core is
|
|||||||
end if;
|
end if;
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
return height + 1;
|
return height + 2;
|
||||||
end string_height;
|
end string_height;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
@ -66,6 +66,39 @@ package skill is
|
|||||||
eremnokinesis => (new string'("Eremnokinesis"), new string'("Eremnokinesis skill is for lonely, sad and depressed people only."))
|
eremnokinesis => (new string'("Eremnokinesis"), new string'("Eremnokinesis skill is for lonely, sad and depressed people only."))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
explanation : constant array (enumeration) of access string := (
|
||||||
|
none => new string'("--"),
|
||||||
|
--
|
||||||
|
alchemy => new string'("--"),
|
||||||
|
archery => new string'("--"),
|
||||||
|
architecture => new string'("--"),
|
||||||
|
athletics => new string'("--"),
|
||||||
|
diplomacy => new string'("--"),
|
||||||
|
estates => new string'("--"),
|
||||||
|
exploration => new string'("--"),
|
||||||
|
leadership => new string'("--"),
|
||||||
|
logistics => new string'("--"),
|
||||||
|
medicine => new string'("--"),
|
||||||
|
mercantile => new string'("--"),
|
||||||
|
mysticism => new string'("--"),
|
||||||
|
necromancy => new string'("--"),
|
||||||
|
resistance => new string'("--"),
|
||||||
|
skirmish => new string'("--"),
|
||||||
|
sorcery => new string'("--"),
|
||||||
|
tactics => new string'("--"),
|
||||||
|
thaumaturgy => new string'("--"),
|
||||||
|
pyrokinesis => new string'("--"),
|
||||||
|
hydrokinesis => new string'("--"),
|
||||||
|
aerokinesis => new string'("--"),
|
||||||
|
khousokinesis => new string'("--"),
|
||||||
|
phosokinesis => new string'("--"),
|
||||||
|
eremnokinesis => new string'("Eremnokinesis skill, meaning the art of manipulating darkness, increases strength and " & core.line_feed &
|
||||||
|
"duration of magical abilities from Dark school of magic, influences your experience with " & core.line_feed &
|
||||||
|
"creatures that have high darkness aptitude, mainly Dark Elementals, and lets you see " & core.line_feed &
|
||||||
|
"further into the shroud, not increasing the visibility, but giving you information about " & core.line_feed &
|
||||||
|
"what monsters or items are beyond the shadows.")
|
||||||
|
);
|
||||||
|
|
||||||
icon : array (enumeration) of core.sprite;
|
icon : array (enumeration) of core.sprite;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -167,12 +167,11 @@ package body ui is
|
|||||||
core.draw (data, x, y, factor => 1);
|
core.draw (data, x, y, factor => 1);
|
||||||
write (text, x + core.icon + 10, y + 10, code => true);
|
write (text, x + core.icon + 10, y + 10, code => true);
|
||||||
--
|
--
|
||||||
if core.cursor_inside (x, y, core.icon, core.icon) then
|
if core.cursor_inside (x, y, width, core.icon) then
|
||||||
prioritize := true;
|
prioritize := true;
|
||||||
--
|
--
|
||||||
if core.cursor_mode = core.cursor_left then
|
if core.cursor_mode = core.cursor_right then
|
||||||
action.all;
|
action.all;
|
||||||
core.cursor_mode := core.cursor_none;
|
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
end draw_icon_and_text;
|
end draw_icon_and_text;
|
||||||
|
@ -440,6 +440,13 @@ package body world is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
procedure review_skill is
|
||||||
|
begin
|
||||||
|
ui.draw_text (skill.explanation (review_skill_data).all, core.center_x (90*9+20), core.center_y (5*15+20), offset => 10);
|
||||||
|
end review_skill;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure review_unit is
|
procedure review_unit is
|
||||||
data : unit.definition := unit.description (review_unit_data);
|
data : unit.definition := unit.description (review_unit_data);
|
||||||
from : faction.definition := faction.description (data.kind);
|
from : faction.definition := faction.description (data.kind);
|
||||||
@ -1181,11 +1188,14 @@ package body world is
|
|||||||
count : constant natural := skill.limit'last + 1;
|
count : constant natural := skill.limit'last + 1;
|
||||||
begin
|
begin
|
||||||
for index in skill.limit loop
|
for index in skill.limit loop
|
||||||
ui.draw_icon_and_text (data => skill.icon (data.skills (index).index),
|
review_skill_data := data.skills (index).index;
|
||||||
text => skill.description (data.skills (index).index).name.all & data.skills (index).value'image,
|
--
|
||||||
x => x + (index mod 2) * (width / 2),
|
ui.draw_icon_and_text (data => skill.icon (data.skills (index).index),
|
||||||
y => y + (index / 2) * core.icon,
|
text => skill.description (data.skills (index).index).name.all & data.skills (index).value'image,
|
||||||
width => width / 2);
|
x => x + (index mod 2) * (width / 2),
|
||||||
|
y => y + (index / 2) * core.icon,
|
||||||
|
width => width / 2,
|
||||||
|
action => review_skill'access);
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
return (width, (count / 2) * core.icon);
|
return (width, (count / 2) * core.icon);
|
||||||
|
@ -41,8 +41,9 @@ package world is
|
|||||||
|
|
||||||
map : definition;
|
map : definition;
|
||||||
|
|
||||||
review_unit_data : unit.enumeration;
|
review_skill_data : skill.enumeration;
|
||||||
review_chad_data : chad.enumeration;
|
review_unit_data : unit.enumeration;
|
||||||
|
review_chad_data : chad.enumeration;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -70,6 +71,7 @@ package world is
|
|||||||
procedure draw_unit (data : in unit.enumeration; state : in core.animation; x, y, factor : in integer);
|
procedure draw_unit (data : in unit.enumeration; state : in core.animation; x, y, factor : in integer);
|
||||||
procedure draw_chad (data : in chad.information; state : in core.animation; x, y, factor : in integer);
|
procedure draw_chad (data : in chad.information; state : in core.animation; x, y, factor : in integer);
|
||||||
|
|
||||||
|
procedure review_skill;
|
||||||
procedure review_unit;
|
procedure review_unit;
|
||||||
procedure review_chad;
|
procedure review_chad;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user