if (ereg('(AtkA)+', $Op_Spec) && $Spec_AtkA_R2 >= 50) { $Op_Attacking += 20; $Spec_Event_Tag .= "<Br>對手進入了興奮狀態!"; } //SEED Mode if ($Pl_Gen['hypermode'] == 1 || $Pl_Gen['hypermode'] == 5) { $Pl_Attacking = floor($Pl_Attacking + 20); } if ($Op_Gen['hypermode'] == 1 || $Op_Gen['hypermode'] == 5) { $Op_Attacking = floor($Op_Attacking + 20); } //Calculate Hit Times and Damage Values $Pl_Calc = ReturnHitDam($Pl_SyWepA['atk'], $Pl_SyWepA['rd'], $Pl_SyWepA['hit'], $Pl_Tar, $Pl_Hit, $Op_Miss, $Pl_Attacking, $Op_Def, $Pl_Spec, $Op_Spec); $StrikeRds = $Pl_Calc[0]; $Pl_Dealt = $Pl_Calc[1]; $Op_Calc = ReturnHitDam($Op_SyWepA['atk'], $Op_SyWepA['rd'], $Op_SyWepA['hit'], $Op_Tar, $Op_Hit, $Pl_Miss, $Op_Attacking, $Pl_Def, $Op_Spec, $Pl_Spec); $CStrikeRds = $Op_Calc[0]; $Op_Dealt = $Op_Calc[1]; if ($Op_Game['en'] - $Op_SyWepA['enc'] < 0) { $Op_Dealt = 0; $OpNoENFlag = 1; } //Calculate Left HP and EN //Spec - Reflect if (!$OpNoENFlag) { if (ereg('(MirrorDam)+', $Pl_Spec) && mt_rand(0, 100) >= 95 + $Op_Tar * 0.7) { $Pl_Dealt = $Op_Dealt; $Op_Dealt = 0; $Spec_Event_Tag .= "<br>你完全反彈了對方的攻擊!"; } elseif (ereg('(MirrorDam)+', $Pl_Spec) && mt_rand(0, 100) >= 80 + $Op_Tar * 0.7) { $Pl_Dealt = floor($Op_Dealt * 0.8);
$Pl->SetSpec->battlephase(); } if ($Op->SetSpecID) { $Op->SetSpec->battlephase(); } //Calculate Hit Times and Damage Values unset($Calc, $Dealt, $Strike); if (!$CS_Flag['Op']) { $Calc['Pl'] = ReturnHitDam($Pl->Eq['A']['atk'], $Pl->Eq['A']['rd'], $Pl->Eq['A']['hit'], $Pl->MS['atf'], $Op->MS['def'], $Op->MS['ref'], $Pl->MS['taf'], $Pl->Player['attacking'], $Op->Player['defending'], $Op->Player['reacting'], $Pl->Player['targeting'], $Pl->Specs, $Op->Specs, $Pl->Eq['A']['range'], $Op->Eq['A']['range'], $Pl->Eq['A']['attrb'], $Op->Eq['A']['attrb']); $Dealt['Pl'] = $Calc['Pl'][0]; $Strike['Pl'] = $Calc['Pl'][1]; } else { $Dealt['Pl'][0] = $Strike['Pl'][0] = 0; } if ($Op->Player['en'] - $Op->RequireEN > 0 && !$CS_Flag['Pl']) { $Calc['Op'] = ReturnHitDam($Op->Eq['A']['atk'], $Op->Eq['A']['rd'], $Op->Eq['A']['hit'], $Op->MS['atf'], $Pl->MS['def'], $Pl->MS['ref'], $Op->MS['taf'], $Op->Player['attacking'], $Pl->Player['defending'], $Pl->Player['reacting'], $Op->Player['targeting'], $Op->Specs, $Pl->Specs, $Op->Eq['A']['range'], $Pl->Eq['A']['range'], $Op->Eq['A']['attrb'], $Pl->Eq['A']['attrb']); $Dealt['Op'] = $Calc['Op'][0]; $Strike['Op'] = $Calc['Op'][1]; } else { $OpNoENFlag = 1; $Dealt['Op'][0] = $Strike['Op'][0] = 0; } //Total Damages $Damage['Pl'] = array_sum($Dealt['Pl']); $Damage['Op'] = array_sum($Dealt['Op']); $Strikes['Pl'] = array_sum($Strike['Pl']); $Strikes['Op'] = array_sum($Strike['Op']); //Spec - First Strike // $FirstStrikeFlag['Pl'] = analyzeFirstStrike($Pl->Specs, $Pl->Eq['A']['range'], $Op->Eq['A']['range']); // $FirstStrikeFlag['Op'] = analyzeFirstStrike($Op->Specs, $Op->Eq['A']['range'], $Pl->Eq['A']['range']); $FirstStrikeFlag['Pl'] = analyzeFirstStrike($Pl->Specs, $Pl->Eq, $Op->Eq);