
<!-- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
	Capharnaum - FENETRE COMBAT

	Version 1.0.0
	Juillet 2010
	Neural Noise
	
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->

<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.0">
	
	<windowclass name="feuillepersonnage_combat">
		<frame name="generique_feuillepersonnage_combat" />
		<datasource name="feuillepersonnage" />
		<placement>
			<size>
				<width>550</width>
				<height>685</height>
			</size>
			<position>
				<x>415</x>
				<y>450</y>
			</position>
		</placement>
		
		<sheetdata>


			<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			COMBAT
			---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->			
			
			<numberfield name="Initmax_valeur" source="Combat.initmax">				
				<bounds rect="100,46,41,22" />
				<font name="sheetnumbersmall" />						
				<tooltip text="Initiative max." />				
				<description text="Initiative max."/>	

				<readonly />
				<script>				
					
					function onInit()												
						
						--[[Création des champs s'ils n'existent pas (pour éciter les plantages)]]
						local Coordination = window.getDatabaseNode().createChild("Caracteristiques.coordination", "number");
						local Souffle = window.getDatabaseNode().createChild("Caracteristiques.souffle", "number");
						local Sagesse = window.getDatabaseNode().createChild("Caracteristiques.sagesse", "number");
						
						--[[Mise à jour des valeurs]]
						Coordination.onUpdate = update;
						Souffle.onUpdate = update;
						Sagesse.onUpdate = update;
						
						--[[Appelle la fonction "update" ci-dessous de manière à calculer les bonnes valeurs]]
						update();
					end
					
					function update()
						
						--[[Recupération des valeurs]]
						local Coordination = window.getDatabaseNode().getChild("Caracteristiques.coordination").getValue();
						local Souffle = window.getDatabaseNode().getChild("Caracteristiques.souffle").getValue();
						local Sagesse = window.getDatabaseNode().getChild("Caracteristiques.sagesse").getValue();
						
						--[[Calcul de la Valeur]]
						local InitMAX = (1 + math.ceil((Coordination + Souffle + Sagesse) / 3));
						
						--[[On affecte la valeur calculée]]						
						setValue(InitMAX);			
					end
				
				</script> 


			</numberfield>		
		
			<numberfield name="Trempe_valeur" source="Combat.trempe">				
				<bounds rect="220,46,41,22" />
				<font name="sheetnumbersmall" />									
				<tooltip text="Trempe" />					
				<description text="Trempe"/>	
				
				<readonly />
				<script>				
					
					function onInit()												
						
						--[[Création des champs s'ils n'existent pas (pour éciter les plantages)]]
						local Heroisme = window.getDatabaseNode().createChild("Vertus.heroisme", "number");
						local Souffle = window.getDatabaseNode().createChild("Caracteristiques.souffle", "number");
						
						--[[Mise à jour des valeurs]]
						Heroisme.onUpdate = update;
						Souffle.onUpdate = update;
						
						--[[Appelle la fonction "update" ci-dessous de manière à calculer les bonnes valeurs]]
						update();
					end
					
					function update()
						
						--[[Recupération des valeurs]]
						local Heroisme = window.getDatabaseNode().getChild("Vertus.heroisme").getValue();
						local Souffle = window.getDatabaseNode().getChild("Caracteristiques.souffle").getValue();
						
						--[[Calcul de la Valeur]]
						local Trempe = (math.ceil(Heroisme + Souffle));
						
						--[[On affecte la valeur calculée]]						
						setValue(Trempe);			
					end
				
				</script> 
				
				
			</numberfield>			
		
			<numberfield name="Defpassive_valeur" source="Combat.defpassive">				
				<bounds rect="177,73,41,22" />
				<font name="sheetnumbersmall" />						
				<tooltip text="Défense passive" />				
				<description text="Défense passive"/>	
				
				<readonly />
				<script>				
					
					function onInit()												
						
						--[[Création des champs s'ils n'existent pas (pour éciter les plantages)]]
						local Coordination = window.getDatabaseNode().createChild("Caracteristiques.coordination", "number");
						local Epreuve = window.getDatabaseNode().createChild("Competences.epreuve", "number");
						
						--[[Mise à jour des valeurs]]
						Coordination.onUpdate = update;
						Epreuve.onUpdate = update;
						
						--[[Appelle la fonction "update" ci-dessous de manière à calculer les bonnes valeurs]]
						update();
					end
					
					function update()
						
						--[[Recupération des valeurs]]
						local Coordination = window.getDatabaseNode().getChild("Caracteristiques.coordination").getValue();
						local Epreuve = window.getDatabaseNode().getChild("Competences.epreuve").getValue();
						
						--[[Calcul de la Valeur]]
						local Defpassive = (math.ceil(Coordination + Epreuve + 6));
						
						--[[On affecte la valeur calculée]]						
						setValue(Defpassive);			
					end
				
				</script> 
			</numberfield>		

			
			
			
			<stringfield name="arme1" >
				<bounds rect="106,101,157,20" />
			</stringfield>
			
			<stringfield name="attdefarme1" >
				<bounds rect="98,126,39,23" />
			</stringfield>
			
			<numberfield name="Degat1_valeur" source="Combat.degat1">				
				<bounds rect="218,124,41,22" />
				<font name="sheetnumbersmall" />						
				<displaysign />
				<tooltip text="Dégâts Arme 1" />				
				<description text="Dégâts Arme 1"/>	
			</numberfield>		
		
			<stringfield name="special1arme1" >
				<bounds rect="96,146,165,20" />
			</stringfield>		
		
			<stringfield name="special2arme1" >
				<bounds rect="13,168,248,20" />
			</stringfield>			
		

			<stringfield name="arme2" >
				<bounds rect="110,191,149,20" />
			</stringfield>

			<stringfield name="attdefarme2" >
				<bounds rect="98,216,39,23" />
			</stringfield>
			
			<numberfield name="Degat2_valeur" source="Combat.degat2">				
				<bounds rect="218,214,41,22" />
				<font name="sheetnumbersmall" />						
				<displaysign />
				<tooltip text="Dégâts Arme 2" />				
				<description text="Dégâts Arme 2"/>	
			</numberfield>		
		
			<stringfield name="special1arme2" >
				<bounds rect="96,235,165,20" />
			</stringfield>		
		
			<stringfield name="special2arme2" >
				<bounds rect="13,258,248,20" />
			</stringfield>			
		
			
			<stringfield name="arme3" >
				<bounds rect="105,280,157,20" />
			</stringfield>

			<stringfield name="attdefarme3" >
				<bounds rect="98,305,39,23" />
			</stringfield>
			
			<numberfield name="Degat3_valeur" source="Combat.degat3">				
				<bounds rect="218,303,41,22" />
				<font name="sheetnumbersmall" />						
				<displaysign />
				<tooltip text="Dégâts Arme 3" />				
				<description text="Dégâts Arme 3"/>	
			</numberfield>		
		
			<stringfield name="special1arme3" >
				<bounds rect="96,325,165,20" />
			</stringfield>		
		
			<stringfield name="special2arme3" >
				<bounds rect="13,346,248,20" />
			</stringfield>

			<stringfield name="armure" >
				<bounds rect="97,370,164,20" />
			</stringfield>

			<numberfield name="Protection_valeur" source="Combat.protection">				
				<bounds rect="120,392,39,23" />
				<font name="sheetnumbersmall" />						
				<tooltip text="Protection" />				
				<description text="Protection"/>	
			</numberfield>	
			
			<numberfield name="Pv_valeur" source="Combat.pv">				
				<bounds rect="218,418,37,34" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Points de vie" />				
				<description text="Points de vie"/>	
			</numberfield>				
			
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			CARACTERISITQUES COMPAGNON
			---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->


			<numberfield name="Coordinationcompagnon_valeur" source="Caractcompagnon.coordinationcompagnon">				
				<bounds rect="400,65,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Coordination compagnon" />				
				<description text="Coordination compagnon"/>
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>	

			<numberfield name="Puissancecompagnon_valeur" source="Caractcompagnon.puissancecompagnon">				
				<bounds rect="400,89,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Puissance compagnon" />				
				<description text="Puissance compagnon"/>
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>				
			
			<numberfield name="Soufflecompagnon_valeur" source="Caractcompagnon.soufflecompagnon">				
				<bounds rect="400,113,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Souffle compagnon" />				
				<description text="Souffle compagnon"/>
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>	

			<numberfield name="Charmecompagnon_valeur" source="Caractcompagnon.charmecompagnon">				
				<bounds rect="400,137,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Charme compagnon" />				
				<description text="Charme compagnon"/>
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>	

			<numberfield name="Sagessecompagnon_valeur" source="Caractcompagnon.sagessecompagnon">				
				<bounds rect="400,161,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Sagesse compagnon" />				
				<description text="Sagesse compagnon"/>
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>	

			<numberfield name="Trempecompagnon_valeur" source="Caractcompagnon.trempecompagnon">				
				<bounds rect="499,65,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Trempe compagnon" />				
				<description text="Trempe compagnon"/>				
			</numberfield>	

			<numberfield name="Legendecompagnon_valeur" source="Caractcompagnon.legendecompagnon">				
				<bounds rect="499,89,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Légende" />				
				<description text="Légende"/>
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>	

			<numberfield name="Initmaxcompagnon_valeur" source="Caractcompagnon.initmaxcompagnon">				
				<bounds rect="470,138,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Initiative max. compagnon" />				
				<description text="Initiative max. compagnon"/>		
			</numberfield>	

			<numberfield name="Defpassivecompagnon_valeur" source="Caractcompagnon.defpassivecompagnon">				
				<bounds rect="470,183,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Déf. passive compagnon" />				
				<description text="Déf. passive compagnon"/>
			</numberfield>

			<numberfield name="Resistmagiecompagnon_valeur" source="Caractcompagnon.resistmagiecompagnon">				
				<bounds rect="470,228,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Résist. Magie compagnon" />				
				<description text="Résist. Magie compagnon"/>	
			</numberfield>

			<numberfield name="Pvcompagnon_valeur" source="Caractcompagnon.Pvcompagnon">				
				<bounds rect="341,218,39,33" />
				<font name="sheetnumbersmall" />			
				<tooltip text="PV  compagnon" />				
				<description text="PV  compagnon"/>
			</numberfield>

