/** * Constructor * * @param array $options */ public function __construct(array $options = []) { // Warrior have the "Armor Up!" hero power. Gain 2 armor $options['heroPower'] = new ArmorUp(); // Call the constructor to apply hero power parent::__construct($options); }
/** * Constructor * * @param array $options */ public function __construct(array $options = []) { // Priest have the "Lesser heal" hero power. Restore 2 health $options['heroPower'] = new LesserHeal(); // Call the constructor to apply hero power parent::__construct($options); }
/** * Constructor * * @param array $options */ public function __construct(array $options = []) { // Shaman have the "Totemic Call" hero power. Summon a random totem $options['heroPower'] = new TotemicCall(); // Call the constructor to apply hero power parent::__construct($options); }
/** * Set the player hero * * @param \PHPHearthSim\Model\Hero $hero * @return \PHPHearthSim\Model\Player */ public function setHero(Hero $hero) { // Set owner $hero->setOwner($this); // Assign hero $this->hero = $hero; return $this; }