function calculate_ex_attack_dmg(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } if (check_ex_dmg_nullify($pa, $pd, $active)) { return $pa['ex_dmg_dealt']; } else { return $chprocess($pa, $pd, $active); } }
function calculate_physical_dmg(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } if ($pa['bskill'] != 26) { return $chprocess($pa, $pd, $active); } eval(import_module('logger', 'itemmain')); $attack_type = 'u'; if (\skillbase\skill_getvalue(26, 'lvl', $pa) == 2) { $attack_type = 'f'; } //2级时是灼焰 $log .= '在技能的作用下,伤害全部转化为了<span class="red">' . $itemspkinfo[$attack_type] . '</span>伤害!<br>'; //连击和灵系体力是唯一需要考虑的特殊“物理伤害加成” //(因为这不是加成,只是被做到加成里去了……) $r = \wep_f\get_WF_dmg_multiplier($pa, $pd, $active); $r = array_merge($r, \ex_rapid_attr\get_rapid_dmg_multiplier($pa, $pd, $active)); //判断属抹 $flag = check_ex_dmg_nullify($pa, $pd, $active); $pa['skill26_flag1'] = 2; //跳过之后的属抹判断 $pa['skill26_flag2'] = 2; //攻击属性判断开始正常返回 if ($flag) { $log .= "<span class=\"red\">属性攻击的力量完全被防具吸收了!</span>只造成了<span class=\"red\">" . round($zdmg) . "</span>点伤害!<br>"; $pa['physical_dmg_dealt'] += $pa['ex_dmg_dealt']; $pa['dmg_dealt'] += $pa['ex_dmg_dealt']; $pa['ex_dmg_dealt'] = 0; return; } $multiple = \ex_dmg_att\calculate_ex_single_dmg_multiple($pa, $pd, $active, $attack_type); $dmg = \weapon\get_physical_dmg($pa, $pd, $active); $dmg *= $multiple; $dmg = round($dmg); if ($dmg < 1) { $dmg = 1; } eval(import_module('ex_dmg_att')); $fin_dmg = $dmg; $mult_words = ''; foreach ($r as $key) { $fin_dmg = $fin_dmg * $key; $mult_words .= "×{$key}"; } $fin_dmg = round($fin_dmg); if ($fin_dmg < 1) { $fin_dmg = 1; } if ($mult_words == '') { $log .= "武器攻击造成了<span class=\"red\">{$dmg}</span>点" . $itemspkinfo[$attack_type] . "伤害!<br>"; } else { $tdmg = round($dmg * $zdmg); $log .= "武器攻击造成了{$dmg}{$mult_words}=<span class=\"red\">{$fin_dmg}</span>点" . $itemspkinfo[$attack_type] . "伤害!<br>"; $dmg = $tdmg; } $pa['physical_dmg_dealt'] += $fin_dmg; $pa['dmg_dealt'] += $fin_dmg; }