| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -53,6 +53,7 @@ $minlevel = $_GET['minlevel'];	// selbsterklärend
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$maxlevel = $_GET['maxlevel'];	// selbsterklärend
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$gain = $_GET['gain'];			// ('Anmeldung', 'PL', 'Level')
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$randomize = $_GET['randomize']; // 1 für nach jeder Runde die reihenfolge setzen
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$itemless = $_GET['itemless']; // gibt an ob das turnier die items ingorieren soll (standard sind items aktiv)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				// Turniereigenschaften
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$gruppenphase = $_GET['gruppenphase'];	// Flag für Gruppenphase (1 für aktiv)
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -67,17 +68,22 @@ $grp_proceed = $_GET['grp_proceed'];	// Anzahl der Teilnehmer die Gruppenphase v
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 * @param int $round rundennummer (0,1,2...)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 * @return int die id des siegenden chars
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 */
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				function turnierfight($char1_id, $char2_id, $art_1, $round){
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				function turnierfight($char1_id, $char2_id, $art_1, $round, $itemless){
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					// Gotta replace this later -.-
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					echo 'Fight between '.$char1_id.' und '.$char2_id;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					echo 'Fight between '.$char1_id.' and '.$char2_id .', items = ' . ($itemless == 1?'TRUE':'FALSE') . '<br>' . "\n" ;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$chara_1 = getChar($char1_id); // ohne Equip für Turniere!!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$chara_2 = getChar($char2_id);	// ohne Equip für Turniere!!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					//$chara_1 = getCharWithBuffs($char1_id); // Equip für Turniere!!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					//$chara_2 = getCharWithBuffs($char2_id);	// Equip für Turniere!!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$chara_1 = null;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$chara_2 = null;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					if($itemless == 1) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$chara_1 = getChar($char1_id); // ohne Equip für Turniere!!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$chara_2 = getChar($char2_id);	// ohne Equip für Turniere!!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					} else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$chara_1 = getCharWithBuffs($char1_id); // Equip für Turniere!!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$chara_2 = getCharWithBuffs($char2_id);	// Equip für Turniere!!
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					include "turnier_kampf.php";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					echo ', Sieger '.$sieger.'<br>';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					echo ', Sieger '.$sieger.'<br>'. "\n" ;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				//	 in $sieger steht die id des gewinners
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					if($char1_id == $sieger){
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						return $char1_id;
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -202,7 +208,7 @@ while(count($char_array) > 1){ // Solange bis nur ein Char übrig bleibt
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$n_chars = array();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					for($i=0;$i<count($char_array);$i+=2){
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				//		echo 'Berechne fight zwischen '.$char_array[$i].'und '.$char_array[$i+1].'('.$i.'/'.count($char_array).')<br>';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$n_chars[] = turnierfight($char_array[$i], $char_array[$i+1], $name, $round);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$n_chars[] = turnierfight($char_array[$i], $char_array[$i+1], $name, $round, $itemless);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				//	echo 'nxt round<br>';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$round++;
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |