本文整理匯總了PHP中Shadowfunc::calcDistance方法的典型用法代碼示例。如果您正苦於以下問題:PHP Shadowfunc::calcDistance方法的具體用法?PHP Shadowfunc::calcDistance怎麽用?PHP Shadowfunc::calcDistance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Shadowfunc
的用法示例。
在下文中一共展示了Shadowfunc::calcDistance方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: diceOffensive
private function diceOffensive(SR_Player $player, SR_Player $target, $level)
{
$dices = round($level * 10);
$int = $player->get('intelligence');
$int += Common::pow($level, 1.3);
$dices += round($int * 5);
$dices += round($player->get('spellatk') * 6);
$dices += round($player->get('essence') * 18);
$dices -= round(Shadowfunc::calcDistance($this->caster, $target) / 4);
# XXX Cannot apply distance malus because of alchemy.
$defense = round($target->get('essence') * 0.3);
$defense += round($target->get('intelligence') * 0.2);
$defense += round($target->get('spelldef') * 0.2);
echo "Dice Offensive with {$dices} dices and defense {$defense}\n";
return Shadowfunc::dicePoolB($dices, $defense);
// return Shadowfunc::dicePool($dices, $defense, 4);
}