Patch #2610 by Zaroth: default turn limit to -1 when reading WML,

...plus changes for story-only campaign scenarios
This commit is contained in:
Iurii Chernyi 2011-03-29 21:50:13 +00:00
parent 3b9020f696
commit c57467034e
15 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,8 @@
Version 1.9.5+svn:
* Language and i18n:
* Updated translations: British English, Galician, Old English
* WML engine:
* Patch #2610: changed default for turns in [scenario] tag to -1 (unlimited)
* Miscellaneous and bugfixes:
* Changed : replaced all sticky excpetions by lua jailbreak exceptions
(fixes bug #17743).

View File

@ -3,6 +3,7 @@
name= _ "Dark Sky Over Weldyn"
id=16_Dark_Sky_Over_Weldyn
next_scenario=17_A_New_Ally
turns=1
{NO_MAP_DATA}
# Significant plot points: (1) Elves (and, later, others) help buy

View File

@ -3,6 +3,7 @@
name=_ "Epilogue"
id=23_Epilogue
next_scenario=null
turns=1
{NO_MAP_DATA}
{DEFAULT_SCHEDULE}

View File

@ -8,6 +8,7 @@
name= _ "Revelations"
id=12_Revelations
next_scenario=13_News_from_the_Front
turns=1
{NO_MAP_DATA}
{SCENARIO_MUSIC the_dangerous_symphony.ogg}

View File

@ -3,6 +3,7 @@
name= _ "The Treaty"
id=15_The_Treaty
next_scenario=16_The_Chief_Must_Die
turns=1
{NO_MAP_DATA}
{SCENARIO_MUSIC heroes_rite.ogg}

View File

@ -3,6 +3,7 @@
name= _ "Hour of Glory"
id=18_Hour_of_Glory
next_scenario=19_Costly_Revenge
turns=1
{NO_MAP_DATA}
{SCENARIO_MUSIC love_theme.ogg}

View File

@ -4,6 +4,7 @@
id=20_Council_Ruling
{NO_MAP_DATA}
next_scenario=21_Elvish_Assassins
turns=1
{SCENARIO_MUSIC "transience.ogg"}

View File

@ -2,6 +2,7 @@
[scenario]
name= _ "Epilogue"
id=24_Epilogue
turns=1
{NO_MAP_DATA}
{SCENARIO_MUSIC elf-land.ogg}

View File

@ -5,6 +5,7 @@
bonus=yes
name= _ "Return to Oldwood"
map_data="{campaigns/The_Rise_Of_Wesnoth/maps/05_The_Oldwood.map}"
turns=1
{DEFAULT_SCHEDULE}

View File

@ -5,6 +5,7 @@
next_scenario=12_A_Final_Spring
bonus=yes
map_data="{campaigns/The_Rise_Of_Wesnoth/maps/11_Southbay_in_Winter.map}"
turns=1
{DEFAULT_SCHEDULE}

View File

@ -4,6 +4,7 @@
name= _ "A Spy in the Woods"
next_scenario=19_The_Vanguard
map_data="{campaigns/The_Rise_Of_Wesnoth/maps/16_The_Kalian.map}"
turns=1
{AFTERNOON}

View File

@ -4,6 +4,7 @@
name= _ "The Plan"
next_scenario=22_The_Rise_of_Wesnoth
map_data="{campaigns/The_Rise_Of_Wesnoth/maps/21_The_Plan.map}"
turns=1
{AFTERNOON}

View File

@ -4,6 +4,7 @@
name= _ "Epilogue"
next_scenario=null
map_data="{campaigns/The_Rise_Of_Wesnoth/maps/21_The_Plan.map}"
turns=1
{AFTERNOON}

View File

@ -121,7 +121,7 @@ static LEVEL_RESULT playsingle_scenario(const config& game_config,
bool skip_replay, end_level_data &end_level)
{
const int ticks = SDL_GetTicks();
int num_turns = (*level)["turns"].to_int();
int num_turns = (*level)["turns"].to_int(-1);
LOG_NG << "creating objects... " << (SDL_GetTicks() - ticks) << "\n";
playsingle_controller playcontroller(*level, state_of_game, ticks, num_turns, game_config, disp.video(), skip_replay);
@ -160,7 +160,7 @@ static LEVEL_RESULT playmp_scenario(const config& game_config,
io_type_t& io_type, end_level_data &end_level)
{
const int ticks = SDL_GetTicks();
int num_turns = (*level)["turns"].to_int();
int num_turns = (*level)["turns"].to_int(-1);
playmp_controller playcontroller(*level, state_of_game, ticks, num_turns,
game_config, disp.video(), skip_replay, io_type == IO_SERVER);
LEVEL_RESULT res = playcontroller.play_scenario(story, skip_replay);

View File

@ -39,7 +39,7 @@ LEVEL_RESULT play_replay_level(const config& game_config,
{
try{
const int ticks = SDL_GetTicks();
int num_turns = (*level)["turns"].to_int();
int num_turns = (*level)["turns"].to_int(-1);
DBG_NG << "creating objects... " << (SDL_GetTicks() - ticks) << "\n";
replay_controller replaycontroller(*level, state_of_game, ticks, num_turns, game_config, video);
DBG_NG << "created objects... " << (SDL_GetTicks() - replaycontroller.get_ticks()) << "\n";