Skip to content
Snippets Groups Projects
Commit 3eaf8c6b authored by dg's avatar dg
Browse files

Melinda can now move in with you in the Fortress

git-svn-id: http://svn.net-core.org/repos/t-engine4@3953 51575b47-30f0-44d4-a5cc-537603b46e54
parent a204eb11
No related branches found
No related tags found
No related merge requests found
......@@ -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"
-- 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"
game/modules/tome/data/gfx/shockbolt/player/cornac_female_redhair.png

7.37 KiB

......@@ -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")
......
......@@ -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
......@@ -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",
}
......@@ -181,8 +181,14 @@
<property name="type" value="&quot;spawn&quot;"/>
</properties>
</object>
<object name="melinda" x="743" y="1030" width="21" height="21">
<properties>
<property name="subtype" value="&quot;melinda&quot;"/>
<property name="type" value="&quot;spawn&quot;"/>
</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="&quot;Control Room&quot;"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment