|
@@ -54,16 +54,16 @@ discard block |
|
|
block discarded – undo |
|
54
|
54
|
* fonction qui renvoi le cout d'une recherche |
|
55
|
55
|
*/ |
|
56
|
56
|
private function getCoutRecherche($cout, $niveau_recherche) { |
|
57
|
|
- $cout_eau = $cout["eau"] * ($this->coef_centre * $niveau_recherche); |
|
|
57
|
+ $cout_eau = $cout["eau"]*($this->coef_centre*$niveau_recherche); |
|
58
|
58
|
$cout_eau = Bataille::getTestAssezRessourceBase("eau", $cout_eau); |
|
59
|
59
|
|
|
60
|
|
- $cout_electricite = $cout["electricite"] * ($this->coef_centre * $niveau_recherche); |
|
|
60
|
+ $cout_electricite = $cout["electricite"]*($this->coef_centre*$niveau_recherche); |
|
61
|
61
|
$cout_electricite = Bataille::getTestAssezRessourceBase("electricite", $cout_electricite); |
|
62
|
62
|
|
|
63
|
|
- $cout_fer = $cout["fer"] * ($this->coef_centre * $niveau_recherche); |
|
|
63
|
+ $cout_fer = $cout["fer"]*($this->coef_centre*$niveau_recherche); |
|
64
|
64
|
$cout_fer = Bataille::getTestAssezRessourceBase("fer", $cout_fer); |
|
65
|
65
|
|
|
66
|
|
- $cout_fuel = $cout["fuel"] * ($this->coef_centre * $niveau_recherche); |
|
|
66
|
+ $cout_fuel = $cout["fuel"]*($this->coef_centre*$niveau_recherche); |
|
67
|
67
|
$cout_fuel = Bataille::getTestAssezRessourceBase("fuel", $cout_fuel); |
|
68
|
68
|
|
|
69
|
69
|
return [ |
|
@@ -83,10 +83,10 @@ discard block |
|
|
block discarded – undo |
|
83
|
83
|
$pourcent = ($temps*Bataille::getBatiment()->getNiveauBatiment("centre_recherche")/100); |
|
84
|
84
|
|
|
85
|
85
|
if ($niveau == 0) { |
|
86
|
|
- return round($temps-$pourcent);; |
|
|
86
|
+ return round($temps-$pourcent); ; |
|
87
|
87
|
} |
|
88
|
88
|
|
|
89
|
|
- return round(($temps * ($this->coef_centre * $niveau))-$pourcent); |
|
|
89
|
+ return round(($temps*($this->coef_centre*$niveau))-$pourcent); |
|
90
|
90
|
} |
|
91
|
91
|
|
|
92
|
92
|
/** |
|
@@ -256,7 +256,7 @@ discard block |
|
|
block discarded – undo |
|
256
|
256
|
$fuel = Bataille::getTestAssezRessourceBase("fuel", $cout["fuel"]["ressource"]); |
|
257
|
257
|
|
|
258
|
258
|
|
|
259
|
|
- if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge" ) { |
|
|
259
|
+ if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge") { |
|
260
|
260
|
FlashMessage::setFlash("Pas assez de ressources pour effectuer cette recherche"); |
|
261
|
261
|
return false; |
|
262
|
262
|
} |