Skip to content

Commit

Permalink
More bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonLarsen committed Aug 25, 2015
1 parent ece07ef commit 0f57466
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 41 deletions.
6 changes: 3 additions & 3 deletions data/levels/world.lua
Expand Up @@ -643,7 +643,7 @@ return {
visible = true,
properties = {
["dir"] = "2",
["id"] = "ghostkid3"
["id"] = "ghostkid2"
}
},
{
Expand All @@ -659,7 +659,7 @@ return {
visible = true,
properties = {
["dir"] = "0",
["id"] = "ghostkid3"
["id"] = "ghostdog1"
}
},
{
Expand All @@ -675,7 +675,7 @@ return {
visible = true,
properties = {
["dir"] = "3",
["id"] = "ghostkid4"
["id"] = "ghostdog2"
}
},
{
Expand Down
1 change: 0 additions & 1 deletion main.lua
Expand Up @@ -33,7 +33,6 @@ function love.load()

gamestate.registerEvents()
gamestate.push(require("scenes.title.TitleScene")())

Resources.playMusic("overworld.mp3")
end

Expand Down
2 changes: 1 addition & 1 deletion scenes/minigame/door/Controller.lua
Expand Up @@ -67,7 +67,7 @@ function Controller:draw()
local frame = math.floor(self.hits / self.required * 4) + 1
frame = math.min(frame, 4)

love.graphics.draw(self.hole[frame], self.holex, self.holy, 0, 1, 1, 32, -20)
love.graphics.draw(self.hole[frame], self.holex-32, self.holey-50)
end

if self:isSuccess() then
Expand Down
2 changes: 1 addition & 1 deletion scenes/minigame/sling/Controller.lua
Expand Up @@ -73,7 +73,7 @@ function Controller:update(dt)
self.cockroachy = self.slingy+2*self.power

elseif self.state == 1 then
self.pos = self.pos + 2*dt
self.pos = self.pos + ice_speed[self.level]*dt
self.rot = math.sin(self.pos)-0.1

self.yspeed = self.yspeed + GRAVITY*dt
Expand Down
70 changes: 35 additions & 35 deletions scenes/world/NPCData.lua
Expand Up @@ -187,25 +187,53 @@ NPCData["ghostkid2"] = {
end
}

NPCData["ghostkid3"] = {
NPCData["ghostdog1"] = {
type = NPCData.TYPE_ENEMY,
name = "GHOST KID",
sprite = "ghost",
costume = NPCData.COSTUME_GHOST,
name = "GHOST DOG",
sprite = "ghostdog",
costume = NPCData.COSTUME_GHOST_CRITTER,
state = 0,
range = 4,
hp = 80,
damage = 25,
hp = 200,
damage = 35,

interact = {
[0] = function(self)
self.scene:add(Dialog({"GHOST DOG: I'M A GHOST DOG!"}, function()
self:startBattle()
end))
end,
},

onWin = function(self)
self:setNPCState(1, 0)
end
}

-- GHOST DOG WHO GIVES YOU WOLF SUIT
NPCData["ghostdog2"] = {
type = NPCData.TYPE_ENEMY,
name = "GHOST DOG",
sprite = "ghostdog",
costume = NPCData.COSTUME_GHOST_CRITTER,
state = 0,
range = 4,
hp = 230,
damage = 40,

interact = {
[0] = function(self)
self.scene:add(Dialog({"GHOST KID: YOU WON'T STAND", "A CHANCE IN THE ALLEY ALLEY", "WITHOUT A SPLATTER COSTUME!"}, function()
self.scene:add(Dialog({"GHOST DOG: I'M NOT AFRAID","OF YOU!"}, function()
self:startBattle()
end))
end,
},

onWin = function(self)
self.scene:add(Dialog({"GHOST DOG: HERE. HAVE THIS.","THAT WILL HELP YOU SCARE","THE BULLIES IN THE FOREST!"}, function()
self.scene:find("player"):giveCostume("wolf")
end))
self.scene:add(Dialog({"GHOST DOG GAVE YOU A WOLF"," COSTUME."}))
self:setNPCState(1, 0)
end
}
Expand Down Expand Up @@ -275,34 +303,6 @@ NPCData["dad"] = {
}
}

-- GHOST DOG WHO GIVES YOU WOLF SUIT
NPCData["ghostkid4"] = {
type = NPCData.TYPE_ENEMY,
name = "GHOST DOG",
sprite = "ghostdog",
costume = NPCData.COSTUME_GHOST_CRITTER,
state = 0,
range = 4,
hp = 230,
damage = 40,

interact = {
[0] = function(self)
self.scene:add(Dialog({"GHOST DOG: I'M A GHOST DOG!"}, function()
self:startBattle()
end))
end,
},

onWin = function(self)
self.scene:add(Dialog({"GHOST DOG: HERE. HAVE THIS.","THAT WILL HELP YOU SCARE","THE BULLIES IN THE FOREST!"}, function()
self.scene:find("player"):giveCostume("wolf")
end))
self.scene:add(Dialog({"GHOST DOG GAVE YOU A WOLF"," COSTUME."}))
self:setNPCState(1, 0)
end
}

-- Old man in house with apples
NPCData["oldman"] = {
type = NPCData.TYPE_NPC,
Expand Down

0 comments on commit 0f57466

Please sign in to comment.