diff --git a/game/modules/tome/data/chats/last-hope-melinda-father.lua b/game/modules/tome/data/chats/last-hope-melinda-father.lua index ef6e6c49c445e2a11573d7c0ab7d7ef21de321ba..6012ca6ff4a5e1ace1b1fb65a98bccd9285d63d9 100644 --- a/game/modules/tome/data/chats/last-hope-melinda-father.lua +++ b/game/modules/tome/data/chats/last-hope-melinda-father.lua @@ -17,6 +17,9 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org local q = game.player:hasQuest("kryl-feijan-escape") +local qs = game.player:hasQuest("shertul-fortress") +local ql = game.player:hasQuest("love-melinda") + if not q or not q:isStatus(q.DONE) then newChat{ id="welcome", @@ -37,6 +40,7 @@ newChat{ id="welcome", text = [[@playername@! My daughter's savior!]], answers = { {"Hi, I was just checking in to see if Melinda is all right.", jump="reward", cond=function(npc, player) return not npc.rewarded_for_saving_melinda end, action=function(npc, player) npc.rewarded_for_saving_melinda = true end}, + {"Hi, I would like to talk to Melinda please.", jump="home1", switch_npc={name="Melinda"}, cond=function(npc, player) return ql and not ql:isCompleted("moved-in") end}, {"Sorry, I have to go!"}, } } @@ -130,6 +134,38 @@ I feel safe in your arms. Please, I know you must leave, but promise to come bac } } +------------------------------------------------------------------ +-- Moving in +------------------------------------------------------------------ +newChat{ id="home1", + text = [[#LIGHT_GREEN#*Melinda appears at the door and kisses you*#WHITE# +@playername@! I missed you!]], + answers = { + {"I am sorry, I was a bit busy I fear. You know, the usual: slaying cultists, looting treasures of old."}, + {"Actually I have thought about something, for us. Some time ago I assumed ownership of a very special home... #LIGHT_GREEN#[tell her the Fortress story]#WHITE#", jump="home2", cond=function(npc, player) return ql and qs and qs:isCompleted("farportal") and not ql:isCompleted("moved-in") end}, + } +} + +newChat{ id="home2", + text = [[An ancient fortress of a mythical race?! How #{bold}#exciting#{normal}#!]], + answers = { + {"Yes indeed, I will probably spend quite some time there and I wondered if, well maybe, if you would like to stay there with me, there is much free room and...", jump="home3"}, + {"But really dangerous, anyway I must be on my way. I will try to stop by again soon. #LIGHT_GREEN#[kiss her]#WHITE#"}, + } +} + +newChat{ id="home3", + text = [[#LIGHT_GREEN#*Melinda hugs you fiercely, kisses you and rushes to the inside of the shop. While she runs you hear:*#WHITE# +Daddy you won't have to fear for me anymore! I'm moving home!]], + answers = { + {"I take that as a yes. #LIGHT_GREEN#[wait for her return and go to the Fortress]#WHITE#", action=function(npc, player) + game:changeLevel(1, "shertul-fortress") + player:hasQuest("love-melinda"):spawnFortress(player) + end}, + } +} + + end return "welcome" diff --git a/game/modules/tome/data/chats/melinda-fortress.lua b/game/modules/tome/data/chats/melinda-fortress.lua new file mode 100644 index 0000000000000000000000000000000000000000..a4f154785bfd950aa9795f148fa4aadc9489f782 --- /dev/null +++ b/game/modules/tome/data/chats/melinda-fortress.lua @@ -0,0 +1,27 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +newChat{ id="welcome", + text = [[Hi sweety!]], + answers = { + {"#LIGHT_GREEN#[kiss her]#WHITE#"}, + } +} + +return "welcome" diff --git a/game/modules/tome/data/gfx/shockbolt/player/cornac_female_redhair.png b/game/modules/tome/data/gfx/shockbolt/player/cornac_female_redhair.png new file mode 100644 index 0000000000000000000000000000000000000000..0e96a9e04b269719483c015b53ddad91bdfceb88 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/cornac_female_redhair.png differ diff --git a/game/modules/tome/data/maps/zones/shertul-fortress.lua b/game/modules/tome/data/maps/zones/shertul-fortress.lua index 3144ddb093973a3b72e0553c904b92c699882494..79ba90a47e6b9b00c371e96a1823e802358fa630 100644 --- a/game/modules/tome/data/maps/zones/shertul-fortress.lua +++ b/game/modules/tome/data/maps/zones/shertul-fortress.lua @@ -56,6 +56,7 @@ addSpot({17, 27}, "portal", "back") addSpot({23, 25}, "spawn", "butler") addSpot({36, 29}, "door", "farportal") addSpot({40, 29}, "spawn", "farportal") +addSpot({23, 32}, "spawn", "melinda") -- addZone section addZone({21, 23, 33, 35}, "zonename", "Control Room") diff --git a/game/modules/tome/data/quests/love-melinda.lua b/game/modules/tome/data/quests/love-melinda.lua index 0dd87b0fc16c19f43a727e947e82c63c4e327065..19e22b8255f3e36f570ab2f0e28e2df358eae1cb 100644 --- a/game/modules/tome/data/quests/love-melinda.lua +++ b/game/modules/tome/data/quests/love-melinda.lua @@ -26,6 +26,9 @@ desc = function(self, who) else desc[#desc+1] = "You talked for a while and it seems she has a crush on you." end + if self:isCompleted("moved-in") then + desc[#desc+1] = "Melinda decided to come live with you in your Fortress." + end return table.concat(desc, "\n") end @@ -36,3 +39,42 @@ function onWin(self, who) "You lived together and led a happy life. Melinda even learned a few adventurer's tricks and you both traveled Eyal, making new legends.", } end + +function spawnFortress(self, who) game:onTickEnd(function() + local melinda = require("mod.class.NPC").new{ + name = "Melinda", + type = "humanoid", subtype = "human", female=true, + display = "@", color=colors.LIGHT_BLUE, + image = "player/cornac_female_redhair.png", + moddable_tile = "human_female", + moddable_tile_base = "base_redhead_01.png", + desc = [[You saved her from the depth of a cultists lair and fell in love with her. She has moved in the Fortress to see you more often.]], + autolevel = "tank", + ai = "none", + stats = { str=8, dex=7, mag=8, con=12 }, + faction = who.faction, + never_anger = true, + + resolvers.equip{ id=true, + {defined="SIMPLE_GOWN", autoreq=true, ego_chance=-1000, ego_chance=-1000} + }, + + body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, QUIVER=1 }, + lite = 4, + rank = 2, + exp_worth = 0, + + max_life = 100, life_regen = 0, + life_rating = 12, + combat_armor = 3, combat_def = 3, + + on_die = function(self) game.player:setQuestStatus("love-melinda", engine.Quest.FAILED) end, + can_talk = "melinda-fortress", + } + melinda:resolve() melinda:resolve(nil, true) + local spot = game.level:pickSpot{type="spawn", subtype="melinda"} + game.zone:addEntity(game.level, melinda, "actor", spot.x, spot.y) + who:move(spot.x + 1, spot.y) + + who:setQuestStatus(self.id, self.COMPLETED, "moved-in") +end) end diff --git a/game/modules/tome/data/zones/shertul-fortress/objects.lua b/game/modules/tome/data/zones/shertul-fortress/objects.lua index 0412caa90fbecc49c0158fa6bb87462d61a36b80..b28e2b9f92c2d76f3ff6b4986dbddc620a6c0fe4 100644 --- a/game/modules/tome/data/zones/shertul-fortress/objects.lua +++ b/game/modules/tome/data/zones/shertul-fortress/objects.lua @@ -67,3 +67,11 @@ When activated it will prompt to destroy items on the floor, if there are none i end }, } + +newEntity{ base = "BASE_CLOTH_ARMOR", + define_as = "SIMPLE_GOWN", + name = "simple gown", + cost = 0.5, + material_level = 1, + moddable_tile = "upper_body_12", +} diff --git a/tiled-maps/shertul-fortress.tmx b/tiled-maps/shertul-fortress.tmx index 3eb5a47df8596bb38496ae7c564321452ab0eff4..db7a7f055a74975d268003eafbc61b7e197b3d1f 100644 --- a/tiled-maps/shertul-fortress.tmx +++ b/tiled-maps/shertul-fortress.tmx @@ -181,8 +181,14 @@ <property name="type" value=""spawn""/> </properties> </object> + <object name="melinda" x="743" y="1030" width="21" height="21"> + <properties> + <property name="subtype" value=""melinda""/> + <property name="type" value=""spawn""/> + </properties> + </object> </objectgroup> - <objectgroup name="addZone#rooms" width="60" height="60"> + <objectgroup name="addZone#rooms" width="60" height="60" visible="0"> <object name="control room" x="673" y="738" width="412" height="408"> <properties> <property name="subtype" value=""Control Room""/>