From d0f5ca0ac39786a4be508cad457d2fd8825e1129 Mon Sep 17 00:00:00 2001 From: hecht Date: Tue, 19 Aug 2014 20:00:25 +0000 Subject: [PATCH] Fehler behoben der zum unverdienten Sieg eines Chars fuehrte, der genau auf 0 hp rauskam beim verlieren. --- ag/include/kampf_wrapper.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ag/include/kampf_wrapper.inc.php b/ag/include/kampf_wrapper.inc.php index 0d63797..e29b7ad 100644 --- a/ag/include/kampf_wrapper.inc.php +++ b/ag/include/kampf_wrapper.inc.php @@ -256,14 +256,14 @@ function calculateFight(array $char1, array $char2) { $rundenArray[] = $runde; } - if(($k_hp[0] > $k_aufgabe[0] && $k_hp[1] > $k_aufgabe[1]) || ($k_hp[0] < $k_aufgabe[0] && $k_hp[1] < $k_aufgabe[1])) { + if(($k_hp[0] > $k_aufgabe[0] && $k_hp[1] > $k_aufgabe[1]) || ($k_hp[0] <= $k_aufgabe[0] && $k_hp[1] <= $k_aufgabe[1])) { // Both are above or both are below their limit to surrender? if($k_hp[0] >= $k_hp[1]) { // If even the creator wins ;) $metaData['winner'] = $chara_1['id']; } else { $metaData['winner'] = $chara_2['id']; } - } else if($k_hp[0] < $k_aufgabe[0]) { // char1 is about to surrender + } else if($k_hp[0] <= $k_aufgabe[0]) { // char1 is about to surrender $metaData['winner'] = $chara_2['id']; } else { $metaData['winner'] = $chara_1['id']; @@ -292,4 +292,4 @@ function calculateExperience(array $char1, array $char2, $winner, $factor) { -?> \ No newline at end of file +?>