Binary files freeciv/server/civserver.exe and freeciv-ai/server/civserver.exe differ diff -u3NrX freeciv/diff_ignore freeciv/server/srv_main.c freeciv-ai/server/srv_main.c --- freeciv/server/srv_main.c Sun Feb 24 22:58:19 2002 +++ freeciv-ai/server/srv_main.c Mon Feb 25 00:38:35 2002 @@ -1964,6 +1964,30 @@ if(game.is_new_game) init_new_game(); + players_iterate(aiplayer) { + if (aiplayer->ai.control) { + if (aiplayer->ai.skill_level == 8) { + players_iterate(pdest) { + if ((pdest->ai.control) && + (aiplayer->player_no != pdest->player_no)) { + aiplayer->diplstates[pdest->player_no].type=DS_PEACE; + pdest->diplstates[aiplayer->player_no].type=DS_PEACE; + } + } players_iterate_end + } + if (aiplayer->ai.skill_level == 9) { + players_iterate(pdest) { + if ((pdest->ai.control) && + (aiplayer->player_no != pdest->player_no)) { + aiplayer->diplstates[pdest->player_no].type=DS_ALLIANCE; + pdest->diplstates[aiplayer->player_no].type=DS_ALLIANCE; + give_shared_vision(pdest, aiplayer); /* not the other way around */ + } + } players_iterate_end + } + } + } players_iterate_end; + game.is_new_game = FALSE; send_game_state(&game.est_connections, CLIENT_GAME_RUNNING_STATE); diff -u3NrX freeciv/diff_ignore freeciv/server/stdinhand.c freeciv-ai/server/stdinhand.c --- freeciv/server/stdinhand.c Sun Feb 24 22:58:20 2002 +++ freeciv-ai/server/stdinhand.c Mon Feb 25 00:43:05 2002 @@ -1009,6 +1009,8 @@ CMD_EASY, CMD_NORMAL, CMD_HARD, + CMD_HARDER, + CMD_TOUGH, CMD_CMDLEVEL, CMD_FIRSTLEVEL, @@ -1183,6 +1185,24 @@ "sets the default level for any new AI players to 'hard'. With an " "argument, sets the skill level for that player only.") }, + {"harder", ALLOW_CTRL, + /* TRANS: translate text between <> only */ + N_("harder\n" + "harder "), + N_("Set one or all AI players to 'harder'."), + N_("With no arguments, sets all AI players to skill level 'harder', and " + "sets the default level for any new AI players to 'harder'. With an " + "argument, sets the skill level for that player only.") + }, + {"tough", ALLOW_CTRL, + /* TRANS: translate text between <> only */ + N_("tough\n" + "tough "), + N_("Set one or all AI players to 'tough'."), + N_("With no arguments, sets all AI players to skill level 'tough', and " + "sets the default level for any new AI players to 'tough'. With an " + "argument, sets the skill level for that player only.") + }, {"cmdlevel", ALLOW_HACK, /* confusing to leave this at ALLOW_CTRL */ /* TRANS: translate text between <> only */ N_("cmdlevel\n" @@ -1632,7 +1652,7 @@ { const char *nm[11] = { "UNUSED", "UNKNOWN", "UNKNOWN", "easy", "UNKNOWN", "normal", "UNKNOWN", "hard", - "UNKNOWN", "UNKNOWN", "UNKNOWN" }; + "harder", "tough", "UNKNOWN" }; assert(level>0 && level<=10); return nm[level]; @@ -2501,13 +2521,20 @@ { enum m_pre_result match_result; struct player *pplayer; - enum command_id cmd = (level <= 3) ? CMD_EASY : - (level >= 6) ? CMD_HARD : - CMD_NORMAL; - /* kludge - these commands ought to be 'set' options really - rp */ + enum command_id cmd; assert(level > 0 && level < 11); + switch(level) { + case 3 : cmd=CMD_EASY; break; + case 5 : cmd=CMD_NORMAL; break; + case 7 : cmd=CMD_HARD; break; + case 8 : cmd=CMD_HARDER; break; + case 9 : cmd=CMD_TOUGH; break; + } + + /* kludge - these commands ought to be 'set' options really - rp */ + pplayer=find_player_by_name_prefix(name, &match_result); if (pplayer) { @@ -2911,6 +2938,12 @@ break; case CMD_HARD: set_ai_level(caller, arg, 7); + break; + case CMD_HARDER: + set_ai_level(caller, arg, 8); + break; + case CMD_TOUGH: + set_ai_level(caller, arg, 9); break; case CMD_QUIT: quit_game(caller);