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

	
	
	<!--Tripartite Pact-->
	<event eventID="1501" countryID="15" visibleByPlayer="1" oneTimeChecking="0">
	<title>ZID_1501_title</title>
    	<description>ZID_1501_desc</description>
	<condition>
      	<and>
        <!--Country is active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="15"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
	    <!--Option 1 in event 226 - events_2_germany.xml -->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="226"/>
          	<operator value="equals"/>
          	<rightOperand constValue="1"/>
        </expression>
	    <!--Flag not fired yet-->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="1501"/>
          	<operator value="equals"/>
          	<rightOperand constValue="0"/>
        </expression>
      	</and>
	</condition>
   	<options>
      	<option optionID="1" chanceAI="95" >
        	<description>ZID_1501_op1</description>
        	<tooltip>ZID_1501_desc1</tooltip>
        	<effects>
				<!--Set flag-->
          		<effect method="Flag.SetValue" param0="1501" param1="1"/>
   			</effects>
		</option>
      	<option optionID="2" chanceAI="5" >
        	<description>ZID_1501_op2</description>
        	<tooltip>ZID_1501_desc2</tooltip>
        	<effects>
		  		<!--More willing to join Axis -->
          		<effect method="Country.ChangeAllianceEntry" param0="15" param1="20"/>
				<!--Set flag-->
          		<effect method="Flag.SetValue" param0="1501" param1="2"/>
   			</effects>
		</option>
  	</options>
  	</event>
	
	
	<!--Joining the war-->
	<event eventID="1502" countryID="15" visibleByPlayer="1" oneTimeChecking="0">
	<title>ZID_1502_title</title>
    	<description>ZID_1502_desc</description>
	<condition>
      	<and>
        <!--Country is active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="15"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
        <!--France is not active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="16"/>
			<operator value="equals"/>
			<rightOperand constValue="0"/>
        </expression>
        <!--Poland is not active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="1"/>
			<operator value="equals"/>
			<rightOperand constValue="0"/>
        </expression>
        <!--Spain is neutral-->
		<expression>
			<leftOperand method="Country.GetAlliance" param0="15"/>
			<operator value="equals"/>
			<rightOperand constValue="0"/>
        </expression>
		<!-- Paris controlled by Germany-->
		<expression>
			<leftOperand method="Hex.ControlledByCountry" param0="94" param1="97" param2="2"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
		</expression>
		<!-- Kiev controlled by Germany-->
		<expression>
			<leftOperand method="Hex.ControlledByCountry" param0="181" param1="89" param2="2"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
		</expression>
		<!-- Smolensk controlled by Germany-->
		<expression>
			<leftOperand method="Hex.ControlledByCountry" param0="183" param1="67" param2="2"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
		</expression>
	    <!--Option 2 in event 1501 -->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="1501"/>
          	<operator value="equals"/>
          	<rightOperand constValue="2"/>
        </expression>
	    <!--Flag not fired yet-->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="1502"/>
          	<operator value="equals"/>
          	<rightOperand constValue="0"/>
        </expression>
      	</and>
	</condition>
   	<options>
      	<option optionID="1" chanceAI="60" >
        	<description>ZID_1502_op1</description>
        	<tooltip>ZID_1502_desc1</tooltip>
        	<effects>
		  		<!--More willing to join Axis -->
          		<effect method="Country.ChangeAllianceEntry" param0="15" param1="100"/>
				<!--Set flag-->
          		<effect method="Flag.SetValue" param0="1502" param1="1"/>
   			</effects>
		</option>
      	<option optionID="2" chanceAI="40" >
        	<description>ZID_1502_op2</description>
        	<tooltip>ZID_1502_desc2</tooltip>
        	<effects>
				<!--Set flag-->
          		<effect method="Flag.SetValue" param0="1502" param1="2"/>
   			</effects>
		</option>
  	</options>
  	</event>


	<!--Increasing War Economy - Peace-->
	<event eventID="1503" countryID="15" visibleByPlayer="1" oneTimeChecking="1"> 
		<title>ZID_1503_title</title>
		<description>ZID_1503_desc</description>
    <beginDate day="1" month="9" year="1939"/>
	<condition>
		<and>
        <!--Random check-->
        <expression>
          	<leftOperand method="System.GetRandomNumber" param0="1" param1="100"/>
          	<operator value="lessOrEqual"/>
          	<rightOperand constValue="2"/>
        </expression>
        <!--Country is active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="15"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
		<!--Not at war-->
		<expression>
			<leftOperand method="Country.IsAtWar" param0="15"/>
			<operator value="equals"/>
			<rightOperand constValue="0"/>
       	</expression>
		<!--WE less than 50-->
		<expression>
			<leftOperand method="Country.GetWarEconomy" param0="15"/>
			<operator value="lessOrEqual"/>
			<rightOperand constValue="50"/>
       	</expression>
		</and>
	</condition>
	<options>
		<option optionID="1" chanceAI="100">
			<description>ZID_1503_op1</description>
			<tooltip>ZID_1503_desc1</tooltip>
			<effects>
				<!--WE Increased by 5-->
          		<effect method="Country.ChangeWarEconomy" param0="15" param1="5"/>
			</effects>
		</option>
	</options>
	</event>
	
	
	<!--Keeping out of the war-->
	<event eventID="1504" countryID="15" visibleByPlayer="0" oneTimeChecking="0">
	<title>ZID_1504_title</title>
    	<description>ZID_1504_desc</description>
	<condition>
    <beginDate day="1" month="9" year="1939"/>
    <endDate day="31" month="3" year="1945"/>
      	<and>
        <!--Country is AI-->
		<expression>
			<leftOperand method="Country.IsAIControlled" param0="15"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
        <!--Country is active-->
		<expression>
			<leftOperand method="Country.IsActive" param0="15"/>
			<operator value="equals"/>
			<rightOperand constValue="1"/>
        </expression>
        <!--Spain is neutral-->
		<expression>
			<leftOperand method="Country.GetAlliance" param0="15"/>
			<operator value="equals"/>
			<rightOperand constValue="0"/>
        </expression>
        <!--Spain is more than 30 in alliance entry-->
		<expression>
			<leftOperand method="Country.GetAllianceEntry" param0="15"/>
			<operator value="greaterOrEqual"/>
			<rightOperand constValue="30"/>
        </expression>
			<or>
			<!--Not in Tripartite-->
			<expression>
				<leftOperand method="Flag.GetValue" param0="1501"/>
				<operator value="equals"/>
				<rightOperand constValue="0"/>
			</expression>
			<!--Not in Tripartite-->
			<expression>
				<leftOperand method="Flag.GetValue" param0="1501"/>
				<operator value="equals"/>
				<rightOperand constValue="1"/>
			</expression>
			</or>
	    <!--Flag not fired yet-->
        <expression>
          	<leftOperand method="Flag.GetValue" param0="1504"/>
          	<operator value="equals"/>
          	<rightOperand constValue="0"/>
        </expression>
      	</and>
	</condition>
   	<options>
      	<option optionID="1" chanceAI="100" >
        	<description>ZID_1504_op1</description>
        	<tooltip>ZID_1504_desc1</tooltip>
        	<effects>
		  		<!--Less willing to join any alliance -->
          		<effect method="Country.ChangeAllianceEntry" param0="15" param1="-20"/>
			</effects>
		</option>
  	</options>
  	</event>
	
	



</eventSystem>