User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Fix Bug: 'TypeError: this.hasResources is not a function' in this line: 'if (utility.action === 'trade' && this.hasResources()) {' Line Number: 70
User prompt
Improve iq
User prompt
Fix Bug: 'Uncaught TypeError: self.createAndAddWorkplace is not a function' in this line: 'self.workplaces.push(self.createAndAddWorkplace());' Line Number: 455
User prompt
Fix Bug: 'Uncaught TypeError: self.createAndAddHouse is not a function' in this line: 'houses.push(self.createAndAddHouse(2048 / 2, 2732 / 2));' Line Number: 441
===================================================================
--- original.js
+++ change.js
@@ -119,8 +119,11 @@
self.tiredness = 0;
Villager.prototype.canBuildHouse = function () {
return this.gameResources && this.gameResources.wood.amount >= 200 && this.gameResources.rock.amount >= 200 && this.gameResources.food.amount >= 200;
};
+ self.hasResources = function () {
+ return self.carriedWood > 0 || self.carriedRock > 0 || self.carriedFood > 0;
+ };
Villager.prototype.calculateBuildUtility = function () {
return this.canBuildHouse() ? 25000 : 0;
};
Villager.prototype.canFallInLove = function (otherVillager) {
A background of a paysage with plain and without tree or montainbut no water see from the top in the air 100m by 100m Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
One human medieval villager in a warcraft 2 style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a house in a warcraft 2 style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tree a rock and crambery in a RTS style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A heart comic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cloud in a comic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A market in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An Inn in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An school in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An bakery in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A well in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tree in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An apple in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A rock in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A home in a RTS and fantasy style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A brewery in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A lumberjack in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a marketplace in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a festival in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.