From 122182c2501db3d5bb32df852b7de4c27bbec8f4 Mon Sep 17 00:00:00 2001 From: hecht Date: Thu, 14 Aug 2014 19:32:24 +0000 Subject: [PATCH] Und ein weiterer Versuch reborn ans laufen zu bekommen. --- ag/gm/gm_seite.php | 4 + ag/gm/include/geheim.inc.php | 26 ++++--- ag/include/kampf/kampf_rechnung.php | 110 +++++++++++++++------------- ag/include/kampf/reborn.php | 56 ++++++-------- ag/include/kampf_wrapper.inc.php | 2 +- ag/include/schatz.inc.php | 2 +- ag/kampf2.php | 2 +- ag/kampf_clan.php | 2 +- cronjob/kampf_include.php | 2 +- 9 files changed, 105 insertions(+), 101 deletions(-) diff --git a/ag/gm/gm_seite.php b/ag/gm/gm_seite.php index 4ad8d22..41bef63 100644 --- a/ag/gm/gm_seite.php +++ b/ag/gm/gm_seite.php @@ -31,6 +31,7 @@ include_once(ROOT_PATH.'/include/usergroup.inc.php'); include_once(ROOT_PATH.'/gm/include/attacken.inc.php'); include_once(ROOT_PATH.'/gm/include/bilderschau.inc.php'); include_once(ROOT_PATH.'/gm/include/clan.inc.php'); +include_once(ROOT_PATH.'/gm/include/geheim.inc.php'); include_once(ROOT_PATH.'/gm/include/info.inc.php'); include_once(ROOT_PATH.'/gm/include/item.inc.php'); include_once(ROOT_PATH.'/gm/include/monster.inc.php'); @@ -111,6 +112,9 @@ function displayLogin(){ } function displayOptions(){ + // FIXME: Hinzufuegen der Includes und der Entry Funktion im Array und wir brauchen + // in dieser Datei deutlich weniger Copy&Paste! + $entries = array("bilder" => "Bilderschau", "faq" => "FAQ bearbeiten", "rassen" => "Rassen bearbeiten", diff --git a/ag/gm/include/geheim.inc.php b/ag/gm/include/geheim.inc.php index d737c6c..3f109f0 100644 --- a/ag/gm/include/geheim.inc.php +++ b/ag/gm/include/geheim.inc.php @@ -14,17 +14,19 @@ defineIfNotDefined('GEHEIM_CHANCE_NIETE', 0.5); function displayGeheim($request) { ?> - - - - - - - -
- Geheim Übersicht -
- Zum Hauptmenu -
+
+ + + + + + + + + + +
Geheim Übersicht
Zum Hauptmenu +
+
$play1_ausweich) { +if(!$aktion_AV2[$x]) { + if($zufall_pl2 > $play1_ausweich) { -$alt_hp = $k_hp[0]; + $alt_hp = $k_hp[0]; -$charsa2_def = $k_ver[0]+$technick1['verteidigung']; -$charsa2_4_def = ($k_ver[0]+$technick1['verteidigung']) / 1.1; + $charsa2_def = $k_ver[0]+$technick1['verteidigung']; + $charsa2_4_def = ($k_ver[0]+$technick1['verteidigung']) / 1.1; -if($charsa2_def <= 2) { - $charsa2_def = 2; + if($charsa2_def <= 2) { + $charsa2_def = 2; } -if($charsa2_4_def < 1) { - $charsa2_4_def = 1; + if($charsa2_4_def < 1) { + $charsa2_4_def = 1; } -$charsa2_def = mt_rand($charsa2_4_def,$charsa2_def); -$charsa2_str = $k_starke[1]*1.2+$technick2['starke']; -$charsa2_4_str = ($k_starke[1] *1.2 +$technick2['starke']) +1; + $charsa2_def = mt_rand($charsa2_4_def,$charsa2_def); + $charsa2_str = $k_starke[1]*1.2+$technick2['starke']; + $charsa2_4_str = ($k_starke[1] *1.2 +$technick2['starke']) +1; -if($charsa1_str <= 2) { - $charsa1_str = 2; - } -if($charsa2_4_str < 1) { - $charsa2_4_str = 1; - } + if($charsa1_str <= 2) { + $charsa1_str = 2; + } + if($charsa2_4_str < 1) { + $charsa2_4_str = 1; + } -$charsa2_str = mt_rand($charsa2_4_str,$charsa2_str); + $charsa2_str = mt_rand($charsa2_4_str,$charsa2_str); -$k_hp[0] = round(($k_hp[0] + $charsa2_def - $charsa2_str + mt_rand(1,20))); -$schaden_2 = $alt_hp - $k_hp[0]; + $k_hp[0] = round(($k_hp[0] + $charsa2_def - $charsa2_str + mt_rand(1,20))); + $schaden_2 = $alt_hp - $k_hp[0]; -if($alt_hp < $k_hp[0]) { - $k_hp[0] = $alt_hp; $schaden_2 = 0; - } -} else { -$schaden_2 = 'Keinen Schaden'; -} + if($alt_hp < $k_hp[0]) { + $k_hp[0] = $alt_hp; $schaden_2 = 0; + } + } else { + $schaden_2 = 'Keinen Schaden'; + } } if(!$technick1['name']) { - $technick1['name'] = 'Normaler Kick'; - } + $technick1['name'] = 'Normaler Kick'; +} if(!$technick2['name']) { - $technick2['name'] = 'Normaler Kick'; - } + $technick2['name'] = 'Normaler Kick'; +} + +// Nun kommt reborn an die reihe! +if(isset($reborn_hp[0]) && $k_hp[0] <= 0) { + $k_hp[0] = $reborn_hp[0]; + unset($reborn_hp[0]); + $schaden_1 .= '
Reborn!'; +} +if(isset($reborn_hp[1]) && $k_hp[1] <= 0) { + $k_hp[1] = $reborn_hp[1]; + unset($reborn_hp[1]); + $schaden_2 .= '
Reborn!'; +} if($k_hp[0]<0) { - $k_hp7[0] = 0; - } else { - $k_hp7[0] = $k_hp[0]; - } + $k_hp7[0] = 0; +} else { + $k_hp7[0] = $k_hp[0]; +} if($k_mp[0]<0) { - $k_mp7[0] = 0; - } else { - $k_mp7[0] = $k_mp[0]; - } + $k_mp7[0] = 0; +} else { + $k_mp7[0] = $k_mp[0]; +} if($k_hp[1]<0) { - $k_hp7[1] = 0; - } else { - $k_hp7[1] = $k_hp[1]; - } -if($k_mp[1]<0) { + $k_hp7[1] = 0; +} else { + $k_hp7[1] = $k_hp[1]; +} +if($k_mp[1]<0) { $k_mp7[1] = 0; - } else { - $k_mp7[1] = $k_mp[1]; - } +} else { + $k_mp7[1] = $k_mp[1]; +} ?> \ No newline at end of file diff --git a/ag/include/kampf/reborn.php b/ag/include/kampf/reborn.php index 6c1c387..0c7a0ab 100644 --- a/ag/include/kampf/reborn.php +++ b/ag/include/kampf/reborn.php @@ -7,46 +7,32 @@ * */ -if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN - - ################### Spieler 1 - if ($technick1['type'] == 'reborn') { - $k_mp[0] = $k_mp[0] - $technick1['mp']; - if ($k_mp[0] >= 0) { - $reborn_hp[0] = ($k_hp1[1] / 100) * $technick1['hp']; - $schaden_1 = 'Reborn!'; - } else { - $schaden_1 = 'Technik fehlgeschlagen'; - $k_mp[0] = 0; - } - - $aktion_AV1[$x] = 'nein'; +################### Spieler 1 +if ($technick1['type'] == 'reborn') { + $k_mp[0] = $k_mp[0] - $technick1['mp']; + if ($k_mp[0] >= 0) { + $reborn_hp[0] = ($k_hp1[1] / 100) * $technick1['hp']; + $schaden_1 = 'Reborn!'; + } else { + $schaden_1 = 'Technik fehlgeschlagen'; + $k_mp[0] = 0; } - ################### Spieler 2 + $aktion_AV1[$x] = 'nein'; +} - if ($technick2['type'] == 'reborn') { - $k_mp[1] = $k_mp[1] - $technick2['mp']; - if ($k_mp[1] >= 0) { - $reborn_hp[1] = ($k_hp2[1] / 100) * $technick2['hp']; - $schaden_2 = 'Reborn!'; - } else { - $schaden_2 = 'Technik fehlgeschlagen'; - $k_mp[1] = 0; - } +################### Spieler 2 - $aktion_AV2[$x] = 'nein'; +if ($technick2['type'] == 'reborn') { + $k_mp[1] = $k_mp[1] - $technick2['mp']; + if ($k_mp[1] >= 0) { + $reborn_hp[1] = ($k_hp2[1] / 100) * $technick2['hp']; + $schaden_2 = 'Reborn!'; + } else { + $schaden_2 = 'Technik fehlgeschlagen'; + $k_mp[1] = 0; } -} -if(isset($reborn_hp[0]) && $k_hp[0] <= 0) { - $k_hp[0] = $reborn_hp[0]; - unset($reborn_hp[0]); - $schaden_1 .= '
Reborn!'; + $aktion_AV2[$x] = 'nein'; } -if(isset($reborn_hp[1]) && $k_hp[1] <= 0) { - $k_hp[1] = $reborn_hp[1]; - unset($reborn_hp[1]); - $schaden_2 .= '
Reborn!'; -} diff --git a/ag/include/kampf_wrapper.inc.php b/ag/include/kampf_wrapper.inc.php index 50841d3..0d63797 100644 --- a/ag/include/kampf_wrapper.inc.php +++ b/ag/include/kampf_wrapper.inc.php @@ -208,9 +208,9 @@ function calculateFight(array $char1, array $char2) { include (ROOT_PATH . '/include/kampf/konter_heal.php'); //Nach Konterheal, damit überstehende HP bleibt include (ROOT_PATH . '/include/kampf/tausch.php'); + include (ROOT_PATH . '/include/kampf/reborn.php'); } include (ROOT_PATH . '/include/kampf/heilung.php'); - include (ROOT_PATH . '/include/kampf/reborn.php'); #####################################KAMPF SYSTEM include (ROOT_PATH . '/include/kampf/kampf_rechnung.php'); diff --git a/ag/include/schatz.inc.php b/ag/include/schatz.inc.php index bb25f92..bc5c70d 100644 --- a/ag/include/schatz.inc.php +++ b/ag/include/schatz.inc.php @@ -252,9 +252,9 @@ function monsterfight_neu($chara_1, $fight_monster, $std, $ort){ include (ROOT_PATH . '/include/kampf/konter_heal.php'); //Nach Konterheal, damit überstehende HP bleibt include (ROOT_PATH . '/include/kampf/tausch.php'); + include (ROOT_PATH . '/include/kampf/reborn.php'); } include (ROOT_PATH . '/include/kampf/heilung.php'); - include (ROOT_PATH . '/include/kampf/reborn.php'); #####################################KAMPF SYSTEM include (ROOT_PATH . '/include/kampf/kampf_rechnung.php'); diff --git a/ag/kampf2.php b/ag/kampf2.php index b20dbf2..b622b04 100644 --- a/ag/kampf2.php +++ b/ag/kampf2.php @@ -209,9 +209,9 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { include (ROOT_PATH . '/include/kampf/konter_heal.php'); //Nach Konterheal, damit überstehende HP bleibt include (ROOT_PATH . '/include/kampf/tausch.php'); + include (ROOT_PATH . '/include/kampf/reborn.php'); } include (ROOT_PATH . '/include/kampf/heilung.php'); - include (ROOT_PATH . '/include/kampf/reborn.php'); #####################################KAMPF SYSTEM include (ROOT_PATH . '/include/kampf/kampf_rechnung.php'); diff --git a/ag/kampf_clan.php b/ag/kampf_clan.php index 7aab932..ab71bff 100644 --- a/ag/kampf_clan.php +++ b/ag/kampf_clan.php @@ -199,9 +199,9 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { include (ROOT_PATH . '//include/kampf/konter_heal.php'); //Nach Konterheal, damit überstehende HP bleibt include (ROOT_PATH . '//include/kampf/tausch.php'); + include (ROOT_PATH . '//include/kampf/reborn.php'); } include (ROOT_PATH . '//include/kampf/heilung.php'); - include (ROOT_PATH . '//include/kampf/reborn.php'); #####################################KAMPF SYSTEM include (ROOT_PATH . '//include/kampf/kampf_rechnung.php'); diff --git a/cronjob/kampf_include.php b/cronjob/kampf_include.php index 8f20f4e..e57a67c 100644 --- a/cronjob/kampf_include.php +++ b/cronjob/kampf_include.php @@ -50,7 +50,7 @@ if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN include ('include/kampf/konter_heal.php'); //Nach Konterheal, damit überstehende HP bleibt include ('include/kampf/tausch.php'); + include ('include/kampf/reborn.php'); } include ('include/kampf/heilung.php'); -include ('include/kampf/reborn.php');