-- 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 idle => null; when offense => core.increment (world.map.chads (1).attributes (attribute.offense).value, data.modifier); when defense => core.increment (world.map.chads (1).attributes (attribute.defense).value, data.modifier); when wisdom => core.increment (world.map.chads (1).attributes (attribute.wisdom).value, data.modifier); when stamina => core.increment (world.map.chads (1).attributes (attribute.stamina).value, data.modifier); when speed => core.increment (world.map.chads (1).attributes (attribute.speed).value, data.modifier); when reach => core.increment (world.map.chads (1).attributes (attribute.reach).value, data.modifier); when alchemy => core.increment (world.map.chads (1).skills (skill.alchemy).value, data.modifier); when archery => core.increment (world.map.chads (1).skills (skill.archery).value, data.modifier); when architecture => core.increment (world.map.chads (1).skills (skill.architecture).value, data.modifier); when athletics => core.increment (world.map.chads (1).skills (skill.athletics).value, data.modifier); when diplomacy => core.increment (world.map.chads (1).skills (skill.diplomacy).value, data.modifier); when estates => core.increment (world.map.chads (1).skills (skill.estates).value, data.modifier); when exploration => core.increment (world.map.chads (1).skills (skill.exploration).value, data.modifier); when leadership => core.increment (world.map.chads (1).skills (skill.leadership).value, data.modifier); when logistics => core.increment (world.map.chads (1).skills (skill.logistics).value, data.modifier); when medicine => core.increment (world.map.chads (1).skills (skill.medicine).value, data.modifier); when mercantile => core.increment (world.map.chads (1).skills (skill.mercantile).value, data.modifier); when mysticism => core.increment (world.map.chads (1).skills (skill.mysticism).value, data.modifier); when necromancy => core.increment (world.map.chads (1).skills (skill.necromancy).value, data.modifier); when resistance => core.increment (world.map.chads (1).skills (skill.resistance).value, data.modifier); when skirmish => core.increment (world.map.chads (1).skills (skill.skirmish).value, data.modifier); when sorcery => core.increment (world.map.chads (1).skills (skill.sorcery).value, data.modifier); when tactics => core.increment (world.map.chads (1).skills (skill.tactics).value, data.modifier); when thaumaturgy => core.increment (world.map.chads (1).skills (skill.thaumaturgy).value, data.modifier); when gold => core.increment (world.map.chads (1).resources (resource.gold).value, data.modifier); when wood => core.increment (world.map.chads (1).resources (resource.wood).value, data.modifier); when stone => core.increment (world.map.chads (1).resources (resource.stone).value, data.modifier); when metal => core.increment (world.map.chads (1).resources (resource.metal).value, data.modifier); when leather => core.increment (world.map.chads (1).resources (resource.leather).value, data.modifier); when gem => core.increment (world.map.chads (1).resources (resource.gem).value, data.modifier); -- when take_material => core.increment (world.map.chads (1).materials (material.enumeration'val (data.modifier)).value, data.amount); end case; end apply; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ end effect;