|
|
@ -43,7 +43,7 @@ $random = mt_rand(0,100);
|
|
|
|
if ($technick1['type'] == 'tausch') {
|
|
|
|
if ($technick1['type'] == 'tausch') {
|
|
|
|
if ($k_mp[0] >= $technick1['mp']) {
|
|
|
|
if ($k_mp[0] >= $technick1['mp']) {
|
|
|
|
if($random <= $chance) { //Trefferchance abhängig vom ausgewürfeltem Glück
|
|
|
|
if($random <= $chance) { //Trefferchance abhängig vom ausgewürfeltem Glück
|
|
|
|
if ($kampf_info['rasse'] != "NPC") { ///BEI NPCS WIRD KOERPER TAUSCH GEBLOCKT
|
|
|
|
if ($kampf_info['rasse'] != 'NPC') { ///BEI NPCS WIRD KOERPER TAUSCH GEBLOCKT
|
|
|
|
$k_starke_alt[0] = $k_starke[0];
|
|
|
|
$k_starke_alt[0] = $k_starke[0];
|
|
|
|
$k_speed_alt[0] = $k_speed[0];
|
|
|
|
$k_speed_alt[0] = $k_speed[0];
|
|
|
|
$k_ver_alt[0] = $k_ver[0];
|
|
|
|
$k_ver_alt[0] = $k_ver[0];
|
|
|
@ -69,21 +69,21 @@ if ($technick1['type'] == 'tausch') {
|
|
|
|
$k_hp[1] = $k_hp_alt[0];
|
|
|
|
$k_hp[1] = $k_hp_alt[0];
|
|
|
|
|
|
|
|
|
|
|
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
|
|
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
|
|
|
$schaden_1 = "Chance: ".$chance."%<br>Körpertausch";
|
|
|
|
$schaden_1 = 'Chance: '.$chance.'%<br>Körpertausch';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
|
|
|
$k_mp[0] = $k_mp[0] - $technick1['mp'];
|
|
|
|
$schaden_1 = "Chance: ".$chance."%<br>Körpertausch fehlgeschlagen";
|
|
|
|
$schaden_1 = 'Chance: '.$chance.'%<br>Körpertausch fehlgeschlagen';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($k_mp[0] < 0) {
|
|
|
|
if ($k_mp[0] < 0) {
|
|
|
|
$k_mp[0] = 0;
|
|
|
|
$k_mp[0] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$schaden_1 = "Körpertausch fehlgeschlagen";
|
|
|
|
$schaden_1 = 'Körpertausch fehlgeschlagen';
|
|
|
|
$k_mp[0] = 0;
|
|
|
|
$k_mp[0] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$aktion_AV1[$x] = "nein";
|
|
|
|
$aktion_AV1[$x] = 'nein';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
################### Spieler 2
|
|
|
|
################### Spieler 2
|
|
|
@ -95,7 +95,7 @@ $random = mt_rand(0,100);
|
|
|
|
if ($technick2['type'] == 'tausch') {
|
|
|
|
if ($technick2['type'] == 'tausch') {
|
|
|
|
if ($k_mp[1] >= $technick2['mp']) {
|
|
|
|
if ($k_mp[1] >= $technick2['mp']) {
|
|
|
|
if($random <= $chance) { //Trefferchance abhängig vom ausgewürfeltem Glück
|
|
|
|
if($random <= $chance) { //Trefferchance abhängig vom ausgewürfeltem Glück
|
|
|
|
if ($kampf_info['rasse'] != "NPC") {
|
|
|
|
if ($kampf_info['rasse'] != 'NPC') {
|
|
|
|
$k_starke_alt[0] = $k_starke[0];
|
|
|
|
$k_starke_alt[0] = $k_starke[0];
|
|
|
|
$k_speed_alt[0] = $k_speed[0];
|
|
|
|
$k_speed_alt[0] = $k_speed[0];
|
|
|
|
$k_ver_alt[0] = $k_ver[0];
|
|
|
|
$k_ver_alt[0] = $k_ver[0];
|
|
|
@ -121,21 +121,21 @@ if ($technick2['type'] == 'tausch') {
|
|
|
|
$k_hp[1] = $k_hp_alt[0];
|
|
|
|
$k_hp[1] = $k_hp_alt[0];
|
|
|
|
|
|
|
|
|
|
|
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
|
|
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
|
|
|
$schaden_2 = "Chance: ".$chance."%<br>Körpertausch";
|
|
|
|
$schaden_2 = 'Chance: '.$chance.'%<br>Körpertausch';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
|
|
|
$k_mp[1] = $k_mp[1] - $technick2['mp'];
|
|
|
|
$schaden_2 = "Chance: ".$chance."%<br>Körpertausch fehlgeschlagen";
|
|
|
|
$schaden_2 = 'Chance: '.$chance.'%<br>Körpertausch fehlgeschlagen';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($k_mp[1] < 0) {
|
|
|
|
if ($k_mp[1] < 0) {
|
|
|
|
$k_mp[1] = 0;
|
|
|
|
$k_mp[1] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$schaden_2 = "Körpertausch fehlgeschlagen";
|
|
|
|
$schaden_2 = 'Körpertausch fehlgeschlagen';
|
|
|
|
$k_mp[1] = 0;
|
|
|
|
$k_mp[1] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$aktion_AV2[$x] = "nein";
|
|
|
|
$aktion_AV2[$x] = 'nein';
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|