Skip to content

Commit

Permalink
Assassin Micro AI: remove unused parameters from function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsc committed Oct 12, 2016
1 parent 1d5aba9 commit 2c2f795
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/ai/micro_ais/cas/ca_assassin_move.lua
Expand Up @@ -40,15 +40,15 @@ end

local ca_assassin_move = {}

function ca_assassin_move:evaluation(cfg, data)
function ca_assassin_move:evaluation(cfg)
local units, target = get_units_target(cfg)
if (not units[1]) then return 0 end
if (not target) then return 0 end

return cfg.ca_score
end

function ca_assassin_move:execution(cfg, data)
function ca_assassin_move:execution(cfg)
-- We simply move the assassins one at a time
local units, target = get_units_target(cfg)
local unit = units[1]
Expand Down Expand Up @@ -146,7 +146,7 @@ function ca_assassin_move:execution(cfg, data)
-- We need to pick the farthest reachable hex along that path
local farthest_hex = path[1]
for i = 2,#path do
local sub_path, sub_cost = wesnoth.find_path(unit, path[i][1], path[i][2], cfg)
local sub_path, sub_cost = wesnoth.find_path(unit, path[i][1], path[i][2])
if sub_cost <= unit.moves then
local unit_in_way = wesnoth.get_unit(path[i][1], path[i][2])
if not unit_in_way then
Expand Down

0 comments on commit 2c2f795

Please sign in to comment.