Skip to content

proof of concept setup to have AI buy upgrades from shop#4

Open
ProditorMagnus wants to merge 2 commits into
masterfrom
ai_upgrades
Open

proof of concept setup to have AI buy upgrades from shop#4
ProditorMagnus wants to merge 2 commits into
masterfrom
ai_upgrades

Conversation

@ProditorMagnus
Copy link
Copy Markdown
Collaborator

No description provided.

if not wesnoth.units.get(loc) then
local unit = wesnoth.units.find{side=wesnoth.current.side, canrecruit=true}[1]
-- Ideally unit should go to closest shop, not just first
-- AI teleports to shop with single movement point, bug of wesnoth engine, but for this use case it is suitable
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ilua._pretty_print("ai_answer_dialog", settings)
local gold = wesnoth.sides[wesnoth.current.side].gold

if current_side ~= wesnoth.current.side then
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will not work if only one side is droided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant