diff --git a/maps/mountain_fortress_v3/entities.lua b/maps/mountain_fortress_v3/entities.lua index c119c90c1..57779b13b 100644 --- a/maps/mountain_fortress_v3/entities.lua +++ b/maps/mountain_fortress_v3/entities.lua @@ -357,8 +357,9 @@ local function hidden_treasure(player, entity) end local magic = rpg.magicka + local magic_requirement = Public.get('magic_requirement') - if magic >= 450 then + if magic >= magic_requirement then local msg = rare_treasure_chest_messages[random(1, #rare_treasure_chest_messages)] Alert.alert_player(player, 5, msg) Public.add_loot_rare(entity.surface, entity.position, 'wooden-chest', magic) diff --git a/maps/mountain_fortress_v3/loot.lua b/maps/mountain_fortress_v3/loot.lua index 437d386dc..3c52d2a0f 100644 --- a/maps/mountain_fortress_v3/loot.lua +++ b/maps/mountain_fortress_v3/loot.lua @@ -27,7 +27,8 @@ function Public.get_distance(position) end function Public.add_loot(surface, position, chest) - local budget = 48 + abs(position.y) * 1.75 + local loot_stats = Public.get('loot_stats') + local budget = loot_stats.normal + abs(position.y) * 1.75 budget = budget * random(25, 175) * 0.01 if random(1, 128) == 1 then @@ -79,7 +80,8 @@ function Public.add_loot(surface, position, chest) end function Public.add_loot_rare(surface, position, chest, magic) - local budget = (magic * 22) + abs(position.y) * 1.75 + local loot_stats = Public.get('loot_stats') + local budget = (magic * loot_stats.rare) + abs(position.y) * 1.75 budget = budget * random(25, 175) * 0.01 if random(1, 128) == 1 then diff --git a/maps/mountain_fortress_v3/table.lua b/maps/mountain_fortress_v3/table.lua index 40099c51b..fe4c8fbb3 100644 --- a/maps/mountain_fortress_v3/table.lua +++ b/maps/mountain_fortress_v3/table.lua @@ -195,6 +195,11 @@ function Public.reset_main_table() } this.traps = {} this.munch_time = true + this.magic_requirement = 50 + this.loot_stats = { + rare = 48, + normal = 48 + } this.coin_amount = 1 this.difficulty_set = false this.bonus_xp_on_join = 250