Ajout de l'icone Waria - Modification des fichiers json du mode de jeu Duel - Correction d'un problème lors de la suppression d'une action de l'arbre (elle n'était pas vraiment supprimée) - Dorénavant, les bonus d'attaque se cumule - Ajout du record de score par niveau - Ajout de l'affichage du record dans la scène de sélection et sur la page de fin de jeu - Suppression d'un lien css dans le html qui était inutil

master
clmaisonha 5 years ago
parent 0db79472e4
commit 5ef302d4d5

@ -3,10 +3,10 @@
<head>
<meta charset="utf-8">
<title>Waria</title>
<link rel="icon" href="public/icon/favicon.png"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="public/css/app.min.css" rel="stylesheet" type="text/css">
<script src="public/js/phaser.min.js"></script>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Allerta+Stencil"/>
</head>
<body>

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":true,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":3,"speedReload":3,"range":3,"damage":5,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8}]}
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":false,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.1,"name":"enemy","speed":0,"speedReload":5,"range":5,"damage":5,"lNode":[{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8},{"style":"attack","number":1,"x":0.8,"y":0.3}]}

@ -1 +1 @@
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":true,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":3,"speedReload":3,"range":3,"damage":5,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8}]}
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":false,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":10,"speedReload":0,"range":0,"damage":0,"lNode":[{"type":"condition","option":[false,false,true,0.3333333333333333,1],"lNode":[{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[1]},{"type":"condition","option":[true,true,false,0.6666666666666666,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"move","option":[true,true]}]},{"type":"move","option":[true,false]},{"type":"attack","option":[1]},{"type":"move","option":[true,true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8},{"style":"attack","number":2,"x":0.2,"y":0.4},{"style":"attack","number":2,"x":0.4,"y":0.2}]}

@ -1 +1 @@
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":true,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":3,"speedReload":3,"range":3,"damage":5,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8}]}
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":false,"initStat":{"valueMax":15,"lBar":[{"valueMax":10,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":5,"speedReload":5,"range":5,"damage":5,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.3},{"style":"shield","number":0,"x":0.2,"y":0.2},{"style":"shield","number":0,"x":0.1,"y":0.2},{"style":"shield","number":2,"x":0.8,"y":0.6},{"style":"shield","number":2,"x":0.2,"y":0.8},{"style":"speed","number":2,"x":0.4,"y":0.9},{"style":"attack","number":0,"x":0.8,"y":0.15}]}

@ -1 +1 @@
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":true,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":3,"speedReload":3,"range":3,"damage":5,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8}]}
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":false,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.6,"y":0.13,"name":"enemy","speed":10,"speedReload":5,"range":5,"damage":10,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.5,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"speed","number":0,"x":0.1,"y":0.8},{"style":"shield","number":2,"x":0.1,"y":0.7},{"style":"shield","number":2,"x":0.1,"y":0.6},{"style":"shield","number":0,"x":0.9,"y":0.9},{"style":"shield","number":0,"x":0.9,"y":0.8},{"style":"shield","number":0,"x":0.9,"y":0.7},{"style":"shield","number":0,"x":0.9,"y":0.6},{"style":"shield","number":0,"x":0.9,"y":0.5},{"style":"shield","number":0,"x":0.9,"y":0.4},{"style":"shield","number":0,"x":0.9,"y":0.3},{"style":"shield","number":0,"x":0.9,"y":0.2},{"style":"attack","number":2,"x":0.9,"y":0.1},{"style":"attack","number":2,"x":0.1,"y":0.1},{"style":"attack","number":2,"x":0.2,"y":0.1}]}

@ -1 +1 @@
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":true,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":3,"speedReload":3,"range":3,"damage":5,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8}]}
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":false,"initStat":{"valueMax":20,"lBar":[{"valueMax":10,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":10,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":10,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":10,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.15,"y":0.5,"name":"enemy","speed":5,"speedReload":10,"range":10,"damage":10,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.35,"y":0.7,"name":"myself","speed":0,"speedReload":0,"range":0,"damage":0,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8},{"style":"attack","number":0,"x":0.8,"y":0.4}]}

