main
radiskull 10 years ago
parent 28c4bad8c6
commit f899b2fcff

@ -0,0 +1,198 @@
<?php
/*
* Created on 07.03.2009
*
* @copyright (c) 2009 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
if (!function_exists('getVariableName')) {
function getVariableName($attribute, $char, $pos) {
switch($attribute) {
case 'hp_cur':
return 'k_hp';
case 'hp_max':
if($char == 'self') {
if($pos == 1) {
return 'k_hp1';
} else {
return 'k_hp2';
}
} else {
if($pos == 1) {
return 'k_hp2';
} else {
return 'k_hp1';
}
}
case 'mp_cur':
return 'k_mp';
case 'mp_max':
if($char == 'self') {
if($pos == 1) {
return 'k_mp1';
} else {
return 'k_mp2';
}
} else {
if($pos == 1) {
return 'k_mp2';
} else {
return 'k_mp1';
}
}
case 'str':
return 'k_starke';
case 'def':
return 'k_ver';
case 'spd':
return 'k_speed';
case 'heal':
return 'tmp_hp';
default:
return '';
}
}
}
if (!function_exists('getCharVariable')) {
function getCharVariable($attribute, $char, $pos) {
switch ($attribute) {
case 'hp_max':
case 'mp_max':
return 1;
default:
if($char == 'self') {
return $pos - 1;
} else {
return 2 - $pos;
}
}
}
}
if (!function_exists('getCalculatedValue')) {
function getCalculatedValue($schaden, $wert, $attWert) {
if($schaden == '%') {
return ($attWert * $wert) / 100;
} else {
return $wert;
}
}
}
if (!function_exists('processStatChanges')) {
function processStatChanges(&$statChanges, $charPos) {
foreach ($statChanges as $statKey => &$attacke) {
//echo '<br>attackenstats: '.count($attacke).'<br>';
$statsCounter = 0;
foreach ($attacke as $attKey => &$stat) {
if(is_array($stat)) {
//echo '<br>'.print_r($stat);
//echo '<br>dauer: '.$stat['dauer'].'/'.$stat['maxdauer'];
//echo '<br>wert: '.$stat['dauer'];
//echo '<br>operator: ';
//echo '<br>wert: '.$stat['wert'];
//echo '<br>attribut: '.getVariableName($stat['attribut'], $stat['char'], $charPos).' ('.$stat['attribut'].')';
//echo '<br>value: '.$GLOBALS['kampf'][getVariableName($stat['attribut'], $stat['char'], $charPos)][getCharVariable($stat['attribut'], $stat['char'], $charPos)];
//echo '<br>zAttribut: '.getVariableName($stat['zattribut'], $stat['char'], $charPos).' ('.$stat['zattribut'].')';
// echo '<br>value: '.$GLOBALS['kampf'][getVariableName($stat['zattribut'], $stat['char'], $charPos)][getCharVariable($stat['zattribut'], $stat['char'], $charPos)];
$statsCounter++;
$attributWert = &$GLOBALS['kampf'][getVariableName($stat['attribut'], $stat['char'], $charPos)][getCharVariable($stat['attribut'], $stat['char'], $charPos)];
if($stat['attribut'] != $stat['zattribut']) {
$zAttributWert = &$GLOBALS['kampf'][getVariableName($stat['zattribut'], $stat['char'], $charPos)][getCharVariable($stat['zattribut'], $stat['char'], $charPos)];
} else {
$zAttributWert = &$attributWert;
}
if(($stat['wirkung'] == 'always' || $stat['dauer'] == $stat['maxdauer']) && ($stat['unblockbar'] || !$GLOBALS['kampf']['aussetzen'])) {
switch ($stat['operator']) {
case '+':
//echo '+<br>';
$stat['akk_schaden'] += getCalculatedValue($stat['formel'], $stat['wert'], $attributWert);
$zAttributWert += getCalculatedValue($stat['formel'], $stat['wert'], $attributWert);
break;
case '-':
//echo '-<br>';
$stat['akk_schaden'] -= getCalculatedValue($stat['formel'], $stat['wert'], $attributWert);
$zAttributWert -= getCalculatedValue($stat['formel'], $stat['wert'], $attributWert);
break;
case '*':
//echo '*<br>';
//vorherigen wert merken um später gegen rechnen zu können
$tmp_wert = $attributWert;
//echo 'tmp_wert: '.$tmp_wert.'<br>';
$zAttributWert *= getCalculatedValue($stat['formel'], $stat['wert'], $attributWert);
$stat['akk_schaden'] += $attributWert - $tmp_wert;
break;
case '/':
//echo '/<br>';
//vorherigen wert merken um später gegen rechnen zu können
$tmp_wert = $attributWert;
//echo 'tmp_wert: '.$tmp_wert.'<br>';
$zAttributWert /= getCalculatedValue($stat['formel'], $stat['wert'], $attributWert);
$stat['akk_schaden'] += $attributWert - $tmp_wert;
break;
}
}
//echo '<br>ber. value: '.$zAttributWert;
//echo '<br>akk_schaden: '.$stat['akk_schaden'].'<br>';
//echo 'Varname: '.getVariableName($stat['attribut'], $stat['char']).'<br>';
//echo 'Vartyp: '.getCharVariable($stat['attribut'], $stat['attribut']).'<br>';
//echo 'Schaden: '.getCalculatedValue($stat['schaden'], $stat['wert'], $stat['attribut']).'<br>';
//echo '<br>zattribut: '.$stat['zattribut'];
if(getVariableName($stat['zattribut'], $stat['char'], $charPos) == 'tmp_hp') {
//hier extra den weiteren parameter für healkonter setzen
$index = 3;
if($charPos == 1) {
if($stat['char'] == 'self') {
$index = 3;
} else {
$index = 2;
}
} else {
if($stat['char'] == 'self') {
$index = 2;
} else {
$index = 3;
}
}
$GLOBALS['kampf'][getVariableName($stat['zattribut'], $stat['char'], $charPos)][$index] = true;
}
$stat['dauer']--;
if($stat['dauer'] < 1) {
if($stat['wiederherstellbar'] == 'yes') {
//echo 'resette stat '.$stat['attribut'].' um den wert '.$stat['akk_schaden'].'<br>';
$zAttributWert -= $stat['akk_schaden'];
}
$statsCounter--;
if($charPos == 1) {
$GLOBALS['kampf']['schaden1'] = $attacke['text'];
} else {
$GLOBALS['kampf']['schaden2'] = $attacke['text'];
}
unset($attacke[$attKey]);
}
}
}
//echo 'Statscounter: '.$statsCounter.'<br>';
//echo 'attackenstats: '.count($attacke).'<br>';
if($statsCounter == 0) {
unset($statChanges[$statKey]);
}
}
}
}
################### Spieler 1
//char auf der linken Seite
processStatChanges($statChange_Char1, 1);
################### Spieler 2
//char auf der rechten Seite
processStatChanges($statChange_Char2, 2);
?>

@ -0,0 +1,81 @@
<?php
/*
* Created on 07.03.2009
*
* @copyright (c) 2009 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
if (!function_exists('getTechniqueAttributeName')) {
function getTechniqueAttributeName($attribute) {
switch ($attribute) {
case 'hp_cur':
case 'hp_max':
return 'hp';
case 'mp_cur':
case 'mp_max':
return 'mp';
case 'str':
return 'starke';
case 'def':
return 'verteidigung';
case 'spd':
return 'speed';
default:
return '';
}
}
}
################### Spieler 1
if ($technick1['type'] == 'generic') {
$k_mp[0] = $k_mp[0] - $technick1['mp'];
if ($k_mp[0] >= 0) {
$options = json_decode($technick1['options'], true);
$statChange_Char1[] = $options;
foreach ($statChange_Char1 as &$attacke) {
foreach ($attacke as &$stat) {
if(is_array($stat)) {
$stat['maxdauer'] = $stat['dauer'];
$stat['wert'] = $technick1[getTechniqueAttributeName($stat['attribut'])];
}
}
}
} else {
$schaden_1 = 'Technik Fehlgeschlagen';
$k_mp[0] = 0;
}
$aktion_AV1[$x] = 'nein';
}
################### Spieler 2
if ($technick2['type'] == 'generic') {
$k_mp[1] = $k_mp[1] - $technick2['mp'];
if ($k_mp[1] >= 0) {
$options = json_decode($technick2['options'], true);
$statChange_Char2[] = $options;
foreach ($statChange_Char2 as &$attacke) {
foreach ($attacke as &$stat) {
if(is_array($stat)) {
$stat['dauer'] = $technick2['runden'];
$stat['maxdauer'] = $technick2['runden'];
$stat['wert'] = $technick2[getTechniqueAttributeName($stat['attribut'])];
}
}
}
} else {
$schaden_2 = 'Technik Fehlgeschlagen';
$k_mp[1] = 0;
}
$aktion_AV2[$x] = 'nein';
}

@ -0,0 +1,27 @@
<?php
/*
*
* @copyright (c) 2009 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
?>
<?php
####################KAMPF HP SPIELER 1
if($tmp_hp[2] == true) {
$k_hp[1] = $k_hp[1] + $tmp_hp[1];
if ($k_hp2[1] < $k_hp[1]) {
$k_hp[1] = $k_hp2[1];
}
}
####################KAMPF HP SPIELER 2
if($tmp_hp[3] == true) {
$k_hp[0] = $k_hp[0] + $tmp_hp[0];
if ($k_hp1[1] < $k_hp[0]) {
$k_hp[0] = $k_hp1[1];
}
}
?>

@ -9,38 +9,39 @@
####################KAIOKEN SPIELER 1 ####################KAIOKEN SPIELER 1
if($technick1['type'] == 'kaioken') { if($technick1['type'] == 'kaioken') {
$k_mp[0] = $k_mp[0] - $technick1['mp']; $k_mp[0] = $k_mp[0] - $technick1['mp'];
$k_hp[0] = $k_hp[0] - $technick1['hp']; $k_hp[0] = $k_hp[0] - $technick1['hp'];
if($k_mp[0] < 0) { if($k_mp[0] < 0) {
$schaden_2 = 'Keinen Schaden'; $schaden_2 = 'Keinen Schaden';
$schaden_1 = 'kaioken fehlgeschlagen'; $schaden_1 = 'kaioken fehlgeschlagen';
$aktion_AV1[$x] = 'nein'; $aktion_AV1[$x] = 'nein';
$k_mp[0] = 0; $k_mp[0] = 0;
} else { } else {
$schaden_1 = 'Kaioken'; $schaden_1 = 'Kaioken';
$k_starke[0] = $k_starke[0] + $technick1[starke]; $k_starke[0] = $k_starke[0] + $technick1[starke];
$k_speed[0] = $k_speed[0] + $technick1[speed]; $k_speed[0] = $k_speed[0] + $technick1[speed];
$k_ver[0] = $k_ver[0] + $technick1[verteidigung]; $k_ver[0] = $k_ver[0] + $technick1[verteidigung];
$aktion_AV1[$x] = 'nein'; $aktion_AV1[$x] = 'nein';
}} }
}
####################KAIOKEN SPIELER 2 ####################KAIOKEN SPIELER 2
if($technick2['type'] == kaioken) { if($technick2['type'] == kaioken) {
$k_mp[1] = $k_mp[1] - $technick2['mp']; $k_mp[1] = $k_mp[1] - $technick2['mp'];
$k_hp[1] = $k_hp[1] - $technick2['hp']; $k_hp[1] = $k_hp[1] - $technick2['hp'];
if($k_mp[1] < 0) { if($k_mp[1] < 0) {
$schaden_1 = 'Keinen Schaden'; $schaden_1 = 'Keinen Schaden';
$schaden_2 = 'kaioken fehlgeschlagen'; $schaden_2 = 'kaioken fehlgeschlagen';
$aktion_AV2[$x] = 'nein'; $aktion_AV2[$x] = 'nein';
$k_mp[1] = 0; $k_mp[1] = 0;
} else { } else {
$k_starke[1] = $k_starke[1] + $technick2['starke'];
$k_speed[1] = $k_speed[1] + $technick2['speed'];
$k_ver[1] = $k_ver[1] + $technick2['verteidigung'];
$aktion_AV2[$x] = 'nein';
$schaden_2 = 'kaioken';
}}
$k_starke[1] = $k_starke[1] + $technick2['starke'];
$k_speed[1] = $k_speed[1] + $technick2['speed'];
$k_ver[1] = $k_ver[1] + $technick2['verteidigung'];
$aktion_AV2[$x] = 'nein';
$schaden_2 = 'kaioken';
}
}
?> ?>

@ -17,17 +17,8 @@ if ($technick1['type'] == "konterhp") {
} else { } else {
$k_hp[1] -= $tmp_hp[1]; $k_hp[1] -= $tmp_hp[1];
$schaden_1 = "$tmp_hp[1]"; $schaden_1 = "$tmp_hp[1]";
if($tmp_hp[1] > 0) {
$schaden_2 = "Konter!";
}
$aktion_AV1[$x] = "nein"; $aktion_AV1[$x] = "nein";
} $tmp_hp[2] = false;
} else {
if($tmp_hp[2] == true) {
$k_hp[1] = $k_hp[1] + $tmp_hp[1];
if ($k_hp2[1] < $k_hp[1]) {
$k_hp[1] = $k_hp2[1];
}
} }
} }
@ -42,18 +33,8 @@ if ($technick2['type'] == "konterhp") {
} else { } else {
$k_hp[0] -= $tmp_hp[0]; $k_hp[0] -= $tmp_hp[0];
$schaden_2 = "$tmp_hp[0]"; $schaden_2 = "$tmp_hp[0]";
if($tmp_hp[0] > 0) {
$schaden_1 = "Konter!";
}
$aktion_AV2[$x] = "nein"; $aktion_AV2[$x] = "nein";
} $tmp_hp[3] = false;
} else {
if($tmp_hp[3] == true) {
$k_hp[0] = $k_hp[0] + $tmp_hp[0];
if ($k_hp1[1] < $k_hp[0]) {
$k_hp[0] = $k_hp1[1];
}
} }
} }
?> ?>

@ -98,6 +98,9 @@ function calculateFight(array $char1, array $char2) {
$runden_gif_technik1 = ''; $runden_gif_technik1 = '';
$runden_gif2 = 0; $runden_gif2 = 0;
$runden_gif_technik2 = ''; $runden_gif_technik2 = '';
$statChange_Char1 = array();
$statChange_Char2 = array();
$tmp_hp = array();
// now that we know what attacks our chars are capable of readout the attack information! // now that we know what attacks our chars are capable of readout the attack information!
$kombined = array_merge($k_attacke1, $k_attacke2); $kombined = array_merge($k_attacke1, $k_attacke2);
@ -133,8 +136,21 @@ function calculateFight(array $char1, array $char2) {
$runde['char2_array'] = $chara_2; $runde['char2_array'] = $chara_2;
$rundenArray = array($runde); $rundenArray = array($runde);
//globals erstellen für den generic-typ
$GLOBALS['kampf']['k_starke'] = &$k_starke;
$GLOBALS['kampf']['k_speed'] = &$k_speed;
$GLOBALS['kampf']['k_ver'] = &$k_ver;
$GLOBALS['kampf']['k_hp'] = &$k_hp;
$GLOBALS['kampf']['k_hp1'] = &$k_hp1;
$GLOBALS['kampf']['k_hp2'] = &$k_hp2;
$GLOBALS['kampf']['k_mp'] = &$k_mp;
$GLOBALS['kampf']['k_mp1'] = &$k_mp1;
$GLOBALS['kampf']['k_mp2'] = &$k_mp2;
$GLOBALS['kampf']['tmp_hp'] = &$tmp_hp;
$GLOBALS['kampf']['schaden1'] = &$schaden_1;
$GLOBALS['kampf']['schaden2'] = &$schaden_2;
$GLOBALS['kampf']['aussetzen'] = &$aussetzten_runde;
$tmp_hp = array();
while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
$runde = array(); $runde = array();
@ -163,6 +179,9 @@ function calculateFight(array $char1, array $char2) {
##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken ##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken
include (ROOT_PATH . '/include/kampf/majin.php'); include (ROOT_PATH . '/include/kampf/majin.php');
include (ROOT_PATH . '/include/kampf/generic_technik.php');
include (ROOT_PATH . '/include/kampf/generic_rechnung.php');
if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN
include (ROOT_PATH . '/include/kampf/atk_wert.php'); include (ROOT_PATH . '/include/kampf/atk_wert.php');
include (ROOT_PATH . '/include/kampf/tausch2.php'); //////////////////Muss ganz oben sein wegen technik Tauschen include (ROOT_PATH . '/include/kampf/tausch2.php'); //////////////////Muss ganz oben sein wegen technik Tauschen
@ -186,6 +205,7 @@ function calculateFight(array $char1, array $char2) {
include (ROOT_PATH . '/include/kampf/tausch.php'); include (ROOT_PATH . '/include/kampf/tausch.php');
//include "kampf/summon.php"; //include "kampf/summon.php";
} }
include (ROOT_PATH . '/include/kampf/heilung.php');
include (ROOT_PATH . '/include/kampf/atk_wert.php'); include (ROOT_PATH . '/include/kampf/atk_wert.php');
if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN
include (ROOT_PATH . '/include/kampf/schatten.php'); include (ROOT_PATH . '/include/kampf/schatten.php');
@ -200,6 +220,7 @@ function calculateFight(array $char1, array $char2) {
// stupid, i know .... but what else should i do if i don't want to rewrite it all -.- // stupid, i know .... but what else should i do if i don't want to rewrite it all -.-
// maybe you should have set a reference to the variable? :P (radi)
$chara_1['starke'] = $k_starke[0]; $chara_1['starke'] = $k_starke[0];
$chara_1['speed'] = $k_speed[0]; $chara_1['speed'] = $k_speed[0];

@ -178,6 +178,24 @@ function monsterfight_neu($chara_1, $fight_monster, $std, $ort){
')'; ')';
// echo 'Debug Message: '.$sql.'<br>'; // echo 'Debug Message: '.$sql.'<br>';
mysql_query($sql); mysql_query($sql);
$statChange_Char1 = array();
$statChange_Char2 = array();
$tmp_hp = array();
//globals erstellen für den generic-typ
$GLOBALS['kampf']['k_starke'] = &$k_starke;
$GLOBALS['kampf']['k_speed'] = &$k_speed;
$GLOBALS['kampf']['k_ver'] = &$k_ver;
$GLOBALS['kampf']['k_hp'] = &$k_hp;
$GLOBALS['kampf']['k_hp1'] = &$k_hp1;
$GLOBALS['kampf']['k_hp2'] = &$k_hp2;
$GLOBALS['kampf']['k_mp'] = &$k_mp;
$GLOBALS['kampf']['k_mp1'] = &$k_mp1;
$GLOBALS['kampf']['k_mp2'] = &$k_mp2;
$GLOBALS['kampf']['tmp_hp'] = &$tmp_hp;
$GLOBALS['kampf']['schaden1'] = &$schaden_1;
$GLOBALS['kampf']['schaden2'] = &$schaden_2;
$GLOBALS['kampf']['aussetzen'] = &$aussetzten_runde;
while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > 0 AND $x < 10) { while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > 0 AND $x < 10) {
$technick1 = mysql_fetch_assoc(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1[$x]' LIMIT 10")); $technick1 = mysql_fetch_assoc(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1[$x]' LIMIT 10"));
@ -205,6 +223,9 @@ function monsterfight_neu($chara_1, $fight_monster, $std, $ort){
##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken ##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken
include (ROOT_PATH . '/include/kampf/majin.php'); include (ROOT_PATH . '/include/kampf/majin.php');
include (ROOT_PATH . '/include/kampf/generic_technik.php');
include (ROOT_PATH . '/include/kampf/generic_rechnung.php');
if (!$aussetzten_runde) { /////DAS FueR MAJIN ATTACKEN if (!$aussetzten_runde) { /////DAS FueR MAJIN ATTACKEN
include (ROOT_PATH . '/include/kampf/atk_wert.php'); include (ROOT_PATH . '/include/kampf/atk_wert.php');
include (ROOT_PATH . '/include/kampf/tausch2.php'); //////////////////Muss ganz oben sein wegen technik Tauschen include (ROOT_PATH . '/include/kampf/tausch2.php'); //////////////////Muss ganz oben sein wegen technik Tauschen
@ -228,6 +249,7 @@ function monsterfight_neu($chara_1, $fight_monster, $std, $ort){
//Nach Konterheal, damit überstehende HP bleibt //Nach Konterheal, damit überstehende HP bleibt
include (ROOT_PATH . '/include/kampf/tausch.php'); include (ROOT_PATH . '/include/kampf/tausch.php');
} }
include (ROOT_PATH . '/include/kampf/heilung.php');
include (ROOT_PATH . '/include/kampf/atk_wert.php'); include (ROOT_PATH . '/include/kampf/atk_wert.php');
if (!$aussetzten_runde) { /////DAS FueR MAJIN ATTACKEN if (!$aussetzten_runde) { /////DAS FueR MAJIN ATTACKEN
include (ROOT_PATH . '/include/kampf/schatten.php'); include (ROOT_PATH . '/include/kampf/schatten.php');

@ -110,7 +110,24 @@ if ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
exit; exit;
} }
$statChange_Char1 = array();
$statChange_Char2 = array();
$tmp_hp = array(); $tmp_hp = array();
//globals erstellen für den generic-typ
$GLOBALS['kampf']['k_starke'] = &$k_starke;
$GLOBALS['kampf']['k_speed'] = &$k_speed;
$GLOBALS['kampf']['k_ver'] = &$k_ver;
$GLOBALS['kampf']['k_hp'] = &$k_hp;
$GLOBALS['kampf']['k_hp1'] = &$k_hp1;
$GLOBALS['kampf']['k_hp2'] = &$k_hp2;
$GLOBALS['kampf']['k_mp'] = &$k_mp;
$GLOBALS['kampf']['k_mp1'] = &$k_mp1;
$GLOBALS['kampf']['k_mp2'] = &$k_mp2;
$GLOBALS['kampf']['tmp_hp'] = &$tmp_hp;
$GLOBALS['kampf']['schaden1'] = &$schaden_1;
$GLOBALS['kampf']['schaden2'] = &$schaden_2;
$GLOBALS['kampf']['aussetzen'] = &$aussetzten_runde;
while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
$technick1 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1[$x]' LIMIT 10")); $technick1 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1[$x]' LIMIT 10"));
@ -162,7 +179,10 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
$tmp_hp[3] = false; $tmp_hp[3] = false;
##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken ##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken
include (ROOT_PATH . '/include/kampf/majin.php'); include (ROOT_PATH . '/include/kampf/majin.php');
include (ROOT_PATH . '/include/kampf/generic_technik.php');
include (ROOT_PATH . '/include/kampf/generic_rechnung.php');
if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN
include (ROOT_PATH . '/include/kampf/atk_wert.php'); include (ROOT_PATH . '/include/kampf/atk_wert.php');
include (ROOT_PATH . '/include/kampf/tausch2.php'); //////////////////Muss ganz oben sein wegen technik Tauschen include (ROOT_PATH . '/include/kampf/tausch2.php'); //////////////////Muss ganz oben sein wegen technik Tauschen
@ -187,14 +207,16 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
include (ROOT_PATH . '/include/kampf/tausch.php'); include (ROOT_PATH . '/include/kampf/tausch.php');
//include "kampf/summon.php"; //include "kampf/summon.php";
} }
include (ROOT_PATH . '/include/kampf/heilung.php');
include (ROOT_PATH . '/include/kampf/atk_wert.php'); include (ROOT_PATH . '/include/kampf/atk_wert.php');
if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN
include (ROOT_PATH . '/include/kampf/schatten.php'); include (ROOT_PATH . '/include/kampf/schatten.php');
} }
#####################################KAMPF SYSTEM #####################################KAMPF SYSTEM
include (ROOT_PATH . '/include/kampf/kampf_rechnung.php'); include (ROOT_PATH . '/include/kampf/kampf_rechnung.php');
$db_query = mysql_fetch_array(mysql_query("SELECT * FROM kampf WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') AND dauer='0' order by id DESC LIMIT 1")); $db_query = mysql_fetch_array(mysql_query("SELECT * FROM kampf WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') AND dauer='0' order by id DESC LIMIT 1"));
mysql_query("UPDATE kampf SET hp1='$db_query[hp1],$k_hp7[0]', hp2='$db_query[hp2],$k_hp7[1]', mp1='$db_query[mp1],$k_mp7[0]', mp2='$db_query[mp2],$k_mp7[1]', schaden1='$db_query[schaden1],$schaden_1', schaden2='$db_query[schaden2],$schaden_2', attacke1='$db_query[attacke1],$technick1[name]', attacke2='$db_query[attacke2],$technick2[name]', starke1='$db_query[starke1],$k_starke[0]', starke2='$db_query[starke2],$k_starke[1]', ver1='$db_query[ver1],$k_ver[0]', ver2='$db_query[ver2],$k_ver[1]', speed1='$db_query[speed1],$k_speed[0]', speed2='$db_query[speed2],$k_speed[1]', ausdauer1='$db_query[ausdauer1],$k_ausdauer[0]', ausdauer2='$db_query[ausdauer2],$k_ausdauer[1]', glueck1='$db_query[glueck1],$k_glueck[0]', glueck2='$db_query[glueck2],$k_glueck[1]' WHERE id='$db_query[id]'"); mysql_query("UPDATE kampf SET hp1='$db_query[hp1],$k_hp7[0]', hp2='$db_query[hp2],$k_hp7[1]', mp1='$db_query[mp1],$k_mp7[0]', mp2='$db_query[mp2],$k_mp7[1]', schaden1='$db_query[schaden1],$schaden_1', schaden2='$db_query[schaden2],$schaden_2', attacke1='$db_query[attacke1],$technick1[name]', attacke2='$db_query[attacke2],$technick2[name]', starke1='$db_query[starke1],$k_starke[0]', starke2='$db_query[starke2],$k_starke[1]', ver1='$db_query[ver1],$k_ver[0]', ver2='$db_query[ver2],$k_ver[1]', speed1='$db_query[speed1],$k_speed[0]', speed2='$db_query[speed2],$k_speed[1]', ausdauer1='$db_query[ausdauer1],$k_ausdauer[0]', ausdauer2='$db_query[ausdauer2],$k_ausdauer[1]', glueck1='$db_query[glueck1],$k_glueck[0]', glueck2='$db_query[glueck2],$k_glueck[1]' WHERE id='$db_query[id]'");

@ -96,6 +96,24 @@ $runden_gif1 = 0;
$runden_gif_technik1 = ""; $runden_gif_technik1 = "";
$runden_gif2 = 0; $runden_gif2 = 0;
$runden_gif_technik2 = ""; $runden_gif_technik2 = "";
$statChange_Char1 = array();
$statChange_Char2 = array();
$tmp_hp = array();
//globals erstellen für den generic-typ
$GLOBALS['kampf']['k_starke'] = &$k_starke;
$GLOBALS['kampf']['k_speed'] = &$k_speed;
$GLOBALS['kampf']['k_ver'] = &$k_ver;
$GLOBALS['kampf']['k_hp'] = &$k_hp;
$GLOBALS['kampf']['k_hp1'] = &$k_hp1;
$GLOBALS['kampf']['k_hp2'] = &$k_hp2;
$GLOBALS['kampf']['k_mp'] = &$k_mp;
$GLOBALS['kampf']['k_mp1'] = &$k_mp1;
$GLOBALS['kampf']['k_mp2'] = &$k_mp2;
$GLOBALS['kampf']['tmp_hp'] = &$tmp_hp;
$GLOBALS['kampf']['schaden1'] = &$schaden_1;
$GLOBALS['kampf']['schaden2'] = &$schaden_2;
$GLOBALS['kampf']['aussetzen'] = &$aussetzten_runde;
if ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { if ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
$sql = "INSERT clan_fights SET hp1='$k_hp[0]', hp2='$k_hp[1]', mp1='$k_mp[0]', mp2='$k_mp[1]', schaden1='$schaden_1', schaden2='$schaden_2', attacke1='$technick1[name]', attacke2='$technick2[name]', char1='$chara_1[id]', char2='$chara_2[id]', starke1='$k_starke[0]', starke2='$k_starke[1]', ver1='$k_ver[0]', ver2='$k_ver[1]', speed1='$k_speed[0]', speed2='$k_speed[1]', ausdauer1='$k_ausdauer[0]', ausdauer2='$k_ausdauer[1]', clanfight_id='$clanfight_id', runde='$runde', kampf='$kampf'"; $sql = "INSERT clan_fights SET hp1='$k_hp[0]', hp2='$k_hp[1]', mp1='$k_mp[0]', mp2='$k_mp[1]', schaden1='$schaden_1', schaden2='$schaden_2', attacke1='$technick1[name]', attacke2='$technick2[name]', char1='$chara_1[id]', char2='$chara_2[id]', starke1='$k_starke[0]', starke2='$k_starke[1]', ver1='$k_ver[0]', ver2='$k_ver[1]', speed1='$k_speed[0]', speed2='$k_speed[1]', ausdauer1='$k_ausdauer[0]', ausdauer2='$k_ausdauer[1]', clanfight_id='$clanfight_id', runde='$runde', kampf='$kampf'";
@ -151,6 +169,9 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
$aussetzten_runde = ""; ////// MUSS SO BLEIBEN WICHTIG $aussetzten_runde = ""; ////// MUSS SO BLEIBEN WICHTIG
##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken ##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken
include (ROOT_PATH . '//include/kampf/majin.php'); include (ROOT_PATH . '//include/kampf/majin.php');
include (ROOT_PATH . '/include/kampf/generic_technik.php');
include (ROOT_PATH . '/include/kampf/generic_rechnung.php');
if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN
include (ROOT_PATH . '//include/kampf/atk_wert.php'); include (ROOT_PATH . '//include/kampf/atk_wert.php');
@ -172,6 +193,7 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
include (ROOT_PATH . '//include/kampf/hpmp.php'); include (ROOT_PATH . '//include/kampf/hpmp.php');
//include "kampf/summon.php"; //include "kampf/summon.php";
} }
include (ROOT_PATH . '/include/kampf/heilung.php');
include (ROOT_PATH . '//include/kampf/atk_wert.php'); include (ROOT_PATH . '//include/kampf/atk_wert.php');
if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN
include (ROOT_PATH . '//include/kampf/schatten.php'); include (ROOT_PATH . '//include/kampf/schatten.php');

Loading…
Cancel
Save