PK v?data/UT NC]Nux dPK k? data/birth/UT hfN|]Nux dPK 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 dPK k?{$ $ data/talents/tourist.luaUT eNL^Nux dnewTalentType{ 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?WYdata/timed_effects.luaUT (lNIeNux dnewEffect{ 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 dPK \}v?Whooks/load.luaUT Nk]Nux dlocal 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 dPK Xk?overload/data/UT XbNVbNux dPK Yk?overload/data/gfx/UT ZbNXbNux dPK k?overload/data/gfx/talents/UT eNZbNux dPK k?k]Bw w *overload/data/gfx/talents/sight_seeing.pngUT bNbNux dPNG  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'<88xqaa wyx`~f&G[87rM,vo6 x1]'@DDo:=:n>|k |ŋO0+xE\2jjjd)deL`ԩv-n ajق &@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>e X0s{ ~@hvU/!.` A)..;áB0(@HL H?{(77G?NO~U߬<@`U~-*j\snw"LyDmpS+*Ν;e O"0y44}`ME PXs9GѲr/􁁁[p""0 ny1$$f4A+VnbW:^4]d7H|BH3 [IMh9  ĜD" `%Z 9,!b,)@DȘT楇ۘmv*0HbLuH{!.444:k; bh0ASuo߾/C KꜘL DgzDol&kzSh_˄V78D٭m5nczA0E{G4R% S>k. ~?|:t= 'ldPXGޣ?/tz˗U 566r ŲwŒo}"#ׯ>}ڗQqqLOO_be\ >toXw/K.\074CqJ_RVU)7 [,w:ٍPi=߫{0m5t\ckHwww[[[WWw FW577wO|i'{OLQ__x |\ (Hbb6t2쒓'ONDKK˥ =5)6<<f0b:(//|vAj̛7@llիm6UWJ%&&=x}&t]mmmC̙3\r!<K.5u|0ocwڵ>k˖-S~`@5K^^ 6|AGq}ɿxw4ԩ⪪9yʔ)v=...---e2JW7o.@aMCGIII~aIIxxBlB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