Skip to content

Commit

Permalink
LoW: disallow shuffling sides for MP
Browse files Browse the repository at this point in the history
  • Loading branch information
nemaara committed Mar 9, 2019
1 parent f38fa3d commit 570e1b2
Show file tree
Hide file tree
Showing 19 changed files with 80 additions and 15 deletions.
Expand Up @@ -107,6 +107,7 @@ This is the story of Kalenz, Landar, and of the Elves in the first days of the h
[/unit]
{SINGLEPLAYER_GOLD}
#else
disallow_shuffle=yes
{MULTIPLAYER_GOLD}
#endif
[unit]
Expand Down Expand Up @@ -148,6 +149,7 @@ This is the story of Kalenz, Landar, and of the Elves in the first days of the h
save_id=Landar
x=18
y=15
disallow_shuffle=yes

{MULTIPLAYER_GOLD}

Expand Down
Expand Up @@ -48,6 +48,7 @@
{PLAYABLE}
{KALENZ_YOUNG}
{PLAYER_GOLD}
disallow_shuffle=yes
#ifndef MULTIPLAYER
[unit]
{LANDAR_YOUNG}
Expand Down Expand Up @@ -77,6 +78,7 @@
x=20
y=4
save_id=Landar
disallow_shuffle=yes
{LANDAR_YOUNG}
{PLAYABLE}
{PLAYER_GOLD}
Expand Down
Expand Up @@ -76,6 +76,7 @@
no_leader=yes
{PLAYABLE}
save_id=Kalenz
disallow_shuffle=yes
fog=yes
{PLAYER_GOLD}
[/side]
Expand All @@ -85,6 +86,7 @@
no_leader=yes
{PLAYABLE}
save_id=Landar
disallow_shuffle=yes
fog=yes
{PLAYER_GOLD}
)}
Expand All @@ -96,6 +98,7 @@
no_leader=yes
previous_save_id=Kalenz
save_id=Galtrid
disallow_shuffle=yes
{GOLD 300 200 100}
income=-2
village_gold=1
Expand Down Expand Up @@ -142,6 +145,7 @@
previous_save_id=Landar
{PLAYABLE}
save_id=El_Isomithir
disallow_shuffle=yes
fog=yes
{GOLD 300 200 100}
income=-2
Expand Down Expand Up @@ -181,21 +185,21 @@
[engine]
name=lua
code=<<
local my_ai = { }

function my_ai:retreat()
local urudin = wesnoth.get_units({id="Urudin"})[1]
if urudin and urudin.valid then
local mhp, hp = urudin.max_hitpoints, urudin.hitpoints
local turn = wesnoth.current.turn
if turn >= 3 or hp < mhp / 2 then
ai.move_full(urudin, 20, 6)
end
end
end

return my_ai
>>
local my_ai = { }

function my_ai:retreat()
local urudin = wesnoth.get_units({id="Urudin"})[1]
if urudin and urudin.valid then
local mhp, hp = urudin.max_hitpoints, urudin.hitpoints
local turn = wesnoth.current.turn
if turn >= 3 or hp < mhp / 2 then
ai.move_full(urudin, 20, 6)
end
end
end

return my_ai
>>
[/engine]
[stage]
id=leader_retreat
Expand Down
Expand Up @@ -65,6 +65,7 @@ Chapter Two"
{KALENZ}
{PLAYABLE}
save_id=Kalenz
disallow_shuffle=yes
{PLAYER_GOLD}
#ifndef MULTIPLAYER
[unit]
Expand All @@ -84,6 +85,7 @@ Chapter Two"
{MP_SIDE 2 (
{LANDAR}
save_id=Landar
disallow_shuffle=yes
{PLAYABLE}
{PLAYER_GOLD}
)}
Expand All @@ -92,6 +94,7 @@ Chapter Two"
{MP_SIDE 3 (
no_leader=yes
save_id=Cleodil
disallow_shuffle=yes
{PLAYABLE}
{PLAYER_GOLD}
)}
Expand Down
Expand Up @@ -63,6 +63,7 @@
side=1
{PLAYABLE}
save_id=Kalenz
disallow_shuffle=yes

no_leader=yes
[unit]
Expand Down Expand Up @@ -91,6 +92,7 @@
no_leader=yes
{PLAYABLE}
save_id=Landar
disallow_shuffle=yes
{PLAYER_GOLD}
[unit]
{LANDAR}
Expand All @@ -104,6 +106,7 @@
no_leader=yes
{PLAYABLE}
save_id=Cleodil
disallow_shuffle=yes
{PLAYER_GOLD}
[unit]
{CLEODIL}
Expand Down
Expand Up @@ -41,6 +41,7 @@
side=1
{PLAYABLE}
save_id=Kalenz
disallow_shuffle=yes

