<?xml version="1.0" encoding="utf-8"?>
<eventSystem xmlns="iqsoftwaregames">

	
	<!--Winter War - Soviets makes demands-->
  	<event eventID="8001" countryID="3" oneTimeChecking="1" visibleByPlayer="1">
    	<title>ZID_8001_title</title>
    	<description>ZID_8001_desc</description>
    <beginDate day="1" month="11" year="1939"/>
    <endDate day="25" month="2" year="1940"/>
    <condition>
      	<and>
        <!--Random check-->
        <expression>
          	<leftOperand method="System.GetRandomNumber" param0="1" param1="100"/>
          	<operator value="less"/>
          	<rightOperand constValue="25"/>
        </expression>
		<!--Country is active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="3"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
		<!--Finland is active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="7"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
		<!--Finland is neutral-->
		<expression>
			<leftOperand method="Country.GetAlliance" param0="7"/>
			<operator value="equals"/>
			<rightOperand constValue="0"/>
        </expression>
		<!--No war with Germany-->
		<expression>
			<leftOperand method="Country.HasWarWithCountry" param0="3" param1="2"/>
			<operator value="equals"/>
			<rightOperand constValue="0"/>
        </expression>
		<!--No war with Finland-->
		<expression>
			<leftOperand method="Country.HasWarWithCountry" param0="3" param1="7"/>
			<operator value="equals"/>
			<rightOperand constValue="0"/>
        </expression>
	    <!--Option 1 in event 8501 (R-M Pact)-->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="8501"/>
          	<operator value="equals"/>
          	<rightOperand constValue="1"/>
        </expression>
	    <!--Flag not fired yet-->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="8001"/>
          	<operator value="equals"/>
          	<rightOperand constValue="0"/>
        </expression>
   	 	</and>
    </condition>
    <options>
      	<option optionID="1" chanceAI="95">
        	<description>ZID_8001_op1</description>
        	<tooltip>ZID_8001_desc1</tooltip>
        	<effects>
		  	<!--Set flag on -->
          	<effect method="Flag.SetValue" param0="8001" param1="2"/>
        	</effects>
      	</option>
      	<option optionID="2" chanceAI="5">
        	<description>ZID_8001_op2</description>
        	<tooltip>ZID_8001_desc2</tooltip>
        	<effects>
		  	<!--Set flag on -->
          	<effect method="Flag.SetValue" param0="8001" param1="1"/>
        	</effects>
      	</option>
    </options>
  	</event>
	
	
	<!--Winter War - Soviet territorial demands-->
  	<event eventID="8002" countryID="7" oneTimeChecking="0" visibleByPlayer="1">
    	<title>ZID_8002_title</title>
    	<description>ZID_8002_desc</description>
    <condition>
      	<and>
		<!--Country is active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="7"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
	    <!--Option 1 in event 8001 -->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="8001"/>
          	<operator value="equals"/>
          	<rightOperand constValue="2"/>
        </expression>
	    <!--Flag not fired yet-->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="8002"/>
          	<operator value="equals"/>
          	<rightOperand constValue="0"/>
        </expression>
   	 	</and>
    </condition>
    <options>
      	<option optionID="1" chanceAI="70">
        	<description>ZID_8002_op1</description>
        	<tooltip>ZID_8002_desc1</tooltip>
        	<effects>
			<!--Orientation Democracy-->
          	<effect method="Country.SetOrientation" param0="7" param1="0"/>
			<!--Zone of influence-->
          	<effect method="Country.SetZoneOfInfluence" param0="7" param1="0"/>
		  	<!--Army is ready -->
          	<effect method="Country.UnFreezeAllUnits" param0="7"/>
		  	<!--War needs more factories -->
          	<effect method="Country.ChangeWarEconomy" param0="7" param1="10"/>
		  	<!--Set flag on -->
          	<effect method="Flag.SetValue" param0="8002" param1="1"/>
        	</effects>
      	</option>
      	<option optionID="2" chanceAI="30">
        	<description>ZID_8002_op2</description>
        	<tooltip>ZID_8002_desc2</tooltip>
        	<effects>
		  	<!--More willing to join Axis -->
          	<effect method="Country.ChangeAllianceEntry" param0="7" param1="15"/>
          	<!-- Territorial changes:-->
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="165" param1="42" param2="1" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="166" param1="41" param2="2" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="167" param1="41" param2="2" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="168" param1="0" param2="1" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="168" param1="40" param2="3" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="169" param1="0" param2="4" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="169" param1="39" param2="5" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="170" param1="0" param2="8" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="170" param1="37" param2="7" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="171" param1="0" param2="2" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="171" param1="3" param2="6" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="171" param1="36" param2="8" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="172" param1="34" param2="2" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="172" param1="39" param2="4" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="173" param1="33" param2="2" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="173" param1="41" param2="2" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="174" param1="31" param2="2" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="175" param1="31" param2="2" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="176" param1="30" param2="3" param3="3"/>
          	<effect method="HexStripe.ChangeControllerAndOwner" param0="177" param1="30" param2="5" param3="3"/>
			<!--Mannerheim Line destroyed-->
			<effect method="Hex.SetFortLevel" param0="169" param1="43" param2="0" />
			<effect method="Hex.SetFortLevel" param0="170" param1="43" param2="0" />
			<effect method="Hex.SetFortLevel" param0="171" param1="43" param2="0" />
			<effect method="Hex.SetFortLevel" param0="172" param1="42" param2="0" />
			<effect method="Hex.SetFortLevel" param0="173" param1="42" param2="0" />
			<effect method="Hex.SetFortLevel" param0="173" param1="41" param2="0" />
			<effect method="Hex.SetFortLevel" param0="176" param1="32" param2="0" />
			<effect method="Hex.SetFortLevel" param0="176" param1="31" param2="0" />
			<effect method="Hex.SetFortLevel" param0="176" param1="30" param2="0" />
			<effect method="Hex.SetFortLevel" param0="176" param1="29" param2="0" />
			<effect method="Hex.SetFortLevel" param0="176" param1="28" param2="0" />
			<effect method="Hex.SetFortLevel" param0="176" param1="27" param2="0" />
		  	<!--Set flag on -->
          	<effect method="Flag.SetValue" param0="8002" param1="2"/>
        	</effects>
      	</option>
    </options>
  	</event>
	
	
	<!--Winter War - Finland didn't give up to Soviet's demands-->
  	<event eventID="8003" countryID="3" oneTimeChecking="0" visibleByPlayer="1">
    	<title>ZID_8003_title</title>
    	<description>ZID_8003_desc</description>
    <condition>
      	<and>
		<!--Country is active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="3"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
	    <!--Option 1 in event 8002 -->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="8002"/>
          	<operator value="equals"/>
          	<rightOperand constValue="1"/>
        </expression>
	    <!--Flag not fired yet-->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="8003"/>
          	<operator value="equals"/>
          	<rightOperand constValue="0"/>
        </expression>
   	 	</and>
    </condition>
    <options>
      	<option optionID="1" chanceAI="95">
        	<description>ZID_8003_op1</description>
        	<tooltip>ZID_8003_desc1</tooltip>
        	<effects>
		  	<!--Declare war against Finland -->
          	<effect method="Country.DeclareWarOnCountry" param0="3" param1="7"/>
		  	<!--War is not what others like -->
          	<effect method="Country.ChangeDiplomaticPoints" param0="3" param1="-10"/>
		  	<!--War needs more factories -->
          	<effect method="Country.ChangeWarEconomy" param0="3" param1="10"/>
		  	<!--Set flag on -->
          	<effect method="Flag.SetValue" param0="8003" param1="1"/>
        	</effects>
      	</option>
      	<option optionID="2" chanceAI="5">
        	<description>ZID_8003_op2</description>
        	<tooltip>ZID_8003_desc2</tooltip>
        	<effects>
		  	<!--Finns more willing to join Axis -->
          	<effect method="Country.ChangeAllianceEntry" param0="7" param1="10"/>
		  	<!--Set flag on -->
          	<effect method="Flag.SetValue" param0="8003" param1="2"/>
        	</effects>
      	</option>
    </options>
  	</event>
	
	

</eventSystem>