Merge lp:~widelands-dev/widelands/lua_AI_fixes into lp:widelands

Proposed by hessenfarmer
Status: Merged
Merged at revision: 8928
Proposed branch: lp:~widelands-dev/widelands/lua_AI_fixes
Merge into: lp:widelands
Diff against target: 48 lines (+9/-3)
3 files modified
data/campaigns/tutorial02_warfare.wmf/player_names (+1/-1)
data/campaigns/tutorial02_warfare.wmf/scripting/mission_thread.lua (+7/-2)
data/tribes/buildings/productionsites/atlanteans/well/init.lua (+1/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands/lua_AI_fixes
Reviewer Review Type Date Requested Status
GunChleoc Approve
Review via email: mp+359082@code.launchpad.net

Commit message

- Add roads to p2 in warfare tutorial because the AI is empty
- Add one well to the atlantean basic economy as water is needed
  for crucial spidercloth production

Description of the change

assign empty AI to p2 in warfare tutorial
add roads to p2 in warfare tutorial due to no AI can build them.

add one well to the atlantean basic economy as water is needed for crucial spidercloth production.

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4255. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/457654319.
Appveyor build 4049. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_lua_AI_fixes-4049.

Revision history for this message
GunChleoc (gunchleoc) wrote :

LGTM, thanks for fixing :)

@bunnybot merge

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/campaigns/tutorial02_warfare.wmf/player_names'
2--- data/campaigns/tutorial02_warfare.wmf/player_names 2014-10-26 09:05:11 +0000
3+++ data/campaigns/tutorial02_warfare.wmf/player_names 2018-11-20 20:35:50 +0000
4@@ -12,5 +12,5 @@
5 [player_2]
6 name="Sparring Partner"
7 tribe="empire"
8-ai=
9+ai="empty"
10 closeable="false"
11
12=== modified file 'data/campaigns/tutorial02_warfare.wmf/scripting/mission_thread.lua'
13--- data/campaigns/tutorial02_warfare.wmf/scripting/mission_thread.lua 2017-12-19 17:04:30 +0000
14+++ data/campaigns/tutorial02_warfare.wmf/scripting/mission_thread.lua 2018-11-20 20:35:50 +0000
15@@ -78,7 +78,9 @@
16 end
17
18 function create_enemy()
19- prefilled_buildings(wl.Game().players[2],
20+ local map = wl.Game().map
21+ local p2 = wl.Game().players[2]
22+ prefilled_buildings(p2,
23 {"empire_barrier", 24, 7},
24 {"empire_sentry", 29, 16},
25 {"empire_tower", 30, 21},
26@@ -88,7 +90,10 @@
27 }
28 }
29 )
30- wl.Game().players[2]:forbid_buildings("all")
31+ connected_road(p2,map:get_field(29,17).immovable,"tr,tl|tl,tl|tl,tl|tl,tl|tl,l")
32+ connected_road(p2,map:get_field(31,22).immovable,"tr,tl|tl,tl,tl")
33+ connected_road(p2,map:get_field(31,28).immovable,"tr,tr|tr,tl|tl,tl")
34+ p2:forbid_buildings("all")
35 end
36
37 function attack()
38
39=== modified file 'data/tribes/buildings/productionsites/atlanteans/well/init.lua'
40--- data/tribes/buildings/productionsites/atlanteans/well/init.lua 2018-05-24 10:19:21 +0000
41+++ data/tribes/buildings/productionsites/atlanteans/well/init.lua 2018-11-20 20:35:50 +0000
42@@ -31,6 +31,7 @@
43 },
44
45 aihints = {
46+ basic_amount = 1,
47 collects_ware_from_map = "water"
48 },
49

Subscribers

People subscribed via source and target branches

to status/vote changes: