Newer
Older
-- ToME - Tales of Middle-Earth
--
-- 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
local Stats = require "engine.interface.ActorStats"
local Talents = require "engine.interface.ActorTalents"
-- This file describes artifacts associated with a boss of the game, they have a high chance of dropping their respective ones, but they can still be found elsewhere
-- Design: Revamp Wintertide to make it more unique, interesting, and not terrible.
-- Balance: A cold themed weapon doesn't play nice with melee scalers, and Ice Block on hit, while useful overall, has some obvious anti-synergy. So instead of focusing on stats I added a decent passive on hit and a very powerful active. The active is a "better" Stone Wall but you have to be actively using the weapon in melee to make use of it. The delayed expansion of the storm also limits its strength as an "oh shit" button.
newEntity{ base = "BASE_LONGSWORD",
power_source = {arcane=true},
define_as = "LONGSWORD_WINTERTIDE", unided_name = "glittering longsword", image="object/artifact/wintertide.png",
name = "Wintertide", unique=true,
moddable_tile = "special/%s_wintertide",
moddable_tile_big = true,
desc = [[The air seems to freeze around the blade of this sword, draining all heat from the area.
It is said the Conclave created this weapon for their warmaster during the dark times of the first allure war.]],
require = { stat = { str=35 }, },
level_range = {35, 45},
rarity = 280,
material_level = 5,
local storm = self.winterStorm
if not storm or storm.duration <=0 then
return ("No Winter Storm Active")
return ("Winter Storm: " .. ((storm.duration and storm.radius) and ("radius %d (%d turns remaining)"):format(math.floor(storm.radius), storm.duration) or "None"))
combat = {
dam = 39, -- lower damage, defensive item with extremely powerful effects
apr = 10,
physcrit = 10,
dammod = {str=1},
damrange = 1.4,
melee_project={[DamageType.ICE] = 25}, -- Iceblock HP is based on damage, since were adding iceblock pierce we want this to be less generous
Hachem_Muche
committed
special_on_hit = {
desc=function(self, who, special)
local dam = who:damDesc(engine.DamageType.COLD, special:damage(self, who))
return ("Create a Winter Storm that gradually expands (from radius %d to radius %d), dealing %0.2f cold damage (based on Strength) to your enemies each turn and slowing their ability to act by 20%%. Subsequent melee strikes will relocate the storm on top of your target and increase its duration."):format(special.radius, special.max_radius, dam)
end,
on_kill=1,
damage = function(special, self, who) return who:combatStatScale("str", 20, 80, 0.75) end,
duration = 5,
radius = 1,
max_radius = 4,
fct=function(combat, who, target, dam, special)
local Object = require "mod.class.Object"
local Map = require "engine.Map"
-- special_on_hit doesn't know what item triggered it, so find it
local self, item, inven_id = who:findInAllInventoriesBy("define_as", "LONGSWORD_WINTERTIDE")
if not self or not who:getInven(inven_id).worn then return end
if who.turn_procs.wintertide_sword then return end
-- The reference to winterStorm is lost sometimes on reload but since we know only one can ever exist we can just check the map effects and set the reference every proc
Hachem_Muche
committed
for k, eff in pairs(game.level.map.effects) do
if eff and eff.is_wintertide then
self.winterStorm = eff
end
end
DarkGod
committed
Hachem_Muche
committed
-- Who knows if this is necessary
if self.winterStorm and self.winterStorm.duration <= 0 then
self.winterStorm = nil
end
who.turn_procs.wintertide_sword = true
-- If the map has no Winter Storm then create one
if not self.winterStorm then
game.logSeen(target, "#LIGHT_BLUE#A Winter Storm forms around %s.", target.name:capitalize())
Hachem_Muche
committed
local stormDam = special:damage(self, who)
self.winterStorm = game.level.map:addEffect(who,
target.x, target.y, special.duration,
engine.DamageType.WINTER, {dam=stormDam, x=target.x, y=target.y}, -- Winter is cold damage+energy reduction, enemy only
special.radius, -- starting radius
5, nil,
{type="icestorm", only_one=true, args = {radius = 1}},
function(e, update_shape_only)
if not update_shape_only then
-- Increase the radius by 0.2 each time the effect ticks (1000 energy)
if e.radius < e.max_radius then
Hachem_Muche
committed
e.radius = e.radius + 0.2
if e.particles and math.floor(e.particles[1].args.radius) ~= math.floor(e.radius) then -- expand the graphical effect
e.particles[1].args.radius = e.radius
e.particles[1].radius = e.radius -- is this needed?
Hachem_Muche
committed
e.particles[1]:dieDisplay()
e.particles[1]:checkDisplay()
end
end
end
Hachem_Muche
committed
return true
end,
false,
false
)
self.winterStorm.is_wintertide = true
self.winterStorm.max_radius = special.max_radius
Hachem_Muche
committed
else
-- The storm already exists so move it on top of the target and increase its duration
self.winterStorm.x = target.x
self.winterStorm.y = target.y
if self.winterStorm.duration < 7 then -- duration can be extended forever while meleeing
self.winterStorm.duration = self.winterStorm.duration + 2
end
game.level.map.changed = true
},
wielder = {
iceblock_pierce=35, -- this can be generous because of how melee specific the item is
resists = { [DamageType.COLD] = 25 },
on_melee_hit={[DamageType.ICE] = 40},
inc_damage = { [DamageType.COLD] = 20 },
},
use_power = { name ="concentrate the precipitation of your Winter Storm into ice walls (lasting 10 turns) within its area", power = 30,
use = function(self, who)
local Object = require "mod.class.Object"
local Map = require "engine.Map"
if not self.winterStorm then return end
if self.winterStorm and self.winterStorm.duration <= 0 then
self.winterStorm = nil
return
end
local grids = core.fov.circle_grids(self.winterStorm.x, self.winterStorm.y, self.winterStorm.radius, true)
game.logSeen(who, "#LIGHT_BLUE#%s activates %s %s, precipitating walls of ice from the Winter Storm!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true}))
self.use_power.last_use = {turn = game.turn, x = self.winterStorm.x, y = self.winterStorm.y, radius = self.winterStorm.radius} -- for ai purposes
local self = who
for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do
local oe = game.level.map(x, y, engine.Map.TERRAIN)
if oe then
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
if oe._wintertide_ice_wall then
oe.temporary = 10
else
local e = Object.new{
old_feat = oe,
name = "winter wall", image = "npc/iceblock.png",
_wintertide_ice_wall = true,
display = '#', color_r=255, color_g=255, color_b=255, back_color=colors.GREY,
desc = "a summoned wall of ice",
type = "wall", --subtype = "floor",
always_remember = true,
can_pass = {pass_wall=1},
does_block_move = true,
show_tooltip = true,
block_move = true,
block_sight = true,
temporary = 10,
x = x, y = y,
canAct = false,
act = function(self)
self:useEnergy()
self.temporary = self.temporary - 1
if self.temporary <= 0 then
game.level.map(self.x, self.y, engine.Map.TERRAIN, self.old_feat)
game.level:removeEntity(self)
end
end,
dig = function(src, x, y, old)
game.level:removeEntity(old)
return nil, old.old_feat
end,
summoner_gain_exp = true,
summoner = self,
}
e.tooltip = mod.class.Grid.tooltip
game.level:addEntity(e)
game.level.map(x, y, engine.Map.TERRAIN, e)
end
return {id=true, used=true}
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
end,
on_pre_use = function(self, who, silent, fake)
if not self.winterStorm then return false end
local last_use = self.use_power.last_use
if last_use then
if game.turn - last_use.turn >= 11*game.energy_to_act/game.energy_per_tick then -- no current icewalls
return true
else -- current icewall, don't overlap
if core.fov.distance(self.winterStorm.x, self.winterStorm.y, last_use.x, last_use.y) < math.floor(last_use.radius) then return false end
end
end
return true
end,
tactStatus = function(o, who, aitarget) -- get Tactical info for tactical table functions
local TDist = core.fov.distance(who.x, who.y, aitarget.x, aitarget.y)
local TEnv = core.fov.distance(aitarget.x, aitarget.y, o.winterStorm.x, o.winterStorm.y) < math.floor(o.winterStorm.radius)
local SEnv = core.fov.distance(who.x, who.y, o.winterStorm.x, o.winterStorm.y) < math.floor(o.winterStorm.radius)
--game.log("#LIGHT_BLUE# Wintertide TACT DATA: targetdistance %0.1f, targetenveloped: %s, selfenveloped: %s", TDist, TEnv, SEnv)
return TDist, TEnv, SEnv
end,
tactical = {
ESCAPE = function(who, t, aitarget)
local o = t.is_object_use and t.getObject(who, t)
if not (o and o.wielded and aitarget and o.winterStorm and o.winterStorm.duration > 0) then
return 0
else
local Tdist, Tenv, Senv = o.use_power.tactStatus(o, who, aitarget)
--game.log("#LIGHT_BLUE# Wintertide ESCAPE distance %0.1f, Tenveloped: %s, Senveloped: %s", Tdist, Tenv, Senv)
local val = 0
if Tenv then
if not Senv then val = val + 3
elseif Tdist > 1 then val = val + 1
end
elseif Senv then
if Tdist > 1 then val = val + 0.5 end
end
return val
end
end,
DEFEND = function(who, t, aitarget) -- defense against multiple foes
local o = t.is_object_use and t.getObject(who, t)
if not (o and o.wielded and aitarget and o.winterStorm and o.winterStorm.duration > 0) then
return 0
else
local Tdist, Tenv, Senv = o.use_power.tactStatus(o, who, aitarget)
--game.log("#LIGHT_BLUE# Wintertide DEFEND distance %0.1f, Tenveloped: %s, Senveloped: %s", Tdist, Tenv, Senv)
local val = 0
if Tdist <= 1 then
if Senv then val = val + 1.5 end
if Tenv then val = val + 0.5 end
end
return val
end
end,
PROTECT = function(who, t, aitarget) --summons protect summoner
if not (who.summoner and aitarget) then return end
local o = t.is_object_use and t.getObject(who, t)
if not (o and o.wielded and o.winterStorm and o.winterStorm.duration > 0) then
return 0
else
local Tdist, Tenv, Senv = o.use_power.tactStatus(o, who.summoner, aitarget)
--game.log("#LIGHT_BLUE# Wintertide PROTECT distance %0.1f, Tenveloped: %s, Summonerenveloped: %s", Tdist, Tenv, Senv)
local val = 0
if Tdist > 1 then
if Tenv then val = val + 1 end
if Senv then val = val + 0.5 end
end
return val
end
end,
},
radius = function(self, who)
local winterStorm = self.winterStorm
if winterStorm and winterStorm.duration > 0 then
return winterStorm.radius
else
return 0
end
end,
-- target = {},
},
DarkGod
committed
self.winterStorm = nil
end,
on_pickup = function(self, who)
self.winterStorm = nil
end,
}
newEntity{ base = "BASE_LITE", define_as = "WINTERTIDE_PHIAL",
power_source = {arcane=true},
unided_name = "phial filled with darkness", unique = true, image="object/artifact/wintertide_phial.png",
name = "Wintertide Phial", color=colors.DARK_GREY,
desc = [[This phial seems filled with darkness, yet it cleanses your thoughts.]],
rarity = 200,
encumber = 2,
cost = 50,
wielder = {
lite = 1,
infravision = 6,
},
max_power = 60, power_regen = 1,
Hachem_Muche
committed
use_power = {
name = function(self, who) return ("cleanse your mind of up to %d (based on Magic) detrimental mental effects"):format(self.use_power.nbcure(self, who)) end,
power = 40,
nbcure = function(self, who) return math.floor(who:combatStatScale("mag", 2.5, 6, "log")) end,
use = function(self, who)
local target = who
local effs = {}
local known = false
Hachem_Muche
committed
game.logSeen(who, "%s uses the %s to cleanse %s mind!", who.name:capitalize(), self:getName({no_add_name = true}), who:his_her())
-- Go through all mental effects
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "mental" and e.status == "detrimental" then
effs[#effs+1] = {"effect", eff_id}
end
end
Hachem_Muche
committed
for i = 1, self.use_power.nbcure(self, who) do
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
if #effs == 0 then break end
local eff = rng.tableRemove(effs)
if eff[1] == "effect" then
target:removeEffect(eff[2])
known = true
end
end
return {id=true, used=true}
end
},
}
-- Artifact, dropped by Rantha
newEntity{ base = "BASE_LEATHER_BOOT",
power_source = {nature=true},
define_as = "FROST_TREADS",
unided_name = "ice-covered boots",
name = "Frost Treads", unique=true, image="object/artifact/frost_treads.png",
desc = [[A pair of leather boots. Cold to the touch, they radiate a cold blue light.]],
require = { stat = { dex=16 }, },
level_range = {10, 18},
material_level = 2,
rarity = 220,
cost = 40,
wielder = {
lite = 1,
combat_armor = 4,
combat_def = 1,
fatigue = 7,
inc_damage = {
[DamageType.COLD] = 15,
},
resists = {
[DamageType.COLD] = 20,
[DamageType.NATURE] = 10,
},
inc_stats = { [Stats.STAT_STR] = 4, [Stats.STAT_DEX] = 4, [Stats.STAT_CUN] = 4, },
},
}
newEntity{ base = "BASE_HELM",
power_source = {technique=true},
define_as = "DRAGON_SKULL",
name = "Dragonskull Helm", unique=true, unided_name="skull helm", image = "object/artifact/dragonskull_helmet.png",
desc = [[Traces of a dragon's power still remain in this bleached and cracked skull.]],
require = { stat = { wil=24 }, },
level_range = {45, 50},
material_level = 5,
rarity = 280,
cost = 200,
wielder = {
resists = {
[DamageType.FIRE] = 15,
[DamageType.COLD] = 15,
[DamageType.ACID] = 15,
[DamageType.LIGHTNING] = 15,
},
esp = {dragon=1},
combat_armor = 2,
fatigue = 12,
combat_physresist = 12,
combat_mentalresist = 12,
combat_spellresist = 12,
},
}
newEntity{ base = "BASE_LIGHT_ARMOR",
power_source = {nature=true},
define_as = "EEL_SKIN", image = "object/artifact/eel_skin_armor.png",
name = "Eel-skin armour", unique=true,
unided_name = "slippery armour", color=colors.VIOLET,
desc = [[This armour seems to have been patched together from many eels. Yuck.]],
level_range = {5, 12},
rarity = 200,
cost = 500,
material_level = 2,
wielder = {
inc_stats = { [Stats.STAT_DEX] = 2, [Stats.STAT_CUN] = 3, },
poison_immune = 0.3,
combat_armor = 1,
combat_def = 10,
fatigue = 2,
},
max_power = 50, power_regen = 1,
use_talent = { id = Talents.T_CALL_LIGHTNING, level=2, power = 18 },
talent_on_wild_gift = { {chance=10, talent=Talents.T_CALL_LIGHTNING, level=2} },
}
newEntity{ base = "BASE_RING",
power_source = {psionic=true},
define_as = "NIGHT_SONG",
name = "Nightsong", unique=true, image = "object/artifact/ring_nightsong.png",
desc = [[A pitch black ring, unadorned. It seems as though tendrils of darkness creep upon it.]],
unided_name = "obsidian ring",
level_range = {15, 23},
rarity = 250,
cost = 500,
material_level = 2,
wielder = {
max_stamina = 25,
combat_def = 6,
fatigue = -7,
inc_stats = { [Stats.STAT_CUN] = 6 },
combat_mentalresist = 13,
talent_cd_reduction={
[Talents.T_SHADOWSTEP]=1,
},
inc_damage={ [DamageType.PHYSICAL] = 5, },
},
max_power = 50, power_regen = 1,
use_talent = { id = Talents.T_DARK_TENDRILS, level=2, power = 40 },
}
newEntity{ base = "BASE_HELM",
power_source = {nature=true},
define_as = "HELM_OF_GARKUL",
unided_name = "tribal helm",
name = "Steel Helm of Garkul", unique=true, image="object/artifact/helm_of_garkul.png",
desc = [[A great helm that belonged to Garkul the Devourer, one of the greatest orcs ever to live.]],
require = { stat = { str=16 }, },
level_range = {12, 22},
rarity = 200,
cost = 500,
material_level = 2,
skullcracker_mult = 5,
wielder = {
combat_armor = 6,
fatigue = 8,
inc_stats = { [Stats.STAT_STR] = 5, [Stats.STAT_CON] = 5, [Stats.STAT_WIL] = 4 },
inc_damage={ [DamageType.PHYSICAL] = 10, },
combat_physresist = 12,
combat_mentalresist = 12,
combat_spellresist = 12,
talents_types_mastery = {["technique/thuggery"]=0.2},
},
set_list = { {"define_as","SET_GARKUL_TEETH"} },
HousePet
committed
set_desc = {
garkul = "Another of Garkul's heirlooms would bring out his spirit.",
},
on_set_complete = function(self, who)
self:specialSetAdd("skullcracker_mult", 1)
self:specialSetAdd({"wielder","melee_project"}, {[engine.DamageType.GARKUL_INVOKE]=5})
end,
}
newEntity{ base = "BASE_SHIELD",
power_source = {arcane=true},
define_as = "LUNAR_SHIELD",
unique = true,
name = "Lunar Shield", image = "object/artifact/shield_lunar_shield.png",
moddable_tile = "special/%s_lunar_shield",
moddable_tile_big = true,
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
unided_name = "chitinous shield",
desc = [[A large section of chitin removed from Nimisil. It continues to give off a strange white glow.]],
color = colors.YELLOW,
metallic = false,
require = { stat = { str=35 }, },
level_range = {40, 50},
rarity = 280,
cost = 350,
material_level = 5,
special_combat = {
dam = 45,
block = 250,
physcrit = 10,
dammod = {str=1},
damrange = 1.4,
damtype = DamageType.ARCANE,
},
wielder = {
resists={[DamageType.DARKNESS] = 25},
inc_damage={[DamageType.DARKNESS] = 15},
combat_armor = 7,
combat_def = 12,
combat_def_ranged = 5,
combat_spellpower = 10,
fatigue = 2,
lite = 1,
talents_types_mastery = {["celestial/star-fury"]=0.2,["celestial/twilight"]=0.1,},
learn_talent = { [Talents.T_BLOCK] = 5, },
},
talent_on_spell = { {chance=10, talent=Talents.T_MOONLIGHT_RAY, level=2} },
}
newEntity{ base = "BASE_SHIELD",
power_source = {nature=true},
define_as = "WRATHROOT_SHIELD",
unided_name = "large chunk of wood",
moddable_tile = "special/%s_wrathroots_barkwood",
moddable_tile_big = true,
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
name = "Wrathroot's Barkwood", unique=true, image="object/artifact/shield_wrathroots_barkwood.png",
desc = [[The barkwood of Wrathroot, made into roughly the shape of a shield.]],
require = { stat = { str=25 }, },
level_range = {12, 22},
rarity = 200,
cost = 20,
material_level = 2,
metallic = false,
special_combat = {
dam = resolvers.rngavg(20,30),
block = 60,
physcrit = 2,
dammod = {str=1.5},
damrange = 1.4,
},
wielder = {
combat_armor = 10,
combat_def = 9,
fatigue = 14,
resists = {
[DamageType.DARKNESS] = 20,
[DamageType.COLD] = 20,
[DamageType.NATURE] = 20,
},
learn_talent = { [Talents.T_BLOCK] = 3, },
},
}
newEntity{ base = "BASE_GEM",
power_source = {nature=true},
unique = true, define_as = "PETRIFIED_WOOD",
unided_name = "burned piece of wood",
name = "Petrified Wood", subtype = "red", --Visually black, but associate with fire, not acid
color = colors.WHITE, image = "object/artifact/petrified_wood.png",
level_range = {35, 45},
rarity = 280,
desc = [[A piece of the scorched wood taken from the remains of Snaproot.]],
cost = 100,
material_level = 4,
imbue_powers = {
resists = { [DamageType.NATURE] = 25, [DamageType.DARKNESS] = 10, [DamageType.COLD] = 10 },
inc_stats = { [Stats.STAT_CON] = 25, },
},
wielder = {
resists = { [DamageType.NATURE] = 25, [DamageType.DARKNESS] = 10, [DamageType.COLD] = 10 },
inc_stats = { [Stats.STAT_CON] = 25, },
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
},
}
newEntity{ base = "BASE_STAFF",
power_source = {arcane=true},
unique = true, define_as = "CRYSTAL_SHARD",
name = "Crystal Shard",
unided_name = "crystalline tree branch",
flavor_name = "magestaff",
level_range = {10, 22},
color=colors.BLUE, image = "object/artifact/crystal_shard.png",
rarity = 300,
desc = [[This crystalline tree branch is remarkably rigid, and refracts light in myriad colors. Gazing at it entrances you, and you worry where its power may have come from.]],
cost = 200,
material_level = 2,
require = { stat = { mag=20 }, },
combat = {
dam = 16,
apr = 4,
dammod = {mag=1.3},
damtype = DamageType.ARCANE,
convert_damage = {
[DamageType.BLIGHT] = 50,
},
},
wielder = {
combat_spellpower = 14,
combat_spellcrit = 4,
inc_damage={
[DamageType.ARCANE] = 18,
[DamageType.BLIGHT] = 18,
},
resists={
[DamageType.ARCANE] = 10,
[DamageType.BLIGHT] = 10,
},
damage_affinity={
[DamageType.ARCANE] = 20,
},
},
max_power = 45, power_regen = 1,
Hachem_Muche
committed
use_power = { name = "create 2 living shards of crystal to serve you for 10 turns", power = 45, use = function(self, who)
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
if not who:canBe("summon") then game.logPlayer(who, "You cannot summon; you are suppressed!") return end
local NPC = require "mod.class.NPC"
local list = NPC:loadList("/data/general/npcs/crystal.lua")
for i = 1, 2 do
-- Find space
local x, y = util.findFreeGrid(who.x, who.y, 5, true, {[engine.Map.ACTOR]=true})
if not x then break end
local e
repeat e = rng.tableRemove(list)
until not e.unique and e.rarity
e = e:clone()
local crystal = game.zone:finishEntity(game.level, "actor", e)
crystal.make_escort = nil
crystal.silent_levelup = true
crystal.faction = who.faction
crystal.ai = "summoned"
crystal.ai_real = "dumb_talented_simple"
crystal.summoner = who
crystal.summon_time = 10
crystal.exp_worth = 0
crystal:forgetInven(crystal.INVEN_INVEN)
local setupSummon = getfenv(who:getTalentFromId(who.T_SPIDER).action).setupSummon
if who:knowTalent(who.T_BLIGHTED_SUMMONING) then
crystal.blighted_summon_talent = who.T_BONE_SHIELD
crystal:incIncStat("mag", who:getMag())
crystal.summon_time=15
end
setupSummon(who, crystal, x, y)
game:playSoundNear(who, "talents/ice")
end
return {id=true, used=true}
end },
}
newEntity{ base = "BASE_WARAXE",
power_source = {arcane=true},
define_as = "MALEDICTION",
unided_name = "pestilent waraxe",
name = "Malediction", unique=true, image = "object/artifact/axe_malediction.png",
moddable_tile = "special/%s_axe_malediction",
moddable_tile_big = true,
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
desc = [[The land withers and crumbles wherever this cursed axe rests.]],
require = { stat = { str=55 }, },
level_range = {35, 45},
rarity = 290,
cost = 375,
material_level = 4,
combat = {
dam = 55,
apr = 15,
physcrit = 10,
dammod = {str=1},
damrange = 1.2,
burst_on_hit={[DamageType.BLIGHT] = 25},
lifesteal=5, --You can counter the life regen by fighting, muhuhahah
},
wielder = {
life_regen = -0.3,
inc_damage = { [DamageType.BLIGHT] = 20 },
},
}
newEntity{ base = "BASE_STAFF",
power_source = {arcane=true},
define_as = "STAFF_KOR", image = "object/artifact/staff_kors_fall.png",
unided_name = "dark staff",
flavor_name = "vilestaff",
name = "Kor's Fall", unique=true,
desc = [[Made from the bones of many creatures, this staff glows with power. You can feel its evil presence even from a distance.]],
require = { stat = { mag=25 }, },
level_range = {1, 10},
rarity = 200,
cost = 60,
material_level = 1,
modes = {"darkness", "fire", "blight", "acid"},
combat = {
is_greater = true,
dam = 10,
apr = 0,
physcrit = 1.5,
dammod = {mag=1.1},
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
},
wielder = {
see_invisible = 2,
combat_spellpower = 7,
combat_spellcrit = 8,
inc_damage={
[DamageType.ACID] = 10,
[DamageType.DARKNESS] = 10,
[DamageType.FIRE] = 10,
[DamageType.BLIGHT] = 10,
},
talents_types_mastery = { ["corruption/bone"] = 0.1, },
learn_talent = {[Talents.T_COMMAND_STAFF] = 1},
},
max_power = 6, power_regen = 1,
use_talent = { id = Talents.T_BONE_SPEAR, level = 3, power = 6 },
}
newEntity{ base = "BASE_AMULET",
power_source = {arcane=true},
define_as = "VOX",
name = "Vox", unique=true,
unided_name = "ringing amulet", color=colors.BLUE, image="object/artifact/jewelry_amulet_vox.png",
desc = [[No force can hope to silence the wearer of this amulet.]],
level_range = {40, 50},
rarity = 220,
cost = 3000,
material_level = 5,
wielder = {
see_invisible = 20,
silence_immune = 1,
combat_spellpower = 9,
combat_spellcrit = 4,
max_mana = 50,
combat_spellspeed = 0.15,
max_vim = 50,
},
}
newEntity{ base = "BASE_STAFF",
power_source = {arcane=true},
define_as = "TELOS_TOP_HALF", image = "object/artifact/staff_broken_top_telos.png",
slot_forbid = false,
twohanded = false,
unided_name = "broken staff", flavor_name = "magestaff",
name = "Telos's Staff (Top Half)", unique=true,
require = { stat = { mag=35 }, },
level_range = {40, 50},
rarity = 210,
encumber = 2.5,
material_level = 5,
modes = {"fire", "cold", "lightning", "arcane"},
cost = 500,
combat = {
dam = 35,
apr = 0,
physcrit = 1.5,
dammod = {mag=1.0},
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
},
wielder = {
combat_spellpower = 30,
combat_spellcrit = 15,
combat_mentalresist = 8,
inc_stats = { [Stats.STAT_WIL] = 5, },
inc_damage = {[DamageType.ARCANE] = 35 },
learn_talent = {[Talents.T_COMMAND_STAFF] = 1 },
},
}
newEntity{ base = "BASE_AMULET",
power_source = {arcane=true},
define_as = "AMULET_DREAD",
name = "Choker of Dread", unique=true, image = "object/artifact/amulet_choker_of_dread.png",
unided_name = "dark amulet", color=colors.LIGHT_DARK,
desc = [[The evilness of undeath radiates from this amulet.]],
level_range = {20, 28},
rarity = 220,
cost = 500,
material_level = 3,
wielder = {
see_invisible = 10,
blind_immune = 1,
combat_spellpower = 5,
combat_dam = 5,
},
max_power = 60, power_regen = 1,
Hachem_Muche
committed
use_power = { name = "summon an elder vampire to your side for 15 turns", power = 60, use = function(self, who)
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
if not who:canBe("summon") then game.logPlayer(who, "You cannot summon; you are suppressed!") return end
-- Find space
local x, y = util.findFreeGrid(who.x, who.y, 5, true, {[engine.Map.ACTOR]=true})
if not x then
game.logPlayer(who, "Not enough space to invoke the vampire!")
return
end
print("Invoking guardian on", x, y)
local NPC = require "mod.class.NPC"
local vampire = NPC.new{
type = "undead", subtype = "vampire",
display = "V", image = "npc/elder_vampire.png",
name = "elder vampire", color=colors.RED,
desc=[[A terrible robed undead figure, this creature has existed in its unlife for many centuries by stealing the life of others. It can summon the very shades of its victims from beyond the grave to come enslaved to its aid.]],
combat = { dam=resolvers.rngavg(9,13), atk=10, apr=9, damtype=engine.DamageType.DRAINLIFE, dammod={str=1.9} },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
autolevel = "warriormage",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=3, },
stats = { str=12, dex=12, mag=12, con=12 },
life_regen = 3,
size_category = 3,
rank = 3,
infravision = 10,
inc_damage = table.clone(who.inc_damage, true),
resists = { [engine.DamageType.COLD] = 80, [engine.DamageType.NATURE] = 80, [engine.DamageType.LIGHT] = -50, },
blind_immune = 1,
confusion_immune = 1,
see_invisible = 5,
undead = 1,
level_range = {who.level, who.level}, exp_worth = 0,
max_life = resolvers.rngavg(90,100),
combat_armor = 12, combat_def = 10,
resolvers.talents{ [who.T_STUN]=2, [who.T_BLUR_SIGHT]=3, [who.T_PHANTASMAL_SHIELD]=2, [who.T_ROTTING_DISEASE]=3, },
faction = who.faction,
summoner = who,
summon_time = 15,
}
vampire:resolve()
game.zone:addEntity(game.level, vampire, "actor", x, y)
vampire:forceUseTalent(vampire.T_TAUNT, {})
game:playSoundNear(who, "talents/spell_generic")
return {id=true, used=true}
end },
}
newEntity{ define_as = "RUNED_SKULL",
power_source = {arcane=true},
unique = true,
type = "gem", subtype="red", image = "object/artifact/bone_runed_skull.png",
unided_name = "human skull",
name = "Runed Skull",
display = "*", color=colors.RED,
level_range = {40, 50},
rarity = 390,
cost = 150,
encumber = 3,
material_level = 5,
desc = [[Dull red runes are etched all over this blackened skull.]],
carrier = {
combat_spellpower = 7,
on_melee_hit = {[DamageType.FIRE]=25},
},
}
newEntity{ base = "BASE_GREATMAUL",
power_source = {technique=true},
define_as = "GREATMAUL_BILL_TRUNK",
unided_name = "tree trunk", image = "object/artifact/bill_treestump.png",
name = "Bill's Tree Trunk", unique=true,
desc = [[This is a big, nasty-looking tree trunk that Bill the Troll used as a weapon. It could still serve this purpose, should you be strong enough to wield it!]],
require = { stat = { str=25 }, },
level_range = {1, 10},
material_level = 1,
moddable_tile = "special/treetrunk",
moddable_tile_big = true,
rarity = 200,
metallic = false,
cost = 70,
combat = {
dam = 30,
apr = 7,
physcrit = 1.5,
dammod = {str=1.3},
damrange = 1.7,
},
wielder = {
},
max_power = 20, power_regen = 1,
use_talent = { id = Talents.T_SHATTERING_BLOW, level = 2, power = 20 },
}
newEntity{ base = "BASE_SHIELD",
power_source = {technique=true},
define_as = "SANGUINE_SHIELD",
unided_name = "bloody shield",
name = "Sanguine Shield", unique=true, image = "object/artifact/sanguine_shield.png",
moddable_tile = "special/%s_hand_sanguine_shield", moddable_tile_big = true,
desc = [[Though tarnished and spattered with blood, the emblem of the Sun still manages to shine through on this shield.]],
require = { stat = { str=39 }, },
level_range = {35, 45},
material_level = 4,
rarity = 240,
cost = 120,
special_combat = {
dam = 40,
block = 220,
physcrit = 9,
dammod = {str=1.2},
},
wielder = {
combat_armor = 4,
combat_def = 14,
combat_def_ranged = 14,
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
fatigue = 19,
resists = { [DamageType.BLIGHT] = 25, },
life_regen = 5,
learn_talent = { [Talents.T_BLOCK] = 5, },
},
}
newEntity{ base = "BASE_GLOVES", define_as = "FLAMEWROUGHT",
power_source = {nature=true},
unique = true,
name = "Flamewrought", color = colors.RED, image = "object/artifact/gloves_flamewrought.png",
unided_name = "chitinous gloves",
desc = [[These gloves seems to be made out of the exoskeletons of ritches. They are hot to the touch.]],
level_range = {5, 12},
rarity = 180,
cost = 50,
material_level = 1,
wielder = {
inc_stats = { [Stats.STAT_WIL] = 3, [Stats.STAT_CUN] = 2,},
resists = { [DamageType.FIRE]= 10, },
inc_damage = { [DamageType.FIRE]= 5, },
combat_mindpower=2,
combat_armor = 2,
combat = {
dam = 5,
apr = 7,
physcrit = 1,
dammod = {dex=0.4, str=-0.6, cun=0.4 },
melee_project={[DamageType.FIRE] = 10},
talent_on_hit = { T_RITCH_FLAMESPITTER_BOLT = {level=3, chance=30} },
convert_damage = { [DamageType.FIRE] = 100,},
},
},
max_power = 24, power_regen = 1,
use_talent = { id = Talents.T_RITCH_FLAMESPITTER_BOLT, level = 3, power = 8 },
}
-- The crystal set
newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS",
power_source = {arcane=true},
unique = true,
unided_name = "scintillating crystal",
name = "Crystal Focus", subtype = "multi-hued",
color = colors.WHITE, image = "object/artifact/crystal_focus.png",
level_range = {5, 12},
desc = [[This crystal radiates the power of the Spellblaze itself.]],
rarity = 200,
identified = false,
cost = 50,
material_level = 2,
max_power = 1, power_regen = 1,
use_power = { name = "combine with a weapon", power = 1, use = function(self, who, gem_inven, gem_item)
Hachem_Muche
committed
who:showInventory("Fuse with which weapon?", who:getInven("INVEN"), function(o) return (o.type == "weapon" or o.subtype == "hands" or o.subtype == "shield") and o.subtype ~= "mindstar" and not o.egoed and not o.unique and not o.rare and not o.archery end, function(o, item)
local oldname = o:getName{do_color=true}
-- Remove the gem
who:removeObject(gem_inven, gem_item)
who:sortInven(gem_inven)
local Entity = require("engine.Entity")
local ActorStats = require("engine.interface.ActorStats")
local crystalline_ego = Entity.new{
name = "crystalline weapon",
no_unique_lore = true,
is_crystalline_weapon = true,
power_source = {arcane=true},
wielder = {
combat_spellpower = 12,
combat_dam = 12,
inc_stats = {
[ActorStats.STAT_WIL] = 3,
[ActorStats.STAT_CON] = 3,
},
inc_damage = {ARCANE=10},
},
set_list = { {"is_crystalline_armor", true} },
on_set_complete = function(self, wearer)