30 lines
1.3 KiB
Ada
30 lines
1.3 KiB
Ada
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
--
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
with core, attribute, skill, resource, deity, material, magic, equipment, unit, construction, chad, world;
|
|
|
|
use type core.point;
|
|
|
|
package body effect is
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
procedure apply (data : in value) is
|
|
begin
|
|
case data.operation is
|
|
when player_add =>
|
|
case data.operator is
|
|
when attribute_offense => world.map.chads (1).attributes (attribute.offense) := world.map.chads (1).attributes (attribute.offense) + data.modifier;
|
|
when attribute_wisdom => world.map.chads (1).attributes (attribute.wisdom) := world.map.chads (1).attributes (attribute.wisdom) + data.modifier;
|
|
when attribute_speed => world.map.chads (1).attributes (attribute.speed) := world.map.chads (1).attributes (attribute.speed) + data.modifier;
|
|
when others => null;
|
|
end case;
|
|
when others => null;
|
|
end case;
|
|
end apply;
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
end effect;
|