|
@@ -60,16 +60,16 @@ discard block |
|
|
block discarded – undo |
|
60
|
60
|
* fonction qui renvoi le cout d'une recherche |
|
61
|
61
|
*/ |
|
62
|
62
|
private function getCoutRecherche($cout, $niveau_recherche) { |
|
63
|
|
- $cout_eau = $cout["eau"] * ($this->coef_centre * $niveau_recherche); |
|
|
63
|
+ $cout_eau = $cout["eau"]*($this->coef_centre*$niveau_recherche); |
|
64
|
64
|
$cout_eau = Bataille::getTestAssezRessourceBase("eau", $cout_eau); |
|
65
|
65
|
|
|
66
|
|
- $cout_electricite = $cout["electricite"] * ($this->coef_centre * $niveau_recherche); |
|
|
66
|
+ $cout_electricite = $cout["electricite"]*($this->coef_centre*$niveau_recherche); |
|
67
|
67
|
$cout_electricite = Bataille::getTestAssezRessourceBase("electricite", $cout_electricite); |
|
68
|
68
|
|
|
69
|
|
- $cout_fer = $cout["fer"] * ($this->coef_centre * $niveau_recherche); |
|
|
69
|
+ $cout_fer = $cout["fer"]*($this->coef_centre*$niveau_recherche); |
|
70
|
70
|
$cout_fer = Bataille::getTestAssezRessourceBase("fer", $cout_fer); |
|
71
|
71
|
|
|
72
|
|
- $cout_fuel = $cout["fuel"] * ($this->coef_centre * $niveau_recherche); |
|
|
72
|
+ $cout_fuel = $cout["fuel"]*($this->coef_centre*$niveau_recherche); |
|
73
|
73
|
$cout_fuel = Bataille::getTestAssezRessourceBase("fuel", $cout_fuel); |
|
74
|
74
|
|
|
75
|
75
|
return [ |
|
@@ -89,10 +89,10 @@ discard block |
|
|
block discarded – undo |
|
89
|
89
|
$pourcent = ($temps*Bataille::getBatiment()->getNiveauBatiment("centre_recherche")/100); |
|
90
|
90
|
|
|
91
|
91
|
if ($niveau == 0) { |
|
92
|
|
- return round($temps-$pourcent);; |
|
|
92
|
+ return round($temps-$pourcent); ; |
|
93
|
93
|
} |
|
94
|
94
|
|
|
95
|
|
- return round(($temps * ($this->coef_centre * $niveau))-$pourcent); |
|
|
95
|
+ return round(($temps*($this->coef_centre*$niveau))-$pourcent); |
|
96
|
96
|
} |
|
97
|
97
|
|
|
98
|
98
|
/** |
|
@@ -259,7 +259,7 @@ discard block |
|
|
block discarded – undo |
|
259
|
259
|
$fuel = Bataille::getTestAssezRessourceBase("fuel", $cout["fuel"]); |
|
260
|
260
|
|
|
261
|
261
|
|
|
262
|
|
- if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge" ) { |
|
|
262
|
+ if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge") { |
|
263
|
263
|
FlashMessage::setFlash("Pas assez de ressources pour effectuer cette recherche"); |
|
264
|
264
|
return false; |
|
265
|
265
|
} |