function check_skill400_proc(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('skill400', 'player', 'logger')); if (!\skillbase\skill_query(400, $pa) || !check_unlocked400($pa)) { return array(); } $l400 = \skillbase\skill_getvalue(400, 'lvl', $pa); if (rand(0, 99) < $procrate[$l400]) { if ($active) { if ($l400 >= 5) { $log .= "<span class=\"yellow\">你朝{$pd['name']}打出了猛烈的一击!</span><br>"; } else { $log .= "<span class=\"yellow\">你朝{$pd['name']}打出了重击!</span><br>"; } } else { if ($l400 == 5) { $log .= "<span class=\"yellow\">{$pa['name']}朝你打出了猛烈的一击!</span><br>"; } else { $log .= "<span class=\"yellow\">{$pa['name']}朝你打出了重击!</span><br>"; } } $dmggain = (100 + $attgain[$l400]) / 100; return array($dmggain); } return array(); }
function check_skill35_proc(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('skill35', 'player', 'logger')); if (!\skillbase\skill_query(35, $pa) || !check_unlocked35($pa)) { return array(); } if ($pa['wepk'] != 'WP') { return array(); } if (rand(0, 99) < calculate_skill35_proc_rate($pa, $pd, $active)) { if ($active) { $log .= "<span class=\"yellow\">你朝着{$pd['name']}打出了凶猛的一击!<span class=\"clan\">敌人被打晕了过去!</span></span><br>"; } else { $log .= "<span class=\"yellow\">{$pa['name']}朝你打出了凶猛的一击!<span class=\"clan\">你被打晕了过去!</span></span><br>"; } $clv = (int) \skillbase\skill_getvalue(35, 'lvl', $pa); $dmggain = (100 + $attgain[$clv]) / 100; \skill602\set_stun_period($sk35_stuntime[$clv] * 1000, $pd); \skill602\send_stun_battle_news($pa['name'], $pd['name']); return array($dmggain); } return array(); }
function bufficons_list() { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys', 'player')); \player\update_sdata(); if (\skillbase\skill_query(456, $sdata) && check_unlocked456($sdata)) { eval(import_module('skill456')); $skill456_time = $now - $starttime; $z = array('disappear' => 0); if ($skill456_time < $skill456_act_time) { $z['clickable'] = 1; $z['style'] = 1; $z['totsec'] = $skill456_act_time; $z['nowsec'] = $skill456_time; $skill456_rm = $skill456_act_time - $skill456_time; $z['hint'] = "技能「突击」"; } else { $z['clickable'] = 0; $z['style'] = 3; $z['activate_hint'] = "技能「突击」生效时间已经结束"; } \bufficons\bufficon_show('img/skill456.gif', $z); } $chprocess(); }
function check_ex_dmg_nullify(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('ex_dmg_att', 'logger')); $ex_att_array = \attrbase\get_ex_attack_array($pa, $pd, $active); $ex_def_array = \attrbase\get_ex_def_array($pa, $pd, $active); //有属性攻击才进入判断 $flag = 0; $exnum = 0; foreach ($ex_attack_list as $key) { if (in_array($key, $ex_att_array)) { $flag = 1; $exnum++; } } if ($flag && in_array('b', $ex_def_array)) { $proc_rate = get_ex_dmg_nullify_proc_rate($pa, $pd, $active); $dice = rand(0, 99); if ($dice < $proc_rate) { $log .= "<span class=\"red\">属性攻击的力量完全被防具吸收了!</span>只造成了<span class=\"red\">{$exnum}</span>点伤害!<br>"; $pa['ex_dmg_dealt'] = $exnum; $pd['exdmg_nullify_success'] = 1; return 1; } else { $log .= "纳尼?防具使属性攻击无效化的属性竟然失效了!<br>"; return 0; } } return 0; }
function itemuse(&$theitem) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys', 'player', 'itemmain', 'logger')); $itm =& $theitem['itm']; $itmk =& $theitem['itmk']; $itme =& $theitem['itme']; $itms =& $theitem['itms']; $itmsk =& $theitem['itmsk']; if (strpos($itmk, 'A') === 0) { $eqp = 'art'; $noeqp = ''; if ($noeqp && strpos(${$eqp . 'k'}, $noeqp) === 0 || !${$eqp . 's'}) { ${$eqp} = $itm; ${$eqp . 'k'} = $itmk; ${$eqp . 'e'} = $itme; ${$eqp . 's'} = $itms; ${$eqp . 'sk'} = $itmsk; $log .= "装备了<span class=\"yellow\">{$itm}</span>。<br>"; $itm = $itmk = $itmsk = ''; $itme = $itms = 0; } else { swap(${$eqp}, $itm); swap(${$eqp . 'k'}, $itmk); swap(${$eqp . 'e'}, $itme); swap(${$eqp . 's'}, $itms); swap(${$eqp . 'sk'}, $itmsk); $log .= "卸下了<span class=\"red\">{$itm}</span>,装备了<span class=\"yellow\">{${$eqp}}</span>。<br>"; } return; } $chprocess($theitem); }
function strike_finish(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } if (\skillbase\skill_query(263, $pd) && check_unlocked263($pd)) { if (\skillbase\skill_query(261, $pd)) { $t = (int) \skillbase\skill_getvalue(261, 'lastuse', $pd); if ($t > 0) { $chance = 35; } else { $chance = 20; } } else { $chance = 20; } if ($pd['club'] != 19) { $chance = 10; } if (rand(0, 99) < $chance) { eval(import_module('logger')); $dmgred = min($pd['wp'], 800); if ($active) { $log .= '<span class="yellow">敌人精湛的格斗技术抵挡了' . $dmgred . '点伤害!</span><br>'; } else { $log .= '<span class="yellow">你精湛的格斗技术抵挡了' . $dmgred . '点伤害!</span><br>'; } $pa['dmg_dealt'] -= $dmgred; if ($pa['dmg_dealt'] < 1) { $pa['dmg_dealt'] = 1; } } } return $chprocess($pa, $pd, $active); }
function itemuse(&$theitem) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys', 'player', 'itemmain', 'logger')); $itm =& $theitem['itm']; $itmk =& $theitem['itmk']; $itme =& $theitem['itme']; $itms =& $theitem['itms']; $itmsk =& $theitem['itmsk']; if (strpos($itmk, 'Y') === 0 || strpos($itmk, 'Z') === 0) { if ($itm == '消音器') { if (strpos($wepk, 'WG') !== 0) { $log .= '你没有装备枪械,不能使用消音器。<br>'; } elseif (strpos($wepsk, 'S') === false) { $wepsk .= 'S'; $log .= "你给<span class=\"yellow\">{$wep}</span>安装了<span class=\"yellow\">{$itm}</span>。<br>"; \itemmain\itms_reduce($theitem); } else { $log .= "你的武器已经安装了消音器。<br>"; } return; } } $chprocess($theitem); }
function finalize310(&$pa, $data) { if (eval(__MAGIC__)) { return $___RET_VALUE; } if ($data == '') { $x = 0; } else { $x = base64_decode_number($data); } $ox = $x; $x += \skillbase\skill_getvalue(310, 'cnt', $pa); $x = min($x, (1 << 30) - 1); if ($ox < 100 && $x >= 100) { \cardbase\get_qiegao(100, $pa); } eval(import_module('cardbase')); $arr = $cardindex['A']; $c = count($arr) - 1; $cr = $arr[rand(0, $c)]; if ($ox < 2500 && $x >= 2500) { \cardbase\get_qiegao(400, $pa); \cardbase\get_card($cr, $pa); } $cr = $arr[rand(0, $c)]; if ($ox < 10000 && $x >= 10000) { \cardbase\get_qiegao(1500, $pa); \cardbase\get_card($cr, $pa); } return base64_encode_number($x, 5); }
function get_physical_dmg_multiplier(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } $r = array(); if (\skillbase\skill_query(262, $pa) && check_unlocked262($pa) && $pa['user_commanded'] == 1 && $active && !$pa['is_counter'] && (!isset($pa['sk262flag']) || !$pa['sk262flag'])) { eval(import_module('logger')); $ct = floor(getmicrotime() * 1000); $st = (int) \skillbase\skill_getvalue(262, 'ct', $pa); $t = $ct - $st; //$log.='t='.$t; $pretime = skill262_get_pretime($pa); $dmgperc = skill262_get_dmgperc($pa); $maxdmgperc = skill262_get_maxdmgperc($pa); //$log.=' pretime='.$pretime.' dmgperc='.$dmgperc.' maxdmgperc='.$maxdmgperc; if ($t < $pretime) { $z = 0; } else { $z = ($t - $pretime) / 1000 * $dmgperc; $z = min($z, $maxdmgperc); $z = round($z); $log .= '<span class="lime">你积蓄力量打出了致命的一拳!伤害增加了' . $z . '%!</span><br>'; } $r = array(1 + $z / 100); } return array_merge($r, $chprocess($pa, $pd, $active)); }
function upgrade12() { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('player', 'logger')); if (!\skillbase\skill_query(12)) { $log .= '你没有这个技能!<br>'; return; } if ($skillpoint < 1) { $log .= '技能点不足。<br>'; return; } eval(import_module('wound')); $flag = false; $log .= "消耗了<span class='lime'>1</span>点技能点,<br>"; for ($i = 0; $i < strlen($inf); $i++) { $log .= "{$infname[$inf[$i]]}状态解除了。<br>"; $flag = true; } $inf = ''; if (!$flag) { $log .= '但是什么也没发生。<br>'; } $skillpoint--; $inf = ''; }
function upgrade227() { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('player', 'logger', 'input')); $skillpara1 = (int) $skillpara1; if (!\skillbase\skill_query(227) || !check_unlocked227($sdata)) { $log .= '你没有这个技能。<br>'; return; } if (!\sklearn_util\sklearn_basecheck($skillpara1) || !sklearn_checker227('is_learnable', $skillpara1)) { $log .= '你不可以学习这个技能!<br>'; return; } if (!sklearn_checker227('now_learnable', $skillpara1)) { $log .= '现在尚没有足够资源学习这个技能!<br>'; return; } if (\skillbase\skill_query($skillpara1)) { $log .= '你已经拥有这个技能了!<br>'; return; } if ((int) \skillbase\skill_getvalue(227, 'l') != 0) { $log .= '你已经学习过一个技能了!<br>'; return; } \skillbase\skill_setvalue(227, 'l', $skillpara1); \skillbase\skill_acquire($skillpara1); $log .= '学习成功。<br>'; }
public static function findTemplateLoader($loader) { if (is_array($loader)) { $loader = $loader[0]; $args = py_slice($loader, 1); } else { $args = array(); } if (is_string($loader)) { $expl_ = explode('.', $loader); $module = join('.', py_slice($expl_, 0, -1)); $attr = $expl_[count($expl_) - 1]; try { $mod = import_module($module); } catch (ImportError $e) { throw new ImproperlyConfigured('Error importing template source loader ' . $loader . ': "' . $e . '"'); } if (!$mod instanceof BaseLoader) { throw new ImproperlyConfigured('Error importing template source loader ' . $loader . ': module doesn\'t return a BaseLoader descendant object.'); } $TemplateLoader = $mod; if (isset($TemplateLoader->load_template_source)) { $func = new $TemplateLoader($args); } else { // Try loading module the old way - string is full path to callable if ($args) { throw new ImproperlyConfigured('Error importing template source loader ' . $loader . ' - can\'t pass arguments to function-based loader.'); } $func = $TemplateLoader; } return $func; } else { throw new ImproperlyConfigured('Loader does not define a "load_template" callable template source loader'); } }
function check_itmsk($nm, &$pa = NULL) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('player', 'logger')); if ($pa == NULL) { foreach ($battle_equip_list as $itm) { foreach (\itemmain\get_itmsk_array(${$itm . 'sk'}) as $key) { if ($key == $nm) { return 1; } } } return 0; } else { foreach ($battle_equip_list as $itm) { foreach (\itemmain\get_itmsk_array($pa[$itm . 'sk']) as $key) { if ($key == $nm) { return 1; } } } return 0; } }
function show_achievements() { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys')); $res = $db->query("SELECT n_achievements FROM {$gtablepre}users WHERE username='******'"); if (!$db->num_rows($res)) { return; } $zz = $db->fetch_array($res); $ach = $zz['n_achievements']; $achdata = explode(';', $ach); for ($key = 1; $key <= 1000; $key++) { if (defined('MOD_SKILL' . $key . '_INFO') && defined('MOD_SKILL' . $key . '_ACHIEVEMENT_ID')) { if (strpos(constant('MOD_SKILL' . $key . '_INFO'), 'achievement;') !== false) { $id = (int) constant('MOD_SKILL' . $key . '_ACHIEVEMENT_ID'); if (isset($achdata[$id])) { $s = (string) $achdata[$id]; } else { $s = ''; } $func = '\\skill' . $key . '\\show_achievement' . $key; echo '成就编号' . $id . ' 技能编号' . $key . ' 成就信息<br><br>'; $func($s); echo '<br><br>'; } } } }
function check_skill401_proc(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('skill401', 'player', 'logger')); if (!\skillbase\skill_query(401, $pd) || !check_unlocked401($pd)) { return array(); } $l401 = \skillbase\skill_getvalue(401, 'lvl', $pd); if ($l401 > 0) { if ($active) { if ($l401 == 5) { $log .= "<span class=\"yellow\">{$pd['name']}的护甲使其几乎刀枪不入!</span><br>"; } else { $log .= "<span class=\"yellow\">{$pd['name']}坚硬的护甲减少了你造成的物理伤害!</span><br>"; } } else { if ($l401 == 5) { $log .= "<span class=\"yellow\">你的护甲使你几乎刀枪不入!</span><br>"; } else { $log .= "<span class=\"yellow\">你坚硬的护甲减少了{$pa['name']}造成的物理伤害!</span><br>"; } } $dmggain = (100 - $dmgreduce[$l401]) / 100; return array($dmggain); } return array(); }
function init() { eval(import_module('weapon', 'itemmain')); //武器类型依赖的熟练度名称 $skillinfo['C'] = 'wc'; //武器类型攻击动词 $attinfo['C'] = '投掷'; //武器类型名 $iteminfo['WC'] = '投掷兵器'; //基础反击率 $counter_obbs['C'] = 35; //射程 $rangeinfo['C'] = 5; //基础命中率 $hitrate_obbs['C'] = 70; //各种攻击方式的最高命中率 $hitrate_max_obbs['C'] = 96; //每点熟练增加的命中 $hitrate_r['C'] = 0.25; //各种攻击方式的伤害变动范围,越少越稳定。 $dmg_fluc['C'] = 5; //每点熟练度增加的伤害 $skill_dmg['C'] = 0.35; //各种攻击方式的武器损伤概率 $wepimprate['C'] = 10000; //以该类武器击杀敌人后的死亡状态标号 $wepdeathstate['C'] = 24; }
function upgrade43() { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('player', 'logger')); if (!\skillbase\skill_query(43) || !check_unlocked43($sdata)) { $log .= '你没有这个技能。<br>'; return; } eval(import_module('input')); $val = (int) $skillpara1; if ($val != 1 && $val != 2) { $log .= '参数不合法。<br>'; return; } if ($val == 1) { if (!\skillbase\skill_query(41)) { \skillbase\skill_acquire(41); } \skill41\unlock41($sdata); } else { if (!\skillbase\skill_query(42)) { \skillbase\skill_acquire(42); } \skill42\unlock42($sdata); } \skillbase\skill_lost(43); $log .= '选择成功。<br>'; }
function check_physical_def_attr(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('ex_phy_def', 'logger')); if (isset($def_kind[$pa['wep_kind']])) { $ex_def_array = \attrbase\get_ex_def_array($pa, $pd, $active); if (in_array($def_kind[$pa['wep_kind']], $ex_def_array) || in_array('A', $ex_def_array)) { if (check_ex_phy_def_proc($pa, $pd, $active)) { if ($active) { $log .= "<span class=\"yellow\">{$pd['name']}的装备使你的攻击伤害减半了!</span><br>"; } else { $log .= "<span class=\"yellow\">你的装备使{$pa['name']}的攻击伤害减半了!</span><br>"; } return array(0.5); } else { if ($active) { $log .= "<span class=\"yellow\">{$pd['name']}的装备没能发挥攻击伤害减半的效果!</span><br>"; } else { $log .= "<span class=\"yellow\">你的装备没能发挥攻击伤害减半的效果!</span><br>"; } return array(); } } } return array(); }
function checkendgame() { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys')); if ($gamestate >= 40 || $gamestate == 21) { //队伍胜利模式游戏结束判断 if (in_array($gametype, $teamwin_mode)) { $result = $db->query("SELECT teamID FROM {$tablepre}players WHERE type = 0 AND hp > 0"); $flag = 1; $first = 1; while ($data = $db->fetch_array($result)) { if ($first) { $first = 0; $firstteamID = $data['teamID']; } else { if ($firstteamID != $data['teamID'] || !$data['teamID']) { //如果有超过一种teamID,或有超过一个人没有teamID,则游戏还未就结束 $flag = 0; break; } } } if ($flag && !$first) { \sys\gameover(); } } else { if ($alivenum <= 1) { \sys\gameover(); } } } }
function apply_total_damage_modifier_down(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } if (!\skillbase\skill_query(415, $pd) || !check_unlocked415($pd)) { return $chprocess($pa, $pd, $active); } eval(import_module('logger')); $var_415 = \skillbase\skill_getvalue(415, 'lvl', $pd); $pa['dmg_dealt'] = (int) $pa['dmg_dealt']; if ($var_415 == 0 && $pa['dmg_dealt'] % 2 == 0) { $tz = 1; while ($pa['dmg_dealt'] > 0 && $pa['dmg_dealt'] % 2 == 0) { $pa['dmg_dealt'] = floor($pa['dmg_dealt'] / 2); $tz *= 2; } if ($tz > 1) { if ($active) { $log .= "<span class=\"yellow\">你的攻击被敌人的技能「影像」防御了,伤害降低至{$tz}分之1!</span><br>"; } else { $log .= "<span class=\"yellow\">敌人的攻击被你的技能「影像」防御了,伤害降低至{$tz}分之1!</span><br>"; } } } if ($var_415 == 1 && $pa['dmg_dealt'] % 1000 != 666) { $pa['dmg_dealt'] = 0; if ($active) { $log .= "<span class=\"yellow\">敌人的技能「影像」使你的攻击没有造成任何效果!</span><br>"; } else { $log .= "<span class=\"yellow\">你的技能「影像」使敌人的攻击没有造成任何效果!</span><br>"; } } $chprocess($pa, $pd, $active); }
function parse_news($news, $hour, $min, $sec, $a, $b, $c, $d, $e) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys', 'player')); if ($news == 'death40') { $dname = $typeinfo[$b] . ' ' . $a; if (!$e) { $e0 = "<span class=\"yellow\">【{$dname} 什么都没说就死去了】</span><br>\n"; } else { $e0 = "<span class=\"yellow\">【{$dname}:“{$e}”】</span><br>\n"; } return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>受到<span class=\"yellow\">{$c}</span>的袭击,自爆身亡了!{$e0}"; } if ($news == 'death41') { $dname = $typeinfo[$b] . ' ' . $a; if (!$e) { $e0 = "<span class=\"yellow\">【{$dname} 什么都没说就死去了】</span><br>\n"; } else { $e0 = "<span class=\"yellow\">【{$dname}:“{$e}”】</span><br>\n"; } return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>被<span class=\"yellow\">{$c}</span>的自爆炸死了!{$e0}"; } return $chprocess($news, $hour, $min, $sec, $a, $b, $c, $d, $e); }
function apply_total_damage_modifier_down(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } if (!\skillbase\skill_query(439, $pd) || !check_unlocked439($pd)) { return $chprocess($pa, $pd, $active); } if ($pa['dmg_dealt'] <= 0) { return $chprocess($pa, $pd, $active); } eval(import_module('logger')); $var_439 = \skillbase\skill_getvalue(439, 'type', $pd); if ($var_439 != $pa['wep_kind']) { \skillbase\skill_setvalue(439, 'type', $pa['wep_kind'], $pd); } else { \skillbase\skill_setvalue(439, 'type', '0', $pd); if ($active) { $log .= "<span class=\"yellow\">黄翔把你的攻击方式ban了,造成的伤害降低75%!</span><br>"; } else { $log .= "<span class=\"yellow\">黄翔把敌人的攻击方式ban了,造成的伤害降低75%!</span><br>"; } $pa['dmg_dealt'] = ceil($pa['dmg_dealt'] / 4); } $chprocess($pa, $pd, $active); }
function apply_sk252_effect() { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys', 'player', 'metman')); if ($w_hp <= 0) { $tdata['hpstate'] = "<span class=\"red\">{$hpinfo['3']}</span>"; $tdata['spstate'] = "<span class=\"red\">{$spinfo['3']}</span>"; $tdata['ragestate'] = "<span class=\"red\">{$rageinfo['3']}</span>"; $tdata['isdead'] = true; } else { if ($w_hp < $w_mhp * 0.2) { $tdata['hpstate'] = "<span class=\"red\">{$w_hp} / {$w_mhp}</span>"; } elseif ($w_hp < $w_mhp * 0.5) { $tdata['hpstate'] = "<span class=\"yellow\">{$w_hp} / {$w_mhp}</span>"; } else { $tdata['hpstate'] = "<span class=\"clan\">{$w_hp} / {$w_mhp}</span>"; } $tdata['spstate'] = "{$w_sp} / {$w_msp}"; if ($w_rage >= 100) { $tdata['ragestate'] = "<span class=\"red\">{$w_rage}</span>"; } elseif ($w_rage >= 30) { $tdata['ragestate'] = "<span class=\"yellow\">{$w_rage}</span>"; } else { $tdata['ragestate'] = $w_rage; } } $tdata['wepestate'] = $w_wepe; }
function check_physical_nullify(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('logger')); $ex_def_array = \attrbase\get_ex_def_array($pa, $pd, $active); if (in_array('B', $ex_def_array)) { $proc_rate = get_ex_phy_nullify_proc_rate($pa, $pd, $active); $dice = rand(0, 99); if ($dice < $proc_rate) { if ($active) { $log .= "<span class=\"yellow\">你的攻击完全被{$pd['name']}的装备吸收了!</span><br>"; } else { $log .= "<span class=\"yellow\">{$pa['name']}的攻击完全被你的装备吸收了!</span><br>"; } $pd['physical_nullify_success'] = 1; } else { if ($active) { $log .= "纳尼?{$pd['name']}的装备使攻击无效化的属性竟然失效了!<br>"; } else { $log .= "纳尼?你的装备使攻击无效化的属性竟然失效了!<br>"; } } } return array(); }
function parse_news($news, $hour, $min, $sec, $a, $b, $c, $d, $e) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys', 'player')); $dname = $typeinfo[$b] . ' ' . $a; if (!$e) { $e0 = "<span class=\"yellow\">【{$dname} 什么都没说就死去了】</span><br>\n"; } else { $e0 = "<span class=\"yellow\">【{$dname}:“{$e}”】</span><br>\n"; } if ($news == 'death20') { return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>被<span class=\"yellow\">{$c}</span>使用<span class=\"red\">{$nowep}</span>击飞{$e0}"; } elseif ($news == 'death21') { return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>被<span class=\"yellow\">{$c}</span>使用<span class=\"red\">{$d}</span>殴打致死{$e0}"; } elseif ($news == 'death22') { return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>被<span class=\"yellow\">{$c}</span>使用<span class=\"red\">{$d}</span>斩杀{$e0}"; } elseif ($news == 'death23') { return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>被<span class=\"yellow\">{$c}</span>使用<span class=\"red\">{$d}</span>射杀{$e0}"; } elseif ($news == 'death24') { return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>被<span class=\"yellow\">{$c}</span>投掷<span class=\"red\">{$d}</span>致死{$e0}"; } elseif ($news == 'death25') { return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>被<span class=\"yellow\">{$c}</span>埋设<span class=\"red\">{$d}</span>伏击炸死{$e0}"; } elseif ($news == 'death29') { return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"yellow\">{$a}</span>被<span class=\"yellow\">{$c}</span>发动<span class=\"red\">{$d}</span>以灵力杀死{$e0}"; } elseif ($news == 'damage') { return "<li>{$hour}时{$min}分{$sec}秒,<span class=\"clan\">{$a}</span><br>\n"; } else { return $chprocess($news, $hour, $min, $sec, $a, $b, $c, $d, $e); } }
function kujidraw1(&$pa, $is_dryrun = false) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('cardbase', 'kuji1')); if ($pa['gold'] < 1000 && !$is_dryrun) { return -1; } $rr = array(); $r = rand(1, $cw); if ($r <= $sw) { $arr = $cardindex['S']; } else { if ($r <= $aw) { $arr = $cardindex['A']; } else { $arr = $cardindex['B']; } } $c = count($arr) - 1; $r = $arr[rand(0, $c)]; if (!$is_dryrun) { if (\cardbase\get_card($r, $pa) != 1) { \cardbase\get_qiegao(30, $pa); $pa['gold'] += 30; } } $rr[0] = $r; for ($i = 1; $i <= 10; $i++) { $r = rand(1, $cw); if ($r <= $sw) { $arr = $cardindex['S']; } else { if ($r <= $aw) { $arr = $cardindex['A']; } else { if ($r <= $bw) { $arr = $cardindex['B']; } else { $arr = $cardindex['C']; } } } $c = count($arr) - 1; $r = $arr[rand(0, $c)]; if (!$is_dryrun) { if (\cardbase\get_card($r, $pa) == 1) { \cardbase\get_qiegao(-100, $pa); $pa['gold'] -= 100; } else { \cardbase\get_qiegao(-70, $pa); $pa['gold'] -= 70; } } $rr[$i] = $r; } return $rr; }
function battle_wrapper(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } battle_prepare($pa, $pd, $active); battle($pa, $pd, $active); battle_finish($pa, $pd, $active); //写回数据库 eval(import_module('sys', 'logger', 'player', 'metman')); if ($active) { if ($pd['hp'] <= 0 && $pa['hp'] > 0) { $pa['action'] = 'corpse' . $pd['pid']; } if ($pa['hp'] <= 0 && $pd['hp'] > 0 && $pd['action'] == '' && $pd['type'] == 0) { $pd['action'] = 'pacorpse' . $pa['pid']; } } else { if ($pd['hp'] <= 0 && $pa['hp'] > 0 && $pa['action'] == '' && $pa['type'] == 0) { $pa['action'] = 'pacorpse' . $pd['pid']; } if ($pa['hp'] <= 0 && $pd['hp'] > 0) { $pd['action'] = 'corpse' . $pa['pid']; } } if ($active) { $edata = $pd; \player\player_save($pa); \player\player_save($pd); \metman\metman_load_playerdata($pd); if ($pd['type'] == 0) { save_enemy_battlelog($pd); } \player\load_playerdata($pa); } else { $edata = $pa; \player\player_save($pa); \player\player_save($pd); \metman\metman_load_playerdata($pa); if ($pa['type'] == 0) { save_enemy_battlelog($pa); } \player\load_playerdata($pd); } $battle_title = '战斗发生'; $main = MOD_METMAN_MEETMAN; \metman\init_battle(1); if (substr($action, 0, 6) == 'corpse') { \corpse\findcorpse($edata); } else { include template(MOD_BATTLE_BATTLERESULT); $cmd = ob_get_contents(); ob_clean(); $action = ''; } if (defined('MOD_CLUBBASE')) { include template(MOD_CLUBBASE_NPCSKILLPAGE); } }
function bubblebox_get_style($str) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('bubblebox')); return $bubblebox_style[$str]; }
function itemuse(&$theitem) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('logger')); $log .= "你使用了道具 <span class=\"yellow\">{$theitem['itm']}</span> 。<br>但是什么也没有发生。<br>"; }
function get_final_dmg_multiplier(&$pa, &$pd, $active) { if (eval(__MAGIC__)) { return $___RET_VALUE; } $r = array(); if (\skillbase\skill_query(408, $pa) && check_unlocked408($pa)) { eval(import_module('logger', 'skill408', 'weapon')); $l408 = \skillbase\skill_getvalue(408, 'lvl', $pa); $var_408 = 0; if ($l408 == 1) { if ($pa['wep_kind'] == 'P') { $var_408 = 20; } if ($pa['wep_kind'] == 'N') { $var_408 = 40; } } else { if ($l408 == 2) { if ($pa['wep_kind'] == 'G') { $var_408 = 20; } } else { if ($l408 == 3) { if ($pa['wep_kind'] == 'K') { $var_408 = 20; } if ($pa['wep_kind'] == 'C') { $var_408 = 15; } } else { if ($l408 == 4) { if ($pa['wep_kind'] == 'D') { $var_408 = 15; } } else { if ($l408 == 5) { $var_408 = $rangeinfo[$pd['wepk'][1]] * 3; if ($var_408 == 0) { $var_408 = 24; } } } } } } if ($var_408 > 0) { if ($active) { $log .= "<span class=\"yellow\">「菁英」使你造成的最终伤害提高了{$var_408}%!</span><br>"; } else { $log .= "<span class=\"yellow\">「菁英」使敌人造成的最终伤害提高了{$var_408}%!</span><br>"; } $r = array(1 + $var_408 / 100); } } return array_merge($r, $chprocess($pa, $pd, $active)); }