Skip to content

Commit

Permalink
Add secret lab
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitgentleman committed Oct 6, 2015
1 parent f8b6215 commit 928bde0
Show file tree
Hide file tree
Showing 14 changed files with 335 additions and 7 deletions.
Binary file added src/images/hiddendoor/jukebox-iso.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/npc/borchert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/npc/borchert_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/npc/raquel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/npc/raquel_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/tilesets/greendale-computer-wing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/tilesets/greendale-secret-lab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/maps/greendale-computer-wing-2.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</layer>
<layer name="foreground" width="24" height="14">
<data encoding="base64" compression="zlib">
eJxjYBgFgwWIQmkxBoYGcs2QoI5T6A4SILhhDZBei0PNViDeBsTbgXgHEOsAsS4Q6yGpCcRtvgMQH8BnPggcAOKDeOR5ofQhID4MxEeA+CgWdXJI7GggjsFjJjIQh9JngPgsEJ8D4vNY1Gkgsa8Bwy2NSPOJBUZUNo8U0ADEjUDchEO+HIh9gNiXXg7CAwBjdReP
eJxjYBgFgwWIQmkxBoYGcs2QoI5T6A4SILhhDZBei0PNViDeBsTbgXgHEOsA8TEgPo6kJhC3+Q5AfACf+SBwAIgPIvEvAPFFJD4vlD4ExIeB+AgQH8VijhwSOxqIY/DYiQzEofQZID4LxOeA+DwWdRpI7GvAcEsj0nxigRGVzSMFNABxIxA34ZAvB2IfIPall4PwAADRRxpi
</data>
</layer>
<layer name="fade" width="24" height="14">
Expand All @@ -30,7 +30,7 @@
</layer>
<layer name="collision" width="24" height="14">
<data encoding="base64" compression="zlib">
eJx7zsDA8JyGeBSMguEIxBgZGMQZiVdPiloYkALqYQRiSSx6GckwjxxAy7JhOJQPADtSK9E=
eJx7zsDA8JyGmAGJphUYNX/UfFqZz8gIwehADCgmjkUcl/nEqkUGUlC7JbHoRXYTLcOHlmUDreOVHgAA5HQ02w==
</data>
</layer>
<objectgroup name="nodes">
Expand Down
6 changes: 3 additions & 3 deletions src/maps/greendale-computer-wing-3.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</layer>
<layer name="collision" width="24" height="14">
<data encoding="base64" compression="zlib">
eJx7zsDA8JyGeBSMglFAGIgxQjAIiDMixKWAbAlGiJgkI3a9jIyoeqgJaFk2DIfyAQCT9CwX
eJx7zsDA8JyGmAGJphUYNX/U/KFuvhgjBIOAOCNCXArIlmCEiEkyYtf7HE0PNQEtywZahzs9AAAxuDUb
</data>
</layer>
<objectgroup name="nodes">
Expand All @@ -41,7 +41,7 @@
<property name="to" value="wing3"/>
</properties>
</object>
<object type="hiddendoortrigger" x="144" y="204" width="36" height="24">
<object type="hiddendoortrigger" x="114" y="204" width="36" height="24">
<properties>
<property name="height" value="24"/>
<property name="message" value="Do you want to select a song?"/>
Expand All @@ -55,7 +55,7 @@
<property name="aniframes2" value="1-10,1"/>
<property name="anispeed2" value=".35"/>
<property name="hideable" value="true"/>
<property name="level" value="greendale-computer-wing"/>
<property name="level" value="greendale-secret-lab"/>
<property name="movetime" value="2.7"/>
<property name="offset_hidden_x" value="0"/>
<property name="offset_shown_x" value="-50"/>
Expand Down
4 changes: 2 additions & 2 deletions src/maps/greendale-computer-wing.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<tileset firstgid="1" name="greendale-computer-wing" tilewidth="24" tileheight="24">
<image source="../images/tilesets/greendale-computer-wing.png" width="240" height="552"/>
</tileset>
<tileset firstgid="241" name="collisions" tilewidth="24" tileheight="24">
<tileset firstgid="231" name="collisions" tilewidth="24" tileheight="24">
<image source="../images/tilesets/collisions.png" width="632" height="512"/>
</tileset>
<layer name="background" width="32" height="14">
Expand All @@ -35,7 +35,7 @@
</layer>
<layer name="collision" width="32" height="14">
<data encoding="base64" compression="zlib">
eJz7yMDA8HEA8SgYBaNgeAEFRgYGRcaBdgV5gBvobhUgVoa6XwGJBvlJgREhxo3mRyUsflZAEkNWz8EIKf/YGAcGczGOlr8gAABMxCKD
eJx7zsDA8HwA8SgYBaNgeAExRgYGcUby9Q4kYATaLwXEkoyo7pGC+kmMESHGSIRbkf2DrP4fA6T8+zNAmIFxtPwFAQDG9z5G
</data>
</layer>
<objectgroup name="nodes">
Expand Down
67 changes: 67 additions & 0 deletions src/maps/greendale-secret-lab.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="24" height="14" tilewidth="24" tileheight="24">
<properties>
<property name="blue" value="159"/>
<property name="green" value="123"/>
<property name="red" value="104"/>
<property name="soundtrack" value="greendale-alt"/>
<property name="title" value="Borchert Hallway"/>
</properties>
<tileset firstgid="1" name="greendale-secret-lab" tilewidth="24" tileheight="24">
<image source="../images/tilesets/greendale-secret-lab.png" width="240" height="360"/>
</tileset>
<tileset firstgid="151" name="collisions" tilewidth="24" tileheight="24">
<image source="../images/tilesets/collisions.png" width="632" height="512"/>
</tileset>
<layer name="background" width="24" height="14">
<data encoding="base64" compression="zlib">
eJxjYmBgYKIhZqQxZgZiFihNTQw0s4EZgulivjxUXIECMxUH0P2j5uM2nw+I+amM+aDmKwPZICxJZaw8TDAtyzYQBgA7VhU0
</data>
</layer>
<layer name="wall" width="24" height="14">
<data encoding="base64" compression="zlib">
eJxjYBgFo2AU0BLw0cbMBhDNCsQSNDAfaGYD0OwGWpiNbAcNjacLAAD0ygKH
</data>
</layer>
<layer name="foreground" width="24" height="14">
<data encoding="base64" compression="zlib">
eJzt0Lsvg1EAxuFOqMltLCOqLq2ibkVR6lrF4FIGpQxaasCqf7ln+CSGb0Ni+H7Jk5yTnLzDicWiov5/FY454ZQkY6QYZ4JJpoL3GaaDcweddIXsxunmkipXXJNlhlnmyDHPAosssUyCHnrpC+5nnHNBPwPcUeeeB/KssMoaBdbZYJMiWwyHuKHGLYMM8cQzLV7YpsQOu+yxzwGHlDkiHeKRBk1GGA35t5/0yhvvv7z7vQ/af7j/1SfsWRgy
</data>
</layer>
<layer name="super foreground" width="24" height="14">
<properties>
<property name="foreground" value="true"/>
</properties>
<data encoding="base64" compression="zlib">
eJztzKcOgDAUQFE8IIEvRbBJ2HvzvVxR2TQIFOlNjngdzzB0Ot3fChAiQowE6cu/vuTMhAVbzAVKVKjRoFXs7NBjwCi5d+DCE/OEGQtWbNgV+w+cuHAjQ654/1UPOxcPug==
</data>
</layer>
<layer name="collision" width="24" height="14" visible="0">
<data encoding="base64" compression="zlib">
eJybzsDAMJ2GeAMDbcAGNHrU/JFj/jE0TA3zTwHxRiA+SUDfKSQ1MD3o+CQW8wmBU2jmHSegnl7hT8uyYTgAAHouOS4=
</data>
</layer>
<objectgroup name="nodes">
<object name="main" type="door" x="24" y="197" width="35" height="67">
<properties>
<property name="aniframes2" value="1-9,1"/>
<property name="anispeed2" value=".35"/>
<property name="hideable" value="true"/>
<property name="level" value="greendale-computer-wing-3"/>
<property name="movetime" value="2.7"/>
<property name="offset_hidden_x" value="0"/>
<property name="offset_shown_x" value="-40"/>
<property name="offset_shown_y" value="40"/>
<property name="show_sfx" value="throne_door"/>
<property name="sound" value="false"/>
<property name="sprite" value="jukebox-iso"/>
<property name="sprite_height" value="67"/>
<property name="sprite_width" value="35"/>
<property name="to" value="jukebox"/>
<property name="trigger" value="raquel"/>
</properties>
</object>
<object name="raquel" type="npc" x="360" y="198" width="24" height="67"/>
<object name="borchert" type="npc" x="312" y="216" width="48" height="48"/>
</objectgroup>
</map>
2 changes: 2 additions & 0 deletions src/npclevels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ return {
oldman = {0, 0, 0, false},
juanita = {0, 0, 0, false},
frankie = {0, 0, 0, false},
raquel = {0, 0, 0, false},
borchert = {0, 0, 0, false},
}
51 changes: 51 additions & 0 deletions src/npcs/borchert.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
-- inculdes
local Dialog = require 'dialog'
local prompt = require 'prompt'
local Timer = require('vendor/timer')
local Quest = require 'quest'
local quests = require 'npcs/quests/juanitaquest'

