diff --git a/data/ai/micro_ais/cas/ca_forest_animals_move.lua b/data/ai/micro_ais/cas/ca_forest_animals_move.lua index 3254df01a927..554741b11894 100644 --- a/data/ai/micro_ais/cas/ca_forest_animals_move.lua +++ b/data/ai/micro_ais/cas/ca_forest_animals_move.lua @@ -46,7 +46,7 @@ function ca_forest_animals_move:execution(cfg) -- Get the locations of all the rabbit holes W.store_items { variable = 'holes_wml' } - local all_items = H.get_variable_array('holes_wml') + local all_items = wml.array_access.get('holes_wml') W.clear_variable { name = 'holes_wml' } -- If cfg.rabbit_hole_img is set, only items with that image or halo count as holes diff --git a/data/ai/micro_ais/cas/ca_forest_animals_new_rabbit.lua b/data/ai/micro_ais/cas/ca_forest_animals_new_rabbit.lua index 2977e3680a1a..8674d9d312b1 100644 --- a/data/ai/micro_ais/cas/ca_forest_animals_new_rabbit.lua +++ b/data/ai/micro_ais/cas/ca_forest_animals_new_rabbit.lua @@ -19,7 +19,7 @@ function ca_forest_animals_new_rabbit:execution(cfg) -- Get the locations of all items on that map (which could be rabbit holes) W.store_items { variable = 'holes_wml' } - local all_items = H.get_variable_array('holes_wml') + local all_items = wml.array_access.get('holes_wml') W.clear_variable { name = 'holes_wml' } -- Eliminate all holes that have an enemy within 'rabbit_enemy_distance' hexes diff --git a/data/ai/micro_ais/engines/priority_target_engine.lua b/data/ai/micro_ais/engines/priority_target_engine.lua index 8da0c9c1c4fb..2d68c4f44482 100644 --- a/data/ai/micro_ais/engines/priority_target_engine.lua +++ b/data/ai/micro_ais/engines/priority_target_engine.lua @@ -33,7 +33,7 @@ return { moves = "current", variable = "tmp_locs" } - attack_locs = H.get_variable_array("tmp_locs") + attack_locs = wml.array_access.get("tmp_locs") W.clear_variable { name = "tmp_locs" } if (#attack_locs > 0) then break end end diff --git a/data/multiplayer/scenarios/2p_Dark_Forecast.lua b/data/multiplayer/scenarios/2p_Dark_Forecast.lua index 8036e030a06d..d13a0d37d782 100644 --- a/data/multiplayer/scenarios/2p_Dark_Forecast.lua +++ b/data/multiplayer/scenarios/2p_Dark_Forecast.lua @@ -352,7 +352,7 @@ on_event("prestart", function() end return res end - helper.set_variable_array("fixed_spawn", { + wml.array_access.set("fixed_spawn", { fixed_spawn(1, 15, "Fire Dragon", "Gryphon Master", "Hurricane Drake"), fixed_spawn(5, 1, "Yeti", "Elvish Druid", "Elvish Druid"), fixed_spawn(1, 7, "Lich", "Walking Corpse", "Walking Corpse", "Walking Corpse", "Ghoul", "Soulless", "Walking Corpse", "Walking Corpse", "Walking Corpse"), diff --git a/data/test/scenarios/ai/_main.cfg b/data/test/scenarios/ai/_main.cfg index 19bf91f7a4a1..0033e9c15226 100644 --- a/data/test/scenarios/ai/_main.cfg +++ b/data/test/scenarios/ai/_main.cfg @@ -13,7 +13,7 @@ #define ASPECT_NOTIFICATION << local H = wesnoth.require('helper') -local expected = H.get_variable_array('expected') +local expected = wml.array_access.get('expected') local aspect = wml.variables['test_attribute'] if ai.aspects[aspect] ~= expected[wesnoth.current.turn].value then wml.variables['is_valid'] = false