Exemplo n.º 1
0
 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);
 }