User prompt
for each level my enemy health and attack values are as follows - Level 1 Health: 20 - 100 random Attack: 1 - 20 random Attack Speed: 1 - 5 random 🔹 Level 2 Health: 50 - 150 random Attack: 5 - 25 random Attack Speed: 2 - 6 random 🔹 Level 3 Health: 80 - 200 random Attack: 10 - 30 random Attack Speed: 3 - 7 random 🔹 Level 4 Health: 110 - 250 random Attack: 15 - 35 random Attack Speed: 4 - 8 random 🔹 Level 5 Health: 150 - 300 random Attack: 20 - 40 random Attack Speed: 5 - 9 random 🔹 Level 6 Health: 200 - 360 random Attack: 25 - 45 random Attack Speed: 6 - 10 random 🔹 Level 7 Health: 250 - 420 random Attack: 30 - 50 random Attack Speed: 7 - 11 random 🔹 Level 8 Health: 300 - 480 random Attack: 35 - 55 random Attack Speed: 8 - 12 random 🔹 Level 9 Health: 350 - 540 random Attack: 40 - 60 random Attack Speed: 9 - 13 random 🔹 Level 10 Health: 400 - 600 random Attack: 45 - 70 random Attack Speed: 10 - 15 random /// set the enemy statistics like this I will get enemies like this from level 1 to level 10
User prompt
The enemy will be on the far right of the screen.
User prompt
The buttons are not visible, make sure you installed it in the correct places
User prompt
Add the spawnBtn and upgradeBtn buttons to the locations I mentioned.
User prompt
the main character will appear on the left side of the screen, there will be a button in the middle bottom part, when we click on that button, an enemy will appear in front of him "spawnBtn", gold will drop from the enemy, there will be a button in the middle top part and that button will develop the character and increase the level "upgradeBtn", our gold amount will be written in the upper right part
Code edit (1 edits merged)
Please save this source code
User prompt
Gold Drop Hero
Initial prompt
The main character will appear on the left side of the screen, there will be a button in the middle bottom part, when we click on that button, an enemy will come in front of him, gold will drop from the enemy, there will be a button in the middle top part and that button will develop the character, increase the level and our gold amount will be written in the upper right part
/**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 });
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000
});