forked from halo-battle/game
Le calcul des points c'était n'importe quoi. J'ai simplifié c'est désormais: le nombre de ressources consommées x 0.7
This commit is contained in:
parent
aed31bcfc8
commit
dcb0eaf50d
@ -113,6 +113,7 @@ class User
|
||||
|
||||
public function addPoints($metal, $cristal, $hydrogene, $credits = 0, $demolition = false)
|
||||
{
|
||||
/* Ancien code, fait des calculs boursier dans le système de points, wtf ?
|
||||
global $table_bourse_ressources;
|
||||
//On charge les 3 valeurs boursières
|
||||
$bdd = new BDD();
|
||||
@ -129,6 +130,11 @@ class User
|
||||
$points = bourse_calcPrixBase($bourse[0]["dispo"], $metal);
|
||||
$points += bourse_calcPrixBase($bourse[1]["dispo"], $cristal);
|
||||
$points += bourse_calcPrixBase($bourse[2]["dispo"], $hydrogene);
|
||||
*/
|
||||
$rate = 0.7;
|
||||
$points = $metal *$rate;
|
||||
$points += $cristal *$rate;
|
||||
$points += $hydrogene *$rate;
|
||||
|
||||
if ($demolition) {
|
||||
$this->points -= intval($points);
|
||||
|
Loading…
Reference in New Issue
Block a user