Code edit (1 edits merged)
Please save this source code
User prompt
Castle Clash: Gold Rush
Initial prompt
background image 1 player's castle is on the bottom left of the screen, 1 enemy's castle is on the bottom right of the screen, they both have 1000 health, health values are written on both of them, add gold logic to the game, 1 gold is earned every 0.2 seconds, both the player and the enemy have gold and use this gold to send out soldiers, the player also uses this gold to send out soldiers, the enemy's is automatic, the player clicks on the screen to send them out, the gold values are reduced by the cost of the soldiers on both sides, the amount of gold belonging to the player is written in the middle of the screen, the soldiers stop when they touch each other and hit each other according to their attack values and disappear when their health values run out, the health and attack values of these soldiers are random between 5-25, and the soldiers sent by the enemy attack as if they encountered my soldier when they touch the block where my pen is defined, of course the castle does not attack him, the enemy soldier will continue to attack until I send out a new soldier and kill him, the same thing happens to the player soldiers The same goes for them, when they reach the enemy castle they will stop and attack.
/**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 });
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000
});
ottoman castle. In-Game asset. 2d. High contrast. No shadows. pixel art
roma knight. In-Game asset. 2d. High contrast. No shadows
Ottoman Janissary. In-Game asset. 2d. High contrast. No shadows
sword. In-Game asset. 2d. High contrast. No shadows
Ottoman camel warrior. In-Game asset. 2d. High contrast. No shadows. pixel art
Roman cavalry. In-Game asset. 2d. High contrast. No shadows
camel face. In-Game asset. 2d. High contrast. No shadows. pixel art
wall icon game. In-Game asset. 2d. High contrast. No shadows
RED CRESCENT ICON. In-Game asset. 2d. High contrast. No shadows
HEALING TENT OTTOMAN. In-Game asset. 2d. High contrast. No shadows