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


PHP SR_Player::isRunner方法代码示例

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


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

示例1: onTrollReward

 private function onTrollReward(SR_NPC $npc, SR_Player $player)
 {
     $max = $player->isRunner() ? Shadowcmd_lvlup::MAX_VAL_ATTRIBUTE_RUNNER : Shadowcmd_lvlup::MAX_VAL_ATTRIBUTE;
     $base = $player->getBase('magic');
     if ($base >= $max) {
         $ny = 5000;
         $player->giveNuyen($ny);
         return $player->message($this->lang('reward_ny', array($ny)));
         // 			return $player->message('Larry hands you another 5000 nuyen!');
     }
     $player->message($this->lang('reward1'));
     // 		$player->message('Larry leads you to a shamane: "This is our shamane, Srando, he can help you."');
     $race = $player->getRace();
     if ($race === 'Ork' || $race === 'Troll') {
         $player->message($this->lang('reward2', array($race)));
         // 			$player->message('The shamane says: "You are a strong '.$race.'. You just need to calm down sometime."');
         $player->message($this->lang('reward3'));
         // 			$player->message('You are starting to argue, but the shamane continues: "If you calm you have more time to strengthen yourself. Focus yourself, and the path is clear."');
         $player->message($this->lang('reward4'));
         // 			$player->message('The shamane touches your head: "Your mind is now clear from anything. You can focus yourself from now on."');
         $player->message($this->lang('reward5'));
         // 			$player->message('Your character is now allowed to learn magic and spells.');
     } else {
         $player->message($this->lang('reward5'));
         // 			$player->message('The shamane mumbles some magic spells and raises your base value for magic by 1.');
     }
     $player->alterField('magic', 1);
     $player->modify();
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:30,代码来源:Troll_Maniac.php

示例2: onSolveDuo

 public function onSolveDuo(SR_Player $player)
 {
     $this->msg('solve2a');
     $this->msg('solve2b');
     // 		$player->message('The dwarfs look very pleased.');
     // 		$player->message('"Thank you so much", Aron says, "For your help we have thought of a special reward..."');
     $max = $player->isRunner() ? Shadowcmd_lvlup::MAX_VAL_SKILL_RUNNER : Shadowcmd_lvlup::MAX_VAL_SKILL;
     if ($player->getBase('melee') > $max) {
         $this->msg('solve2c', array(Shadowfunc::displayNuyen(5000)));
         $player->giveNuyenEvent(5000);
         // 			$player->message('You received another 5000 nuyen!');
     } else {
         $this->msg('solve2d');
         // 			$player->message('Your melee skill has increased by 1.');
         $player->levelupField('melee', 1);
         // 			$player->modify();
     }
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:19,代码来源:Redmond_AresDwarf_II.php

示例3: onKill

 public static function onKill(SR_Player $killer, SR_Player $victim)
 {
     if (!$killer->isHuman()) {
         return true;
     }
     if ($victim instanceof SR_HireNPC) {
         $column = 'npc';
     } elseif ($victim instanceof SR_NPC) {
         $column = 'mob';
     } else {
         if ($victim->isRunner()) {
             $column = 'runner';
         } else {
             $column = 'human';
         }
     }
     if (false === ($stats = self::getOrCreateStats($killer))) {
         return false;
     }
     return $stats->increase('sr4ps_kill_' . $column, 1);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:21,代码来源:SR_PlayerStats.php

示例4: announceKilled

 private function announceKilled(SR_Player $killer)
 {
     $famous = $this->isRunner() ? 'famous' : 'newbie';
     $famous2 = $killer->isRunner() ? 'famous' : 'newbie';
     $npchuman = $killer->isHuman() ? 'runner' : 'NPC';
     $message = sprintf('[Shadowlamb] - The %s runner %s got killed by the %s %s %s', $famous, $this->getName(), $famous2, $npchuman, $killer->getName());
     Shadowshout::sendGlobalMessage($message);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:8,代码来源:SR_Player.php

示例5: getMaxLevel

 public static function getMaxLevel(SR_Player $player, $field)
 {
     $runner = $player->isRunner();
     if ($field === 'essence') {
         return 6;
     }
     if (in_array($field, SR_Player::$SKILL)) {
         return $runner ? self::MAX_VAL_SKILL_RUNNER : self::MAX_VAL_SKILL;
     } elseif (in_array($field, SR_Player::$ATTRIBUTE)) {
         return $runner ? self::MAX_VAL_ATTRIBUTE_RUNNER : self::MAX_VAL_ATTRIBUTE;
     } elseif (in_array($field, SR_Player::$KNOWLEDGE)) {
         return $runner ? self::MAX_VAL_KNOWLEDGE_RUNNER : self::MAX_VAL_KNOWLEDGE;
     } elseif (false !== ($spell = SR_Spell::getSpell($field))) {
         return $runner ? self::MAX_VAL_SPELL_RUNNER : self::MAX_VAL_SPELL;
     } else {
         return false;
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:18,代码来源:lvlup.php


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