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