Exemplo n.º 1
0
Arquivo: oc_eas23.cpp Projeto: 7k2/7k2
//--- Begin of function CampaignEastWest::stage_23_process_game_result ---//
//
void CampaignEastWest::stage_23_process_game_result()
{
    //--- if the player won the game -----//

    if( game.result_win_condition_id >= 0 )
    {
        attack_state( attacker_state_recno, target_state_recno, 1, 2, 3 );

        set_event( EVENT_ULTIMATE_VICTORY );
    }

    //---- if the player lost the game ----//

    else
    {
        //-- the Eastern empire invades the player and takes a state of it --//

        if( random_pick_attack_state( eastern_nation_recno, western_nation_recno ) )
        {
            disp_narrative( res_stage.read("23POST") );
            attack_state( attacker_state_recno, target_state_recno, 1, 1, 3 );
        }

        set_event( EVENT_RANDOM_POINT_4 );
    }
}
Exemplo n.º 2
0
//--- Begin of function CampaignEastWest::stage_24_process_game_result ---//
//
void CampaignEastWest::stage_24_process_game_result()
{
	//--- if the player won the game -----//

	if( game.result_win_condition_id >= 0 )
	{
		//----------------------------------------------------------------//
		// You empire and the eastern empire gets the conquered land
		// in an alternate way. (i.e. you get the land in the 1st winning
		// game and the eastern empire gets the land in the 2nd winning game.
		//----------------------------------------------------------------//

		if( ++east_joint_attack_fryhtan_win_count%2 == 1 ||
			 nation_array.is_deleted(STAGE_24_EASTERN_NATION_RECNO) )		// or the allied kingdom has been destroyed
		{
			player_beat_fryhtan_count++;		// the player takes the conquered land
		}

		attack_state( attacker_state_recno, target_state_recno, 1, 2, 3, attacker2_state_recno );

		set_event( return_event_id );
	}

	//---- if the player lost the game ----//

	else
	{
		set_event( return_event_id );
	}
}
Exemplo n.º 3
0
//---- Begin of function CampaignEastWest::stage_24_prelude ----//
//
// Pick a state to attack.
//
void CampaignEastWest::stage_24_prelude()
{
//	disp_narrative( res_stage.read("24PRELUD") );

	attack_state( attacker_state_recno, target_state_recno, 0, 1, 2, attacker2_state_recno );

	//------- set config settings -------//

	config.explore_whole_map = 0;
}
Exemplo n.º 4
0
Arquivo: oc_eas23.cpp Projeto: 7k2/7k2
//---- Begin of function CampaignEastWest::stage_23_prelude ----//
//
// Pick a state to attack.
//
void CampaignEastWest::stage_23_prelude()
{
    play_speech("PRE-23.WAV");
    disp_narrative( res_stage.read("23PRELUD") );
    stop_speech();

    attack_state( attacker_state_recno, target_state_recno, 0, 1, 2 );

    //------- set config settings -------//

    config.explore_whole_map = 0;
}
Exemplo n.º 5
0
//---- Begin of function CampaignEastWest::stage_12_prelude ----//
//
// Pick a state to attack.
//
void CampaignEastWest::stage_12_prelude()
{
	int raceId = get_nation( state_array[attacker_state_recno]->campaign_nation_recno )->race_id;

	disp_dialog( raceId, res_stage.read("12PRELUD") );

	attack_state( attacker_state_recno, target_state_recno, 0, 1, 2 );

	//------- set config settings -------//

	config.explore_whole_map = 1;
}
Exemplo n.º 6
0
//---- Begin of function CampaignEastWest::stage_4_prelude ----//
//
// Pick a state to attack.
//
void CampaignEastWest::stage_4_prelude()
{
	play_speech("PRE-04.WAV");
	disp_narrative( res_stage.read("4PRELUDE") );		// 0-the letter is from a human kingdom
	stop_speech();

	attacker_state_recno = random_pick_state( western_nation_recno, target_state_recno );		// pick a state of the Western empire that is next to defected state.

	attack_state( attacker_state_recno, target_state_recno, 0, 1, 2 );

	//------- set config settings -------//

	config.explore_whole_map = 0;
}
Exemplo n.º 7
0
//--- Begin of function CampaignEastWest::stage_4_process_game_result ---//
//
void CampaignEastWest::stage_4_process_game_result()
{
	//--- if the player won the game -----//

	if( game.result_win_condition_id >= 0 )
	{
		attack_state( attacker_state_recno, target_state_recno, 1, 2, 3 );

		set_event( EVENT_RANDOM_POINT_1 );
	}

	//---- if the player lost the game ----//

	else
	{
		set_event( EVENT_RANDOM_POINT_1 );		// still go to random point 1 even the player has lost the game.
	}
}
Exemplo n.º 8
0
Arquivo: oc_east1.cpp Projeto: 7k2/7k2
//---- Begin of function CampaignEastWest::stage_1_prelude ----//
//
// Pick a state to attack.
//
void CampaignEastWest::stage_1_prelude()
{
    cur_monster_nation_recno = random_pick_monster_campaign_nation();

    int rc = random_pick_attack_state(cur_monster_nation_recno, western_nation_recno);

    err_when( !rc );

    play_speech("PRE-01.WAV");
    disp_narrative( res_stage.read("1PRELUDE") );		// 1-the letter is from a Fryhtan kingdom
    stop_speech();

    attack_state( attacker_state_recno, target_state_recno, 0, 1, 2 );

    //------- set config settings -------//

    config.explore_whole_map = 1;
}
Exemplo n.º 9
0
//--- Begin of function CampaignEastWest::stage_12_process_game_result ---//
//
void CampaignEastWest::stage_12_process_game_result()
{
	//--- if the player won the game -----//

	if( game.result_win_condition_id >= 0 )
	{
		set_event( EVENT_RANDOM_POINT_2 );
	}

	//---- if the player lost the game ----//

	else
	{
		attack_state( attacker_state_recno, target_state_recno, 1, 2, 3 );

		set_event( EVENT_RANDOM_POINT_2 );
	}
}
Exemplo n.º 10
0
//--- Begin of function CampaignEastWest::stage_10_process_game_result ---//
//
void CampaignEastWest::stage_10_process_game_result()
{
	//--- if the player won the game -----//

	if( game.result_win_condition_id >= 0 )
	{
		attack_state( attacker_state_recno, target_state_recno, 1, 2, 3 );

		set_event( EVENT_RANDOM_POINT_2 );
	}

	//---- if the player lost the game ----//

	else
	{
		// must retry

		info.game_year = game_year;			// revert info.game_year back to campaign's game year so that the game's time will not advance

		misc.set_random_seed( saved_random_seed );		// restore the random seed so that the game will replay in the same way
	}
}