Beispiel #1
0
 public function onBrew(SR_Player $player, $mp, $diff, $hits)
 {
     if ($player->getMP() < $mp) {
         $player->msg('1077', array($mp, $player->getMP()));
         // 			$player->message(sprintf('You need %s MP to brew this potion, but you got only %s.', $mp, $player->getMP()));
         return false;
     }
     $player->healMP(-$mp);
     $es = $player->get('essence');
     $al = $player->get('alchemy');
     $wi = $player->get('wisdom');
     $dices = $es * 3 + $al * 2 + $wi;
     $hit = Shadowfunc::dicePool($dices, $diff, $diff);
     return $hit >= $hits;
 }