OSDN Git Service

Yukkuri continue to eat the food of place.
authornagoling <>
Wed, 30 Oct 2013 02:10:23 +0000 (11:10 +0900)
committernagomi <nagomi@192.168.1.23>
Wed, 30 Oct 2013 02:10:23 +0000 (11:10 +0900)
プレイスの食料を食べ続ける不具合修正

main.js

diff --git a/main.js b/main.js
index ab97eb5..3dcd6f3 100644 (file)
--- a/main.js
+++ b/main.js
@@ -1233,7 +1233,7 @@ window.onload = function(){
 
                        var sec = BASE_FPS * 3;
                        var foodHash = this.place.getFoodHash();
-                       if(this.yukkuri.eat(foodHash)){
+                       if(foodHash !== false && this.yukkuri.eat(foodHash)){
                                mangMsg.output(this.yukkuri, EMsg.EAT);
                                this.yukkuri.setFaceImage(EFace.EAT2);
                        }else{
@@ -1249,7 +1249,7 @@ window.onload = function(){
                onactionend:function(self){
                        return function(e){
                                if(typeof e === "undefined")return;
-                               if(self.yukkuri.isManpuku()){
+                               if(self.place.isFood() && self.yukkuri.isManpuku()){
 
                                        self.action.setStatus(EAction.THINK);
                                        self.yukkuri.setFaceImage(EFace.NORMAL);
@@ -1456,7 +1456,7 @@ window.onload = function(){
                                this.image = game.assets[EResPath.GRASS];
                                this.frame = 0;
                                this.give = 10;
-                               this.amount = 3;
+                               this.amount = 20;
                        }
                        this.x = x;
                        this.y = y;
@@ -2121,6 +2121,7 @@ window.onload = function(){
                        // },
                        Marisa.call(this, x, y, EGrow.ADULT);
                        this.classname = "Player";
+                       this.cmdQueue = [];
                        ctl.setPlayer(this);
                        // this.removeEventListener('enterframe',this.runEnterframe);
                        this.addEventListener('enterframe', function(){