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

started grushnak pride

Most NPCs that have sustainable talents will be created with them active
Changed the max life rank adjusting formula, this should result in more life for all actors at high level, specialy for bosses


git-svn-id: http://svn.net-core.org/repos/t-engine4@955 51575b47-30f0-44d4-a5cc-537603b46e54
parent 1611c586
No related branches found
No related tags found
No related merge requests found
Showing
with 78 additions and 26 deletions
......@@ -332,12 +332,13 @@ function _M:getRankLevelAdjust()
end
end
function _M:getRankLifeAdjust()
if self.rank == 1 then return -2
elseif self.rank == 2 then return -0.5
elseif self.rank == 3 then return 1
elseif self.rank == 4 then return 2
elseif self.rank >= 5 then return 3
function _M:getRankLifeAdjust(value)
local level_adjust = 1 + self.level / 40
if self.rank == 1 then return value * (level_adjust - 0.2)
elseif self.rank == 2 then return value * (level_adjust - 0.1)
elseif self.rank == 3 then return value * (level_adjust + 0.1)
elseif self.rank == 4 then return value * (level_adjust + 0.3)
elseif self.rank >= 5 then return value * (level_adjust + 0.5)
else return 0
end
end
......@@ -661,7 +662,7 @@ function _M:levelup()
if not self.fixed_rating then
rating = rng.range(math.floor(self.life_rating * 0.5), math.floor(self.life_rating * 1.5))
end
self.max_life = self.max_life + math.max(rating + self:getRankLifeAdjust(), 1)
self.max_life = self.max_life + math.max(self:getRankLifeAdjust(rating), 1)
self:incMaxMana(self.mana_rating)
self:incMaxStamina(self.stamina_rating)
......
......@@ -580,7 +580,7 @@ function _M:setupCommands()
self.player:forceLevelup(50)
self.player.esp.all = 1
self.player.esp.range = 50
self:changeLevel(1, "vor-pride")
self:changeLevel(5, "grushnak-pride")
-- self.player:grantQuest("escort-duty")
end
end,
......
......@@ -379,10 +379,10 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
if target:checkHit(self:combatAttack(weapon), target:combatPhysicalResist(), 0, 95, 10) and target:canBe("knockback") then
target:knockback(self.x, self.y, self:attr("onslaught"))
end
if lt:checkHit(self:combatAttack(weapon), lt:combatPhysicalResist(), 0, 95, 10) and lt:canBe("knockback") then
if lt and lt:checkHit(self:combatAttack(weapon), lt:combatPhysicalResist(), 0, 95, 10) and lt:canBe("knockback") then
lt:knockback(self.x, self.y, self:attr("onslaught"))
end
if rt:checkHit(self:combatAttack(weapon), rt:combatPhysicalResist(), 0, 95, 10) and r+t:canBe("knockback") then
if rt and rt:checkHit(self:combatAttack(weapon), rt:combatPhysicalResist(), 0, 95, 10) and r+t:canBe("knockback") then
rt:knockback(self.x, self.y, self:attr("onslaught"))
end
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
newEntity{
define_as = "UNDERGROUND_FLOOR",
name = "floor", image = "terrain/underground_floor.png",
display = '.', color=colors.LIGHT_UMBER, back_color=colors.UMBER,
}
for i = 1, 20 do
newEntity{
define_as = "UNDERGROUND_TREE"..(i > 1 and i or ""),
name = "tree",
image = "terrain/underground_floor.png",
add_displays = class:makeTrees("terrain/underground_tree_alpha", 7),
display = '#', color=colors.PURPLE, back_color=colors.UMBER,
always_remember = true,
can_pass = {pass_tree=1},
does_block_move = true,
block_sight = true,
dig = "UNDERGROUND_FLOOR",
}
end
......@@ -72,6 +72,7 @@ newEntity{ base = "BASE_NPC_FAEROS",
[Talents.T_FLAME]=4,
[Talents.T_FIERY_HANDS]=3,
},
resolvers.sustains_at_birth(),
}
newEntity{ base = "BASE_NPC_FAEROS",
......@@ -90,4 +91,5 @@ newEntity{ base = "BASE_NPC_FAEROS",
[Talents.T_FLAMESHOCK]=3,
[Talents.T_INFERNO]=3,
},
resolvers.sustains_at_birth(),
}
......@@ -38,6 +38,7 @@ newEntity{
size_category = 3,
open_door = true,
resolvers.sustains_at_birth(),
autolevel = "warrior",
ai = "dumb_talented_simple", ai_state = { talent_in=3, },
......
......@@ -39,6 +39,7 @@ newEntity{
stats = { str=15, dex=15, mag=8, con=10 },
resolvers.tmasteries{ ["technique/other"]=0.3 },
resolvers.sustains_at_birth(),
poison_immune = 0.9,
resists = { [DamageType.NATURE] = 20, [DamageType.LIGHT] = -20 },
......
......@@ -86,6 +86,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_TOWN",
[Talents.T_CHANT_OF_FORTITUDE]=2,
[Talents.T_SEARING_LIGHT]=2,
},
resolvers.sustains_at_birth(),
}
newEntity{ base = "BASE_NPC_SUNWALL_TOWN",
......@@ -104,4 +105,5 @@ newEntity{ base = "BASE_NPC_SUNWALL_TOWN",
[Talents.T_SEARING_LIGHT]=3,
[Talents.T_FIREBEAM]=2,
},
resolvers.sustains_at_birth(),
}
......@@ -40,6 +40,8 @@ newEntity{
rank = 2,
size_category = 3,
resolvers.sustains_at_birth(),
open_door = true,
autolevel = "rogue",
......@@ -68,7 +70,6 @@ newEntity{ base = "BASE_NPC_THIEF",
rarity = 5,
combat_armor = 2, combat_def = 5,
resolvers.talents{ [Talents.T_STEALTH]=1, },
on_added = function(self) self.energy.value = game.energy_to_act self:useTalent(self.T_STEALTH) end,
max_life = resolvers.rngavg(70,90),
}
......@@ -79,7 +80,6 @@ newEntity{ base = "BASE_NPC_THIEF",
rarity = 5,
combat_armor = 3, combat_def = 5,
resolvers.talents{ [Talents.T_STEALTH]=2, },
on_added = function(self) self.energy.value = game.energy_to_act self:useTalent(self.T_STEALTH) end,
max_life = resolvers.rngavg(70,90),
}
......@@ -90,7 +90,6 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_BANDIT",
rarity = 7,
combat_armor = 4, combat_def = 6,
resolvers.talents{ [Talents.T_STEALTH]=3, [Talents.T_LETHALITY]=2, },
on_added = function(self) self.energy.value = game.energy_to_act self:useTalent(self.T_STEALTH) end,
max_life = resolvers.rngavg(80,100),
}
......@@ -114,7 +113,6 @@ newEntity{ base = "BASE_NPC_THIEF",
{type="humanoid", subtype="human", name="rogue", number=2, hasxp=false},
},
resolvers.talents{ [Talents.T_STEALTH]=3, [Talents.T_SUMMON]=1, [Talents.T_LETHALITY]=3, },
on_added = function(self) self.energy.value = game.energy_to_act self:useTalent(self.T_STEALTH) end,
}
newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_ASSASSIN",
......@@ -124,6 +122,5 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_ASSASSIN",
rarity = 12,
combat_armor = 3, combat_def = 10,
resolvers.talents{ [Talents.T_STEALTH]=3, [Talents.T_PRECISION]=3, [Talents.T_DUAL_WEAPON_TRAINING]=2, [Talents.T_DUAL_WEAPON_DEFENSE]=2, [Talents.T_DUAL_STRIKE]=1, [Talents.T_SWEEP]=1, [Talents.T_SHADOWSTRIKE]=2, [Talents.T_LETHALITY]=5, },
on_added = function(self) self.energy.value = game.energy_to_act self:useTalent(self.T_STEALTH) end,
max_life = resolvers.rngavg(70,90),
}
......@@ -59,6 +59,7 @@ newEntity{
open_door = true,
resolvers.tmasteries{ ["technique/other"]=0.5, ["spell/phantasm"]=0.8, },
resolvers.sustains_at_birth(),
resists = { [DamageType.COLD] = 80, [DamageType.NATURE] = 80, [DamageType.LIGHT] = -50, },
blind_immune = 1,
......
......@@ -49,6 +49,7 @@ newEntity{
open_door = true,
resolvers.tmasteries{ ["technique/other"]=0.3, ["spell/air"]=0.3, ["spell/fire"]=0.3 },
resolvers.sustains_at_birth(),
resists = { [DamageType.COLD] = 80, [DamageType.FIRE] = 20, [DamageType.LIGHTNING] = 40, [DamageType.PHYSICAL] = 35, [DamageType.LIGHT] = -50, },
poison_immune = 1,
......
game/modules/tome/data/gfx/terrain/underground_floor.png

907 B

......@@ -54,7 +54,7 @@ newEntity{ define_as = "UNGOLE", base = "BASE_NPC_SPIDER",
[Talents.T_CORROSIVE_VAPOUR]=5,
[Talents.T_PHANTASMAL_SHIELD]=5,
},
resolvers.sustains_at_birth(),
ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar", },
......
......@@ -61,6 +61,7 @@ newEntity{ define_as = "RANTHA_THE_WORM",
[Talents.T_ICY_SKIN]=3,
[Talents.T_ICE_BREATH]=4,
},
resolvers.sustains_at_birth(),
autolevel = "warriormage",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar", },
......
......@@ -63,6 +63,7 @@ newEntity{ define_as = "SUN_PALADIN_GUREN",
[Talents.T_BARRIER]=5,
[Talents.T_WEAPON_OF_LIGHT]=5,
},
resolvers.sustains_at_birth(),
can_talk = "pre-mount-doom-eruan",
}
......@@ -18,5 +18,5 @@
-- darkgod@te4.org
load("/data/general/grids/basic.lua")
load("/data/general/grids/sand.lua")
load("/data/general/grids/underground.lua")
load("/data/general/grids/water.lua")
......@@ -75,6 +75,7 @@ newEntity{ base="BASE_NPC_ORC_GRUSHNAK", define_as = "GRUSHNAK",
[Talents.T_SECOND_WIND]=5,
[Talents.T_JUGGERNAUT]=5,
},
resolvers.sustains_at_birth(),
on_die = function(self, who)
game.player:resolveSource():setQuestStatus("orc-pride", engine.Quest.COMPLETED, "grushnak")
......
......@@ -27,20 +27,20 @@ return {
width = 50, height = 50,
persistent = "zone",
-- all_remembered = true,
all_lited = true,
-- all_lited = true,
ambiant_music = "Thrall's Theme.ogg",
generator = {
map = {
class = "engine.generator.map.Town",
building_chance = 70,
max_building_w = 8, max_building_h = 8,
edge_entrances = {6,4},
floor = "FLOOR",
external_floor = "SAND",
wall = "WALL",
class = "engine.generator.map.Roomer",
nb_rooms = 10,
lite_room_chance = 20,
-- edge_entrances = {6,4},
rooms = {"forest_clearing"},
['.'] = "UNDERGROUND_FLOOR",
['#'] = {"UNDERGROUND_TREE","UNDERGROUND_TREE2","UNDERGROUND_TREE3","UNDERGROUND_TREE4","UNDERGROUND_TREE5","UNDERGROUND_TREE6","UNDERGROUND_TREE7","UNDERGROUND_TREE8","UNDERGROUND_TREE9","UNDERGROUND_TREE10","UNDERGROUND_TREE11","UNDERGROUND_TREE12","UNDERGROUND_TREE13","UNDERGROUND_TREE14","UNDERGROUND_TREE15","UNDERGROUND_TREE16","UNDERGROUND_TREE17","UNDERGROUND_TREE18","UNDERGROUND_TREE19","UNDERGROUND_TREE20",},
up = "UP",
down = "DOWN",
door = "DOOR",
door = "UNDERGROUND_FLOOR",
},
actor = {
class = "engine.generator.actor.Random",
......
......@@ -76,6 +76,7 @@ newEntity{ define_as = "GOLBUG",
[Talents.T_ICY_SKIN]=4,
[Talents.T_ICE_BREATH]=4,
},
resolvers.sustains_at_birth(),
autolevel = "warrior",
ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar", },
......
......@@ -199,6 +199,7 @@ newEntity{
[Talents.T_PHASE_DOOR]=5,
[Talents.T_ESSENCE_OF_SPEED]=5,
},
resolvers.sustains_at_birth(),
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" },
......@@ -254,6 +255,7 @@ newEntity{
[Talents.T_PHASE_DOOR]=5,
[Talents.T_ESSENCE_OF_SPEED]=5,
},
resolvers.sustains_at_birth(),
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" },
......@@ -286,6 +288,7 @@ This one looks even nastier and looks toward you with what seems to be disdain.
[Talents.T_KNOCKBACK]=5,
[Talents.T_STUN]=2,
},
resolvers.sustains_at_birth(),
blind_immune = 1,
stun_immune = 1,
......
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