示例#1
0
文件: Alcopop.php 项目: sinfocol/gwf3
 public function onConsume(SR_Player $player)
 {
     $m = array('alc' => 0.1);
     $player->addEffects(new SR_Effect(GWF_Time::ONE_HOUR * 1, $m));
     $player->addEffects(new SR_Effect(GWF_Time::ONE_HOUR * 2, $m));
     $player->addEffects(new SR_Effect(GWF_Time::ONE_HOUR * 3, $m));
     $player->getParty()->notice(sprintf('%s drunk an alcopop and got alcoholized (+0.3).', $player->getName()));
 }
示例#2
0
 public function onConsume(SR_Player $player)
 {
     $m = array('alc' => 0.1);
     $player->addEffects(new SR_Effect(GWF_Time::ONE_HOUR * 1, $m));
     $player->addEffects(new SR_Effect(GWF_Time::ONE_HOUR * 2, $m));
     $oldhp = $player->getHP();
     $gain = $player->healHP(0.3);
     $player->getParty()->notice(sprintf('%s drank a beer and got alcoholized (+0.2) %s.', $player->getName(), Shadowfunc::displayHPGain($oldhp, $gain, $player->getMaxHP())));
 }
示例#3
0
 /**
  * Poison the target.
  * @see SR_Weapon::onDealDamage()
  */
 public function onDealDamage(SR_Player $player, SR_Player $target, $hits, $damage)
 {
     $biotech = Common::clamp($target->getVar('biotech'), 0, 15);
     $min = 0.1 - $biotech * 0.01;
     $max = 0.3 - $biotech * 0.02;
     $duration = rand(20, 40);
     $per_sec = Shadowfunc::diceFloat($min, $max, 2);
     if ($per_sec > 0) {
         $modifiers = array('hp' => $per_sec);
         $target->addEffects(new SR_Effect($duration, $modifiers));
         $target->msg('5294', array(sprintf('%.02f', $per_sec), GWF_Time::humanDuration($duration)));
     }
 }
示例#4
0
 public function onConsume(SR_Player $player)
 {
     $mod = array('quickness' => 1);
     $player->addEffects(new SR_Effect(5400, $mod), new SR_Effect(3600, $mod), new SR_Effect(1800, $mod));
 }
示例#5
0
文件: Coffee.php 项目: sinfocol/gwf3
 public function onConsume(SR_Player $player)
 {
     $m = array('caf' => 0.1);
     $player->addEffects(new SR_Effect(GWF_Time::ONE_HOUR * 1, $m));
 }
示例#6
0
 public function onConsume(SR_Player $player)
 {
     $mod = array('strength' => 1);
     $player->addEffects(new SR_Effect(3600, $mod), new SR_Effect(1800, $mod));
 }