Code gesäubert

Konterheal eingefügt (cronjob)
main
radiskull 13 years ago
parent e04b3e423e
commit 88e649fb39

@ -1,43 +1,37 @@
<?php <?php
/* /*
* *
* @copyright (c) 2010 animegame.eu * @copyright (c) 2009 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
* *
*/ */
####################KAMPF HP SPIELER 1
if($technick1[type] == hp) {
$k_mp[0] = $k_mp[0] - $technick1[mp];
if($k_mp[0] < 0) {
$k_mp[0] = 0;
$schaden_1 = "Keine MP";
$aktion_AV1[$x] = "nein";
} else {
$k_hp[0] = $k_hp[0] + (($k_hp1[1] / 100) * $technick1[hp]);
if($k_hp1[1] < $k_hp[0]) { $k_hp[0] = $k_hp1[1]; }
$schaden_1 = "+ $technick1[hp]% HP";
$aktion_AV1[$x] = "nein";
}}
####################KAMPF HP SPIELER 2
if($technick2[type] == hp) {
$k_mp[1] = $k_mp[1] - $technick2[mp];
if($k_mp[1] < 0) {
$k_mp[1] = 0;
$schaden_2 = "Keine MP";
$aktion_AV2[$x] = "nein";
} else {
$k_hp[1] = $k_hp[1] + (($k_hp2[1] / 100) * $technick2[hp]);
if($k_hp2[1] < $k_hp[1]) { $k_hp[1] = $k_hp2[1]; }
$schaden_2 = "+ $technick2[hp]% HP";
$aktion_AV2[$x] = "nein";
}}
####################KAMPF HP SPIELER 1
if ($technick1['type'] == "hp") {
$k_mp[0] = $k_mp[0] - $technick1['mp'];
if ($k_mp[0] < 0) {
$k_mp[0] = 0;
$schaden_1 = 'Keine MP';
$aktion_AV1[$x] = 'nein';
} else {
$tmp_hp[0] = (($k_hp1[1] / 100) * $technick1['hp']);
$schaden_1 = '+' . $technick1['hp'] .'% HP';
$aktion_AV1[$x] = 'nein';
}
}
####################KAMPF HP SPIELER 2
if ($technick2['type'] == 'hp') {
$k_mp[1] = $k_mp[1] - $technick2['mp'];
if ($k_mp[1] < 0) {
$k_mp[1] = 0;
$schaden_2 = 'Keine MP';
$aktion_AV2[$x] = 'nein';
} else {
$tmp_hp[1] = (($k_hp2[1] / 100) * $technick2['hp']);
$schaden_2 = '+' . $technick2['hp'] .'% HP';
$aktion_AV2[$x] = 'nein';
}
}
?> ?>

