/** * Hero power: * Restore 2 health * * @param \PHPHearthSim\Model\Entity $target * @return \PHPHearthSim\Game\HeroPower\Priest\LesserHeal * */ public function useOn(Entity $target = null) { // Call parent to update usage, etc parent::useOn($target); // Heal target for 2 $target->healFor(2, $this); return $this; }
/** * Hero power: * Gain 2 armor * * @param \PHPHearthSim\Model\Entity $target * @return \PHPHearthSim\Game\HeroPower\Warrior\ArmorUp * */ public function useOn(Entity $target = null) { // Call parent to update usage, etc parent::useOn($target); // Gain 2 armor $this->getHero()->gainArmor(2); return $this; }
/** * Hero power: * Summon a random totem * * @param \PHPHearthSim\Model\Entity $target * @return \PHPHearthSim\Game\HeroPower\Shaman\TotemicCall * */ public function useOn(Entity $target = null) { // Call parent to update usage, etc parent::useOn($target); // Create a random totem that does not already exist $randomTotem = $this->createRandomTotemNotOnBattlefield(); // Make sure we have a random totem if ($randomTotem != null) { // Add totem to battlefield $this->getOwner()->addToBattlefield($randomTotem); } return $this; }