HPMP-Bug gefixt, es sollte nun wieder alles richtig geheilt werden

KT-bug gefixt (überschüssige HP werden auf max hp gestellt, nach erfolgreichem tausch)
main
radiskull 13 years ago
parent af5baf35ed
commit 9ace684d30

@ -9,15 +9,17 @@
####################KAMPF HPMP SPIELER 1
if($technick1['type'] == "hpmp") {
//$k_hp[0] = $k_hp[0] + (($k_hp1[1] / 100) * $technick1[hp]);
$tmp_hp[0] = $k_hp[0] + (($k_hp1[1] / 100) * $technick1['hp']);
$k_mp[0] = $k_mp[0] + (($k_mp1[1] / 100) * $technick1['mp']);
//$k_hp[0] = $k_hp[0] + (($k_hp1[1] / 100) * $technick1[hp]);
$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_mp1[1] < $k_mp[0]) { $k_mp[0] = $k_mp1[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];
}
$schaden_1 = "+ $technick1[hp]% HP/ $technick1[mp]% MP";
$aktion_AV1[$x] = "nein";
$schaden_1 = "+ $technick1[hp]% HP/ $technick1[mp]% MP";
$aktion_AV1[$x] = "nein";
}
@ -25,15 +27,17 @@ $aktion_AV1[$x] = "nein";
####################KAMPF HPMP SPIELER 2
if($technick2['type'] == "hpmp") {
//$k_hp[1] = $k_hp[1] + (($k_hp2[1] / 100) * $technick2[hp]);
$tmp_hp[1] = (($k_hp2[1] / 100) * $technick2['hp']);
$k_mp[1] = $k_mp[1] + (($k_mp2[1] / 100) * $technick2['mp']);
//$k_hp[1] = $k_hp[1] + (($k_hp2[1] / 100) * $technick2[hp]);
$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_mp2[1] < $k_mp[1]) { $k_mp[1] = $k_mp2[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];
}
$schaden_2 = "+ $technick2[hp]% HP/ $technick2[mp]% MP";
$aktion_AV2[$x] = "nein";
$schaden_2 = "+ $technick2[hp]% HP/ $technick2[mp]% MP";
$aktion_AV2[$x] = "nein";
}
?>

@ -15,7 +15,7 @@ if ($technick1['type'] == "konterhp") {
$schaden_1 = "Keine MP";
$aktion_AV1[$x] = "nein";
} else {
$k_hp[1] = $k_hp[1] - $tmp_hp[1];
$k_hp[1] -= $tmp_hp[1];
$schaden_1 = "$tmp_hp[1]";
if($tmp_hp[1] > 0) {
$schaden_2 = "Konter!";
@ -38,7 +38,7 @@ if ($technick2['type'] == "konterhp") {
$schaden_2 = "Keine MP";
$aktion_AV2[$x] = "nein";
} else {
$k_hp[0] = $k_hp[0] - $tmp_hp[0];
$k_hp[0] -= $tmp_hp[0];
$schaden_2 = "$tmp_hp[0]";
if($tmp_hp[0] > 0) {
$schaden_1 = "Konter!";

@ -45,6 +45,7 @@ function calculateFight(array $char1, array $char2) {
################## Init Kaempfer 1
//aktuelle hp [0] max hp [1]
$k_hp1 = explode(',', $chara_1['hp']);
$k_mp1 = explode(',', $chara_1['mp']);
@ -58,6 +59,7 @@ function calculateFight(array $char1, array $char2) {
$k_attacke1 = convertLearnIDToAttackID(explode(',', $chara_1['attacken']), $chara_1['id']);
//aktuelle hp Spieler 1[0] Spieler 2[1]
$k_hp[0] = round($k_hp1[0]);
$k_mp[0] = round($k_mp1[0]);
@ -66,6 +68,7 @@ function calculateFight(array $char1, array $char2) {
################## Init Kaempfer 2
//aktuelle hp [0] max hp [1]
$k_hp2 = explode(',', $chara_2['hp']);
$k_mp2 = explode(',', $chara_2['mp']);
@ -77,6 +80,7 @@ function calculateFight(array $char1, array $char2) {
$k_attacke2 = convertLearnIDToAttackID(explode(',', $chara_2['attacken']), $chara_2['id']);
//aktuelle hp Spieler 1[0] Spieler 2[1]
$k_hp[1] = round($k_hp2[0]);
$k_mp[1] = round($k_mp2[0]);
@ -169,10 +173,11 @@ function calculateFight(array $char1, array $char2) {
include (ROOT_PATH . '/include/kampf/lose2.php');
include (ROOT_PATH . '/include/kampf/ausdauer.php');
include (ROOT_PATH . '/include/kampf/mpv.php');
include (ROOT_PATH . '/include/kampf/tausch.php');
include (ROOT_PATH . '/include/kampf/hpmp.php');
//Als letztes um alle HP-Attacken zu kontern (in $tmp_hp gespeichert)
include (ROOT_PATH . '/include/kampf/konter_heal.php');
//Nach Konterheal, damit überstehende HP bleibt
include (ROOT_PATH . '/include/kampf/tausch.php');
//include "kampf/summon.php";
}
include (ROOT_PATH . '/include/kampf/atk_wert.php');

@ -173,10 +173,11 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
include (ROOT_PATH . '/include/kampf/lose2.php');
include (ROOT_PATH . '/include/kampf/ausdauer.php');
include (ROOT_PATH . '/include/kampf/mpv.php');
include (ROOT_PATH . '/include/kampf/tausch.php');
include (ROOT_PATH . '/include/kampf/hpmp.php');
//Als letztes um alle HP-Attacken zu kontern (in $tmp_hp gespeichert)
include (ROOT_PATH . '/include/kampf/konter_heal.php');
//Nach Konterheal, damit überstehende HP bleibt
include (ROOT_PATH . '/include/kampf/tausch.php');
//include "kampf/summon.php";
}
include (ROOT_PATH . '/include/kampf/atk_wert.php');

Loading…
Cancel
Save