Esempio n. 1
0
 /**
  * @return string
  */
 public function NewTradeTokenEvent()
 {
     /* This event causes a random tradegood_token to appear in a mapzone where
        there are currently fewer than three tradegoods. Note that this event will
        fail sometimes because it drew a mapzone with three tokens already present. */
     $mz = $this->map->getRandomPassableMapZone();
     $tradegood = $this->trade->searchZoneForTradegoodTokens($mz);
     if (count($tradegood) <= 2) {
         $tg = $this->trade->getARandomTradegoodPlatonic();
         $this->trade->insertANewTradegoodToken($mz, $tg);
         $this->news->createSomeNews(ucwords($tg->getNamed()) . ' will now be produced in ' . $mz->getX() . ', ' . $mz->getY() . '', $mz->getX(), $mz->getY());
         return ucwords($tg->getNamed()) . ' will now be produced in ' . $mz->getX() . ', ' . $mz->getY();
     }
 }