print_msg( "Summer 1808 - Napoleon has seized the chance to capitalize on political instability in Spain, and he has installed his brother on the throne. Britain has sent a force to keep French hegemony from cutting off Mediterranean trade to Britain." );
popup_dialog( "Sir, we have won a major battle against the French and have captured Lisbon, the first step towards securing the Iberian Peninsula. Portugal is now under our control. Use it as a base to drive the French out of Spain." );
popup_dialog( "NEW OBJECTIVE: Drive the French out of Spain." );
change_objective_text( "mainobj", "Drive the French out of Spain." );
if ( popup_choice( "General Sir, would you like a briefing about this campaign?", "Yes", "No Thanks" ) == 1 )
{
while ( tutorMsg )
{
popup_dialog( "Notice 'Current Level' and 'Experience' at the left. The more enemy troops you defeat in battle, the more seasoned you will become and thus level up. At higher levels, you can activate special battlefield abilities." );
popup_dialog( "Skills that will become available will charge slowly to 100%. When you see that the skill is fully charged, you can press the associated button (surrounded in parenthesis) to activate the skill." );
popup_dialog( "Some skills are more powerful than others and take a longer time to charge. The more levels you gain, the more powerful base skills will become." );
popup_dialog( "Sir, in this campaign troops cost much more than usual. However, they also have many more hitpoints. Manage your troops effectively General, as reinforcements are expensive." );
if ( popup_choice( "Would you like that repeated?", "Yes", "No" ) != 1 )
{
tutorMsg = 0;
}
}
popup_dialog( "This concludes the campaign briefing. You will be briefed again when you gain new skills. Good luck out there, sir." );
}
}
trigger calendar ( timer_expired( "cdar" ) )
{
// I wrote this calendar trigger so it will work with any year and date
// Just a few things are needed:
// static int DAYRATE - number of seconds that equate to a 'day'
// Note: It is possible to change DAYRATE during the run to speed up or slow down the passage of time
// timer cdar - usually set to DAYRATE
// and then all the other static variables:
// day, month, monthSt, year
// Find out what day it is and see if the month needs to change
print_msg( "November 30 1808 - The Battle of Somo Sierra is fought between Spanish rebels and Napoleon's Grand ArmΘe" );
ping ( 1, 7, 131, 147 );
// Spanish Forces
create_unit( 7, 125, 158, "Royal Tercios", 1 );
create_unit( 7, 125, 158, "Iberian Militia", 8 );
create_unit( 7, 125, 158, "Cannon", 2 );
create_unit( 7, 125, 158, "Supply Wagon", 1 );
// French Forces
create_unit( 3, 116, 134, "Musketeers", 10 );
create_unit( 3, 116, 134, "Hussar", 5 );
group_attack_to_order( 1, 125, 158 );
}
trigger napoleon_is_done( month == 1 )
{
print_msg( "January 1809 - Napoleon, satisified with the situation, leaves Spain." );
DAYRATE = 1; // 1809 is a quick year
set_base_rate( 1, "Wealth", 30 );
}
trigger more_trade( year == 1810 )
{
DAYRATE = 3; // Slowing it back down
set_base_rate( 1, "Wealth", 45 );
}
trigger more_more_trade( year == 1811 )
{
set_base_rate( 1, "Wealth", 60 );
}
trigger more_more_more_trade( year == 1812 )
{
set_base_rate( 1, "Wealth", 75 );
}
trigger napoleon_attacks_russia( month == 7 && year == 1812 )
{
print_msg( "July 1812 - News arrives that Napoleon has invaded Russia." );
}
trigger napoleon_is_defeated( month == 11 && year == 1812 )
{
print_msg( "November 1812 - Napoleon's Grand ArmΘe suffers defeat in Russia at the hands of General Winter and is in full retreat." );
}
trigger more_more_more_more_trade( year == 1813 )
{
set_base_rate( 1, "Wealth", 90 );
}
trigger napoleon_withdraws( month == 3 && year == 1813 )
{
print_msg( "March 1813 - Faced with severe manpower shortages, Napoleon has recalled 60,000 men from Spain." );
for ( int k = 2; k < 7; k++ )
{
zen = num_military_units( k );
zen = (int) (zen / 4);
for ( i = 0; i < zen; i++ )
{
someGuy = find_military( k );
kill_unit_anim( k, someGuy, 1 );
}
}
enable_trigger( "ceiling1813" );
}
trigger battle_of_lepzig( month == 11 && year == 1813 )
{
print_msg( "November 1813 - After the battle of Leipzig in Germany, Napoleon's routed army flees to France." );
}
trigger final_trade( year == 1814 )
{
set_base_rate( 1, "Wealth", 100 );
}
trigger napoleon_abdicates( month == 4 && year == 1814 )
{
print_msg( "April 1814 - Napoleon has abdicated in the face of Allied armies closing in on France." );
popup_dialog( "Napoleon has abdicated. You have until the end of June to capture the remainder of French posessions." );
}
trigger end_of_scenario( month == 7 && year == 1814 )
{
popup_dialog( "Sir, though you have impressed the entire nation with your campaign in the Peninsula, your inability to achieve conclusion has earned your dismissal." );
popup_dialog( "General, when you level up by gaining experience, your abilities will improve. In this case, it has increased your talent for leading your men by adding a +2 armor bonus for all soldiers near your general." );
}
else if ( level == 3 )
{
// Auto Reinforce activate
reinforce_count = 0;
force_transport_ability( 1 );
popup_dialog( "Now that you have established yourself as a reliable force in the Peninsula, you will receive reinforcements from England every 60 days. " );
}
else if ( level == 4 )
{
print_game_msg( "General's max health increased!" );
popup_dialog( "Your contacts in the Iberian Peninsula have become well established. This has given you a new ability to call on them to reveal the entire map at any time. Press the 'X' key when this ability is charged to temporarily explore the whole map." );
set_leader_name( 1, "Viscount Wellington" );
popup_dialog( "In addition, you have been given the title Viscount Wellington to commend you on your services." );
popup_dialog( "Sir, your presence on the battlefield has a negative effect on enemy troops, sapping 1% of the strength (per second) of nearby enemy units." );
}
else if ( level == 8 )
{
print_game_msg( "General's max health increased!" );
popup_dialog( "You have gained a new ability to heal troops under your command. Press the 'E' key when this ability is charged to activate it and drop a healing beacon." );
set_leader_name( 1, "Duke of Wellington" );
popup_dialog( "Your services to Britain have earned you the title Duke of Wellington. Congratulations." );