Tausch2 now has a defined behavior in case SSJ was already castet.

main
hecht 9 years ago
parent 0e1de62ca3
commit d71f629890

@ -24,9 +24,9 @@ if ($technick1['type'] == 'SSJ') {
$k_ver[0] = $k_ver[0] * (($technick1['verteidigung'] + 1) / 2); $k_ver[0] = $k_ver[0] * (($technick1['verteidigung'] + 1) / 2);
$schaden_1 = $technick1['name'].'!!!'; $schaden_1 = $technick1['name'].'!!!';
$aktion_AV1[$x] = 'nein';
$ssj_tech_1 = $technick1['level']; $ssj_tech_1 = $technick1['level'];
} }
$aktion_AV1[$x] = 'nein';
} }
} }
@ -43,15 +43,15 @@ if ($technick2['type'] == 'SSJ') {
} else { } else {
if (!$ssj_tech_2) { if (!$ssj_tech_2) {
$k_starke[1] = $k_starke[1] * (($technick2['starke'] + 1) / 2); $k_starke[1] = $k_starke[1] * (($technick2['starke'] + 1) / 2);
$k_speed[1] = $k_speed[1] * (($technick2['speed'] + 1) / 2); $k_speed[1] = $k_speed[1] * (($technick2['speed'] + 1) / 2);
$k_ver[1] = $k_ver[1] * (($technick2['verteidigung'] + 1) / 2); $k_ver[1] = $k_ver[1] * (($technick2['verteidigung'] + 1) / 2);
$schaden_2 = $technick2['name'].'!!!'; $schaden_2 = $technick2['name'].'!!!';
$aktion_AV2[$x] = 'nein';
$ssj_tech_2 = $technick2['level']; $ssj_tech_2 = $technick2['level'];
} }
$aktion_AV2[$x] = 'nein';
} }
} }
?> ?>

@ -12,16 +12,25 @@ if ($technick1['type'] == 'tausch2') {
$k_mp[0] = $k_mp[0] - $technick1['mp']; $k_mp[0] = $k_mp[0] - $technick1['mp'];
if ($k_mp[0] >= 0) { if ($k_mp[0] >= 0) {
$prozent_technik1 = 0; $prozent_technik1 = 0;
$technick1 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick2[id]' LIMIT 10")); if ($technick2['type'] == 'SSJ' && $ssj_tech_1) {
$technick1['speed'] = $technick1['speed'] + (($technick1['speed'] / 100) * $prozent_technik1); // Gegner setzt SSJ ein ... der aktuelle char hat aber schon eine SSJ eingesetzt!
$technick1['verteidigung'] = $technick1['verteidigung'] + (($technick1['verteidigung'] / 100) * $prozent_technik1); $schaden_1 = 'Doppelte SSJ (+10%)';
$technick1['starke'] = $technick1['starke'] + (($technick1['starke'] / 100) * $prozent_technik1); $k_starke[0] = round($k_starke[0] * 1.1);
$speeds_char1 = ($k_speed[0] + $technick1['speed']); $k_speed[0] = round($k_speed[0] * 1.1);
$speeds_char1_4 = ($k_speed[0] + $technick1['speed']) / 1.5; $k_ver[0] = round($k_ver[0] * 1.1);
if ($speeds_char1_4 < 1) { $aktion_AV1[$x] = 'nein';
$speeds_char1_4 = 1; } else {
$technick1 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick2[id]' LIMIT 10"));
$technick1['speed'] = $technick1['speed'] + (($technick1['speed'] / 100) * $prozent_technik1);
$technick1['verteidigung'] = $technick1['verteidigung'] + (($technick1['verteidigung'] / 100) * $prozent_technik1);
$technick1['starke'] = $technick1['starke'] + (($technick1['starke'] / 100) * $prozent_technik1);
$speeds_char1 = ($k_speed[0] + $technick1['speed']);
$speeds_char1_4 = ($k_speed[0] + $technick1['speed']) / 1.5;
if ($speeds_char1_4 < 1) {
$speeds_char1_4 = 1;
}
$speeds_char1 = mt_rand($speeds_char1_4, $speeds_char1);
} }
$speeds_char1 = mt_rand($speeds_char1_4, $speeds_char1);
} else { } else {
$k_mp[0] = 0; $k_mp[0] = 0;
@ -36,20 +45,27 @@ if ($technick1['type'] == 'tausch2') {
if ($technick2['type'] == 'tausch2') { if ($technick2['type'] == 'tausch2') {
$k_mp[1] = $k_mp[1] - $technick2['mp']; $k_mp[1] = $k_mp[1] - $technick2['mp'];
if ($k_mp[1] >= 0) { if ($k_mp[1] >= 0) {
$prozent_technik2 = 0; $prozent_technik2 = 0;
$technick2 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick1[id]' LIMIT 10")); if ($technick1['type'] == 'SSJ' && $ssj_tech_2) {
// Gegner setzt SSJ ein ... der aktuelle char hat aber schon eine SSJ eingesetzt!
$technick2['speed'] = $technick2['speed'] + (($technick2['speed'] / 100) * $prozent_technik2); $schaden_2 = 'Doppelte SSJ (+10%)';
$technick2['verteidigung'] = $technick2['verteidigung'] + (($technick2['verteidigung'] / 100) * $prozent_technik2); $k_starke[1] = round($k_starke[1] * 1.1);
$technick2['starke'] = $technick2['starke'] + (($technick2['starke'] / 100) * $prozent_technik2); $k_speed[1] = round($k_speed[1] * 1.1);
$speeds_char2 = ($k_speed[1] + $technick2['speed']); $k_ver[1] = round($k_ver[1] * 1.1);
$speeds_char2_4 = ($k_speed[1] + $technick2['speed']) / 1.5; $aktion_AV2[$x] = 'nein';
if ($speeds_char2_4 < 1) { } else {
$speeds_char2_4 = 1; $technick2 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick1[id]' LIMIT 10"));
}
$speeds_char2 = mt_rand($speeds_char2_4, $speeds_char2);
$technick2['speed'] = $technick2['speed'] + (($technick2['speed'] / 100) * $prozent_technik2);
$technick2['verteidigung'] = $technick2['verteidigung'] + (($technick2['verteidigung'] / 100) * $prozent_technik2);
$technick2['starke'] = $technick2['starke'] + (($technick2['starke'] / 100) * $prozent_technik2);
$speeds_char2 = ($k_speed[1] + $technick2['speed']);
$speeds_char2_4 = ($k_speed[1] + $technick2['speed']) / 1.5;
if ($speeds_char2_4 < 1) {
$speeds_char2_4 = 1;
}
$speeds_char2 = mt_rand($speeds_char2_4, $speeds_char2);
}
} else { } else {
$k_mp[1] = 0; $k_mp[1] = 0;
$schaden_2 = 'Techniktausch Fehlgeschlagen'; $schaden_2 = 'Techniktausch Fehlgeschlagen';

Loading…
Cancel
Save