Prend une image au hasard dans les 150 qui existent lors de la génération de la planète
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
16c71524b1
commit
93dd3e187a
@ -684,21 +684,17 @@ class Planete extends Surface
|
|||||||
$this->id_user = $id_user;
|
$this->id_user = $id_user;
|
||||||
|
|
||||||
//Génération du nombre de case et de l'image en fonction de la position dans le système
|
//Génération du nombre de case et de l'image en fonction de la position dans le système
|
||||||
|
$this->image = mt_rand(1, 150);
|
||||||
if ($mere) {
|
if ($mere) {
|
||||||
$this->cases = 225;
|
$this->cases = 225;
|
||||||
$this->image = mt_rand(1, 19);
|
|
||||||
} elseif ($this->position > $VAR['nb_planete']*0.75) {
|
} elseif ($this->position > $VAR['nb_planete']*0.75) {
|
||||||
$this->cases = mt_rand(200, 255);
|
$this->cases = mt_rand(200, 255);
|
||||||
$this->image = mt_rand(1, 19);
|
|
||||||
} elseif ($this->position > $VAR['nb_planete']/2) {
|
} elseif ($this->position > $VAR['nb_planete']/2) {
|
||||||
$this->cases = mt_rand(250, 300);
|
$this->cases = mt_rand(250, 300);
|
||||||
$this->image = mt_rand(1, 19);
|
|
||||||
} elseif ($this->position > $VAR['nb_planete']/4) {
|
} elseif ($this->position > $VAR['nb_planete']/4) {
|
||||||
$this->cases = mt_rand(175, 260);
|
$this->cases = mt_rand(175, 260);
|
||||||
$this->image = mt_rand(1, 19);
|
|
||||||
} else {
|
} else {
|
||||||
$this->cases = mt_rand(150, 220);
|
$this->cases = mt_rand(150, 220);
|
||||||
$this->image = mt_rand(1, 19);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Définition des principaux paramètres de la planète
|
//Définition des principaux paramètres de la planète
|
||||||
|
Loading…
Reference in New Issue
Block a user