return {
width = 48,
height = 48,
greeting = 'I am {{red_light}}Russell Borchert{{white}}, anti-deodorant activist, and millionaire.',
animations = {
default = {
'loop',{'1-4,1'},.5,
},
},
stare = true,
talk_items = {
{ ['text']='i am done with you' },
{ ['text']='Money?', freeze = true },
{ ['text']='What is that thing?' },
{ ['text']='Who are you?'},
},
talk_commands = {
['Money?']= function(npc, player)
if npc.trust < 1 then
Dialog.new("I have a couple million Gerald Ford dollars in that bag over there. How about you leave me alone and I hereby grant this money to Greendale?", function()
--taking in the inflation between 1974 and 2014 1 million gerald ford dollars would be worth ~5,044,350.65 USD
player.money = player.money + 5044350
npc.trust = npc.trust + 1
npc.menu:close(player)
end)
else
Dialog.new("I hope you can put that money to good use fixing up Greendale. Now leave me and Raquel alone!", function()
npc.menu:close(player)
end)
end

end,
},
talk_responses = {
['Who are you?']={
"I'm Russell Borchert. I founded Greendale in 1974 with money from the 9-track cassette player I invented.",
"I allowed the Dean to seal me and the entire computer lab off from the rest of the campus while I worked on creating a computer that could process human emotion.",
},
['What is that thing?']={
"This is Raquel. She is the computer I created to respond to emotional stimuli.",
"You can try her yourself. Just think about things that generate emotion, happy or sad.",
},
},
}
208 changes: 208 additions & 0 deletions src/npcs/raquel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
-- inculdes
local Dialog = require 'dialog'

