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
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
===================================================================
--- original.js
+++ change.js
@@ -109,8 +109,11 @@
if (this.tiredness <= 0) {
this.state = 'atHome';
}
};
+ Villager.prototype.hasResources = function () {
+ return this.carriedWood > 0 || this.carriedRock > 0 || this.carriedFood > 0;
+ };
Villager.prototype.isDoingSomething = function () {
return this.state === 'goingToWork' || this.state === 'working' || this.state === 'goingHome' || this.state === 'resting' || this.state === 'plantingTree' || this.state === 'buildingHouse';
};
self.carriedWood = 0;
@@ -125,11 +128,8 @@
};
Villager.prototype.canFallInLove = function (otherVillager) {
return this.state === 'atHome' && otherVillager.state === 'atHome' && !this.partner && !otherVillager.partner;
};
- self.hasResources = function () {
- return self.carriedWood > 0 || self.carriedRock > 0 || self.carriedFood > 0;
- };
self.gameResources = resources;
var villagerGraphics = self.createAsset('villager', 'Villager Graphics', .5, .5);
self.targetX = null;
self.targetY = null;
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.