@ -1 +1 @@
{"enemyVisible":true,"bonusVisible":true,"robotRandomPosition":true,"initStat":{"valueMax":10,"lBar":[{"valueMax":5,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":5,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":5,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":5,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":3,"speedReload":3,"range":3,"damage":5,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":3,"speedReload":1,"range":3,"damage":5,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"shield","number":0,"x":0.2,"y":0.1},{"style":"shield","number":1,"x":0.5,"y":0.9},{"style":"shield","number":2,"x":0.2,"y":0.8}]}
{"enemyVisible":false,"bonusVisible":false,"robotRandomPosition":true,"initStat":{"valueMax":20,"lBar":[{"valueMax":10,"color":16711680,"colorMin":16711680,"lText":["DAMAGE","DEGATS"]},{"valueMax":10,"color":8323327,"colorMin":8323327,"lText":["R.S","RECHARGEMENT"]},{"valueMax":10,"color":255,"colorMin":255,"lText":["SPEED","VITESSE"]},{"valueMax":10,"color":32768,"colorMin":32768,"lText":["RANGE","PORTEE"]}]},"listTeam":[{"name":"enemyTeam","robots":[{"height":0.1,"width":0.1,"x":0.1,"y":0.1,"name":"enemy","speed":8,"speedReload":8,"range":8,"damage":8,"lNode":[{"type":"condition","option":[false,false,true,0,1],"lNode":[{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[true,false]}]},{"type":"attack","option":[0.3333333333333333]},{"type":"attack","option":[0.6666666666666666]},{"type":"attack","option":[]}]},{"type":"move","option":[true,false]},{"type":"move","option":[true]}]}]},{"name":"myTeam","robots":[{"height":0.1,"width":0.1,"x":0.9,"y":0.9,"name":"myself","speed":0,"speedReload":0,"range":0,"damage":0,"lNode":[{"type":"move","option":[true,false]},{"type":"attack","option":[0.3333333333333333]},{"type":"condition","option":[true,true,false,0.3333333333333333,0],"lNode":[{"type":"move","option":[false,true]},{"type":"attack","option":[1]}]},{"type":"move","option":[true,true]}]}]}],"lBonus":[{"style":"speed","number":1,"x":0.1,"y":0.1},{"style":"shield","number":2,"x":0.9,"y":0.1},{"style":"shield","number":2,"x":0.1,"y":0.9},{"style":"attack","number":1,"x":0.9,"y":0.9}]}

@ -24,8 +24,9 @@ class AddAttack extends AddNode {
addNode() {
if (super.verifyCategory()) {
this.selected.addRect(new RectangleNode(this.selected.getX(), this.selected.getY() + 200, this.gameR, 'attack', [this.lCategory[1].getValue()]));
super.cancel();
let newRect = new RectangleNode(this.selected.getX(), this.selected.getY() + OFFY_TREE, this.gameR, 'attack', [this.lCategory[1].getValue()]);
this.selected.addRect(newRect);
super.cancel(newRect);
}
}

@ -36,12 +36,15 @@ class AddCondition extends AddNode {
addNode() {
if (super.verifyCategory()) {
let newRect;
if (this.lCategory[1].getValue()[1] === 'range') {
this.selected.addRect(new RectangleNode(this.selected.getX(), this.selected.getY() + 200, this.gameR, 'condition', [this.lCategory[0].getValue(), false, true, 0, this.lCategory[1].getValue()[0]]));
newRect = new RectangleNode(this.selected.getX(), this.selected.getY() + OFFY_TREE, this.gameR, 'condition', [this.lCategory[0].getValue(), false, true, 0, this.lCategory[1].getValue()[0]]);
} else {
this.selected.addRect(new RectangleNode(this.selected.getX(), this.selected.getY() + 200, this.gameR, 'condition', [this.lCategory[0].getValue(), true, false, this.lCategory[1].getValue()[0], 0]));
newRect = new RectangleNode(this.selected.getX(), this.selected.getY() + OFFY_TREE, this.gameR, 'condition', [this.lCategory[0].getValue(), true, false, this.lCategory[1].getValue()[0], 0]);
}
super.cancel();
this.selected.addRect(newRect);
super.cancel(newRect);
}
}

@ -46,8 +46,9 @@ class AddMove extends AddNode {
addNode() {
if (super.verifyCategory()) {
this.selected.addRect(new RectangleNode(this.selected.getX(), this.selected.getY() + 200, this.gameR, 'move', [this.lCategory[0].getValue(), this.lCategory[1].getValue(), this.lCategory[2].getValue()]));
super.cancel();
let newRect = new RectangleNode(this.selected.getX(), this.selected.getY() + OFFY_TREE, this.gameR, 'move', [this.lCategory[0].getValue(), this.lCategory[1].getValue(), this.lCategory[2].getValue()]);
this.selected.addRect(newRect);
super.cancel(newRect);
}
}

@ -5,6 +5,6 @@ class BonusAttack extends Bonus {
useOn(robot) {
super.useOn(robot);
robot.setAttackBonus(this.value);
robot.setAttackBonus(robot.attackBonus * this.value);
}
}

@ -14,6 +14,10 @@ class Game extends ManageLang {
this.load.on('start', () => {
text = this.add.text(0.5 * WIDTH_WINDOW, 0.5 * HEIGHT_WINDOW, selectWord("LEVEL LOADING ...", "CHARGEMENT DU NIVEAU ..."), style).setOrigin(0.5, 0.5);
text.alpha = 0.5;
if (text.displayWidth > WIDTH_WINDOW) {
text.displayWidth = WIDTH_WINDOW;
text.scaleY = text.scaleX;
}
});
this.load.on('complete', () => {
text.destroy();
@ -105,22 +109,17 @@ class Game extends ManageLang {
this.gm.setBonusVisible(level.bonusVisible);
}
setRobotSelected(robot, iRobot = 0, level, force = false) {
setRobotSelected(robot, iRobot = 0, level = this.cache.json.get('level'), force = false) {
this.iRobot = iRobot;
let tree;
let initStat;
if (!force && this.robotSelected !== undefined && this.robotSelected !== robot && this.tree !== undefined && this.initStat !== undefined) {
this.robotSelected.clearTint();
initStat = JSON.parse(this.initStat.getJson());
this.tree.destroy();
this.initStat.destroy();
tree = JSON.parse(robot.getTreeJson());
} else {
if (this.initStat !== undefined) {
initStat = JSON.parse(this.initStat.getJson());
this.initStat.destroy();
} else {
initStat = level.initStat;
}
if (this.tree !== undefined) {
tree = JSON.parse(this.tree.getJson(true));
@ -130,7 +129,7 @@ class Game extends ManageLang {
}
}
this.tree = this.loadTree(tree);
this.initStat = this.loadInitSave(initStat, robot, robot.damage - DAMAGE_BASE, robot.speedReload - SPEED_RELOAD_BASE, robot.speed - SPEED_BASE, robot.range - RANGE_BASE);
this.initStat = this.loadInitSave(level.initStat, robot, robot.damage - DAMAGE_BASE, robot.speedReload - SPEED_RELOAD_BASE, robot.speed - SPEED_BASE, robot.range - RANGE_BASE);
this.robotSelected = robot;
if (this.robotSelected.team.listRobot.length > 1) {
@ -236,7 +235,7 @@ class Game extends ManageLang {
node = new Condition(element.option[0], element.option[1], element.option[2], element.option[3], element.option[4]);
break;
case "move":
node = new Move(element.option[0], element.option[1]);
node = new Move(element.option[0], element.option[1], element.option[2]);
break;
case "attack":
node = new Attack(element.option[0]);
@ -456,6 +455,7 @@ class Game extends ManageLang {
this.binBtn.changeFrame(0);
this.tryClick();
this.applyTree();
}
}

@ -3,7 +3,6 @@ class LevelSelect extends ManageLang {
super('LevelSelect');
this.father = father;
this.level = level;
console.log(getCookie(this.level));
}
create() {
@ -34,29 +33,46 @@ class LevelSelect extends ManageLang {
createLevel(x, y, number = 0) {
let width;
if (WIDTH_WINDOW > HEIGHT_WINDOW) {
if (WIDTH_WINDOW > HEIGHT_WINDOW * 1.3) {
width = HEIGHT_WINDOW / 4;
} else {
width = WIDTH_WINDOW / 4;
width = WIDTH_WINDOW / 6;
}
let btn = this.add.image(x, y, 'rectangle').setOrigin(0.5, 0.5).setInteractive();
btn.displayHeight = btn.displayWidth = width;
let style = {font: (width / 2).toString() + 'px stencil', fill: "#000000"};
let style = {font: (width / 2).toString() + 'px stencil', fill: "#000000", align: "center"};
let text = this.add.text(x, y, number.toString(), style).setOrigin(0.5, 0.5);
btn.on('pointerover', () => this.over(btn, text));
btn.on('pointerout', () => this.out(btn, text));
let score = parseInt(getCookie(this.level + (number - 1).toString()));
let scoreText;
if (!isNaN(score)) {
scoreText = this.add.text(x, text.y + text.displayHeight / 2, selectWord("RECORD SCORE :", "SCORE RECORD :") + "\n" + score.toString(), style).setOrigin(0.5, 0);
if (scoreText.displayWidth > width * 0.9) {
scoreText.displayWidth = width * 0.9;
scoreText.scaleY = scoreText.scaleX;
}
}
btn.on('pointerover', () => this.over(btn, text, scoreText));
btn.on('pointerout', () => this.out(btn, text, scoreText));
btn.on('pointerdown', () => this.click(number));
}
over(btn, text) {
over(btn, ...texts) {
btn.setFrame(1);
text.setColor("white");
texts.forEach(text => {
if (text !== undefined)
text.setColor("white");
});
}
out(btn, text) {
out(btn, ...texts) {
btn.setFrame(0);
text.setColor("black");
//text.setFill(0xffffff);
texts.forEach(text => {
if (text !== undefined)
text.setColor("black");
});
}
click(number) {

@ -13,17 +13,17 @@ class LoadFile extends Phaser.Scene {
preload() {
let progressBar = this.add.graphics();
let progressBox = this.add.graphics();
let width = 320;
let height = 50;
let width = WIDTH_WINDOW / 3;
let height = width / 5;
let x = WIDTH_WINDOW / 2 - width / 2;
let y = HEIGHT_WINDOW / 2 - height / 2;
progressBox.fillStyle(0x222222, 0.8);
progressBox.fillRect(x, y, 320, height);
progressBox.fillRect(x, y, width, height);
this.load.on('progress', function (value) {
progressBar.clear();
progressBar.fillStyle(0xffffff, 1);
progressBar.fillRect(x + 10, y + 10, (width - 20) * value, height - 20);
progressBar.fillRect(x + 5, y + 5, (width - 10) * value, height - 10);
});
this.load.on('complete', () => {
progressBar.destroy();

@ -1,7 +1,12 @@
class Winner extends Finish {
constructor(father, game, score) {
super(father, game, score);
setCookie(game.level.slice(0, -1), parseInt(game.level[game.level.length - 1]) + 2);
let level = game.level.slice(0, -1);
let nb = parseInt(getCookie(level));
let nbNext = parseInt(game.level[game.level.length - 1]) + 2;
if (isNaN(nb) || nbNext > nb) {
setCookie(level, nbNext);
}
}
create() {

@ -99,7 +99,12 @@ class AddNode extends Phaser.Scene {
return true;
}
cancel() {
cancel(newRect) {
if (newRect !== undefined) {
newRect.click();
this.gameR.clickNode();
}
this.gameR.applyTree();
this.scene.resume('Game');
this.scene.stop('AddNode');
this.father.scene.remove('AddNode');

@ -4,6 +4,14 @@ class Finish extends Phaser.Scene {
this.father = father;
this.gameSave = game;
this.score = score;
let scoreRecord = parseInt(getCookie(this.gameSave.level));
if (isNaN(scoreRecord)) {
scoreRecord = this.score;
}
console.log(scoreRecord);
if (this.score >= scoreRecord) {
setCookie(this.gameSave.level, this.score);
}
}
create() {
@ -19,8 +27,8 @@ class Finish extends Phaser.Scene {
text.displayWidth = WIDTH_WINDOW;
text.scaleY = text.scaleX;
}
style = {font: (sizeText / 2).toString() + 'px stencil', fill: "#e2e2e2"};
this.add.text(WIDTH_WINDOW / 2, text.y + text.displayHeight, "SCORE : " + this.score.toString(), style).setOrigin(0.5, 0.5);
style = {font: (sizeText / 2).toString() + 'px stencil', fill: "#e2e2e2", align: "center"};
this.add.text(WIDTH_WINDOW / 2, text.y + text.displayHeight, "SCORE : " + this.score.toString() + "\n" + selectWord("RECORD SCORE : ", "SCORE RECORD : ") + getCookie(this.gameSave.level), style).setOrigin(0.5, 0.5);
}
createButton(x, texture) {

@ -73,25 +73,12 @@ function getNextLevel(level = "") {
function setCookie(cName, cValue) {
let d = new Date();
let day = 100;
let day = 360;
d.setTime(d.getTime() + (day * 24 * 60 * 60 * 1000));
let expires = "expires=" + d.toUTCString();
document.cookie = cName + "=" + cValue + ";" + expires + ";path=/;SameSite=Lax";
}
/*
function getCookies() {
let c = document.cookie.split('; ');
let json = "{";
c.forEach(cookie => {
let m = cookie.split(('='));
json += '"' + m[0] + '":' + m[1] + ',';
});
json = endLineJson(json) + '}';
return JSON.parse(json);
}
*/
function getCookie(cName) {
let c = document.cookie.split('; ');
for (let i = 0; i < c.length; i++) {

@ -18,7 +18,10 @@ class HealthBar {
let style = {font: height.toString() + 'px stencil', fill: "#000000"};
this.nameText = scene.add.text(x, y, name, style).setOrigin(0, 0);
this.nameText.alpha = 0.5;
if (this.nameText.displayWidth > this.width * 0.9) {
this.nameText.displayWidth = this.width * 0.9;
this.nameText.scaleY = this.nameText.scaleX;
}
this.setX(x, middle);
this.setY(y);
}

@ -1,7 +1,7 @@
{
"enemyVisible": true,
"bonusVisible": true,
"robotRandomPosition": true,
"robotRandomPosition": false,
"initStat": {
"valueMax": 10,
"lBar": [
@ -50,67 +50,29 @@
{
"height": 0.1,
"width": 0.1,
"x": 0.1,
"x": 0.9,
"y": 0.1,
"name": "enemy",
"speed": 3,
"speedReload": 3,
"range": 3,
"speed": 0,
"speedReload": 5,
"range": 5,
"damage": 5,
"lNode": [
{
"type": "condition",
"type": "attack",
"option": [
false,
false,
true,
0,
1
],
"lNode": [
{
"type": "condition",
"option": [
true,
true,
false,
0.3333333333333333,
0
],
"lNode": [
{
"type": "move",
"option": [
true,
false
]
}
]
},
{
"type": "attack",
"option": [
0.3333333333333333
]
},
{
"type": "attack",
"option": [
0.6666666666666666
]
},
{
"type": "attack",
"option": [
]
}
0.3333333333333333
]
},
{
"type": "move",
"type": "attack",
"option": [
0.6666666666666666
]
},
{
"type": "attack",
"option": [
true,
false
]
},
{
@ -205,6 +167,12 @@
"number": 2,
"x": 0.2,
"y": 0.8
},
{
"style": "attack",
"number": 1,
"x": 0.8,
"y": 0.3
}
]
}

@ -1,7 +1,7 @@
{
"enemyVisible": true,
"bonusVisible": true,
"robotRandomPosition": true,
"robotRandomPosition": false,
"initStat": {
"valueMax": 10,
"lBar": [
@ -53,10 +53,10 @@
"x": 0.1,
"y": 0.1,
"name": "enemy",
"speed": 3,
"speedReload": 3,
"range": 3,
"damage": 5,
"speed": 10,
"speedReload": 0,
"range": 0,
"damage": 0,
"lNode": [
{
"type": "condition",
@ -64,17 +64,35 @@
false,
false,
true,
0,
0.3333333333333333,
1
],
"lNode": [
{
"type": "attack",
"option": [
0.3333333333333333
]
},
{
"type": "attack",
"option": [
0.6666666666666666
]
},
{
"type": "attack",
"option": [
1
]
},
{
"type": "condition",
"option": [
true,
true,
false,
0.3333333333333333,
0.6666666666666666,
0
],
"lNode": [
@ -88,20 +106,10 @@
]
},
{
"type": "attack",
"option": [
0.3333333333333333
]
},
{
"type": "attack",
"option": [
0.6666666666666666
]
},
{
"type": "attack",
"type": "move",
"option": [
true,
true
]
}
]
@ -113,9 +121,16 @@
false
]
},
{
"type": "attack",
"option": [
1
]
},
{
"type": "move",
"option": [
true,
true
]
}
@ -205,6 +220,18 @@
"number": 2,
"x": 0.2,
"y": 0.8
},
{
"style": "attack",
"number": 2,
"x": 0.2,
"y": 0.4
},
{
"style": "attack",
"number": 2,
"x": 0.4,
"y": 0.2
}
]
}
}

@ -1,12 +1,12 @@
{
"enemyVisible": true,
"bonusVisible": true,
"robotRandomPosition": true,
"robotRandomPosition": false,
"initStat": {
"valueMax": 10,
"valueMax": 15,
"lBar": [
{
"valueMax": 5,
"valueMax": 10,
"color": 16711680,
"colorMin": 16711680,
"lText": [
@ -53,9 +53,9 @@
"x": 0.1,
"y": 0.1,
"name": "enemy",
"speed": 3,
"speedReload": 3,
"range": 3,
"speed": 5,
"speedReload": 5,
"range": 5,
"damage": 5,
"lNode": [
{
@ -192,19 +192,43 @@
"style": "shield",
"number": 0,
"x": 0.2,
"y": 0.1
"y": 0.3
},
{
"style": "shield",
"number": 1,
"x": 0.5,
"y": 0.9
"number": 0,
"x": 0.2,
"y": 0.2
},
{
"style": "shield",
"number": 0,
"x": 0.1,
"y": 0.2
},
{
"style": "shield",
"number": 2,
"x": 0.8,
"y": 0.6
},
{
"style": "shield",
"number": 2,
"x": 0.2,
"y": 0.8
},
{
"style": "speed",
"number": 2,
"x": 0.4,
"y": 0.9
},
{
"style": "attack",
"number": 0,
"x": 0.8,
"y": 0.15
}
]
}

@ -1,7 +1,7 @@
{
"enemyVisible": true,
"bonusVisible": true,
"robotRandomPosition": true,
"robotRandomPosition": false,
"initStat": {
"valueMax": 10,
"lBar": [
@ -50,13 +50,13 @@
{
"height": 0.1,
"width": 0.1,
"x": 0.1,
"y": 0.1,
"x": 0.6,
"y": 0.13,
"name": "enemy",
"speed": 3,
"speedReload": 3,
"range": 3,
"damage": 5,
"speed": 10,
"speedReload": 5,
"range": 5,
"damage": 10,
"lNode": [
{
"type": "condition",
@ -129,7 +129,7 @@
{
"height": 0.1,
"width": 0.1,
"x": 0.9,
"x": 0.5,
"y": 0.9,
"name": "myself",
"speed": 3,
@ -189,22 +189,88 @@
],
"lBonus": [
{
"style": "shield",
"style": "speed",
"number": 0,
"x": 0.2,
"y": 0.1
"x": 0.1,
"y": 0.8
},
{
"style": "shield",
"number": 1,
"x": 0.5,
"number": 2,
"x": 0.1,
"y": 0.7
},
{
"style": "shield",
"number": 2,
"x": 0.1,
"y": 0.6
},
{
"style": "shield",
"number": 0,
"x": 0.9,
"y": 0.9
},
{
"style": "shield",
"number": 0,
"x": 0.9,
"y": 0.8
},
{
"style": "shield",
"number": 0,
"x": 0.9,
"y": 0.7
},
{
"style": "shield",
"number": 0,
"x": 0.9,
"y": 0.6
},
{
"style": "shield",
"number": 0,
"x": 0.9,
"y": 0.5
},
{
"style": "shield",
"number": 0,
"x": 0.9,
"y": 0.4
},
{
"style": "shield",
"number": 0,
"x": 0.9,
"y": 0.3
},
{
"style": "shield",
"number": 0,
"x": 0.9,
"y": 0.2
},
{
"style": "attack",
"number": 2,
"x": 0.9,
"y": 0.1
},
{
"style": "attack",
"number": 2,
"x": 0.1,
"y": 0.1
},
{
"style": "attack",
"number": 2,
"x": 0.2,
"y": 0.8
"y": 0.1
}
]
}

@ -1,12 +1,12 @@
{
"enemyVisible": true,
"bonusVisible": true,
"robotRandomPosition": true,
"robotRandomPosition": false,
"initStat": {
"valueMax": 10,
"valueMax": 20,
"lBar": [
{
"valueMax": 5,
"valueMax": 10,
"color": 16711680,
"colorMin": 16711680,
"lText": [
@ -15,7 +15,7 @@
]
},
{
"valueMax": 5,
"valueMax": 10,
"color": 8323327,
"colorMin": 8323327,
"lText": [
@ -24,7 +24,7 @@
]
},
{
"valueMax": 5,
"valueMax": 10,
"color": 255,
"colorMin": 255,
"lText": [
@ -33,7 +33,7 @@
]
},
{
"valueMax": 5,
"valueMax": 10,
"color": 32768,
"colorMin": 32768,
"lText": [
@ -50,13 +50,13 @@
{
"height": 0.1,
"width": 0.1,
"x": 0.1,
"y": 0.1,
"x": 0.15,
"y": 0.5,
"name": "enemy",
"speed": 3,
"speedReload": 3,
"range": 3,
"damage": 5,
"speed": 5,
"speedReload": 10,
"range": 10,
"damage": 10,
"lNode": [
{
"type": "condition",
@ -129,13 +129,13 @@
{
"height": 0.1,
"width": 0.1,
"x": 0.9,
"y": 0.9,
"x": 0.35,
"y": 0.7,
"name": "myself",
"speed": 3,
"speedReload": 1,
"range": 3,
"damage": 5,
"speed": 0,
"speedReload": 0,
"range": 0,
"damage": 0,
"lNode": [
{
"type": "move",
@ -205,6 +205,12 @@
"number": 2,
"x": 0.2,
"y": 0.8
},
{
"style": "attack",
"number": 0,
"x": 0.8,
"y": 0.4
}
]
}

@ -1,12 +1,12 @@
{
"enemyVisible": true,
"bonusVisible": true,
"enemyVisible": false,
"bonusVisible": false,
"robotRandomPosition": true,
"initStat": {
"valueMax": 10,
"valueMax": 20,
"lBar": [
{
"valueMax": 5,
"valueMax": 10,
"color": 16711680,
"colorMin": 16711680,
"lText": [
@ -15,7 +15,7 @@
]
},
{
"valueMax": 5,
"valueMax": 10,
"color": 8323327,
"colorMin": 8323327,
"lText": [
@ -24,7 +24,7 @@
]
},
{
"valueMax": 5,
"valueMax": 10,
"color": 255,
"colorMin": 255,
"lText": [
@ -33,7 +33,7 @@
]
},
{
"valueMax": 5,
"valueMax": 10,
"color": 32768,
"colorMin": 32768,
"lText": [
@ -53,10 +53,10 @@
"x": 0.1,
"y": 0.1,
"name": "enemy",
"speed": 3,
"speedReload": 3,
"range": 3,
"damage": 5,
"speed": 8,
"speedReload": 8,
"range": 8,
"damage": 8,
"lNode": [
{
"type": "condition",
@ -132,10 +132,10 @@
"x": 0.9,
"y": 0.9,
"name": "myself",
"speed": 3,
"speedReload": 1,
"range": 3,
"damage": 5,
"speed": 0,
"speedReload": 0,
"range": 0,
"damage": 0,
"lNode": [
{
"type": "move",
@ -189,22 +189,28 @@
],
"lBonus": [
{
"style": "shield",
"number": 0,
"x": 0.2,
"style": "speed",
"number": 1,
"x": 0.1,
"y": 0.1
},
{
"style": "shield",
"number": 1,
"x": 0.5,
"y": 0.9
"number": 2,
"x": 0.9,
"y": 0.1
},
{
"style": "shield",
"number": 2,
"x": 0.2,
"y": 0.8
"x": 0.1,
"y": 0.9
},
{
"style": "attack",
"number": 1,
"x": 0.9,
"y": 0.9
}
]
}
Loading…
Cancel
Save