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

Proposed by Notabilis on 2017-01-06
Status: Merged
Merged at revision: 8239
Proposed branch: lp:~widelands-dev/widelands/casern_campaign
Merge into: lp:widelands
Diff against target: 106 lines (+10/-6)
7 files modified
data/campaigns/bar02.wmf/scripting/mission_thread.lua (+2/-1)
data/campaigns/bar02.wmf/scripting/texts.lua (+3/-2)
data/campaigns/emp02.wmf/scripting/mission_thread.lua (+1/-1)
data/campaigns/emp02.wmf/scripting/starting_conditions.lua (+1/-1)
data/campaigns/emp02.wmf/scripting/texts.lua (+1/-0)
data/campaigns/tutorial02_warfare.wmf/scripting/starting_conditions.lua (+1/-0)
data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua (+1/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/casern_campaign
Reviewer Review Type Date Requested Status
GunChleoc 2017-01-06 Approve on 2017-01-06
Review via email: mp+314208@code.launchpad.net

Description of the change

Adapted the tutorials and campaigns for the future implementation of barracks.

While the campaigns are currently playable some of them will (partially) break when barracks are required for soldier creation. This branch modifies some dialogs and objectives so barracks have/can be build where required / where it makes sense.

Please check the NOCOM in data/campaigns/emp02.wmf/scripting/starting_conditions.lua. It should work as proposed but I would like to have a second opinion about it.

To post a comment you must log in.
GunChleoc (gunchleoc) wrote :

LGTM - just 1 nit as to phrasing.

Not tested.

review: Approve
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 1801. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/189461912.
Appveyor build 1639. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_casern_campaign-1639.

8233. By Notabilis on 2017-01-06

Fixed phrasing nit, removed nocom.

GunChleoc (gunchleoc) wrote :

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/campaigns/bar02.wmf/scripting/mission_thread.lua'
2--- data/campaigns/bar02.wmf/scripting/mission_thread.lua 2016-10-23 11:31:25 +0000
3+++ data/campaigns/bar02.wmf/scripting/mission_thread.lua 2017-01-06 14:18:48 +0000
4@@ -188,6 +188,7 @@
5 "barbarians_ax_workshop",
6 "barbarians_warmill",
7 "barbarians_helmsmithy",
8+ "barbarians_barracks",
9 "barbarians_battlearena",
10 "barbarians_trainingcamp",
11 "barbarians_inn",
12@@ -208,7 +209,7 @@
13 end
14
15 function check_trainingssite_obj(o)
16- while not check_for_buildings(p1, {barbarians_trainingcamp = 1, barbarians_battlearena = 1}) do
17+ while not check_for_buildings(p1, {barbarians_barracks = 1, barbarians_trainingcamp = 1, barbarians_battlearena = 1}) do
18 sleep(6523)
19 end
20 set_objective_done(o)
21
22=== modified file 'data/campaigns/bar02.wmf/scripting/texts.lua'
23--- data/campaigns/bar02.wmf/scripting/texts.lua 2016-09-20 17:01:35 +0000
24+++ data/campaigns/bar02.wmf/scripting/texts.lua 2017-01-06 14:18:48 +0000
25@@ -93,6 +93,7 @@
26 title = _"Build a training infrastructure",
27 number = 4,
28 body = objective_text(_"Build a training infrastructure",
29+ listitem_bullet(_"Build a barracks to train some basic soldiers.") ..
30 listitem_bullet(_"Build a battle arena and a training camp to the west of the mountains.") ..
31 listitem_bullet(_"Enhance your metal workshop to an ax workshop in order to produce weapons, and build up a second metal workshop to ensure the production of tools. When the blacksmith reaches his next level (master blacksmith), you can even enhance the ax workshop to a war mill, which will produce additional weapons.") ..
32 listitem_bullet(_"Build a helm smithy to the west of the mountains to provide your soldiers with better armor."))
33@@ -113,8 +114,8 @@
34 title = _"Build training sites",
35 number = 2,
36 body = objective_text(_"Build training sites",
37- listitem_bullet(_"Build a battle arena and a training camp to the west of the mountains.") ..
38- listitem_arrow(_"Training sites like a training camp or a battle arena are used for training soldiers in their different attributes. These attributes are important in fights and the better a soldier is, the higher is the chance to win a fight."
39+ listitem_bullet(_"Build a barracks, a battle arena and a training camp to the west of the mountains.") ..
40+ listitem_arrow(_"Barracks train basic soldiers while training sites like a training camp or a battle arena are used for training soldiers in their different attributes. These attributes are important in fights and the better a soldier is, the higher is the chance to win a fight."
41 .. "<br>" ..
42 _"The attributes are: health, attack, defense and evade."))
43 }
44
45=== modified file 'data/campaigns/emp02.wmf/scripting/mission_thread.lua'
46--- data/campaigns/emp02.wmf/scripting/mission_thread.lua 2016-10-23 11:31:25 +0000
47+++ data/campaigns/emp02.wmf/scripting/mission_thread.lua 2017-01-06 14:18:48 +0000
48@@ -246,7 +246,7 @@
49 sleep(2343)
50 end
51 campaign_message_box(diary_page_9)
52- p1:allow_buildings{"empire_fortress"}
53+ p1:allow_buildings{"empire_barracks", "empire_fortress"}
54
55 o = add_campaign_objective(obj_remove_the_barbarians)
56 -- Wait for the fortress to come up
57
58=== modified file 'data/campaigns/emp02.wmf/scripting/starting_conditions.lua'
59--- data/campaigns/emp02.wmf/scripting/starting_conditions.lua 2015-10-31 12:11:44 +0000
60+++ data/campaigns/emp02.wmf/scripting/starting_conditions.lua 2017-01-06 14:18:48 +0000
61@@ -14,7 +14,7 @@
62 basket = 1,
63 empire_bread = 8,
64 bread_paddle = 2,
65- cloth = 5,
66+ cloth = 15,
67 coal = 12,
68 felling_ax = 6,
69 fire_tongs = 2,
70
71=== modified file 'data/campaigns/emp02.wmf/scripting/texts.lua'
72--- data/campaigns/emp02.wmf/scripting/texts.lua 2016-10-05 05:24:51 +0000
73+++ data/campaigns/emp02.wmf/scripting/texts.lua 2017-01-06 14:18:48 +0000
74@@ -95,6 +95,7 @@
75 title =_"Destroy the Barbarian tribe",
76 number = 2,
77 body = objective_text(_"Destroy the Barbarian Tribe",
78+ listitem_bullet(_[[Build a barracks to start training soldiers.]]) ..
79 listitem_bullet(_[[As soon as you have enough soldiers, attack and completely destroy the Barbarian buildings.]]) ..
80 listitem_bullet(_[[Finally, build up a fortress on the peninsula (near where the Barbarian headquarters stood before), to avoid new settlements of other tribes in that region.]])
81 ),
82
83=== modified file 'data/campaigns/tutorial02_warfare.wmf/scripting/starting_conditions.lua'
84--- data/campaigns/tutorial02_warfare.wmf/scripting/starting_conditions.lua 2015-10-31 12:11:44 +0000
85+++ data/campaigns/tutorial02_warfare.wmf/scripting/starting_conditions.lua 2017-01-06 14:18:48 +0000
86@@ -54,6 +54,7 @@
87 {"barbarians_sentry", 28, 57, soldiers = {[{3,5,0,2}] = 2 }},
88 {"barbarians_sentry", 37, 61, soldiers = {[{3,5,0,2}] = 2 }},
89 {"barbarians_barrier", 30, 58, soldiers = {[{0,0,0,0}] = 1 }}, -- to make sure some soldiers walk out
90+ {"barbarians_barracks", 32, 58, wares = {ax = 8}},
91 {"barbarians_lumberjacks_hut", 24, 1}
92 )
93
94
95=== modified file 'data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua'
96--- data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua 2016-11-30 09:14:27 +0000
97+++ data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua 2017-01-06 14:18:48 +0000
98@@ -34,7 +34,7 @@
99 position = "topright",
100 title = _"Soldiers’ abilities",
101 body = rt(
102- p(_[[A new soldier is created like a worker: when a military building needs a soldier, a carrier grabs the needed weapons and armor from a warehouse (or your headquarters) and walks up the road to your new building. Basic Barbarian soldiers do not use armor, they only need an ax.]]) ..
103+ p(_[[New soldiers are created differently from normal workers: recruits will walk from a warehouse (or your headquarters) to the barracks where they will receive some basic training and become soldiers. Basic Barbarian soldiers do not use armor, they only need an ax.]]) ..
104 p(_[[Take a look at the soldiers that are on their way to our military buildings. They look different from normal workers: they have a health bar over their head that displays their remaining health, and they have four symbols, which symbolize the individual soldier’s current levels in the four different categories: health, attack, defense and evade.]]) ..
105 -- TRANSLATORS: the current stats are: 3 health, 5 attack, 0 defense, 2 evade.
106 p((_[[If a Barbarian soldier is fully trained, he has level %1% health, level %2% attack, level %3% defense and level %4% evade. This is one fearsome warrior then! The individual abilities have the following meaning:]]):bformat(soldier.max_health_level, soldier.max_attack_level, soldier.max_defense_level, soldier.max_evade_level))