Skip to content

Commit

Permalink
Mtn v3 - revert loot changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerkiz committed Dec 1, 2023
1 parent 80ff96c commit 178f123
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion maps/mountain_fortress_v3/entities.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions maps/mountain_fortress_v3/loot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions maps/mountain_fortress_v3/table.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 178f123

Please sign in to comment.