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

thalore racial tree

git-svn-id: http://svn.net-core.org/repos/t-engine4@3018 51575b47-30f0-44d4-a5cc-537603b46e54
parent a93c2954
No related branches found
No related tags found
No related merge requests found
......@@ -1351,7 +1351,7 @@ function _M:levelup()
if self.alchemy_golem then self.alchemy_golem:forceLevelup(self.level) end
-- Notify party levelups
if self.x and self.y and game.party:hasMember(self) then
if self.x and self.y and game.party:hasMember(self) and not self.silent_levelup then
local x, y = game.level.map:getTileToScreen(self.x, self.y)
game.flyers:add(x, y, 80, 0.5, -2, "LEVEL UP!", {0,255,255})
game.log("#00ffff#Welcome to level %d [%s].", self.level, self.name:capitalize())
......
......@@ -69,6 +69,7 @@ newBirthDescriptor
"#GOLD#Experience penalty:#LIGHT_BLUE# 25%",
},
inc_stats = { str=4, con=3, wil=3, mag=-2, dex=-2 },
talents_types = { ["race/dwarf"]={true, 0} },
talents = {
[ActorTalents.T_DWARF_RESILIENCE]=1,
},
......
......@@ -70,6 +70,7 @@ newBirthDescriptor
},
inc_stats = { str=-2, mag=2, wil=3, cun=1, dex=1, con=0 },
experience = 1.3,
talents_types = { ["race/shalore"]={true, 0} },
talents = { [ActorTalents.T_SHALOREN_SPEED]=1 },
copy = {
default_wilderness = {"playerpop", "shaloren"},
......@@ -102,6 +103,7 @@ newBirthDescriptor
},
inc_stats = { str=2, mag=-2, wil=1, cun=0, dex=3, con=1 },
experience = 1.3,
talents_types = { ["race/thalore"]={true, 0} },
talents = { [ActorTalents.T_THALOREN_WRATH]=1 },
copy = {
faction = "thalore",
......
......@@ -74,6 +74,7 @@ newBirthDescriptor
},
inc_stats = { str=-3, dex=3, con=1, cun=3, lck=5, },
experience = 1.20,
talents_types = { ["race/halfling"]={true, 0} },
talents = {
[ActorTalents.T_HALFLING_LUCK]=1,
},
......
......@@ -73,6 +73,7 @@ newBirthDescriptor
"#GOLD#Confusion resistance:#LIGHT_BLUE# 35%",
},
inc_stats = { str=-3, con=-5, cun=4, wil=6, mag=0, dex=-2 },
talents_types = { ["race/yeek"]={true, 0} },
talents = {
[ActorTalents.T_YEEK_WILL]=1,
[ActorTalents.T_YEEK_ID]=1,
......
......@@ -82,7 +82,7 @@ function checkMaxSummon(self, silent)
end
end
function setupSummon(self, m, x, y)
function setupSummon(self, m, x, y, no_control)
m.unused_stats = 0
m.unused_talents = 0
m.unused_generics = 0
......@@ -99,9 +99,11 @@ function setupSummon(self, m, x, y)
m:attr("pin_immune", self:attr("pin_immune"))
m:attr("confusion_immune", self:attr("confusion_immune"))
if game.party:hasMember(self) then
local can_control = not no_controll and self:knowTalent(self.T_SUMMON_CONTROL)
m.remove_from_party_on_death = true
game.party:addMember(m, {
control=self:knowTalent(self.T_SUMMON_CONTROL) and "full" or "no",
control=can_control and "full" or "no",
type="summon",
title="Summon",
orders = {target=true, leash=true, anchor=true, talents=true},
......
......@@ -90,7 +90,7 @@ newTalent{
end,
info = function(self, t)
return ([[Highers have originaly been created during the Age of Allure by the human Conclave. They are imbued with magic at the very core of their being.
Increase spell save by +%d and Arcane resistance by %d%%.]]):format(self:getTalentLevel(t) * 3, self:getTalentLevel(t) * 5)
Increase spell save by +%d and Arcane resistance by %d%%.]]):format(self:getTalentLevelRaw(t) * 3, self:getTalentLevelRaw(t) * 5)
end,
}
......@@ -126,7 +126,7 @@ newTalent{
info = function(self, t)
local d = t.getData(self, t)
return ([[Activate some of your inner magic, manipulating the world to be in a better shape for you.
Restores %d stamina, %d mana, %d equilibrium, %d vim, %d positive and negative energies, -%d paradox and %d psi energy.
Restores %d stamina, %d mana, %d equilibrium, %d vim, %d positive and negative energies, %d paradox and %d psi energy.
The effect increases with your Constitution.]]):format(d.stamina, d.mana, d.equilibrium, d.vim, d.positive, d.paradox, d.psi)
end,
}
......@@ -139,8 +139,9 @@ newTalent{
short_name = "SHALOREN_SPEED",
name = "Grace of the Eternals",
type = {"race/shalore", 1},
require = racial_req1,
no_energy = true,
cooldown = 50,
cooldown = function(self, t) return 50 - self:getTalentLevel(t) * 5 end,
tactical = { DEFEND = 1 },
action = function(self, t)
local power = 0.1 + self:getDex() / 210
......@@ -153,6 +154,137 @@ newTalent{
end,
}
------------------------------------------------------------------
-- Thaloren powers
------------------------------------------------------------------
newTalentType{ type="race/thalore", name = "thalore", generic = true, description = "The various racial bonuses a character can have." }
newTalent{
short_name = "THALOREN_WRATH",
name = "Wrath of the Woods",
type = {"race/thalore", 1},
require = racial_req1,
points = 5,
no_energy = true,
cooldown = function(self, t) return 50 - self:getTalentLevel(t) * 5 end,
tactical = { ATTACK = 1, DEFEND = 1 },
action = function(self, t)
self:setEffect(self.EFF_ETERNAL_WRATH, 5, {power=7 + self:getWil(10)})
return true
end,
info = function(self, t)
return ([[Call upon the power of the Eternals, increasing all damage by %d%% and reducing all damage taken by %d%% for 5 turns.
The bonus will increase with the Willpower stat]]):format(7 + self:getWil(10), 7 + self:getWil(10))
end,
}
newTalent{
name = "Unshackled",
type = {"race/thalore", 2},
require = racial_req2,
points = 5,
mode = "passive",
on_learn = function(self, t)
self.combat_physresist = self.combat_physresist + 5
self.combat_mentalresist = self.combat_mentalresist + 5
end,
on_unlearn = function(self, t)
self.combat_physresist = self.combat_physresist - 5
self.combat_mentalresist = self.combat_mentalresist - 5
end,
info = function(self, t)
return ([[Thaloren have always been a free people, living in their beloved forest, never carrying much about the world outside.
Increase physical and mental save by +%d.]]):format(self:getTalentLevelRaw(t) * 5)
end,
}
newTalent{
name = "Guardian of the Wood",
type = {"race/thalore", 3},
require = racial_req3,
points = 5,
mode = "passive",
on_learn = function(self, t)
self.disease_immune = self.disease_immune + 0.12
self.resists[DamageType.BLIGHT] = (self.resists[DamageType.BLIGHT] or 0) + 4
end,
on_unlearn = function(self, t)
self.disease_immune = self.disease_immune - 0.12
self.resists[DamageType.BLIGHT] = (self.resists[DamageType.BLIGHT] or 0) - 4
end,
info = function(self, t)
return ([[You are part of the wood, it shields you from corruption.
Increase diseases immunity by %d%% and Blight resistance by %d%%.]]):format(self:getTalentLevel(t) * 12, self:getTalentLevel(t) * 4)
end,
}
newTalent{
name = "Nature's Pride",
type = {"race/thalore", 4},
require = racial_req4,
points = 5,
no_energy = true,
cooldown = function(self, t) return 50 - self:getTalentLevel(t) * 3 end,
tactical = { ATTACK = 2 },
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
local _ _, tx, ty = self:canProject(tg, tx, ty)
target = game.level.map(tx, ty, Map.ACTOR)
if target == self then target = nil end
-- Find space
for i = 1, 2 do
local x, y = util.findFreeGrid(tx, ty, 5, true, {[Map.ACTOR]=true})
if not x then
game.logPlayer(self, "Not enough space to summon!")
return
end
local NPC = require "mod.class.NPC"
local m = NPC.new{
type = "immovable", subtype = "plants",
display = "#",
name = "treant", color=colors.GREEN,
desc = "A very strong near-sentient tree.",
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
rank = 3,
life_rating = 13,
max_life = resolvers.rngavg(50,80),
infravision = 20,
autolevel = "none",
ai = "summoned", ai_real = "tactical", ai_state = { talent_in=2, },
stats = {str=0, dex=0, con=0, cun=0, wil=0, mag=0},
combat = { dam=resolvers.levelup(resolvers.rngavg(15,25), 1, 1.3), atk=resolvers.levelup(resolvers.rngavg(15,25), 1, 1.3), dammod={str=1.1} },
inc_stats = { str=25 + self:getWil() * self:getTalentLevel(t) / 5, dex=18, con=10 + self:getTalentLevel(t) * 2, },
level_range = {1, nil}, exp_worth = 0,
silent_levelup = true,
combat_armor = 13, combat_def = 8,
resolvers.talents{ [Talents.T_STUN]=3, [Talents.T_KNOCKBACK]=2, },
faction = self.faction,
summoner = self, summoner_gain_exp=true,
summon_time = 6,
ai_target = {actor=target}
}
setupSummon(self, m, x, y)
end
game:playSoundNear(self, "talents/spell_generic")
return true
end,
info = function(self, t)
return ([[Nature is with you, you can always feel the call of the woods.
Summons two elite Treants to your side for 6 turns.
Their strength increase with your Willpower stat]]):format()
end,
}
------------------------------------------------------------------
-- Dwarvess powers
------------------------------------------------------------------
......@@ -161,8 +293,9 @@ newTalent{
short_name = "DWARF_RESILIENCE",
name = "Resilience of the Dwarves",
type = {"race/dwarf", 1},
require = racial_req1,
no_energy = true,
cooldown = 50,
cooldown = function(self, t) return 50 - self:getTalentLevel(t) * 5 end,
tactical = { DEFEND = 2 },
action = function(self, t)
self:setEffect(self.EFF_DWARVEN_RESILIENCE, 8, {
......@@ -186,8 +319,9 @@ newTalent{
short_name = "HALFLING_LUCK",
name = "Luck of the Little Folk",
type = {"race/halfling", 1},
require = racial_req1,
no_energy = true,
cooldown = 50,
cooldown = function(self, t) return 50 - self:getTalentLevel(t) * 5 end,
tactical = { ATTACK = 2 },
action = function(self, t)
self:setEffect(self.EFF_HALFLING_LUCK, 5, {
......@@ -202,27 +336,6 @@ newTalent{
end,
}
------------------------------------------------------------------
-- Thaloren powers
------------------------------------------------------------------
newTalentType{ type="race/thalore", name = "thalore", generic = true, description = "The various racial bonuses a character can have." }
newTalent{
short_name = "THALOREN_WRATH",
name = "Wrath of the Eternals",
type = {"race/thalore", 1},
no_energy = true,
cooldown = 50,
tactical = { ATTACK = 1, DEFEND = 1 },
action = function(self, t)
self:setEffect(self.EFF_ETERNAL_WRATH, 5, {power=7 + self:getWil(10)})
return true
end,
info = function(self, t)
return ([[Call upon the power of the Eternals, increasing all damage by %d%% and reducing all damage taken by %d%% for 5 turns.
The bonus will increase with the Willpower stat]]):format(7 + self:getWil(10), 7 + self:getWil(10))
end,
}
------------------------------------------------------------------
-- Orcs powers
------------------------------------------------------------------
......@@ -231,8 +344,9 @@ newTalent{
short_name = "ORC_FURY",
name = "Orcish Fury",
type = {"race/orc", 1},
require = racial_req1,
no_energy = true,
cooldown = 50,
cooldown = function(self, t) return 50 - self:getTalentLevel(t) * 5 end,
tactical = { ATTACK = 2 },
action = function(self, t)
self:setEffect(self.EFF_ORC_FURY, 5, {power=10 + self:getWil(20)})
......@@ -252,8 +366,9 @@ newTalent{
short_name = "YEEK_WILL",
name = "Dominant Will",
type = {"race/yeek", 1},
require = racial_req1,
no_energy = true,
cooldown = 50,
cooldown = function(self, t) return 50 - self:getTalentLevel(t) * 3 end,
range = 4,
no_npc_use = true,
action = function(self, t)
......
No preview for this file type
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