/** * 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; }
function __construct($prerequisites, \DnDEngine\Character $char) { parent::__construct(L::singleton()->t('Prerequisites not met for %s, requires %s.', array($char->getName(), $prerequisites))); }
/** * 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)); }
/** * 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); }
/** * 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); } }