return {
width = 24,
height = 67,
animations = {
default = {
'once',{'2,1'},.5,
},
neutral = {
'once',{'2,1'},.2,
},
happy = {
'once',{'1,1'},.5,
},
sad = {
'once',{'3,1'},.15,
}
},
stare = false,

talk_items = {
{ ['text']='i am done with you' },
{ ['text']='Current emotion level' },
{ ['text']="I'm thinking about...", ['option']={
{ ['text']='puppy parade'},
{ ['text']='Kickpuncher'},
{ ['text']='Inspector Spacetime'},
{ ['text']='the study group'},
{ ['text']='Dictator Chang'},
{ ['text']='buttered noodles'},
{ ['text']="Vaughn's tiny nipples"},
{ ['text']="paintball"},
{ ['text']="City College"},
{ ['text']="Cougar Town"},
{ ['text']="pillow and blanket forts"},
{ ['text']="dancing"},
{ ['text']="psychology experiments"},
{ ['text']="Alan Connor"},
{ ['text']="LeVar Burton"},
{ ['text']="Annie's Boobs"},
{ ['text']="Glee Club"},
{ ['text']="gas leaks"},
{ ['text']="Professor Cornwallis"},
{ ['text']="Yogurtsburgh"},
{ ['text']="Ass Crack Bandit"},
{ ['text']="#sixseasonsandamovie"},
{ ['text']="Magnitude"},
{ ['text']="Natalie is Freezing"},
{ ['text']="norwegian Troll doll"},
{ ['text']="Adderall"},
{ ['text']="Chimpan-Zzz's"},
{ ['text']="Daybreak"},

}},
{ ['text']='How does this work?' },
},
talk_commands = {
['Current emotion level'] = function (npc, player)
local affection = player.affection.raquel or 0
Dialog.new("My current emotion level is " .. affection .. ".", function()
npc.menu:close(player)
end)
end,
['puppy parade'] = function (npc, player)
npc:affectionUpdate(50)
player:affectionUpdate('raquel',50)
end,
['Kickpuncher'] = function (npc, player)
npc:affectionUpdate(50)
player:affectionUpdate('raquel',50)
end,
['Inspector Spacetime'] = function (npc, player)
npc:affectionUpdate(100)
player:affectionUpdate('raquel',100)
end,
['the study group'] = function (npc, player)
npc:affectionUpdate(200)
player:affectionUpdate('raquel',200)
end,
['Dictator Chang'] = function (npc, player)
npc:affectionUpdate(-100)
player:affectionUpdate('raquel',-100)
end,
['buttered noodles'] = function (npc, player)
npc:affectionUpdate(50)
player:affectionUpdate('raquel',50)
end,
["Vaughn's tiny nipples"] = function (npc, player)
npc:affectionUpdate(100)
player:affectionUpdate('raquel',100)
end,
['paintball'] = function (npc, player)
npc:affectionUpdate(200)
end,
['City College'] = function (npc, player)
npc:affectionUpdate(-200)
player:affectionUpdate('raquel',-200)
end,
['Cougar Town'] = function (npc, player)
npc:affectionUpdate(50)
player:affectionUpdate('raquel',50)
end,
['pillow and blanket forts'] = function (npc, player)
npc:affectionUpdate(100)
player:affectionUpdate('raquel',100)
end,
['dancing'] = function (npc, player)
npc:affectionUpdate(50)
player:affectionUpdate('raquel',50)
end,
['psychology experiments'] = function (npc, player)
npc:affectionUpdate(-50)
player:affectionUpdate('raquel',-50)
end,
['Alan Connor'] = function (npc, player)
npc:affectionUpdate(-50)
player:affectionUpdate('raquel',-50)
end,
['LeVar Burton'] = function (npc, player)
npc:affectionUpdate(100)
player:affectionUpdate('raquel',100)
end,
["Annie's Boobs"] = function (npc, player)
npc:affectionUpdate(50)
player:affectionUpdate('raquel',50)
end,
['Glee Club'] = function (npc, player)
npc:affectionUpdate(-100)
player:affectionUpdate('raquel',-100)
end,
['gas leaks'] = function (npc, player)
npc:affectionUpdate(-200)
player:affectionUpdate('raquel',-200)
end,
['Professor Cornwallis'] = function (npc, player)
npc:affectionUpdate(-50)
player:affectionUpdate('raquel',-50)
end,
['Yogurtsburgh'] = function (npc, player)
npc:affectionUpdate(50)
player:affectionUpdate('raquel',50)
end,
['Ass Crack Bandit'] = function (npc, player)
npc:affectionUpdate(-300)
player:affectionUpdate('raquel',-300)
end,
['#sixseasonsandamovie'] = function (npc, player)
npc:affectionUpdate(200)
player:affectionUpdate('raquel',200)
end,
['Magnitude'] = function (npc, player)
npc:affectionUpdate(100)
player:affectionUpdate('raquel',100)
end,
['Natalie is Freezing'] = function (npc, player)
npc:affectionUpdate(50)
player:affectionUpdate('raquel',50)
end,
['norwegian Troll doll'] = function (npc, player)
npc:affectionUpdate(-100)
player:affectionUpdate('raquel',-100)
end,
['Adderall'] = function (npc, player)
npc:affectionUpdate(-100)
player:affectionUpdate('raquel',-100)
end,
["Chimpan-Zzz's"] = function (npc, player)
npc:affectionUpdate(-50)
player:affectionUpdate('raquel',-50)
end,
['Daybreak'] = function (npc, player)
npc:affectionUpdate(100)
player:affectionUpdate('raquel',100)
end,

},

talk_responses = {
['How does this work?']={
"Think about something that will generate a burst of emotion.",
},

},

update = function(dt, npc, player)
local affection = player.affection.raquel or 0

if affection >= 1000 then
npc.state = "happy"
npc.db:set('raquel', true)
npc.married = true

--if npc.married == false then
--Dialog.new("It worked!", function()
--npc.db:set('raquel', true)

--npc.menu:close(player)
--end)
--end
elseif affection < 0 then
npc.state = "sad"
else
npc.state = "default"
end
end,
}

0 comments on commit 928bde0

Please sign in to comment.