parent
0567c7890e
commit
26696dedce
@ -1,46 +0,0 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div align="center">
|
||||
<center>
|
||||
<table border="0" width="951" height="396">
|
||||
<tr>
|
||||
<td width="949" height="39" colspan="2">
|
||||
<p align="center"><b>$CLANNAME Info</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="96" height="28"><b> Leader:</b></td>
|
||||
<td width="852" height="28"> $LEADER</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="96" height="28"><b> Co Leader.</b></td>
|
||||
<td width="852" height="28"> $COLEADER</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="96" height="36"><b> Clanzeichen:</b></td>
|
||||
<td width="852" height="36"> $CLANZEICHEN</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="96" height="28"><b> Member:</b></td>
|
||||
<td width="852" height="27"> $MIN_MEMBER / $MAX_MEMBER</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="96" height="25"><b> Level:</b></td>
|
||||
<td width="852" height="24"> $LEVEL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="96" height="33"><b> Homepage:</b></td>
|
||||
<td width="852" height="32"> $HOMEPAGE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="96" height="23"><b> Info:</b></td>
|
||||
<td width="852" height="172" rowspan="2"> <textarea rows="10" cols="40" readonly>$CLAN_INFO</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="96" height="144"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</body>
|
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
function gettemplate($template)
|
||||
{
|
||||
if(file_exists(''.$template.'.htm'))
|
||||
{
|
||||
$file = file(''.$template.'.htm');
|
||||
$template = implode("",$file);
|
||||
$template = str_replace("\"","\\\"",$template);
|
||||
}
|
||||
else $template='Das Template '.$template.' existiert nicht';
|
||||
return $template;
|
||||
}
|
||||
?>
|
@ -1,56 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
####################SSJ SPIELER 1
|
||||
|
||||
if ($technick1['type'] == 'SSJ') {
|
||||
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||
if ($k_mp[0] < 0) {
|
||||
$schaden_2 = 'Keinen Schaden';
|
||||
$schaden_1 = 'SSJ-Verwandlung fehlgeschlagen';
|
||||
$aktion_AV1[$x] = 'nein';
|
||||
$k_mp[0] = 0;
|
||||
} else {
|
||||
if (!$ssj_tech_1) {
|
||||
$k_starke[0] = $k_starke[0] * $technick1['starke'];
|
||||
$k_speed[0] = $k_speed[0] * $technick1['speed'];
|
||||
$k_ver[0] = $k_ver[0] * $technick1['verteidigung'];
|
||||
|
||||
$schaden_2 = 'Keinen Schaden';
|
||||
$schaden_1 = $technick1['name'];
|
||||
$aktion_AV1[$x] = 'nein';
|
||||
$ssj_tech_1 = $technick1['level'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
####################SSJ SPIELER 2
|
||||
|
||||
if ($technick2['type'] == 'SSJ') {
|
||||
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||
if ($k_mp[1] < 0) {
|
||||
$schaden_1 = 'Keinen Schaden';
|
||||
$schaden_2 = 'SSJ-Verwandlung fehlgeschlagen';
|
||||
$aktion_AV2[$x] = 'nein';
|
||||
$k_mp[1] = 0;
|
||||
} else {
|
||||
if (!$ssj_tech_2) {
|
||||
$k_starke[1] = $k_starke[1] * $technick2['starke'];
|
||||
$k_speed[1] = $k_speed[1] * $technick2['speed'];
|
||||
$k_ver[1] = $k_ver[1] * $technick2['verteidigung'];
|
||||
|
||||
$schaden_1 = 'Keinen Schaden';
|
||||
$schaden_2 = $technick2['name'];
|
||||
|
||||
$aktion_AV2[$x] = 'nein';
|
||||
$ssj_tech_2 = $technick2['level'];
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
#####################################KAMPF SYSTEM
|
||||
|
||||
$speed_prz_1 = $speed_char1/100;
|
||||
$speed_prz_2 = $speed_char2/100;
|
||||
|
||||
if($speed_char1 > $speed_char2) {
|
||||
if($speed_prz_1*90 >= $speed_char2) { $play1_ausweich=20; }
|
||||
if($speed_prz_1*80 >= $speed_char2) { $play1_ausweich=41; }
|
||||
if($speed_prz_1*70 >= $speed_char2) { $play1_ausweich=52; }
|
||||
if($speed_prz_1*60 >= $speed_char2) { $play1_ausweich=63; }
|
||||
if($speed_prz_1*50 >= $speed_char2) { $play1_ausweich=80; }
|
||||
} else {
|
||||
if($speed_prz_2*90 >= $speed_char1) { $play2_ausweich=20; }
|
||||
if($speed_prz_2*80 >= $speed_char1) { $play2_ausweich=41; }
|
||||
if($speed_prz_2*70 >= $speed_char1) { $play2_ausweich=52; }
|
||||
if($speed_prz_2*60 >= $speed_char1) { $play2_ausweich=63; }
|
||||
if($speed_prz_2*50 >= $speed_char1) { $play2_ausweich=80; }
|
||||
}
|
||||
$zufall_pl1=mt_rand(1,100);
|
||||
$zufall_pl2=mt_rand(1,100);
|
||||
?>
|
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
if ($x > 0) {
|
||||
################### PLAYER 1
|
||||
|
||||
$k_starke[0] = round($k_starke[0] + (($k_ausdauer[0] / 20)) - ($k_starke[0] / 50));
|
||||
$k_speed[0] = round($k_speed[0] + ($k_ausdauer[0] / 10));
|
||||
$k_ver[0] = round($k_ver[0] + ($k_ausdauer[0] / 10));
|
||||
$k_ausdauer[0] = round($k_ausdauer[0] - ($k_ausdauer[0] / 20));
|
||||
|
||||
################### PLAYER 2
|
||||
|
||||
$k_starke[1] = round($k_starke[1] + (($k_ausdauer[1] / 20)) - ($k_starke[1] / 50));
|
||||
$k_speed[1] = round($k_speed[1] + ($k_ausdauer[1] / 10));
|
||||
$k_ver[1] = round($k_ver[1] + ($k_ausdauer[1] / 10));
|
||||
$k_ausdauer[1] = round($k_ausdauer[1] - ($k_ausdauer[1] / 20));
|
||||
|
||||
}
|
||||
?>
|
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
####################KAMPF HP SPIELER 1
|
||||
|
||||
if($technick1['type'] == normal AND $technick1['hp'] > 0) {
|
||||
$k_hp[0] = $k_hp[0] - $technick1[hp];
|
||||
}
|
||||
|
||||
####################KAMPF HP SPIELER 2
|
||||
|
||||
if($technick2['type'] == normal AND $technick2['hp'] > 0) {
|
||||
$k_hp[1] = $k_hp[1] - $technick2['hp'];
|
||||
}
|
||||
?>
|
@ -1,47 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
####################KAMPF HP SPIELER 1
|
||||
if ($speeds_char1 >= $speeds_char2) {
|
||||
if ($technick1['type'] == 'hp') {
|
||||
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||
if ($k_mp[0] < 0) {
|
||||
$k_mp[0] = 0;
|
||||
} else {
|
||||
$k_hp[0] = $k_hp[0] + $technick1['hp'];
|
||||
if ($k_hp1[1] < $k_hp[0]) {
|
||||
$k_hp[0] = $k_hp1[1];
|
||||
}
|
||||
|
||||
$schaden_2 = 'Keinen Schaden';
|
||||
$schaden_1 = '+ ' . $technick1['hp'] . ' HP';
|
||||
}
|
||||
$aktion_AV1[$x] = 'nein';
|
||||
}
|
||||
} else {
|
||||
|
||||
####################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;
|
||||
} else {
|
||||
$k_hp[1] = $k_hp[1] + $technick2['hp'];
|
||||
if ($k_hp2[1] < $k_hp[1]) {
|
||||
$k_hp[1] = $k_hp2[1];
|
||||
}
|
||||
|
||||
$schaden_1 = 'Keinen Schaden';
|
||||
$schaden_2 = '+ '.$technick2['hp'].' HP';
|
||||
}
|
||||
$aktion_AV2[$x] = 'nein';
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,48 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
//KAIOKEN SPIELER 1
|
||||
|
||||
if($technick1['type'] == 'kaioken'){
|
||||
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||
$k_hp[0] = $k_hp[0] - $technick1['hp'];
|
||||
if($k_mp[0] < 0) {
|
||||
$schaden_2 = 'Keinen Schaden';
|
||||
$schaden_1 = 'kaioken fehlgeschlagen';
|
||||
$aktion_AV1[$x] = 'nein';
|
||||
$k_mp[0] = 0;
|
||||
} else {
|
||||
$schaden_2 = 'Keinen Schaden';
|
||||
$schaden_1 = 'Kaioken';
|
||||
$k_starke[0] = $k_starke[0] + $technick1['starke'];
|
||||
$k_speed[0] = $k_speed[0] + $technick1['speed'];
|
||||
$k_ver[0] = $k_ver[0] + $technick1['verteidigung'];
|
||||
$aktion_AV1[$x] = 'nein';
|
||||
}
|
||||
}
|
||||
//KAIOKEN SPIELER 2
|
||||
|
||||
if($technick2['type'] == 'kaioken') {
|
||||
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||
$k_hp[1] = $k_hp[1] - $technick2['hp'];
|
||||
if($k_mp[1] < 0) {
|
||||
$schaden_1 = 'Keinen Schaden';
|
||||
$schaden_2 = 'kaioken fehlgeschlagen';
|
||||
$aktion_AV2[$x] = 'nein';
|
||||
$k_mp[1] = 0;
|
||||
} else {
|
||||
$k_starke[1] = $k_starke[1] + $technick2['starke'];
|
||||
$k_speed[1] = $k_speed[1] + $technick2['speed'];
|
||||
$k_ver[1] = $k_ver[1] + $technick2['verteidigung'];
|
||||
$aktion_AV2[$x] = 'nein';
|
||||
$schaden_1 = 'Keinen Schaden';
|
||||
$schaden_2 = 'kaioken';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,115 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
if ($zufall_pl1 > $play2_ausweich) {
|
||||
if (!$aktion_AV1[$x]) {
|
||||
$alt_hp = $k_hp[1];
|
||||
|
||||
$charsa1_def = $k_ver[1] + $technick2['verteidigung'];
|
||||
$charsa1_4_def = ($k_ver[1] + $technick2['verteidigung']) / 1.1;
|
||||
|
||||
if ($charsa1_def <= 2) {
|
||||
$charsa1_def = 2;
|
||||
}
|
||||
if ($charsa1_4_def < 1) {
|
||||
$charsa1_4_def = 1;
|
||||
}
|
||||
|
||||
$charsa1_def = mt_rand($charsa1_4_def, $charsa1_def);
|
||||
|
||||
$charsa1_str = $k_starke[0] * 1.8 + $technick1['starke'];
|
||||
$charsa1_4_str = ($k_starke[0] * 1.8 + $technick1['starke']) + 1;
|
||||
|
||||
if ($charsa1_str <= 2) {
|
||||
$charsa1_str = 2;
|
||||
}
|
||||
|
||||
if ($charsa1_4_str < 1) {
|
||||
$charsa1_4_str = 1;
|
||||
}
|
||||
|
||||
$charsa1_str = mt_rand($charsa1_4_str, $charsa1_str);
|
||||
|
||||
$k_hp[1] = round(($k_hp[1] + $charsa1_def - $charsa1_str +mt_rand(1, 20)));
|
||||
$schaden_1 = $alt_hp - $k_hp[1];
|
||||
if ($alt_hp < $k_hp[1]) {
|
||||
$k_hp[1] = $alt_hp;
|
||||
$schaden_1 = 0;
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
$schaden_1 = 'Keinen Schaden';
|
||||
}
|
||||
if ($zufall_pl2 > $play1_ausweich) {
|
||||
if (!$aktion_AV2[$x]) {
|
||||
|
||||
$alt_hp = $k_hp[0];
|
||||
|
||||
$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_4_def < 1) {
|
||||
$charsa2_4_def = 1;
|
||||
}
|
||||
|
||||
$charsa2_def = mt_rand($charsa2_4_def, $charsa2_def);
|
||||
$charsa2_str = $k_starke[1] * 1.8 + $technick2['starke'];
|
||||
$charsa2_4_str = ($k_starke[1] * 1.8 + $technick2['starke']) + 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);
|
||||
|
||||
$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 (!$technick1['name']) {
|
||||
$technick1['name'] = 'Normaler Kick';
|
||||
}
|
||||
if (!$technick2['name']) {
|
||||
$technick2['name'] = 'Normaler Kick';
|
||||
}
|
||||
|
||||
if ($k_hp[0] < 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];
|
||||
}
|
||||
if ($k_hp[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];
|
||||
}
|
||||
?>
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
####################KAMPF MP SPIELER 1
|
||||
|
||||
if ($technick1['type'] == 'normal' AND $technick1['mp'] > 0) {
|
||||
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||
|
||||
if ($k_mp[0] < 0) {
|
||||
$k_hp[0] = $k_hp[0] + ($k_mp[0] * 10);
|
||||
$k_mp[0] = 0;
|
||||
}
|
||||
}
|
||||
####################KAMPF MP SPIELER 2
|
||||
|
||||
if ($technick2['type'] == 'normal' AND $technick2['mp'] > 0) {
|
||||
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||
|
||||
if ($k_mp[1] < 0) {
|
||||
$k_hp[1] = $k_hp[1] + ($k_mp[1] * 10);
|
||||
$k_mp[1] = 0;
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
####################KAMPF MPV SPIELER 1
|
||||
|
||||
if ($technick1['type'] == 'mpv') {
|
||||
$k_mp[1] = $k_mp[1] - $technick1['mp'];
|
||||
if ($k_mp[1] < 0) {
|
||||
$k_mp[1] = 0;
|
||||
}
|
||||
$aktion_AV1[$x] = 'nein';
|
||||
}
|
||||
if ($technick2['type'] == 'mpv') {
|
||||
$k_mp[0] = $k_mp[0] - $technick2['mp'];
|
||||
if ($k_mp[0] < 0) {
|
||||
$k_mp[0] = 0;
|
||||
}
|
||||
$aktion_AV2[$x] = 'nein';
|
||||
}
|
||||
?>
|
@ -1,100 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2009 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
|
||||
################### Spieler 1
|
||||
$haloo1 = 95;
|
||||
if ($technick1['type'] == 'tausch') {
|
||||
if ($k_mp[0] >= $technick1['mp']) {
|
||||
if ($haloo1 > mt_rand(1, 100)) {
|
||||
|
||||
$k_starke_alt[0] = $k_starke[0];
|
||||
$k_speed_alt[0] = $k_speed[0];
|
||||
$k_ver_alt[0] = $k_ver[0];
|
||||
$k_ausdauer_alt[0] = $k_ausdauer[0];
|
||||
$k_glueck_alt[0] = $k_glueck[0];
|
||||
$k_hp_alt[0] = $k_hp[0];
|
||||
|
||||
$k_starke_alt[1] = $k_starke[1];
|
||||
$k_speed_alt[1] = $k_speed[1];
|
||||
$k_ver_alt[1] = $k_ver[1];
|
||||
$k_ausdauer_alt[1] = $k_ausdauer[1];
|
||||
$k_glueck_alt[1] = $k_glueck[1];
|
||||
$k_hp_alt[1] = $k_hp[1];
|
||||
|
||||
$k_starke[0] = $k_starke_alt[1];
|
||||
$k_speed[0] = $k_speed_alt[1];
|
||||
$k_ver[0] = $k_ver_alt[1];
|
||||
$k_ausdauer[0] = $k_ausdauer_alt[1];
|
||||
$k_glueck[0] = $k_glueck_alt[1];
|
||||
$k_hp[0] = $k_hp_alt[1];
|
||||
|
||||
$k_starke[1] = $k_starke_alt[0];
|
||||
$k_speed[1] = $k_speed_alt[0];
|
||||
$k_ver[1] = $k_ver_alt[0];
|
||||
$k_ausdauer[1] = $k_ausdauer_alt[0];
|
||||
$k_glueck[1] = $k_glueck_alt[0];
|
||||
$k_hp[1] = $k_hp_alt[0];
|
||||
|
||||
} else {
|
||||
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||
$schaden_2 = 'Keinen Schaden';
|
||||
$schaden_1 = 'Körpertausch';
|
||||
}
|
||||
} else {
|
||||
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
||||
$schaden_2 = 'Keinen Schaden';
|
||||
$schaden_1 = 'Körpertausch fehlgeschlagen';
|
||||
}
|
||||
$aktion_AV1[$x] = 'nein';
|
||||
}
|
||||
|
||||
################### Spieler 2
|
||||
if ($technick2['type'] == 'tausch') {
|
||||
if ($k_mp[1] >= $technick2['mp']) {
|
||||
if ($haloo1 > mt_rand(1, 100)) {
|
||||
|
||||
$k_starke_alt[0] = $k_starke[0];
|
||||
$k_speed_alt[0] = $k_speed[0];
|
||||
$k_ver_alt[0] = $k_ver[0];
|
||||
$k_ausdauer_alt[0] = $k_ausdauer[0];
|
||||
$k_glueck_alt[0] = $k_glueck[0];
|
||||
$k_hp_alt[0] = $k_hp[0];
|
||||
|
||||
$k_starke_alt[1] = $k_starke[1];
|
||||
$k_speed_alt[1] = $k_speed[1];
|
||||
$k_ver_alt[1] = $k_ver[1];
|
||||
$k_ausdauer_alt[1] = $k_ausdauer[1];
|
||||
$k_glueck_alt[1] = $k_glueck[1];
|
||||
$k_hp_alt[1] = $k_hp[1];
|
||||
|
||||
$k_starke[0] = $k_starke_alt[1];
|
||||
$k_speed[0] = $k_speed_alt[1];
|
||||
$k_ver[0] = $k_ver_alt[1];
|
||||
$k_ausdauer[0] = $k_ausdauer_alt[1];
|
||||
$k_glueck[0] = $k_glueck_alt[1];
|
||||
$k_hp[0] = $k_hp_alt[1];
|
||||
|
||||
$k_starke[1] = $k_starke_alt[0];
|
||||
$k_speed[1] = $k_speed_alt[0];
|
||||
$k_ver[1] = $k_ver_alt[0];
|
||||
$k_ausdauer[1] = $k_ausdauer_alt[0];
|
||||
$k_glueck[1] = $k_glueck_alt[0];
|
||||
$k_hp[1] = $k_hp_alt[0];
|
||||
|
||||
} else {
|
||||
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||
$schaden_1 = 'Keinen Schaden';
|
||||
$schaden_2 = 'Körpertausch';
|
||||
}
|
||||
} else {
|
||||
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
||||
$schaden_1 = 'Keinen Schaden';
|
||||
$schaden_2 = 'Körpertausch fehlgeschlagen';
|
||||
}
|
||||
$aktion_AV2[$x] = 'nein';
|
||||
}
|
@ -0,0 +1,208 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* @copyright (c) 2011 animegame.eu
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
||||
*
|
||||
*/
|
||||
include_once(ROOT_PATH.'/include/user.inc.php');
|
||||
include_once(ROOT_PATH.'/include/parse.inc.php');
|
||||
include_once(ROOT_PATH.'/include/clan.inc.php');
|
||||
include_once(ROOT_PATH.'/include/clan_fights.inc.php');
|
||||
|
||||
function doTheClanfightTest($acceptTestCase, $amount) {
|
||||
|
||||
mysql_query('UPDATE user SET clan = null'); // clean all clans
|
||||
|
||||
|
||||
$ids = getClanFightCapableClanIds();
|
||||
$row = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM user WHERE 0 < (SELECT COUNT(*) FROM chars WHERE besitzer = user.id)'));
|
||||
|
||||
if(count($ids) < $row[0] / MIN_MEMBERS) {
|
||||
//echo 'We may optimize the user('.$row[0].')/clan('.count($ids).') ratio<br>';
|
||||
|
||||
mysql_query('UPDATE user SET clan = null'); // clean all clans
|
||||
mysql_query('UPDATE clan SET leader = null, co_leader = null');
|
||||
$sql = 'SELECT id FROM clan ORDER BY ID ASC';
|
||||
$qry = mysql_query($sql);
|
||||
while( $row = mysql_fetch_assoc($qry)) {
|
||||
$sql = 'UPDATE user SET clan = ' .$row['id'] . ' WHERE clan is null AND 0 < (SELECT COUNT(*) FROM chars WHERE besitzer = user.id) LIMIT 5';
|
||||
//echo $sql . '<br>';
|
||||
mysql_query($sql);
|
||||
|
||||
if(mysql_affected_rows() == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$qry = mysql_query('SELECT clan, min(id) as id FROM user WHERE clan is not null GROUP BY clan');
|
||||
while($row = mysql_fetch_assoc($qry)) {
|
||||
$sql = 'UPDATE clan SET leader = '.$row['id'].' WHERE id = '.$row['clan'];
|
||||
//echo $sql . '<br>';
|
||||
mysql_query($sql);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
mysql_query('DELETE FROM clan_challenge_requests');
|
||||
mysql_query('DELETE FROM clan_challenges');
|
||||
mysql_query('DELETE FROM events');
|
||||
mysql_query('DELETE FROM clan_locked');
|
||||
|
||||
|
||||
|
||||
|
||||
$ids = getClanFightCapableClanIds();
|
||||
if(count($ids) < 2) {
|
||||
echo "zu wenig Clans die Clanfights machen können " . count($ids);
|
||||
die();
|
||||
}
|
||||
|
||||
for($i=0;$i<count($ids) - 1;$i+=2) {
|
||||
calculateClanFight(getClan($ids[$i]), getClan($ids[$i+1]), $acceptTestCase);
|
||||
}
|
||||
|
||||
#$clan1 = getClan($ids[0]);
|
||||
#$clan2 = getClan($ids[1]);
|
||||
|
||||
function calculateClanFight($clan1, $clan2, $acceptTestCase) {
|
||||
# echo $clan1['id'] . ' ' . $clan2['id'] . ' ' . ($acceptTestCase?'TRUE':'FALSE') . '<br>';
|
||||
$leaderClan1 = getUser($clan1['leader']);
|
||||
$leaderClan2 = getUser($clan2['leader']);
|
||||
|
||||
$result = challengeClan($leaderClan1, $clan2['id'], $amount);
|
||||
if($result !== NULL) {
|
||||
echo $result.'<br>';
|
||||
}
|
||||
|
||||
if(getOpenChallengeRequestCount($clan1['id']) != 1) {
|
||||
echo 'Fehler: Es sollte mindestens ein Fight offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(getOpenChallengeRequestCount($clan2['id']) != 1) {
|
||||
echo 'Fehler: Es sollte mindestens ein Fight offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(count(getOpenChallengeRequests($clan1['id'])) != 1) {
|
||||
echo 'Fehler: Es sollte mindestens ein Fight offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(count(getOpenChallengeRequests($clan2['id'])) != 1) {
|
||||
echo 'Fehler: Es sollte mindestens ein Fight offen sein!!<br>';
|
||||
}
|
||||
|
||||
$challengeArray = getOpenChallengeRequests($clan2['id']);
|
||||
|
||||
if($acceptTestCase) {
|
||||
|
||||
$result = acceptChallengeRequest($challengeArray[0]['clan_requester'], $leaderClan2);
|
||||
|
||||
if($result !== NULL) {
|
||||
echo $result.'<br>';
|
||||
}
|
||||
|
||||
if(getOpenChallengeRequestCount($clan1['id']) > 0) {
|
||||
echo 'Fehler in getOpenChallengeRequestCount: Es sollte kein Fight-Request offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(getOpenChallengeRequestCount($clan2['id']) > 0) {
|
||||
echo 'Fehler in getOpenChallengeRequestCount: Es sollte kein Fight-Request offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(count(getOpenChallengeRequests($clan1['id'])) > 0) {
|
||||
echo 'Fehler in getOpenChallengeRequests ('.$clan1['id'].'): Es sollte kein Fight-Request offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(count(getOpenChallengeRequests($clan2['id'])) > 0) {
|
||||
echo 'Fehler in getOpenChallengeRequests ('.$clan2['id'].'): Es sollte kein Fight-Request offen sein!!<br>';
|
||||
}
|
||||
|
||||
|
||||
if(count(getOpenChallengeIDs($clan1['id'])) != 1) {
|
||||
echo 'Fehler: Es sollte mindestens ein Fight offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(count(getOpenChallengeIDs($clan2['id'])) != 1) {
|
||||
echo 'Fehler: Es sollte mindestens ein Fight offen sein!!<br>';
|
||||
}
|
||||
|
||||
$challengeIDsArray = getOpenChallengeIDs($clan1['id']);
|
||||
$clan_challenge_id = $challengeIDsArray[0];
|
||||
if(count(getParticipatingClanIDs($clan_challenge_id)) != 2) {
|
||||
echo 'Fehler in getParticipatingClanIDs: Es sollten 2 Clans teilnehmen!<br>';
|
||||
}
|
||||
|
||||
// Okay now let the chars participate
|
||||
|
||||
$chars1 = getCharsOfUser($leaderClan1['id']);
|
||||
$chars2 = getCharsOfUser($leaderClan2['id']);
|
||||
|
||||
$found = -1;
|
||||
|
||||
for($i=0;$i<count($chars1);$i++) {
|
||||
if($chars1[$i]['status'] == 'Frei') {
|
||||
$found = $i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($found == -1) {
|
||||
echo 'Konnte keinen freien Char fuer User ' .$leaderClan1 . ' finden<br>';
|
||||
}
|
||||
|
||||
|
||||
$result = joinChallenge($clan_challenge_id, $leaderClan1, $chars1[$found]['id'], 1);
|
||||
if($result !== NULL) {
|
||||
echo $result .'<br>';
|
||||
}
|
||||
|
||||
$found = -1;
|
||||
|
||||
for($i=0;$i<count($chars2);$i++) {
|
||||
if($chars2[$i]['status'] == 'Frei') {
|
||||
$found = $i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($found == -1) {
|
||||
echo 'Konnte keinen freien Char fuer User ' .$leaderClan2 . ' finden<br>';
|
||||
}
|
||||
|
||||
$result = joinChallenge($clan_challenge_id, $leaderClan2, $chars2[$found]['id'], 1);
|
||||
if($result !== NULL) {
|
||||
echo $result .'<br>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$result = denyChallengeRequest($challengeArray[0]['clan_requester'], $leaderClan2);
|
||||
|
||||
if($result !== NULL) {
|
||||
echo $result .'<br>';
|
||||
}
|
||||
|
||||
if(getOpenChallengeRequestCount($clan1['id']) > 0) {
|
||||
echo 'Fehler in getOpenChallengeRequestCount: Es sollte kein Fight-Request offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(getOpenChallengeRequestCount($clan2['id']) > 0) {
|
||||
echo 'Fehler in getOpenChallengeRequestCount: Es sollte kein Fight-Request offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(count(getOpenChallengeRequests($clan1['id'])) > 0) {
|
||||
echo 'Fehler in getOpenChallengeRequests ('.$clan1['id'].'): Es sollte kein Fight-Request offen sein!!<br>';
|
||||
}
|
||||
|
||||
if(count(getOpenChallengeRequests($clan2['id'])) > 0) {
|
||||
echo 'Fehler in getOpenChallengeRequests ('.$clan2['id'].'): Es sollte kein Fight-Request offen sein!!<br>';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
Loading…
Reference in new issue