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

Archery masteries now have a description of the damage they provide.

Fixed targeting if you self-target.
Static map generator can now take an entity as {random_filter={...}} to generate a random entity
New zone: the Flooded Cave
New zone: the Caverns of Osse


git-svn-id: http://svn.net-core.org/repos/t-engine4@974 51575b47-30f0-44d4-a5cc-537603b46e54
parent 46f10e84
No related branches found
No related tags found
No related merge requests found
Showing
with 454 additions and 42 deletions
......@@ -54,7 +54,6 @@ end
--- Gets the chat with the given id
function _M:get(id)
print("[CHAT] get", id)
return self.chats[id]
end
......
......@@ -140,14 +140,23 @@ function _M:generate(lev, old_lev)
local status = self.tiles[c] and self.tiles[c].status
if object then
local o = type(object) == "string" and self.zone:makeEntityByName(self.level, "object", object) or self.zone:finishEntity(self.level, "object", object)
local o
if type(object) == "string" then o = self.zone:makeEntityByName(self.level, "object", object)
elseif type(object) == "table" and object.random_filter then o = self.zone:makeEntity(self.level, "object", object.random_filter, nil, true)
else o = self.zone:finishEntity(self.level, "object", object)
end
if o then
self.zone:addEntity(self.level, o, "object", i-1, j-1)
end
end
if trap then
local t = type(trap) == "string" and self.zone:makeEntityByName(self.level, "trap", trap) or self.zone:finishEntity(self.level, "trap", trap)
local t
if type(trap) == "string" then t = self.zone:makeEntityByName(self.level, "trap", trap)
elseif type(trap) == "table" and trap.random_filter then t = self.zone:makeEntity(self.level, "trap", trap.random_filter, nil, true)
else t = self.zone:finishEntity(self.level, "trap", trap)
end
if t then
self.zone:addEntity(self.level, t, "trap", i-1, j-1)
end
......@@ -155,10 +164,9 @@ function _M:generate(lev, old_lev)
if actor then
local m
if type(actor) == "string" then
m = self.zone:makeEntityByName(self.level, "actor", actor)
else
m = self.zone:finishEntity(self.level, "actor", actor)
if type(actor) == "string" then m = self.zone:makeEntityByName(self.level, "actor", actor)
elseif type(actor) == "table" and actor.random_filter then m = self.zone:makeEntity(self.level, "actor", actor.random_filter, nil, true)
else m = self.zone:finishEntity(self.level, "actor", actor)
end
if m then
self.zone:addEntity(self.level, m, "actor", i-1, j-1)
......
......@@ -19,6 +19,7 @@
require "engine.class"
require "engine.KeyBind"
local Dialog = require "engine.Dialog"
local Map = require "engine.Map"
local Target = require "engine.Target"
......
......@@ -464,11 +464,13 @@ function _M:setupCommands()
[{"_d","ctrl"}] = function()
if config.settings.tome.cheat then
self.player:forceLevelup(50)
self.player.no_breath = 1
self.player.esp.all = 1
self.player.esp.range = 50
self.player.inc_damage.all = 100000
self:changeLevel(1, "wilderness-arda-fareast") game.memory_levels["wilderness-arda-fareast-1"] = game.level
self.player:grantQuest("orc-pride")
self:changeLevel(2, "flooded-cave")
-- game.memory_levels["wilderness-arda-fareast-1"] = game.level
-- self.player:grantQuest("orc-pride")
-- self.player:grantQuest("escort-duty")
end
end,
......
......@@ -242,6 +242,10 @@ function _M:archeryShoot(damtype, mult, on_hit, tg, params)
if sound then game:playSoundNear(ret.firsttarget or self, sound)
elseif sound_miss then game:playSoundNear(ret.firsttarget or self, sound_miss) end
if ammo:getNumber() < 10 or ammo:getNumber() == 50 or ammo:getNumber() == 40 or ammo:getNumber() == 25 then
game.logPlayer(self, "You only have %d %s left!", ammo:getNumber(), ammo.name)
end
return ret.hitted
end
......
......@@ -154,7 +154,7 @@ newBirthDescriptor{
name = "Pyromancer",
desc = {
"A Pyromancer is an archmage specialized in fire magic.",
"They can even learn to pierce through fire resistance and immunity."
"They can even learn to pierce through fire resistance and immunity.",
"They gain access to the special Wildfire talents whose main purpose is to make things burn and burn more.",
"Most archmagi lack basic skills that others take for granted (like general fighting sense), but they make up for it by their raw magical power.",
"Archmagi know all schools of magic but the more intricate (Temporal and Meta) from the start. They however usually refuse to have anything to do with Necromancy.",
......@@ -201,7 +201,7 @@ newBirthDescriptor{
desc = {
"A Cryomancer is an archmage specialized in ice magic.",
"They gain access to the special Ice talents whose main purpose is to make things shatter under extreme cold.",
"They can even learn to pierce through cold resistance and immunity."
"They can even learn to pierce through cold resistance and immunity.",
"Most archmagi lack basic skills that others take for granted (like general fighting sense), but they make up for it by their raw magical power.",
"Archmagi know all schools of magic but the more intricate (Temporal and Meta) from the start. They however usually refuse to have anything to do with Necromancy.",
"All archmagi have been trained in the secret town of Angolwen and posses a unique spell to teleport to it directly.",
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 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
local function attack(str)
return function(npc, player) engine.Faction:setFactionReaction(player.faction, npc.faction, -100, true) npc:doEmote(str, 150) end
end
-----------------------------------------------------------------------
-- Default
-----------------------------------------------------------------------
if not game.player:isQuestStatus("maglor", engine.Quest.COMPLETED, "maglor-story") then
newChat{ id="welcome",
text = [[What is this? Why do you come in my sanctuary and slay its guardians?
Speak or die, for I am Maglor, son of Fëanor and I shall guard the Silmaril for all of eternity!]],
answers = {
{"[attack]", action=attack("So be it... Die now!")},
{"I want the Silmaril!", action=attack("The Oath shall be fullfilled once more...")},
{"I was sent by Ukllmswwik to stop your mad schemes to control all underwater life!", jump="quest"},
}
}
newChat{ id="quest",
text = [[I see, so the dragon sent you. He told you I am insane I assume?
But then who is evil, me that fullfills a sacred oath, secluded in this sanctuary, or you that comes in to kill me, destroying my friends and planning to take the Silmaril?
Who is the insane one?]],
answers = {
{"Your feeble attemp to sway me away from the side of good will not work. Pay for you sins!", action=attack("If you refuse to see reason, you leave me no choice!")},
{"Your words are... disturbing. Why should I spare you?", jump="givequest"},
}
}
newChat{ id="givequest",
text = [[Spare me?#LIGHT_GREEN#*He laugths.*#WHITE#
Do not presume of your power so hastily!
Yet you may want to hear my story. As I was drowning Ossë came to me, he told me nobody should ever see the Silmaril again, but he did not want to destroy it for it held the last shininh light of the first age.
So he made a pact with me, he would save me and provide me with a way to fullfil my oath, by being its guardian, at the bottom of the sea, for all eternity.
Recently that water dragon that sent you started sending "agents" to retrieve the jewel, I can only imagine his goals, but they are clearly not peaceful.
The Silmaril shall never leave this sanctuary!]],
answers = {
{"You do not sound mad to me, could Ukllmswwik have lied?", jump="portal_back", action=function(npc, player) player:setQuestStatus("maglor", engine.Quest.COMPLETED, "maglor-story") end},
{"I will not be deceived by your lies, I will make your pay for your victims!", action=attack("As you wish, it did not have to come to it...")},
}
}
newChat{ id="portal_back",
text = [[Use this portal, it will bring you back to his cave, ask him the truth.]],
answers = {
{"I will make him pay for his treachery.", action=function(npc, player) player:hasQuest("maglor"):portal_back() end},
}
}
-----------------------------------------------------------------------
-- Coming back later
-----------------------------------------------------------------------
else
newChat{ id="welcome",
text = [[Thanks for listening to me.]],
answers = {
{"[attack]", action=attack("So be it... Die now!")},
{"I want the Silmaril!", action=attack("The Oath shall be fullfilled once more...")},
{"Farewell, Guardian."},
}
}
end
return "welcome"
......@@ -17,13 +17,82 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local function attack(str)
return function(npc, player) engine.Faction:setFactionReaction(player.faction, npc.faction, -100, true) npc:doEmote(str, 150) end
end
-----------------------------------------------------------------------
-- Default
-----------------------------------------------------------------------
if not game.player:isQuestStatus("maglor", engine.Quest.COMPLETED, "drake-story") then
newChat{ id="welcome",
text = [[#LIGHT_GREEN#*@npcname@ deep voice booms through the level.*#WHITE#
This is my domain, and I do not take kindly to intruders. What is your purpose here?]],
answers = {
{"I am here to kill you and take your treasures! Die bastard fish!", action=function(npc, player) engine.Faction:setFactionReaction(player.faction, npc.faction, -100, true) end},
{"I did not mean to intrude, I shall leave now."},
{"I am here to kill you and take your treasures! Die bastard fish!", action=attack("DIE!")},
{"I did not mean to intrude, I shall leave now.", jump="quest"},
}
}
newChat{ id="quest",
text = [[Wait! You seem powerful, let me tell you a story first.
A very long time ago, at the very end of the first age of the world, the Silmarils where recoverd from the grasp of Morgoth in the War of the Wrath.
Soon after they were stolen by the two remaining sons of Fëanor, Maedhros and Maglor, therefore fullfilling their oath.
But they found they could no longer bear to wield them, they burned their flesh for their sins.
Maedhros thrust himself in a fiery chasm along with his Silmaril and Maglor threw his into the depths of the ocean, wandering the shores endlessly.
However after a while he regreted his act and dived to recover it, he had no chance of success yet he prevailed.
Ossë helped him, granting him the ability to live under the ocean to guard the Silmaril. There he remained for all the ages of the world.
But something happened recently, Maglor turned mad and now he looks upon all intelligent water live as a threat, which includes myself.
I can not leave this sanctuary but maybe you could help me?
After all this would be a gesture of kindness to end his madness and the Silmaril would gain a new, powerful, guardian.]],
answers = {
{"I still rather kill you and take your treasure!", action=attack("DIE!")},
{"I shall do as you say, but how do I find him?", jump="givequest"},
{"This seems... unwise, I must refuse sorry.", action=function(npc, player) player:grantQuest("maglor") player:setQuestStatus("maglor", engine.Quest.COMPLETED, "drake-story") player:setQuestStatus("maglor", engine.Quest.FAILED) end},
}
}
newChat{ id="givequest",
text = [[I can open a portal to his lair, far into the western sea, but be warned, this is one way only, I can not get you back you will have to find your own way.]],
answers = {
{"I will.", action=function(npc, player) player:grantQuest("maglor") player:setQuestStatus("maglor", engine.Quest.COMPLETED, "drake-story") end},
{"This is a death trap! Goodbye.", action=function(npc, player) player:grantQuest("maglor") player:setQuestStatus("maglor", engine.Quest.COMPLETED, "drake-story") player:setQuestStatus("maglor", engine.Quest.FAILED) end},
}
}
-----------------------------------------------------------------------
-- Coming back later
-----------------------------------------------------------------------
else
newChat{ id="welcome",
text = [[Yes?]],
answers = {
{"[attack]", action=attack("TREACHERY!")},
{"I want your treasures, water beast!", action=attack("Oh, is it so? Well, EARN IT !")},
{"I spoke with Maglor, he did not seem hostile, or mad.", jump="maglor_friend", cond=function(npc, player) return player:isQuestStatus("maglor", engine.Quest.COMPLETED, "maglor-story") and not player:isQuestStatus("maglor", engine.Quest.COMPLETED, "kill-maglor") end},
{"Farewell, Dragon."},
}
}
newChat{ id="maglor_friend",
text = [[#LIGHT_GREEN#*@npcname@ roars!*#WHITE# You listen to the lies of this mad elf!
You are corrupted! TAINTED!]],
answers = {
{"[attack]", action=attack("DO NOT MESS IN THE AFFAIRS OF DRAGONS!")},
{"#LIGHT_GREEN#*Shake your head.*#LAST#He swayed my mind! Please I am not your ennemy.", jump="last_chance", cond=function(npc, player) return rng.percent(30 + player:getLck()) end},
}
}
newChat{ id="last_chance",
text = [[#LIGHT_GREEN#*@npcname@ calms down!*#WHITE# Very well, he is a trickster, now go finish your task, or do not come back.]],
answers = {
{"Thank you, mighty one."},
}
}
end
return "welcome"
......@@ -19,25 +19,26 @@
-- CSV export
local src = [[
,Enemies,Undead,Reunited Kingdom,Shire,Lonely Mountain,Eryn Lasgalen,Angolwen,Tol Falas,,Water lair|H,Assassin lair|H,,Sunwall|H,Orc Pride,,Sandworm Burrowers,,Blue Wizards
Enemies,,,,,,,,,,,,,,,,,,
Undead,-1,,,,,,,,,,,,,,,,,
Reunited Kingdom,-1,,,,,,,,,,,,,,,,,
Shire,-1,,1,,,,,,,,,,,,,,,
Lonely Mountain,-1,,0.5,1,,,,,,,,,,,,,,
Eryn Lasgalen,-1,,0.5,1,0.3,,,,,,,,,,,,,
Angolwen,-1,,,,,,,,,,,,,,,,,
Tol Falas,,-1,-1,-1,-1,-1,-1,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
Water lair|H,-1,,,,,,,,,,,,,,,,,
Assassin lair|H,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
Sunwall|H,-1,,,,,,,-1,,,-1,,,,,,,
Orc Pride,,-1,-1,-1,-1,-1,-1,-1,,,,,-1,,,,,
,,,,,,,,,,,,,,,,,,
Sandworm Burrowers,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
Blue Wizards,,-1,-1,-1,-1,-1,-1,-1,,,,,-1,1,,,,
,Enemies,Undead,Reunited Kingdom,Shire,Lonely Mountain,Eryn Lasgalen,Angolwen,Tol Falas,,Silmaril Guardians|H,Water lair|H,Assassin lair|H,,Sunwall|H,Orc Pride,,Sandworm Burrowers,,Blue Wizards
Enemies,,,,,,,,,,,,,,,,,,,
Undead,-1,,,,,,,,,,,,,,,,,,
Reunited Kingdom,-1,,,,,,,,,,,,,,,,,,
Shire,-1,,1,,,,,,,,,,,,,,,,
Lonely Mountain,-1,,0.5,1,,,,,,,,,,,,,,,
Eryn Lasgalen,-1,,0.5,1,0.3,,,,,,,,,,,,,,
Angolwen,-1,,,,,,,,,,,,,,,,,,
Tol Falas,,-1,-1,-1,-1,-1,-1,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,
Silmaril Guardians|H,,,,,,,,,,,,,,,,,,,
Water lair|H,-1,,,,,,,,,-1,,,,,,,,,
Assassin lair|H,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,
Sunwall|H,-1,,,,,,,-1,,,,-1,,,,,,,
Orc Pride,,-1,-1,-1,-1,-1,-1,-1,,,,,,-1,,,,,
,,,,,,,,,,,,,,,,,,,
Sandworm Burrowers,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,
Blue Wizards,,-1,-1,-1,-1,-1,-1,-1,,,,,,-1,1,,,,
]]
local facts = {}
......
......@@ -17,6 +17,10 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
------------------------------------------------------------
-- For inside the sea
------------------------------------------------------------
newEntity{
define_as = "WATER_FLOOR",
name = "underwater", image = "terrain/water_floor.png",
......@@ -27,15 +31,40 @@ newEntity{
newEntity{
define_as = "WATER_WALL",
name = "wall", image = "terrain/water_wall.png",
name = "coral wall", image = "terrain/water_wall.png",
display = '#', color=colors.AQUAMARINE, back_color=colors.DARK_BLUE,
add_displays = class:makeWater(true),
always_remember = true,
can_pass = {pass_wall=1},
does_block_move = true,
block_sight = true,
air_level = -20,
air_level = -5,
}
newEntity{
define_as = "WATER_DOOR",
name = "coral door", image = "terrain/granite_door1.png",
display = '+', color=colors.AQUAMARINE, back_color=colors.DARK_BLUE,
add_displays = class:makeWater(true),
notice = true,
always_remember = true,
block_sight = true,
door_opened = "WATER_DOOR_OPEN",
dig = "WATER_DOOR_OPEN",
air_level = -5, air_condition="water",
}
newEntity{
define_as = "WATER_DOOR_OPEN",
name = "open coral door", image = "terrain/granite_door1_open.png",
display = "'", color=colors.AQUAMARINE, back_color=colors.DARK_BLUE,
add_displays = class:makeWater(true),
always_remember = true,
door_closed = "WATER_DOOR",
air_level = -5, air_condition="water",
}
------------------------------------------------------------
-- For outside
------------------------------------------------------------
newEntity{
define_as = "SHALLOW_WATER",
......
......@@ -54,7 +54,6 @@ newEntity{ base = "BASE_NPC_AQUATIC_DEMON",
resists={[DamageType.COLD] = resolvers.mbonus(12, 5)},
resolvers.talents{ [Talents.T_WATER_BOLT]=3, [Talents.T_PHASE_DOOR]=2, },
drops = resolvers.drops{chance=100, nb=4, {ego_chance=100} },
}
newEntity{ base = "BASE_NPC_AQUATIC_DEMON",
......@@ -72,5 +71,4 @@ newEntity{ base = "BASE_NPC_AQUATIC_DEMON",
resists={[DamageType.COLD] = resolvers.mbonus(50, 30)},
resolvers.talents{ [Talents.T_TIDAL_WAVE]=4, [Talents.T_FREEZE]=5 },
drops = resolvers.drops{chance=100, nb=4, {ego_chance=100} },
}
......@@ -17,5 +17,5 @@ void main(void)
float bump = 1.0-abs((2.0 * noise)-1.0);
bump *= bump - 0.3;
gl_FragColor = mix(color1, color2, bump) * displayColor;
gl_FragColor.a = 0.6;
gl_FragColor.a = 0.4;
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 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
defineTile('>', "DOWN")
defineTile('.', "WATER_FLOOR")
defineTile('#', "WATER_WALL")
defineTile('^', "WATER_FLOOR", nil, nil, {random_filter={}})
defineTile('M', "WATER_FLOOR", nil, {random_filter={}})
defineTile('@', "WATER_FLOOR", nil, "MAGLOR")
startx = 21
starty = 14
return [[
...................M..........
..............................
.............####.............
...........###..####..........
.........###.......###........
..M.....##..###......###......
.......##.M.####.......##...M.
......##...#####......###.....
.....##^^^^####^^^^####.......
.....##......#.....##.........
....###............#..........
....#MM.###........###........
...######.^.........##........
....##....#......M.##.........
.......####.........#..M......
....######..........#.........
.....####....M......##........
......##.........M...##.......
.......#..............##......
.......#....#####......#......
......##^^^#######^^^^^##.....
.M...##....#######......#.....
....##.....####......M..##....
....##...................#....
.....##...M....^^^^^.....##...
......###......^^^^^...M..#...
....M...###....^^>^^.....##...
..........###..^^^^^...###....
............###^^^^^.###......
..............########........]]
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 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
defineTile('<', "UP")
defineTile(' ', "WATER_FLOOR")
defineTile('+', "WATER_DOOR")
defineTile('#', "WATER_WALL")
defineTile('^', "WATER_FLOOR", nil, nil, {random_filter={}})
defineTile('M', "WATER_FLOOR", nil, {random_filter={}})
defineTile('@', "WATER_FLOOR", nil, "MAGLOR")
startx = 15
starty = 0
return [[
###############<##############
##^ # #### #### # ^#
## #M# ### #### #### ### #M# #
##M# # ### MM # MM ### # #M#
## # ################# # #
## ##### ##### #
## ^+^ M M ^+^ #
######## #######
### ########+######## ##
## M #
## ##################### #
## M # M ### M ### M # M #
## #MMM## ##MMM# #
## # #M M# # #
###^###+## @ ##+###^##
###^###^## ##^###^##
## ### ##M M## ### #
## ## ## #
## ### MMM ### #
## ######+###### #
## ^#^ M#M#M ^#^ #
## ### M#^#M ### #
## ^#^ M#M#M ^#^ #
## ######+###### #
## # ^ ^ # #
##+####### ######### #######+#
## ####### ######### ####### #
## ####### ######### ####### #
## ######### #
##############################]]
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 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
name = "The Guardian of the Sea"
desc = function(self, who)
local desc = {}
desc[#desc+1] = "Ukllmswwik asked you to take his portal to the caverns of Ossë and kill Maglor who has turned mad."
if self:isCompleted("maglor-story") then
desc[#desc+1] = "Maglor told you his side of the story, now you must decide, which of them is corrupt?"
end
if self:isCompleted("kill-maglor") and self:isCompleted("kill-drake") then
desc[#desc+1] = "#LIGHT_GREEN#* You have killed both Ukllmswwik and Maglor, betraying them both.#WHITE#"
elseif self:isCompleted("kill-maglor") and not self:isCompleted("kill-drake") then
desc[#desc+1] = "#LIGHT_GREEN#* You have sided with Ukllmswwik and killed Maglor.#WHITE#"
elseif not self:isCompleted("kill-maglor") and self:isCompleted("kill-drake") then
desc[#desc+1] = "#LIGHT_GREEN#* You have sided with Maglor and killed Ukllmswwik.#WHITE#"
end
return table.concat(desc, "\n")
end
on_grant = function(self, who)
local g = mod.class.Grid.new{
show_tooltip=true,
name="Portal to the Caverns of Ossë",
display='>', color=colors.VIOLET,
notice = true,
change_level=1, change_zone="caverns-osse"
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.level, g, "terrain", 34, 6)
game.logPlayer(game.player, "A portal opens behind Ukllmswwik.")
end
portal_back = function(self, who)
local g = mod.class.Grid.new{
show_tooltip=true,
name="Portal to the Flooded Cave",
display='>', color=colors.VIOLET,
notice = true,
change_level=2, change_zone="flooded-cave"
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.level, g, "terrain", 15, 13)
game.logPlayer(game.player, "A portal opens to the flooded cave.")
end
......@@ -37,6 +37,11 @@ newTalent{
end
end
if target ~= self and (not target:canBe("teleport") or not self:checkHit(self:combatSpellpower(), target:combatSpellResist())) then
game.logSeen(target, "The spell fizzles!")
return true
end
local x, y = self.x, self.y
if self:getTalentLevel(t) >= 4 then
local tg = {type="ball", nolock=true, no_restrict=true, nowarning=true, range=10 + self:combatSpellpower(0.1), radius=7 - self:getTalentLevel(t)}
......@@ -85,6 +90,11 @@ newTalent{
end
end
if target ~= self and (not target:canBe("teleport") or not self:checkHit(self:combatSpellpower(), target:combatSpellResist())) then
game.logSeen(target, "The spell fizzles!")
return true
end
local x, y = self.x, self.y
if self:getTalentLevel(t) >= 4 then
local tg = {type="ball", nolock=true, no_restrict=true, nowarning=true, range=100 + self:combatSpellpower(1), radius=20 - self:getTalentLevel(t)}
......
......@@ -175,8 +175,9 @@ newTalent{
local st = "arrow"
if weapon.archery == "sling" then st = "shot" end
local ego = math.ceil(5 + (self:getTalentLevel(t) * 5))
local o = game.zone:makeEntity(game.level, "object", {type="ammo", subtype=st}, nil, true)
local o = game.zone:makeEntity(game.level, "object", {type="ammo", subtype=st, ego_chance=ego}, nil, true)
if o and rng.percent(10 + self:getTalentLevel(t) * 10) then
o:identify(true)
o:forAllStack(function(so) so.cost = 0 end)
......@@ -189,7 +190,8 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Forage in your immediate environment to try to make ammo for your current weapon.]])
return ([[Forage in your immediate environment to try to make ammo for your current weapon.
There is an additional %d%% chance to get exceptional ammo.]]):format(math.ceil(5 + (self:getTalentLevel(t) * 5)))
end,
}
......@@ -267,6 +269,6 @@ newTalent{
return energy ~= self.energy.value
end,
info = function(self, t)
return ([[You fire multiple shots at the area, doing %d%% damage and stunning your targets for %d turns.]]):format(self:combatTalentWeaponDamage(t, 0.5, 1.5), 2 + self:getTalentLevelRaw(t) * 100)
return ([[You fire multiple shots at the area, doing %d%% damage and stunning your targets for %d turns.]]):format(self:combatTalentWeaponDamage(t, 0.5, 1.5) * 100, 2 + self:getTalentLevelRaw(t))
end,
}
......@@ -24,7 +24,7 @@ newTalent{
require = { stat = { dex=function(level) return 12 + level * 3 end }, },
mode = "passive",
info = function(self, t)
return [[Increases damage with bows.]]
return ([[Increases damage done with bows by %d%%.]]):format(100 * (math.sqrt(self:getTalentLevel(t) / 10)))
end,
}
......
......@@ -24,7 +24,7 @@ newTalent{
require = { stat = { dex=function(level) return 12 + level * 3 end }, },
mode = "passive",
info = function(self, t)
return [[Increases damage with slings.]]
return ([[Increases damage done with slings by %d%%.]]):format(100 * (math.sqrt(self:getTalentLevel(t) / 10)))
end,
}
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 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
load("/data/general/grids/basic.lua")
load("/data/general/grids/water.lua")
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