Example #1
0
File: Game.php Project: uhtoff/WotR
 /**
  * Takes a tile and returns the damage caused
  * @param Card $tile
  * @return int
  */
 public function getHuntTileDamage(Card $tile)
 {
     $base = $tile->getCorruption();
     if ($base == 'd') {
         $corruption = Dice::roll(1)->results[1];
     } elseif ($base == 'e') {
         if ($this->getFellowship()->isInMordor()) {
             $corruption = $this->getHuntDicePool()->count();
         } else {
             $corruption = $this->getCurrentAction()->getData()['success'];
         }
     } else {
         $corruption = $base;
     }
     return $corruption;
 }
Example #2
0
 /**
  * Adds a card to the bottom of the deck
  * @param \Meldon\WotRBundle\Entity\Card $card
  * @return \Meldon\WotRBundle\Entity\Card
  */
 public function addToBottom(Card $card)
 {
     $pos = $this->getPositions();
     if (count($pos) == 0) {
         $bottomPos = 0;
     } else {
         $bottomPos = max($pos);
     }
     $card->setPosition($bottomPos + 1);
     $card->setGroup($this);
     return $card;
 }