Beispiel #1
1
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();
}
Beispiel #2
0
function check_unlocked59(&$pa)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    return (int) \skillbase\skill_getvalue(58, 'r', $pa) == 1;
}
Beispiel #3
0
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);
}
Beispiel #4
0
function finalize323(&$pa, $data)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    if ($data == '') {
        $x = 0;
    } else {
        $x = base64_decode_number($data);
    }
    $ox = $x;
    $x = \skillbase\skill_getvalue(323, 'cnt', $pa);
    if ($x == 0) {
        $x = $ox;
    }
    if ($ox != 0) {
        $x = min($x, $ox);
    }
    eval(import_module('cardbase'));
    $arr = $cardindex['S'];
    $c = count($arr) - 1;
    $cr = $arr[rand(0, $c)];
    if ($x != 0 && $x <= 2700 && ($ox > 2700 || $ox == 0)) {
        \cardbase\get_qiegao(666, $pa);
        \cardbase\get_card($cr, $pa);
    }
    return base64_encode_number($x, 5);
}
Beispiel #5
0
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);
}
Beispiel #6
0
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>';
}
Beispiel #7
0
function kill(&$pa, &$pd)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    $chprocess($pa, $pd);
    eval(import_module('sys', 'logger'));
    if (in_array($pd['state'], array(20, 21, 22, 23, 24, 25, 27, 29))) {
        if (\skillbase\skill_query(58, $pd) && (int) \skillbase\skill_getvalue(58, 'r', $pd) == 0) {
            \skillbase\skill_setvalue(58, 'r', '1', $pd);
            if ($pd['state'] == 27 && !$pd['sourceless']) {
                $log .= "<span class=\"lime\">但是,由于你及时按下了BOMB键,你原地满血复活了!</span><br>";
                $w_log = "<span class=\"lime\">但是,由于{$pd['name']}及时按下了BOMB键,其原地满血复活了!</span><br>";
                \logger\logsave($pa['pid'], $now, $w_log, 'b');
            } else {
                //击杀复活提示将接管player_kill_enemy进行
            }
            $pd['state'] = 0;
            $pd['hp'] = $pd['mhp'];
            $pd['skill58_flag'] = 1;
            if ($pd['type'] == 0) {
                $alivenum++;
            }
            save_gameinfo();
            addnews($now, 'revival', $pd['name']);
            //满血复活时加成效果(这个其实是技能“新生”的内容,但直接做在一起好了)
            $pd['mhp'] += $pd['lvl'] * 2;
            $pd['hp'] += $pd['lvl'] * 2;
            $pd['def'] += $pd['lvl'] * 5;
        }
    }
}
Beispiel #8
0
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);
}
Beispiel #9
0
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));
}
Beispiel #10
0
function get_remaintime46(&$pa = NULL)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    return \skillbase\skill_getvalue(46, 'rmtime', $pa);
}
Beispiel #11
0
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();
}
Beispiel #12
0
function check_unlocked49(&$pa)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    $z = (int) \skillbase\skill_getvalue(49, 'u', $pa);
    return $z == 1;
}
Beispiel #13
0
function get_skill239_percentage(&$pa, &$pd, $active)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('skill239', 'player', 'logger'));
    $clv = (int) \skillbase\skill_getvalue(239, 'lvl', $pa);
    return $sk239_ratio[$clv];
}
Beispiel #14
0
function get_skill51_multiplier(&$pa)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    $z = (int) \skillbase\skill_getvalue(48, 'tot', $pa);
    $z *= 2;
    return $z;
}
Beispiel #15
0
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));
}
Beispiel #16
0
function check_unlocked41(&$pa)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    if (\skillbase\skill_getvalue(41, 'u', $pa) == '1') {
        return 1;
    } else {
        return 0;
    }
}
Beispiel #17
0
function get_skill212_extra_reuse_gain()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('skill212', 'player', 'logger'));
    if (!\skillbase\skill_query(212) || !check_unlocked212()) {
        return 1;
    }
    $reuserate = $reugain[\skillbase\skill_getvalue(212, 'lvl')];
    return $reuserate;
}
Beispiel #18
0
function get_skill217_extra_dmg_gain(&$pa, &$pd, $active)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('skill217', 'player', 'logger'));
    if (!\skillbase\skill_query(217, $pa) || !check_unlocked217($pa)) {
        return 1;
    }
    $d = $dmggain[\skillbase\skill_getvalue(217, 'lvl', $pa)];
    return 1 + $d / 100;
}
Beispiel #19
0
function edible_recover($itm, $hpup, $spup)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    if (\skillbase\skill_query(300)) {
        $x = (int) \skillbase\skill_getvalue(300, 'cnt');
        $x += $hpup + $spup;
        \skillbase\skill_setvalue(300, 'cnt', $x);
    }
    $chprocess($itm, $hpup, $spup);
}
Beispiel #20
0
function get_skill429_dmg($pa)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('skill429', 'player'));
    if (!\skillbase\skill_query(429, $pa)) {
        return 100;
    }
    $rate = $dmglimit[\skillbase\skill_getvalue(429, 'lvl', $pa)];
    return $rate;
}
Beispiel #21
0
function get_skill402_procrate(&$pa, &$pd, &$active)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('skill402', 'player', 'logger'));
    if (!\skillbase\skill_query(402, $pa) || !check_unlocked402($pa)) {
        return 0;
    }
    $r = $procrate[\skillbase\skill_getvalue(402, 'lvl', $pa)];
    return $r;
}
Beispiel #22
0
function player_kill_enemy(&$pa, &$pd, $active)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    if (\skillbase\skill_query(311, $pa) && $pd['type'] == 0) {
        $x = (int) \skillbase\skill_getvalue(311, 'cnt', $pa);
        $x += 1;
        \skillbase\skill_setvalue(311, 'cnt', $x, $pa);
    }
    $chprocess($pa, $pd, $active);
}
Beispiel #23
0
function player_kill_enemy(&$pa, &$pd, $active)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('map'));
    if (\skillbase\skill_query(325, $pa) && $pd['type'] > 0 && $pa['attackwith'] == '精灵球' && $areanum == 0 && (!isset($pa['bskill']) || $pa['bskill'] == 0)) {
        $x = (int) \skillbase\skill_getvalue(325, 'cnt', $pa);
        $x += 1;
        \skillbase\skill_setvalue(325, 'cnt', $x, $pa);
    }
    $chprocess($pa, $pd, $active);
}
Beispiel #24
0
function player_kill_enemy(&$pa, &$pd, $active)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    $chprocess($pa, $pd, $active);
    eval(import_module('cardbase', 'sys', 'logger', 'map'));
    if (\skillbase\skill_query(3000, $pa) && ($pd['type'] == 1 && $pd['name'] == '红暮')) {
        $x = (int) \skillbase\skill_getvalue(3000, 'cnt');
        $x += 1;
        \skillbase\skill_setvalue(3000, 'cnt', $x, $pa);
    }
}
Beispiel #25
0
function assault_finish(&$pa, &$pd, $active)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    if (\skillbase\skill_query(461, $pa) && (int) \skillbase\skill_getvalue(461, 'lvl', $pa) == 1) {
        $pa['inf'] = '';
    }
    if (\skillbase\skill_query(461, $pd) && (int) \skillbase\skill_getvalue(461, 'lvl', $pd) == 1) {
        $pd['inf'] = '';
    }
    return $chprocess($pa, $pd, $active);
}
Beispiel #26
0
function itemmix_success()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys', 'player', 'logger', 'map'));
    if ($itm0 == "火水木金土符『贤者之石』") {
        if ((int) \skillbase\skill_getvalue(309, 'cnt') == 0) {
            \skillbase\skill_setvalue(309, 'cnt', $now - $starttime);
        }
    }
    $chprocess();
}
Beispiel #27
0
function itemmix_success()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys', 'player', 'logger', 'map'));
    if ($itm0 == "【KEY系催泪弹】") {
        $x = (int) \skillbase\skill_getvalue(302, 'cnt');
        $x++;
        \skillbase\skill_setvalue(302, 'cnt', $x);
    }
    $chprocess();
}
Beispiel #28
0
function itemmix_success()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys', 'player', 'logger', 'map'));
    if (strpos($itmsk0, 'x') !== false) {
        $x = (int) \skillbase\skill_getvalue(317, 'cnt');
        $x++;
        \skillbase\skill_setvalue(317, 'cnt', $x);
    }
    $chprocess();
}
Beispiel #29
0
function check_skill258_proc(&$pa)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('skill258'));
    if (\skillbase\skill_query(258, $pa) && check_unlocked258($pa)) {
        $l258 = \skillbase\skill_getvalue(258, 'lvl');
        if ($procrate[$l258] >= rand(0, 99)) {
            return 1;
        }
    }
    return 0;
}
Beispiel #30
0
function kill(&$pa, &$pd)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    $chprocess($pa, $pd);
    eval(import_module('sys', 'logger'));
    if (in_array($pd['state'], array(20, 21, 22, 23, 24, 25, 27, 29))) {
        if (\skillbase\skill_query(427, $pd)) {
            if ($pa['type'] == 88 || $pa['type'] == 1) {
                $log .= "<span class=\"linen\">都告诉你了,对某些NPC无效……快去死吧。</span><br>";
                return;
            }
            \skillbase\skill_setvalue(427, 'r', '1', $pd);
            if ($pd['state'] == 27 && !$pd['sourceless']) {
                $log .= "<span class=\"lime\">但是,由于你及时按下了BOMB键,你原地满血复活了!</span><br>";
                $w_log = "<span class=\"lime\">但是,由于{$pd['name']}及时按下了BOMB键,其原地满血复活了!</span><br>";
                \logger\logsave($pa['pid'], $now, $w_log, 'b');
            } else {
                //击杀复活提示将接管player_kill_enemy进行
            }
            $pd['state'] = 0;
            $pd['hp'] = $pd['mhp'];
            $pd['skill427_flag'] = 1;
            $deathnum--;
            if ($pd['type'] == 0) {
                $alivenum++;
            }
            save_gameinfo();
            if (\skillbase\skill_query(424, $pd)) {
                $clv = \skillbase\skill_getvalue(424, 'lvl', $pd);
                $clv = $clv - 2;
                if ($clv < 0) {
                    $clv = 0;
                }
                \skillbase\skill_setvalue(424, 'lvl', $clv, $pd);
            }
            //陷阱杀人得技能点一起放在这里
            if ($pd['state'] == 27) {
                $pa['skillpoint'] += 2;
                if (\skillbase\skill_query(424, $pa)) {
                    $clv = \skillbase\skill_getvalue(424, 'lvl', $pa);
                    $clv++;
                    \skillbase\skill_setvalue(424, 'lvl', $clv, $pa);
                }
            }
            addnews($now, 'revival', $pd['name']);
        }
    }
}