Skip to content
Snippets Groups Projects
Commit 801b22f9 authored by Clement Franckelemon's avatar Clement Franckelemon
Browse files

Ajustement du taux d'apparition des bonus

fixed #21
parent 2738ccac
No related branches found
No related tags found
1 merge request!20Ajout des Bonus (vie et tir rapide)
......@@ -186,12 +186,12 @@ function getRandomGenerator(ennemies) {
function getRandomBonus(actualBonus) {
if (actualBonus == null){
if((Math.random() * 2) > 1){
if(Math.random() < 0.05){
if(Math.random() < 0.001){
return new Bonus('images/bonus/heal.png',3200,Math.random() * 1000);
} else {
return null;
}
} else if (Math.random() < 0.03) {
} else if (Math.random() < 0.0008) {
return new Bonus('images/bonus/gun_power.png',3200,Math.random() * 1000);
} else {
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment