From 9ace684d30a618709770d2a11449897e1fe1f257 Mon Sep 17 00:00:00 2001 From: radiskull Date: Sat, 17 Mar 2012 13:35:28 +0000 Subject: [PATCH] =?UTF-8?q?HPMP-Bug=20gefixt,=20es=20sollte=20nun=20wieder?= =?UTF-8?q?=20alles=20richtig=20geheilt=20werden=20KT-bug=20gefixt=20(?= =?UTF-8?q?=C3=BCbersch=C3=BCssige=20HP=20werden=20auf=20max=20hp=20gestel?= =?UTF-8?q?lt,=20nach=20erfolgreichem=20tausch)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ag/include/kampf/hpmp.php | 32 ++++++++++++++++++-------------- ag/include/kampf/konter_heal.php | 4 ++-- ag/include/kampf_wrapper.inc.php | 11 ++++++++--- ag/kampf2.php | 3 ++- 4 files changed, 30 insertions(+), 20 deletions(-) diff --git a/ag/include/kampf/hpmp.php b/ag/include/kampf/hpmp.php index e3eba2e..709ae35 100644 --- a/ag/include/kampf/hpmp.php +++ b/ag/include/kampf/hpmp.php @@ -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"; } ?> diff --git a/ag/include/kampf/konter_heal.php b/ag/include/kampf/konter_heal.php index 066583b..5136e95 100644 --- a/ag/include/kampf/konter_heal.php +++ b/ag/include/kampf/konter_heal.php @@ -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!"; diff --git a/ag/include/kampf_wrapper.inc.php b/ag/include/kampf_wrapper.inc.php index 8283351..9445031 100644 --- a/ag/include/kampf_wrapper.inc.php +++ b/ag/include/kampf_wrapper.inc.php @@ -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']); @@ -57,7 +58,8 @@ function calculateFight(array $char1, array $char2) { // readout the attacks of fighter one $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]); @@ -65,7 +67,8 @@ function calculateFight(array $char1, array $char2) { $k_aufgabe[0] = $k_aufgabe_a_1 * $chara_1['aufgeben']; ################## 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'); diff --git a/ag/kampf2.php b/ag/kampf2.php index 1f3fa2f..7fe164b 100644 --- a/ag/kampf2.php +++ b/ag/kampf2.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');