PK
v? data/UT NC]Nux d PK
k? data/birth/UT hfN|]Nux d PK
Dk?( data/birth/tourist.luaUT 0bN^Nux d -- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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 .
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newBirthDescriptor{
type = "class",
name = "Tourist",
desc = {
"Tourists like to see things.",
},
descriptor_choices =
{
subclass =
{
__ALL__ = "disallow",
Tourist = "allow",
},
},
copy = {
max_life = 100,
},
}
newBirthDescriptor{
type = "subclass",
name = "Tourist",
desc = {
"Blah blah",
},
stats = { cun=-2, con=-1, dex=-1, },
talents_types = {
["technique/combat-training"]={true, 0},
["cunning/tourist"]={true, 0},
},
talents = {
T_SIGHT_SEEING = 1,
T_WEAPON_COMBAT = 1,
},
copy = {
resolvers.equip{ id=true,
{type="weapon", subtype="greatsword", name="iron greatsword", autoreq=true, ego_chance=-1000, ego_chance=-1000},
{type="armor", subtype="light", name="rought leather armour", autoreq=true, ego_chance=-1000, ego_chance=-1000},
},
},
}
-- Allow it in Maj'Eyal campaign
getBirthDescriptor("world", "Maj'Eyal").descriptor_choices.class.Tourist = "allow"
PK
k?
data/talents/UT hfN^Nux d PK
k?{$ $ data/talents/tourist.luaUT eNL^Nux d newTalentType{ allow_random=true, type="cunning/tourist", name = "tourist", description = "Tourist things" }
tourists_req1 = {
stat = { wil=function(level) return 12 + (level-1) * 2 end },
level = function(level) return 0 + (level-1) end,
}
tourists_req2 = {
stat = { wil=function(level) return 20 + (level-1) * 2 end },
level = function(level) return 4 + (level-1) end,
}
tourists_req3 = {
stat = { wil=function(level) return 28 + (level-1) * 2 end },
level = function(level) return 8 + (level-1) end,
}
tourists_req4 = {
stat = { wil=function(level) return 36 + (level-1) * 2 end },
level = function(level) return 12 + (level-1) end,
}
newTalent{
name = "Sight Seeing",
type = {"cunning/tourist", 1},
require = tourists_req1,
points = 5,
stamina = 8,
cooldown = 10,
range = 100,
radius = function(self, t) return math.ceil(3 + self:getTalentLevel(t)) end,
requires_target = true,
no_npc_use = true,
action = function(self, t)
local x, y = self:getTarget{type="ball", nolock=true, no_restrict=true, nowarning=true, range=100, radius=self:getTalentRadius(t)}
if not x then return nil end
self:magicMap(math.ceil(3 + self:getTalentLevel(t)), x, y)
game:playSoundNear(self, "talents/spell_generic2")
return true
end,
info = function(self, t)
local radius = self:getTalentRadius(t)
return ([[See remote areas in a radius of %d.]]):
format(radius)
end,
}
newTalent{
name = "Tourist Fury",
type = {"cunning/tourist", 2},
require = tourists_req2,
points = 5,
stamina = 20,
cooldown = 30,
action = function(self, t)
self:setEffect(self.EFF_TOURIST_FURY, math.ceil(5 + self:getTalentLevel(t)), {})
game:playSoundNear(self, "talents/spell_generic2")
return true
end,
info = function(self, t)
return ([[Multiply all damage done by 500%% for %d turns.]]):
format(math.ceil(5 + self:getTalentLevel(t)))
end,
}
newTalent{
name = "Diplomatic Immunity",
type = {"cunning/tourist", 3},
require = tourists_req3,
points = 5,
stamina = 20,
cooldown = 30,
action = function(self, t)
self:setEffect(self.EFF_DIPLOMATIC_IMMUNITY, math.ceil(5 + self:getTalentLevel(t)), {})
game:playSoundNear(self, "talents/spell_generic2")
return true
end,
info = function(self, t)
return ([[Become immune to all damage for %d turns.]]):
format(math.ceil(5 + self:getTalentLevel(t)))
end,
}
PK
Tv?WY data/timed_effects.luaUT (lNIeNux d newEffect{
name = "TOURIST_FURY", image = "talents/tourist_fury.png",
desc = "Tourist Fury",
long_desc = function(self, eff) return ("500% more damage.") end,
type = "physical",
subtype = { tourist=true },
status = "beneficial",
parameters = { },
on_gain = function(self, err) return "#Target# is furious.", "+Tourist Fury" end,
on_lose = function(self, err) return "#Target# is less furious.", "-Tourist Fury" end,
activate = function(self, eff)
end,
deactivate = function(self, eff)
end,
}
newEffect{
name = "DIPLOMATIC_IMMUNITY", image = "talents/diplomatic_immunity.png",
desc = "Diplomatic Immunity",
long_desc = function(self, eff) return ("Invulnerable.") end,
type = "physical",
subtype = { tourist=true },
status = "beneficial",
parameters = { },
on_gain = function(self, err) return "#Target# is furious.", "+Diplomatic Immunity" end,
on_lose = function(self, err) return "#Target# is less furious.", "-Diplomatic Immunity" end,
activate = function(self, eff)
end,
deactivate = function(self, eff)
end,
}
PK
v? hooks/UT κN\Nux d PK
\}v?W hooks/load.luaUT Nk]Nux d local class = require"engine.class"
local ActorTalents = require "engine.interface.ActorTalents"
local ActorTemporaryEffects = require "engine.interface.ActorTemporaryEffects"
local Birther = require "engine.Birther"
class:bindHook("ToME:load", function(self, data)
ActorTalents:loadDefinition("/data-example/talents/tourist.lua")
ActorTemporaryEffects:loadDefinition("/data-example/timed_effects.lua")
Birther:loadDefinition("/data-example/birth/tourist.lua")
end)
class:bindHook("Actor:takeHit", function(self, data)
if self:hasEffect(self.EFF_DIPLOMATIC_IMMUNITY) then data.value = 0 return true end
end)
class:bindHook("DamageProjector:base", function(self, data)
if self.hasEffect and self:hasEffect(self.EFF_TOURIST_FURY) then data.dam = data.dam * 5 return true end
end)
PK
JTv?g?: : init.luaUT lN+UNux d -- ToME - Tales of Maj'Eyal:
-- Copyright (C) 2009, 2010, 2011 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 .
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
long_name = "Example Addons for ToME"
short_name = "example"
for_module = "tome"
version = {3,9,35}
weight = 100
author = { "DarkGod", "darkgod@te4.org" }
homepage = "http://tome.te4.org/"
description = [[Example addon, adds Tourist class.]]
overload = true
superload = true
hooks = true
data = true
PK
Wk? overload/UT VbN,UNux d PK
Xk? overload/data/UT XbNVbNux d PK
Yk? overload/data/gfx/UT ZbNXbNux d PK
k? overload/data/gfx/talents/UT eNZbNux d PK
k?k]Bw w * overload/data/gfx/talents/sight_seeing.pngUT bNbNux d PNG
IHDR @ @ % sRGB pHYs tIME 4*s IDAThZ{PU<<1T$N䶓T4:щM\Ioc涵i' MLfj6f `HR,!HD%ț{i9읹Ya9^ַ}k_[83Rv>DӴoW@oo}%"At;mf$&jYYic].[{`JDnuE-YUP0;=}\ +WFWVFoܨ|11!9O=Z3G5ME--{ȴiƏ1رk>444xVMfBfbBuuBrjiZO'\
X[sL7nݪc7n$I1HHHRzԩS'<88xqaawyx`~f&G[87rM,vo6 x1]'@DDo:=:n>|k |ŋO0+xE\2jjjd)deL`ԩv-najق&@RRbnΜ4]_\!|Ș0228HP>MJ
6M{/?<\V$Q49sq@Mv|p-@ f"\U5j++ ͋H[֙3g:zʕQ*pDFF\W\ ,}Xrl, - `͚5YYHE!"
3
NS僋R֯ cn3dY媱3q@><<<|3I@ wg~훸j>eX0s{ ~@ hvU/!.` A)..;áB 0(@ HL
H?{(77G?NO ~U߬<@`U~-*j\snw"LyDmpS+*Ν;eO"0y4 4}`ME PXs9GѲr/[p""0ny1$$f4A+VnbW:^4]d7H|BH3 [IMh9
ĜD" `%Z 9,! b,)@DȘT楇ۘmv*0HbLuH{!