tweber
Posts: 1411
Joined: 6/27/2007 Status: offline
|
Next set of events deal with victory and defeat. The first event checks for German Victory. I identified German Victory cities on the map (slot 1,1). In the first part of the event, I run a map check that counts the number of German Victory (e.g., Warsaw, Moscow) cities. If they have all 10, they win. This condition has been tweaked 0) SETVAR: Gameslot_German Victory Cities(#37) = 0 1) LOOPER: TempVar0 FROM 0 TO CheckMapWidth 2) LOOPER: TempVar1 FROM 0 TO CheckMapHeight 3) CHECK: CheckSlot(TempVar0, TempVar1, 1) == 1 4) CHECK: CheckHexOwner(TempVar0, TempVar1) == 0 5) SETVAR: Gameslot_German Victory Cities(#37) + 1 6) END CHECK 7) END CHECK 8) END LOOPER 9) END LOOPER 10) CHECK: Gameslot_German Victory Cities(#37) == 10 11) EXECUTE: ExecMessage2(0, 1, -1, -1) 12) EXECUTE: ExecSetWinner(0) 13) END CHECK The next event executes the ‘Establish Vichy’ action card that the German player gets when France falls. I identified the Vichy areas with slot 2 and give the territories to Germany (in the case of Northern France) or the Vichy government. I then give the German player the ‘Occupy Vichy’ card and put a small garrison in Vichy controlled territories. Note that all Allied units in Northern France surrender. 0) EXECUTE: ExecSetSleep(11, 0) 1) EXECUTE: ExecJoinArea(2, 3, 0, -1) 2) EXECUTE: ExecJoinArea(2, 2, 11, -1) 3) EXECUTE: ExecJoinArea(2, 4, 11, -1) 4) EXECUTE: ExecJoinArea(2, 5, 11, -1) 5) EXECUTE: ExecGiveActionCard(34, 0) 6) EXECUTE: ExecMessage2(0, 1, -1, -1) 7) EXECUTE: ExecSetSleep(11, 1) 8) EXECUTE: ExecAddUnit(0, 20, 46, 11) 9) EXECUTE: ExecAddUnit(0, 3, 46, 11) 10) EXECUTE: ExecAddUnit(0, 26, 34, 11) 11) EXECUTE: ExecAddUnit(0, 74, 52, 11) This next event executes the ‘Occupy Vichy’ action card. Germany now controls Southern France. The probability of partisan activity increases. 0) EXECUTE: ExecJoinArea(3, 2, 0, -1) 1) SETVAR: Gameslot_French Partisans(#24) + 1 2) EXECUTE: ExecMessage2(0, 1, -1, -1) The event handles the West’s declaration of War against Vichy (e.g., Operation Torch). First, the German ‘Occupy Vichy’ card is removed and Germany gets Southern France without the rise in Partisan level. The checks with Tempvar0 are an ‘if – then – else’. There is a 25% chance that Vichy remains loyal to Germany. Otherwise, it joins the West. If Germany declares war on Vichy, it automatically joins the west. Note how I use BlockEvent once the event is triggered. 0) CHECK: CheckWar(1, 11) == 1 1) CHECK: CheckHexOwner(26, 34) > 0 2) EXECUTE: ExecRemoveActionCard(34, 0) 3) EXECUTE: ExecJoinArea(3, 2, 0, -1) 4) END CHECK 5) SETVAR: TempVar0 = 0 6) CHECK: CheckRandomPercent > 75 7) EXECUTE: ExecJoinRegime(11, 0, 1) 8) SETVAR: TempVar0 = 1 9) EXECUTE: ExecMessage2(0, 1, -1, -1) 10) END CHECK 11) CHECK: TempVar0 == 0 12) EXECUTE: ExecJoinRegime(11, 1, 1) 13) EXECUTE: ExecMessage2(0, 1, -1, -1) 14) END CHECK 15) EXECUTE: BlockEvent 16) END CHECK 17) CHECK: CheckWar(0, 11) == 1 18) EXECUTE: ExecJoinRegime(11, 1, 1) 19) EXECUTE: ExecMessage2(0, 1, -1, -1) 20) EXECUTE: BlockEvent 21) END CHECK
|