예제 #1
0
파일: Actionsurge.php 프로젝트: Berdir/dnd
 /**
  * Short description for function
  *
  * Long description (if any) ...
  *
  * @param  object  $char Parameter description (if any) ...
  * @return boolean Return description (if any) ...
  * @access public
  */
 public function arePrerequisitesMet(Character $char)
 {
     if ($char->getRace()->getName() == Constants\Common::RACE_HUMAN) {
         Logger::debug('Character %s mets the prerequisites of Action Surge', array($char->getName()));
         return true;
     }
     return false;
 }
예제 #2
0
 function __construct($prerequisites, \DnDEngine\Character $char)
 {
     parent::__construct(L::singleton()->t('Prerequisites not met for %s, requires %s.', array($char->getName(), $prerequisites)));
 }
예제 #3
0
파일: Powerattack.php 프로젝트: Berdir/dnd
 /**
  * Short description for function
  *
  * Long description (if any) ...
  *
  * @param  object $char Parameter description (if any) ...
  * @return void
  * @access public
  */
 public function deactivate(C $char)
 {
     $char->updateAttackBonus(2);
     $char->updateDamageBonus(-$this->getDamageBonus($char));
 }
예제 #4
0
파일: Fighter.php 프로젝트: Berdir/dnd
 /**
  * Short description for function
  *
  * Long description (if any) ...
  *
  * @param  object $char Parameter description (if any) ...
  * @return mixed  Return description (if any) ...
  * @access public
  */
 public function getHealingSurgesPerDay(Character $char)
 {
     return 9 + $char->getAbility(Constants\Abilities::CON);
 }
예제 #5
0
파일: Level.php 프로젝트: Berdir/dnd
 /**
  * Short description for function
  *
  * Long description (if any) ...
  *
  * @param  object                        $char Parameter description (if any) ...
  * @return void
  * @access public
  * @throws Exception_NotEnoughExperience Exception description (if any) ...
  */
 public function __construct(Character $char)
 {
     $this->char = $char;
     $level = $char->getLevel();
     $xp = $char->getExperience();
     if (self::$xpTable[$level + 1] <= $xp) {
         Logger::info('Starting Level Upgrade to Level %s from Character "%s"', array($level + 1, $char->getName()));
         $this->gain = self::$gainTable[$level + 1];
         $this->newLevel = $level + 1;
         Logger::debug('Aviable at this level: ' . $this->getAviable());
     } else {
         throw new Exception_NotEnoughExperience($char);
     }
 }