예제 #1
0
 public function destroy(AbsTown $town)
 {
     $town->setPopulation(-self::POP);
     $town->setPopulationActive(-self::POP);
     $town->setProsperity(-1);
     //retirer en bdd l'id et les coordonnées du batiment pour qu'il disparaisse
 }
예제 #2
0
 public function action(AbsTown $town)
 {
     $town->setGold(self::GOLD);
     $town->setWood(self::WOOD);
     $town->setStone(self::STONE);
     $town->setFood(self::FOOD);
     $town->setArmy(self::ARMY);
     $town->setProsperity(self::PROSPERITY);
 }
예제 #3
0
 public function actionDesertion(AbsTown $town, House $house)
 {
     $town->setGold(self::GOLD);
     $town->setWood(self::WOOD);
     $town->setStone(self::STONE);
     $town->setFood(self::FOOD);
     $town->setProsperity(self::PROSPERITY);
     $house->destroy($town);
 }
예제 #4
0
 public function actionWar(AbsTown $town, $choice)
 {
     if (!$choice) {
         $town->setWood(self::WOOD);
         $town->setStone(self::STONE);
         $town->setFood(self::FOOD);
         $town->setArmy(self::ARMY);
         $town->setProsperity(self::PROSPERITY);
     } else {
         $town->setGold(self::GOLD);
         $town->setProsperity(self::PROSPERITY);
     }
 }
예제 #5
0
 public function action(AbsTown $town)
 {
     $town->setArmy(self::ARMY);
     $town->setProsperity(self::PROSPERITY);
 }
예제 #6
0
 public function destroy(AbsTown $town)
 {
     $town->setProsperity(-1);
 }
예제 #7
0
 public function action(AbsTown $town)
 {
     $town->setGold(self::BYTURNGOLD * $this->getLevel() * $this->getDamageLevel() / 100);
     $town->setWood(self::BYTURNWOOD * $this->getLevel() * $this->getDamageLevel() / 100);
 }
예제 #8
0
 public function action(AbsTown $town)
 {
     $town->setGold(self::GOLD);
     $town->setFood(self::FOOD);
     $town->setProsperity(self::PROSPERITY);
 }