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

New lore when entering the Dreamscape

git-svn-id: http://svn.net-core.org/repos/t-engine4@5760 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9fe55fe6
No related branches found
No related tags found
No related merge requests found
......@@ -560,6 +560,16 @@ To gifts of Nature trust
Your faith instead in tools arcane
Now to Nature you are dust"]] }
newLore{
id = "dreamscape-entry",
category = "dreamscape",
name = "If I Should Die Before I Wake",
lore = [[You wake suddenly from your unexpected slumber and attempt to quickly regain your bearings. However, you are not prepared for the bizarre vision that greets you: instead of land and sky you see only amorphous shapes and varying degrees of light. A strange psychedelic haze permeates the air and otherworldly colors and shadows flicker in and out of your peripheral vision.
As you begin to come to grips with this strange environment, you realize with horror that you cannot move! Your body feels as if it is completely without weight and try as you may you cannot budge an inch. You experience a sense of Déjà Vu as you recall past nightmares of being paralyzed. That's when it strikes you: you never woke up at all, you're still asleep! This epiphany is only reinforced when you notice a strange phenomenon: mirror copies of yourself are being slowly projected from where you stand and are moving about of their own volition.
They all seem to be focused on something in particular, but what? Just as soon as you set your mind to discerning what your dreamselves are focusing on, you feel it. With horror, you realize that you are not alone here.
Somehow, your foe has invaded your very subconcious and is attacking you in your dreams. Still unable to move, your lucid mind races on how to handle such an insane and horrible situation. On a whim you concentrate on one of your projections and you find that you can control it.
Free now to face this nightmare, you turn to find your foe. While you have a sense that having one of your dreamselves destroyed may not by itself be catastrophic, what would happen if several or many are cut down? Unwilling to find out, you resolve yourself to end this offensive intrustion into your mind.]],
}
--------------------------------------------------------------
-- Misc bosses
......
......@@ -218,6 +218,8 @@ newTalent{
end
game.logPlayer(game.player, "#LIGHT_BLUE#You are taken to the Dreamscape!")
if game.party:hasMember(target) then game.player:learnLore("dreamscape-entry") end
end)
local power = self:mindCrit(t.getPower(self, t))
......
......@@ -140,6 +140,7 @@ uberTalent{
action = function(self, t)
local eff = self:hasEffect(self.EFF_FUNGAL_BLOOD)
self:heal(math.min(eff.power, self:getCon() * self.max_life / 100))
self:removeEffect(self.EFF_FUNGAL_BLOOD)
return true
end,
info = function(self, t)
......
......@@ -77,23 +77,10 @@ function _M:generate()
self.mousezones = {}
self:redrawAllItems()
-- calculate each tree items height
for i = 1, #self.tree do
local tree = self.tree[i]
local key = tree.text_status
local current_h = key and key.h or 0
if tree.shown then current_h = current_h + self.frame_size + (key and key.h or 0) + 16 end
self.max_h = self.max_h + current_h
tree.h = current_h
end
-- generate the scrollbar
-- if self.scrollbar then self.scrollbar.max = self.max_h - self.h + 2 end
-- Add UI controls
self.mouse:registerZone(0, 0, self.w, self.h, function(button, x, y, xrel, yrel, bx, by, event)
self.last_input_was_keyboard = false
if event == "button" and button == "wheelup" then if self.scrollbar then self.scroll_inertia = math.min(self.scroll_inertia, 0) - 5 end
elseif event == "button" and button == "wheeldown" then if self.scrollbar then self.scroll_inertia = math.max(self.scroll_inertia, 0) + 5 end
end
......@@ -175,6 +162,8 @@ end
function _M:onExpand(item, inc)
item.shown = not item.shown
print("=====")
table.print(item)
local current_h = item.shown and (self.frame_size + 2 * self.fh + 16) or self.fh
self.max_h = self.max_h + (item.shown and 1 or -1 ) * (self.frame_size + self.fh + 16)
if self.scrollbar then
......@@ -288,6 +277,20 @@ function _M:redrawAllItems()
self:drawItem(tal)
end
end
-- calculate each tree items height
self.max_h = 0
for i = 1, #self.tree do
local tree = self.tree[i]
local key = tree.text_status
local current_h = key and key.h or 0
if tree.shown then current_h = current_h + self.frame_size + (key and key.h or 0) + 16 end
self.max_h = self.max_h + current_h
tree.h = current_h
end
-- generate the scrollbar
if self.scrollbar then self.scrollbar.max = self.max_h end
end
function _M:on_select(item, force)
......@@ -306,9 +309,7 @@ function _M:display(x, y, nb_keyframes, screen_x, screen_y)
if self.scrollbar then
local tmp_pos = self.scrollbar.pos
print(self.scrollbar.pos,self.scrollbar.max, self.scroll_inertia)
self.scrollbar.pos = util.minBound(self.scrollbar.pos + self.scroll_inertia, 0, self.scrollbar.max)
print(" =>",self.scrollbar.pos)
if self.scroll_inertia > 0 then self.scroll_inertia = math.max(self.scroll_inertia - 1, 0)
elseif self.scroll_inertia < 0 then self.scroll_inertia = math.min(self.scroll_inertia + 1, 0)
end
......@@ -373,7 +374,7 @@ function _M:display(x, y, nb_keyframes, screen_x, screen_y)
--self.max_display = i - self.scroll + 1
dx = 0
dy = dy + addh + 12
if dy + self.frame_size >= self.h then break end
if dy >= self.h then break end
end
core.display.glScissor(false)
......
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