18
18
points_to_win = 2000
21
{ value = 2, send = map:get_field(35, 52):region(2), recv = map:get_field(96, 77):region(2) },
22
{ value = 2, send = map:get_field(98, 55):region(2), recv = map:get_field(34, 76):region(2) },
24
{ value = 3, send = map:get_field(64, 57):region(2), recv = map:get_field(78, 73):region(2) },
25
{ value = 3, send = map:get_field(77, 58):region(2), recv = map:get_field(65, 72):region(2) },
27
{ value = 2, send = map:get_field(62, 93):region(2), recv = map:get_field(78, 34):region(2) },
28
{ value = 2, send = map:get_field(80, 95):region(2), recv = map:get_field(63, 29):region(2) },
29
{ value = 2, send = map:get_field(18, 66):region(2), recv = map:get_field(121, 61):region(2) },
30
{ value = 2, send = map:get_field(124, 72):region(2), recv = map:get_field(19, 57):region(2) }
33
20
-- =================
34
21
-- Global Variables
35
22
-- =================
41
28
-- ================
43
30
-- ================
32
-- If the tribes don't have any wares in common, nothing can be smuggled
33
-- This should not happen, but let's have a safeguard anyway.
34
function check_ware_compatiblity(player1, player2)
35
local has_compatible_ware = false
36
for idx,ware in pairs(player1.tribe.wares) do
37
if player2.tribe:has_ware(ware.name) then
38
has_compatible_ware = true
42
if not has_compatible_ware then
44
47
function assign_teams()
45
48
game.players[1].team = 1
46
49
game.players[2].team = 1
47
50
game.players[3].team = 2
48
51
game.players[4].team = 2
52
check_ware_compatiblity(game.players[1], game.players[2])
53
check_ware_compatiblity(game.players[3], game.players[4])
51
56
function place_headquarters()
57
include "map:scripting/starting_conditions.lua"
52
58
for idx,player in ipairs(game.players) do
53
59
local sf = map.player_slots[player.number].starting_field
55
prefilled_buildings(player, { "barbarians_headquarters", sf.x, sf.y,
86
barbarians_blacksmith = 2,
87
barbarians_brewer = 1,
88
barbarians_builder = 10,
89
barbarians_carrier = 40,
90
barbarians_charcoal_burner = 1,
91
barbarians_gardener = 1,
92
barbarians_geologist = 4,
93
barbarians_lime_burner = 1,
94
barbarians_lumberjack = 3,
96
barbarians_ranger = 1,
97
barbarians_stonemason = 2,
60
local tribename = player.tribe.name
61
if tribename == "barbarians" then
62
set_starting_conditions_barbarians(player, sf)
63
elseif tribename == "empire" then
64
set_starting_conditions_empire(player, sf)
65
elseif tribename == "atlanteans" then
66
set_starting_conditions_atlanteans(player, sf)
67
elseif tribename == "frisians" then
68
set_starting_conditions_frisians(player, sf)
70
print("We don't have starting conditions for tribe " .. tribename)