{KALENZ}
x=17
Expand Down Expand Up @@ -71,6 +72,7 @@
{MP_SIDE 2 (
{PLAYABLE}
save_id=Landar
disallow_shuffle=yes
{MULTIPLAYER_GOLD}

no_leader=yes
Expand All @@ -83,6 +85,7 @@
{MP_SIDE 3 (
{PLAYABLE}
save_id=Cleodil
disallow_shuffle=yes
{MULTIPLAYER_GOLD}

no_leader=yes
Expand Down
Expand Up @@ -61,6 +61,7 @@
side=1
{PLAYABLE}
save_id=Kalenz
disallow_shuffle=yes

{KALENZ}
x=46
Expand Down Expand Up @@ -103,6 +104,7 @@
no_leader=yes
{PLAYABLE}
save_id=Landar
disallow_shuffle=yes
{MULTIPLAYER_GOLD}

[unit]
Expand All @@ -117,6 +119,7 @@
no_leader=yes
{PLAYABLE}
save_id=Cleodil
disallow_shuffle=yes
{MULTIPLAYER_GOLD}

[unit]
Expand All @@ -132,6 +135,7 @@
{PLAYABLE}
no_leader=yes
save_id=Galtrid
disallow_shuffle=yes
#ifndef MULTIPLAYER
{GOLD 400 300 200}
#else
Expand Down Expand Up @@ -167,6 +171,7 @@
{PLAYABLE}
{EL_ISOMITHIR}
save_id=El_Isomithir
disallow_shuffle=yes
previous_save_id=Landar
x=29
y=32
Expand All @@ -178,6 +183,7 @@
{PLAYABLE}
{ERADION}
save_id=Eradion
disallow_shuffle=yes
previous_save_id=Cleodil
x=7
y=36
Expand Down
Expand Up @@ -20,6 +20,7 @@
controller=human
allow_player=yes
previous_save_id=Kalenz
disallow_shuffle=yes
save_id=temp1234
persistent=no
{KALENZ}
Expand Down
Expand Up @@ -53,6 +53,7 @@ Chapter Three"
[side]
side=1
save_id=Kalenz
disallow_shuffle=yes
{PLAYABLE}
{KALENZ}
#ifndef MULTIPLAYER
Expand Down Expand Up @@ -83,6 +84,7 @@ Chapter Three"
{MP_SIDE 2 (
{PLAYABLE}
save_id=Landar
disallow_shuffle=yes
{MULTIPLAYER_GOLD}
no_leader=yes
[unit]
Expand All @@ -97,6 +99,7 @@ Chapter Three"
{MP_SIDE 3 (
{PLAYABLE}
save_id=Olurf
disallow_shuffle=yes
#TODO give Olurf more gold?
{MULTIPLAYER_GOLD}
no_leader=yes
Expand All @@ -113,6 +116,7 @@ Chapter Three"
{MP_SIDE 4 (
{PLAYABLE}
save_id=Cleodil
disallow_shuffle=yes
{MULTIPLAYER_GOLD}
no_leader=yes
[unit]
Expand Down
Expand Up @@ -42,6 +42,7 @@
fog=yes
{PLAYABLE}
save_id=Kalenz
disallow_shuffle=yes

{KALENZ}
x=18
Expand Down Expand Up @@ -72,6 +73,7 @@
{MULTIPLAYER_GOLD}
{PLAYABLE}
save_id=Landar
disallow_shuffle=yes
fog=yes
[unit]
{LANDAR}
Expand All @@ -84,6 +86,7 @@
{MULTIPLAYER_GOLD}
{PLAYABLE}
save_id=Olurf
disallow_shuffle=yes
fog=yes
[unit]
{OLURF}
Expand All @@ -96,6 +99,7 @@
{MULTIPLAYER_GOLD}
{PLAYABLE}
save_id=Cleodil
disallow_shuffle=yes
fog=yes
[unit]
{CLEODIL}
Expand Down
Expand Up @@ -42,6 +42,7 @@
fog=yes
{PLAYABLE}
save_id=Kalenz
disallow_shuffle=yes

{KALENZ}
x=20
Expand Down Expand Up @@ -73,6 +74,7 @@
{MP_SIDE 2 (
{PLAYABLE}
save_id=Landar
disallow_shuffle=yes
fog=yes
no_leader=yes
[unit]
Expand All @@ -84,6 +86,7 @@
{MP_SIDE 3 (
{PLAYABLE}
save_id=Olurf
disallow_shuffle=yes
fog=yes
no_leader=yes
[unit]
Expand All @@ -95,6 +98,7 @@
{MP_SIDE 4 (
{PLAYABLE}
save_id=Cleodil
disallow_shuffle=yes
fog=yes
no_leader=yes
[unit]
Expand Down
Expand Up @@ -263,24 +263,28 @@
#ifdef MULTIPLAYER
[side]
side=1
disallow_shuffle=yes
{PLAYABLE}
{KALENZ}
[/side]

[side]
side=2
disallow_shuffle=yes
{PLAYABLE}
{LANDAR}
[/side]

[side]
side=3
disallow_shuffle=yes
{PLAYABLE}
{OLURF}
[/side]

[side]
side=4
disallow_shuffle=yes
{PLAYABLE}
{CLEODIL}
[/side]
Expand Down
Expand Up @@ -38,6 +38,7 @@
share_view=yes
{PLAYABLE}
save_id=Kalenz
disallow_shuffle=yes
{KALENZ}
x=12
y=1
Expand All @@ -62,6 +63,7 @@
side=2
no_leader=yes
save_id=Landar
disallow_shuffle=yes
{PLAYABLE}
[unit]
{LANDAR}
Expand All @@ -75,6 +77,7 @@
side=3
no_leader=yes
save_id=Olurf
disallow_shuffle=yes
{PLAYABLE}
[unit]
{OLURF}
Expand All @@ -88,6 +91,7 @@
side=4
no_leader=yes
save_id=Cleodil
disallow_shuffle=yes
{PLAYABLE}
[unit]
{CLEODIL}
Expand Down

0 comments on commit 570e1b2

Please sign in to comment.