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

hobbit's luck

git-svn-id: http://svn.net-core.org/repos/t-engine4@249 51575b47-30f0-44d4-a5cc-537603b46e54
parent 63ad7551
No related branches found
No related tags found
No related merge requests found
......@@ -233,7 +233,7 @@ end
--- Gets spellcrit
function _M:combatSpellCrit()
return self.combat_spellcrit + 1
return self.combat_spellcrit + (self:getCun() - 10) * 0.3 + 1
end
--- Gets spellspeed
......
......@@ -28,8 +28,8 @@ newBirthDescriptor{
},
copy = {
default_wilderness = {"wilderness/main", 41, 18},
life_rating=12,
},
life_rating=12,
experience = 1.1,
}
......
......@@ -30,13 +30,13 @@ newBirthDescriptor{
Fallohide = "allow",
},
},
stats = { str=-3, dex=3, con=2, lck=5, },
stats = { str=-3, dex=3, con=1, cun=3, lck=5, },
experience = 1.1,
talents = {
ActorTalents.T_IMPROVED_HEALTH_I,
ActorTalents.T_IMPROVED_HEALTH_II,
[ActorTalents.T_HOBBIT_LUCK]=1,
},
copy = {
life_rating = 12,
default_wilderness = {"wilderness/main", 41, 18},
},
}
......
......@@ -115,3 +115,22 @@ newTalent{
The bonus will increase with the Constitution stat]]):format(5 + self:getCon() / 5, 10 + self:getCon() / 5, 10 + self:getCon() / 5)
end,
}
-- Hobbit's power, temporary crit bonus
newTalent{
short_name = "HOBBIT_LUCK",
name = "Luck of the Little Folk",
type = {"base/class", 1},
cooldown = 50,
action = function(self, t)
self:setEffect(self.EFF_HOBBIT_LUCK, 5, {
physical=20 + self:getCun() / 2,
spell=20 + self:getCun() / 2,
})
return true
end,
info = function(self)
return ([[Call upon the luck and cunning of the Little Folk to increase your physical and spell critical strike change by %d%% for 5 turns.
The bonus will increase with the Constitution stat]]):format(10 + self:getCon() / 5, 10 + self:getCon() / 5)
end,
}
......@@ -190,7 +190,7 @@ newEffect{
desc = "Dwarven Resilience",
type = "physical",
status = "beneficial",
parameters = { armor=10, mental=10, physical=10 },
parameters = { armor=10, spell=10, physical=10 },
on_gain = function(self, err) return "#Target#'s skin turns to stone." end,
on_lose = function(self, err) return "#Target# returns to normal." end,
activate = function(self, eff)
......@@ -204,3 +204,21 @@ newEffect{
self:removeTemporaryValue("combat_spellresist", eff.sid)
end,
}
newEffect{
name = "HOBBIT_LUCK",
desc = "Hobbit's Luck",
type = "physical",
status = "beneficial",
parameters = { spell=10, physical=10 },
on_gain = function(self, err) return "#Target# seems more aware." end,
on_lose = function(self, err) return "#Target# awareness returns to normal." end,
activate = function(self, eff)
eff.pid = self:addTemporaryValue("combat_physcrit", eff.physical)
eff.sid = self:addTemporaryValue("combat_spellcrit", eff.spell)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("combat_physcrit", eff.pid)
self:removeTemporaryValue("combat_spellcrit", eff.sid)
end,
}
......@@ -32,10 +32,10 @@ ActorStats:defineStat("Strength", "str", 10, 1, 100, "Strength defines your char
ActorStats:defineStat("Dexterity", "dex", 10, 1, 100, "Dexterity defines your character's ability to be agile and alert. It increases your chance to hit, your ability to avoid attacks and your damage with light weapons.")
ActorStats:defineStat("Magic", "mag", 10, 1, 100, "Magic defines your character's ability to manipulate the magic of the world. It increases your spell power, the effect of spells and other magic items.")
ActorStats:defineStat("Willpower", "wil", 10, 1, 100, "Willpower defines your character's ability to concentrate. It increases your mana and stamina capacity, and your chance to resist mental attacks.")
ActorStats:defineStat("Cunning", "cun", 10, 1, 100, "Cunning defines your character's ability to learn and think. It allows you to learn many wordly abilities, increases your mental resistance and armor penetration.")
ActorStats:defineStat("Cunning", "cun", 10, 1, 100, "Cunning defines your character's ability to learn, think and react. It allows you to learn many wordly abilities, increases your mental resistance, armor penetration and critical chance.")
ActorStats:defineStat("Constitution", "con", 10, 1, 100, "Constitution defines your character's ability to withstand and resist damage. It increases your maximun life and physical resistance.")
-- Luck is hidden and start at half max value (50) which is considered the standard
ActorStats:defineStat("Luck", "lck", 50, 1, 100, "Luck defines your character's chance when dealing with unknown events. It increases yoru critical strike chances, your chance for random encounters, ...")
ActorStats:defineStat("Luck", "lck", 50, 1, 100, "Luck defines your character's chance when dealing with unknown events. It increases your critical strike chances, your chance for random encounters, ...")
-- Actor autolevel schemes
dofile("/data/autolevel_schemes.lua")
-- Actor AIs
......
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