From 2c7f3088db44a43f6fb93536269a4225a7696363 Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Wed, 26 May 2021 09:45:37 +0200 Subject: [PATCH] minor adjustment --- maps/mountain_fortress_v3/entities.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/maps/mountain_fortress_v3/entities.lua b/maps/mountain_fortress_v3/entities.lua index e80bbdbc..5f183149 100644 --- a/maps/mountain_fortress_v3/entities.lua +++ b/maps/mountain_fortress_v3/entities.lua @@ -343,8 +343,8 @@ local function protect_entities(event) end local function hidden_treasure(player, entity) - local rpg = RPG.get('rpg_t') - local magic = rpg[player.index].magicka + local rpg = RPG.get_value_from_player(player.index) + local magic = rpg.magicka if magic > 50 then local msg = rare_treasure_chest_messages[random(1, #rare_treasure_chest_messages)] @@ -696,8 +696,7 @@ local function on_player_mined_entity(event) if not entity.valid then return end - local rpg = RPG.get('rpg_t') - local rpg_char = rpg[player.index] + local rpg_char = RPG.get_value_from_player(player.index) local map_name = 'mountain_fortress_v3' @@ -906,7 +905,7 @@ local function on_player_repaired_entity(event) if carriages_numbers[entity.unit_number] then local player = game.players[event.player_index] local repair_speed = RPG.get_magicka(player) - if table <= 0 then + if repair_speed <= 0 then set_train_final_health(-1, true) return else