} elseif ($mode == 'repairms' && $actionb == 'reppro') { $War_State = checkWartime($Gen['coordinates']); if (($actionc == 'hprec' || $actionc == 'enrec') && $War_State) { echo "國戰進行中, 無法進行修理!"; postFooter(); exit; } $AreaORG_Prepare = "SELECT `occupied` FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_map` WHERE `map_id` = '{$Gen['coordinates']}'"; $AreaORG_Q = mysql_query($AreaORG_Prepare) or die(mysql_error()); $AreaORG = mysql_fetch_array($AreaORG_Q); if ($Game['organization'] == $AreaORG['occupied']) { $RepairHPCost = ceil($RepairHPCost * 0.5); $RepairENCost = ceil($RepairENCost * 0.5); } $plr = array("name" => $Pl_Value['USERNAME'], "hp" => $Game['hp'], "hpmax" => $Game['hpmax'], "en" => $Game['en'], "enmax" => $Game['enmax'], "sp" => $Game['sp'], "spmax" => $Game['spmax'], "status" => $Game['status'], "msuit" => $Gen['msuit'], "time1" => $Gen['time1'], "hypermode" => $Gen['hypermode'], "eqwep" => $Game['eqwep'], "p_equip" => $Game['p_equip']); $Pl_Repaired = RepairPlayer($plr, 0, 0, 1); $Game['hp'] = $Pl_Repaired['hp']; $Game['en'] = $Pl_Repaired['en']; $Game['sp'] = $Pl_Repaired['sp']; $Game['status'] = $Pl_Repaired['status']; $Gen['time1'] = $Pl_Repaired['time1']; $RepairAmt = 0; $PriceRepair = 0; if ($actionc == 'hprec' && $Game['hpmax'] != $Game['hp']) { if ($hp_rep_type == 'pc') { if ($hp_rep_pc_amount > 1.0 || $hp_rep_pc_amount <= 0) { echo "回復量出錯"; postFooter(); exit; } $RepairAmt = floor(($Game['hpmax'] - $Game['hp']) * $hp_rep_pc_amount);
echo "連線逾時!<br>請重新登入!"; exit; } mt_srand((double) microtime() * 1000000); include 'includes/sfo.class.php'; include 'includes/obattle.ext.php'; $Pl = new oBattle(); $Pl->SetUser($Pl_Value['USERNAME']); $Pl->FetchPlayer(true, true); if ($CFU_Time - $Pl->Player['btltime'] < $Btl_Intv) { echo "距離上次攻擊或移動的時間太短了!<br>請在 " . ($Btl_Intv - ($CFU_Time - $Pl->Player['btltime'])) . " 秒後再進行攻擊!"; exit; } if ($Pl->Player['msuit']) { $Pl->ProcessAllWeapon(); $Pl_Repaired = RepairPlayer($Pl->Player, $Pl->Eq['D'], $Pl->Eq['E']); $Pl->Player['hp'] = $Pl_Repaired['hp']; $Pl->Player['en'] = $Pl_Repaired['en']; $Pl->Player['sp'] = $Pl_Repaired['sp']; $Pl->Player['status'] = $Pl_Repaired['status']; $t_now = $Pl->Player['time1'] = $Pl_Repaired['time1']; if ($Pl->Player['status']) { echo "修理中,無法出擊。"; postFooter(); exit; } } else { echo "<center>你沒有機體,不能出擊。"; postFooter(); exit; }
// To be set in CFU // Process Character Information // Using Phase Structure // // Prephase I // //Get User MS Stats if ($Player['msuit'] == "nil") { $Player['msuit'] = '0'; } $Pl->ProcessMS(true); $Ms =& $Pl->MS; if ($Player['msuit']) { // Repair and Update $RepUpdateFlag = $CFU_Time - $Player['time1'] >= 5; $Pl_Repaired = RepairPlayer($Pl->Player, $Pl->Eq['D'], $Pl->Eq['E'], 0, 0, $RepUpdateFlag); $Pl->Player['hp'] = $Pl_Repaired['hp']; $Pl->Player['en'] = $Pl_Repaired['en']; $Pl->Player['sp'] = $Pl_Repaired['sp']; $Pl->Player['status'] = $Pl_Repaired['status']; $Pl->Player['time1'] = $Pl_Repaired['time1']; } // Initialize Player Details $Pl->iniFixes(true); $Pl->analyzeHypermodeState(); $Pl->ProcessAllWeapon(); // // Prephase II // // Set Spec Sub-System: Check Requirements $Pl->checkSetSpec();
$Pl->iniFixes(); $Op->iniFixes(); // Analyze Hypermode State $Pl->analyzeHypermodeState(); // Grant DefX to Enhanced Hypermode $Pl->analyzeEnhHM(); // Process MS $Pl->ProcessMS(); if ($AtkFortFlag != 1) { $Op->ProcessMS(); } else { $Op->MS = array('id' => 'Fortress', 'msname' => $Pl->Player['coordinates'] . '區域要塞', 'atf' => $Area_At, 'def' => $Area_De, 'ref' => 0, 'taf' => $Area_Ta, 'hpfix' => 0, 'enfix' => 0, 'needlv' => 200000, 'price' => 0, 'spec' => 'AntiDam', 'image' => 'fortress.gif'); } // Repair Opponent if (!$isAtkFortName) { $Op_Repaired = RepairPlayer($Op->Player, $Op->Eq['D'], $Op->Eq['E']); $Op->Player['hp'] = $Op_Repaired['hp']; $Op->Player['en'] = $Op_Repaired['en']; $Op->Player['sp'] = $Op_Repaired['sp']; $Op->Player['status'] = $Op_Repaired['status']; } // Process Opponent Weapon Data $Op->ProcessAllWeapon(); // Apply Condition Bonus & Penalty $Pl->apply_condition_bonus(); $Op->apply_condition_bonus(); // Calculate Extra SP Cost - Player $Pl->calc_extra_sp_cost(); $Op->calc_extra_sp_cost(0.5); // Calculate Required EN, Including tactics' special effect $Pl->calc_required_en();
$cOpponent = $cDefenders = 0; $LastOrg_ID = false; $OnConfirm = ''; unset($Op_Org); //Part 3: Display Column Contents - Start include 'includes/btl-filter/btl-fp3-' . $btlFilter . '.php'; //Part 3: Display Column Contents - End $Op_Rank = ''; for ($counter = 1; $counter <= $numofoppos; $counter++) { $LastOrg_ID = isset($Op_Info['organization']) ? $Op_Info['organization'] : false; unset($Op_RightsTitle); $isEnemyFlag = 0; $Op_Info = mysql_fetch_array($Query); $opr = array("name" => $Op_Info['name'], "hp" => $Op_Info['hp'], "hpmax" => $Op_Info['hpmax'], "hprec" => $Op_Info['hprec'], "en" => $Op_Info['en'], "enmax" => $Op_Info['enmax'], "enrec" => $Op_Info['enrec'], "sp" => $Op_Info['sp'], "spmax" => $Op_Info['spmax'], "status" => $Op_Info['status'], "time1" => $Op_Info['time1'], "hypermode" => $Op_Info['hypermode'], "eqwep" => $Op_Info['eqwep'], "p_equip" => $Op_Info['p_equip']); $opr_ms = array("enrec" => $Op_Info['enrec'], "hprec" => $Op_Info['hprec']); $Op_Repaired = RepairPlayer($opr, 0, 0, 1, $opr_ms, 1); $Op_Info['hp'] = $Op_Repaired['hp']; $Op_Info['status'] = $Op_Repaired['status']; if ($Op_Info['status']) { unset($Op_Info); } else { if ($Op_Info['organization'] != $LastOrg_ID || $LastOrg_ID === false || empty($Op_Org)) { $Op_Org = ReturnOrg($Op_Info['organization']); } $Op_RightsTitle = ''; $Op_Rank = ' ' . rankConvert($Op_Info['rank']); if ($Op_Info['rights'] == '1') { $Op_RightsTitle = "<font style=\"color: yellow;font-weight: Bold;\"> " . $RightsClass['Major'] . "</font>"; } elseif ($Op_Info['rights']) { $Op_RightsTitle = "<font style=\"color: yellow;font-weight: Bold;\"> " . $RightsClass['Leader'] . "</font>"; }