2024-05-19 11:32:19 -04:00
|
|
|
-- 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;
|
|
|
|
|
2024-05-23 03:34:45 -04:00
|
|
|
use type core.point;
|
|
|
|
|
2024-05-19 11:32:19 -04:00
|
|
|
package body effect is
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
procedure apply (data : in value) is
|
|
|
|
begin
|
|
|
|
case data.operation is
|
|
|
|
when player_add =>
|
|
|
|
case data.operator is
|
2024-05-23 03:34:45 -04:00
|
|
|
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;
|
2024-05-19 11:32:19 -04:00
|
|
|
when others => null;
|
|
|
|
end case;
|
|
|
|
when others => null;
|
|
|
|
end case;
|
|
|
|
end apply;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end effect;
|