/** * Get the proof handicap. * * @return integer */ public function getHandicap() { $handicap = 0; switch ($this->blueprint->getItemType()->getType()) { case 'meleeWeapon': $handicap += $this->blueprint->getUpgradeHitPoints() * 3; $handicap += $this->blueprint->getUpgradeBreakFactor() * -2; $handicap += $this->blueprint->getUpgradeInitiative() ? 5 : 0; $weaponModificator = $this->blueprint->getUpgradeWeaponModificator(); $handicap += $weaponModificator[0]['attack'] ? 5 : 0; $handicap += $weaponModificator[0]['parade'] ? 5 : 0; foreach ($this->blueprint->getMaterialList() as $material) { /* @var $materialAsset \Model\MaterialAsset */ $materialAsset = $material['materialAsset']; $handicap += $materialAsset->getProof(); } /* @var $technique \Model\Technique */ foreach ($this->blueprint->getTechniqueList() as $technique) { $handicap += $technique->getProof(); } break; case 'rangedWeapon': $handicap += $this->blueprint->getBonusRangedFightValue() * 7; $handicap += $this->blueprint->getReducePhysicalStrengthRequirement() * 5; foreach ($this->blueprint->getMaterialList() as $material) { /* @var $materialAsset \Model\MaterialAsset */ $materialAsset = $material['materialAsset']; $handicap += $materialAsset->getProof(); } break; case 'shield': break; case 'armor': break; case 'projectile': break; } $handicap -= $this->getToolsProofModificator() + $this->getPlanProofModificator(); return $handicap; }