@ -1,17 +1,19 @@
<?php <?php
/* /*
* *
* @copyright (c) 2010 animegame.eu * @copyright (c) 2009 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
* *
*/ */
####################KAMPF HPMP SPIELER 1 ####################KAMPF HPMP SPIELER 1
if($technick1[type] == hpmp) { if($technick1['type'] == "hpmp") {
$k_hp[0] = $k_hp[0] + (($k_hp1[1] / 100) * $technick1[hp]); //$k_hp[0] = $k_hp[0] + (($k_hp1[1] / 100) * $technick1[hp]);
$k_mp[0] = $k_mp[0] + (($k_mp1[1] / 100) * $technick1[mp]); $tmp_hp[0] = (($k_hp1[1] / 100) * $technick1['hp']);
$k_mp[0] = $k_mp[0] + (($k_mp1[1] / 100) * $technick1['mp']);
if($k_hp1[1] < $k_hp[0]) { $k_hp[0] = $k_hp1[1]; } //if($k_hp1[1] < $k_hp[0]) { $k_hp[0] = $k_hp1[1]; }
if($k_mp1[1] < $k_mp[0]) { $k_mp[0] = $k_mp1[1]; } if($k_mp1[1] < $k_mp[0]) { $k_mp[0] = $k_mp1[1]; }
$schaden_1 = "+ $technick1[hp]% HP/ $technick1[mp]% MP"; $schaden_1 = "+ $technick1[hp]% HP/ $technick1[mp]% MP";
@ -22,11 +24,12 @@ $aktion_AV1[$x] = "nein";
####################KAMPF HPMP SPIELER 2 ####################KAMPF HPMP SPIELER 2
if($technick2[type] == hpmp) { if($technick2['type'] == "hpmp") {
$k_hp[1] = $k_hp[1] + (($k_hp2[1] / 100) * $technick2[hp]); //$k_hp[1] = $k_hp[1] + (($k_hp2[1] / 100) * $technick2[hp]);
$k_mp[1] = $k_mp[1] + (($k_mp2[1] / 100) * $technick2[mp]); $tmp_hp[1] = (($k_hp2[1] / 100) * $technick2['hp']);
$k_mp[1] = $k_mp[1] + (($k_mp2[1] / 100) * $technick2['mp']);
if($k_hp2[1] < $k_hp[1]) { $k_hp[1] = $k_hp2[1]; } //if($k_hp2[1] < $k_hp[1]) { $k_hp[1] = $k_hp2[1]; }
if($k_mp2[1] < $k_mp[1]) { $k_mp[1] = $k_mp2[1]; } if($k_mp2[1] < $k_mp[1]) { $k_mp[1] = $k_mp2[1]; }
$schaden_2 = "+ $technick2[hp]% HP/ $technick2[mp]% MP"; $schaden_2 = "+ $technick2[hp]% HP/ $technick2[mp]% MP";

@ -0,0 +1,55 @@
<?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 ($technick1['type'] == "konterhp") {
$k_mp[0] = $k_mp[0] - $technick1['mp'];
if ($k_mp[0] < 0) {
$k_mp[0] = 0;
$schaden_1 = "Keine MP";
$aktion_AV1[$x] = "nein";
} else {
$k_hp[1] = $k_hp[1] - $tmp_hp[1];
$schaden_1 = "$tmp_hp[1]";
if($tmp_hp[1] > 0) {
$schaden_2 = "Konter!";
}
$aktion_AV1[$x] = "nein";
}
} else {
$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 ($technick2['type'] == "konterhp") {
$k_mp[1] = $k_mp[1] - $technick2['mp'];
if ($k_mp[1] < 0) {
$k_mp[1] = 0;
$schaden_2 = "Keine MP";
$aktion_AV2[$x] = "nein";
} else {
$k_hp[0] = $k_hp[0] - $tmp_hp[0];
$schaden_2 = "$tmp_hp[0]";
if($tmp_hp[0] > 0) {
$schaden_1 = "Konter!";
}
$aktion_AV2[$x] = "nein";
}
} else {
$k_hp[0] = $k_hp[0] + $tmp_hp[0];
if ($k_hp1[1] < $k_hp[0]) {
$k_hp[0] = $k_hp1[1];
}
}
?>

@ -1,23 +1,24 @@
<?php <?php
/* /*
* *
* @copyright (c) 2010 animegame.eu * @copyright (c) 2009 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
* *
*/ */
####################Majin SPIELER 1 ####################Majin SPIELER 1
if($technick1[type] == "majin") { if($technick1['type'] == "majin") {
$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) {
$schaden_1 = "Majin Verwandlung fehlgeschlagen"; $schaden_1 = "Majin Verwandlung fehlgeschlagen";
$aktion_AV1[$x] = "nein"; $aktion_AV1[$x] = "nein";
$k_mp[0] = 0; $k_mp[0] = 0;
} else { } else {
$k_starke[1] = $k_starke[1] * ($technick1[starke]-0.5); $k_starke[1] = $k_starke[1] * ($technick1['starke']-0.5);
$k_speed[1] = $k_speed[1] * ($technick1[speed]-0.5); $k_speed[1] = $k_speed[1] * ($technick1['speed']-0.5);
$k_ver[1] = $k_ver[1] * ($technick1[verteidigung]-0.5); $k_ver[1] = $k_ver[1] * ($technick1['verteidigung']-0.5);
$alt_hp = $k_hp[1]; $alt_hp = $k_hp[1];
@ -34,17 +35,17 @@ $aussetzten_runde = 1;
####################Majin SPIELER 2 ####################Majin SPIELER 2
if($technick2[type] == "majin") { if($technick2['type'] == "majin") {
$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) {
$schaden_2 = "Majin Verwandlung fehlgeschlagen"; $schaden_2 = "Majin Verwandlung fehlgeschlagen";
$aktion_AV2[$x] = "nein"; $aktion_AV2[$x] = "nein";
$k_mp[1] = 0; $k_mp[1] = 0;
} else { } else {
$k_starke[0] = $k_starke[0] * ($technick2[starke]-0.5); $k_starke[0] = $k_starke[0] * ($technick2['starke']-0.5);
$k_speed[0] = $k_speed[0] * ($technick2[speed]-0.5); $k_speed[0] = $k_speed[0] * ($technick2['speed']-0.5);
$k_ver[0] = $k_ver[0] * ($technick2[verteidigung]-0.5); $k_ver[0] = $k_ver[0] * ($technick2['verteidigung']-0.5);
$alt_hp = $k_hp[0]; $alt_hp = $k_hp[0];

Loading…
Cancel
Save