当前位置: 首页>>代码示例>>PHP>>正文


PHP SR_Player::healHP方法代码示例

本文整理汇总了PHP中SR_Player::healHP方法的典型用法代码示例。如果您正苦于以下问题:PHP SR_Player::healHP方法的具体用法?PHP SR_Player::healHP怎么用?PHP SR_Player::healHP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SR_Player的用法示例。


在下文中一共展示了SR_Player::healHP方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onConsume

 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())));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:9,代码来源:SmallBeer.php

示例2: cast

 public function cast(SR_Player $player, SR_Player $target, $level, $hits, SR_Player $potion_player)
 {
     $min = $level + 1;
     $max = $min + $level / 4 + $hits / 10;
     $gain = Shadowfunc::diceFloat($min, $max);
     $oldhp = $target->getHP();
     $maxhp = $target->getMaxHP();
     $gain = $target->healHP($gain);
     $append = Shadowfunc::displayHPGain($oldhp, $gain, $maxhp);
     $this->announceADV($player, $target, $level, '10110', $append);
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:12,代码来源:heal.php

示例3: onConsume

 public function onConsume(SR_Player $player)
 {
     $p = $player->getParty();
     $oldhp = $player->getHP();
     $maxhp = $player->getMaxHP();
     $gain = $player->healHP(0.1);
     $newhp = $player->getHP();
     $gainmsg = Shadowfunc::displayHPGain($oldhp, $gain, $maxhp);
     $last = $this->getAmount() === 0 ? 'the last' : 'a';
     if ($p->isFighting()) {
         $busy = $this->getItemUsetime();
         $player->busy($busy);
         $busytext = sprintf(' %s busy.', GWF_Time::humanDuration($busy));
         $p->message($player, sprintf(' eats %s potatoe chip from his roll of Pringles: %s.%s', $last, $gainmsg, $busytext));
         $p->getEnemyParty()->message($player, sprintf(' eats %s chip from his roll of Pringles.', $last));
     } else {
         $player->message(sprintf('You eat %s chip from your Pringles: %s', $last, $gainmsg));
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:19,代码来源:Pringles.php

示例4: onConsume

 public function onConsume(SR_Player $player)
 {
     $oldhp = $player->getHP();
     $gain = $player->healHP(25);
     $player->getParty()->message($player, 'ate a cake. ' . Shadowfunc::displayHPGain($oldhp, $gain, $player->getMaxHP()));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:Cake.php

示例5: onConsume

 public function onConsume(SR_Player $player)
 {
     $oldhp = $player->getHP();
     $gain = $player->healHP(0.4);
     $player->getParty()->notice(sprintf('%s drank a half litre of milk %s.', $player->getName(), Shadowfunc::displayHPGain($oldhp, $gain, $player->getMaxHP())));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:Milk.php

示例6: onConsume

 public function onConsume(SR_Player $player)
 {
     $oldhp = $player->getHP();
     $gain = $player->healHP(Shadowfunc::diceFloat(1.0, 3.0, 1));
     $player->getParty()->message($player, 'ate some bacon. ' . Shadowfunc::displayHPGain($oldhp, $gain, $player->getMaxHP()));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:Bacon.php

示例7: onConsume

 public function onConsume(SR_Player $player)
 {
     $oldhp = $player->getHP();
     $gain = $player->healHP(rand(1, 5));
     $player->getParty()->message($player, 'giggles. ' . Shadowfunc::displayHPGain($oldhp, $gain, $player->getMaxHP()));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:Easteregg.php

示例8: onConsume

 public function onConsume(SR_Player $player)
 {
     $oldhp = $player->getHP();
     $gain = $player->healHP(2);
     $player->getParty()->message($player, 'ate a trout and healed two cent. ' . Shadowfunc::displayHPGain($oldhp, $gain, $player->getMaxHP()) . ' ... Lamer!');
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:Fish.php

示例9: onConsume

 public function onConsume(SR_Player $player)
 {
     $oldhp = $player->getHP();
     $gain = $player->healHP(Shadowfunc::diceFloat(0.2, 0.5, 1));
     $player->getParty()->message($player, 'ate an apple. ' . Shadowfunc::displayHPGain($oldhp, $gain, $player->getMaxHP()));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:Apple.php


注:本文中的SR_Player::healHP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。