@CONFIG( version -> "1.0.0" features -> "advanced" ) @IMPORTS( Base from_cloud "https://dixscript-docs.pages.dev/api/registry/base_types.mdix" ) @ENUMS( Difficulty { EASY = 0, NORMAL = 1, HARD = 2, NIGHTMARE = 3 } EnemyType { MELEE = 0, RANGED = 1, CASTER = 2, BOSS = 3 } ) @QUICKFUNCS( ~makeEnemy(id, name, health, difficulty) { return { id = id name = name health = health difficulty = difficulty damage = difficulty == Difficulty.NIGHTMARE ? health / 4 : difficulty == Difficulty.HARD ? health / 6 : difficulty == Difficulty.NORMAL ? health / 8 : health / 12 xp_reward = health / 2 } } ~makeLootTable(enemyId, guaranteed, chance) { return { enemy_id = enemyId guaranteed = guaranteed chance = chance } } ) @DATA( package_name = "game_helpers" package_version = "1.0.0" )