<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			COMPETENCES COMPAGNON
			---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->

			<numberfield name="Epreuvecompagnon_valeur" source="Competcompagnon.epreuvecompagnon">				
				<bounds rect="495,285,39,23" />
				<font name="sheetnumbersmall" />			
				<tooltip text="Epreuve compagnon" />				
				<description text="Epreuve"/>
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>
			

			<stringfield name="Inspiration" >
				<bounds rect="274,314,213,20" />
			</stringfield>			
			
			<numberfield name="Inspirationcompagnon_valeur" source="Competcompagnon.inspirationcompagnon">				
				<bounds rect="495,310,39,23" />
				<font name="sheetnumbersmall" />			
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>			
			
			<stringfield name="compet2" >
				<bounds rect="274,339,213,20" />
			</stringfield>			
			
			<numberfield name="Compet2compagnon_valeur" source="Competcompagnon.compet2compagnon">				
				<bounds rect="495,335,39,23" />
				<font name="sheetnumbersmall" />			
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>				
			
			<stringfield name="compet3" >
				<bounds rect="274,364,213,20" />
			</stringfield>			
			
			<numberfield name="Compet3compagnon_valeur" source="Competcompagnon.compet3compagnon">				
				<bounds rect="495,360,39,23" />
				<font name="sheetnumbersmall" />			
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>				
			
			<stringfield name="compet4" >
				<bounds rect="274,389,213,20" />
			</stringfield>			
			
			<numberfield name="Compet4compagnon_valeur" source="Competcompagnon.compet4compagnon">				
				<bounds rect="495,385,39,23" />
				<font name="sheetnumbersmall" />			
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>				
			
			<stringfield name="compet5" >
				<bounds rect="274,414,213,20" />
			</stringfield>			
			
			<numberfield name="Compet5compagnon_valeur" source="Competcompagnon.compet5compagnon">				
				<bounds rect="495,410,39,23" />
				<font name="sheetnumbersmall" />			
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>				
			
			<stringfield name="compet6" >
				<bounds rect="274,439,213,20" />
			</stringfield>			
			
			<numberfield name="Compet6compagnon_valeur" source="Competcompagnon.compet6compagnon">				
				<bounds rect="495,435,39,23" />
				<font name="sheetnumbersmall" />			
				<script>
					function onInit()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
								
					function onValueChanged()
						if getValue() &lt; 0 then
							setValue(0);
						elseif getValue() &gt; 6 then
							setValue(6);
						end
					end
				</script>				
			</numberfield>				
			
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			TECHNIQUE ET NIVEAU
			---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->			
			
			
			<stringfield name="technique" >
				<bounds rect="114,475,421,20" />
				<tooltip text="Parole / Académie / Ecole" />				
				<description text="Parole / Académie / Ecole"/>
			</stringfield>				
			
			<stringfield name="niv1" >
				<bounds rect="74,504,463,20" />
				<tooltip text="Niveau 1" />				
				<description text="Niveau 1"/>
			</stringfield>				
			
			<stringfield name="niv2" >
				<bounds rect="74,533,463,20" />
				<tooltip text="Niveau 2" />				
				<description text="Niveau 2"/>
			</stringfield>				
			
			<stringfield name="niv3" >
				<bounds rect="74,561,463,20" />
				<tooltip text="Niveau 3" />				
				<description text="Niveau 3"/>
			</stringfield>				
			
			<stringfield name="niv4" >
				<bounds rect="74,590,463,20" />
				<tooltip text="Niveau 3" />				
				<description text="Niveau 3"/>
			</stringfield>				

			<stringfield name="niv5" >
				<bounds rect="74,619,463,20" />
				<tooltip text="Niveau 5" />				
				<description text="Niveau 5"/>
			</stringfield>	

			<stringfield name="niv6" >
				<bounds rect="74,648,463,20" />
				<tooltip text="Niveau 6" />				
				<description text="Niveau 6"/>
			</stringfield>	
			
		</sheetdata>
	</windowclass>
</root>