objects.lua
4.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
-- 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 <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/objects/objects-maj-eyal.lua")
for i = 1, 7 do
newEntity{ base = "BASE_LORE",
define_as = "NOTE"..i,
name = "Song of the Sands", lore="sandworm-note-"..i,
desc = [[Some people get the weirdest ideas!]],
rarity = false,
}
end
-- Artifact, dropped by the sandworm queen
newEntity{
power_source = {nature=true},
define_as = "SANDQUEEN_HEART",
type = "corpse", subtype = "heart",
name = "Heart of the Sandworm Queen", unique=true, unided_name="pulsing organ",
display = "*", color=colors.VIOLET,
desc = [[The heart of the Sandworm Queen, ripped from her dead body. You could ... consume it, should you feel mad enough.]],
cost = 3000,
use_simple = { name="consume the heart", use = function(self, who)
game.logPlayer(who, "#00FFFF#You consume the heart and feel the knowledge of this very old creature fill you!")
who.unused_stats = who.unused_stats + 3
who.unused_talents = who.unused_talents + 1
who.unused_generics = who.unused_generics + 1
game.logPlayer(who, "You have %d stat point(s) to spend. Press G to use them.", who.unused_stats)
game.logPlayer(who, "You have %d class talent point(s) to spend. Press G to use them.", who.unused_talents)
game.logPlayer(who, "You have %d generic talent point(s) to spend. Press G to use them.", who.unused_generics)
if who:knowTalentType("wild-gift/") then
who:setTalentTypeMastery("wild-gift/harmony", who:getTalentTypeMastery("wild-gift/harmony") + 0.1)
else
who:learnTalentType("wild-gift/harmony", false)
end
game.logPlayer(who, "You are transformed by the heart of the Queen!.")
game.logPlayer(who, "#00FF00#You gain an affinity for nature. You can now learn new Harmony talents (press G).")
game:setAllowedBuild("wilder_wyrmic", true)
return true, "destroy", true
end}
}
newEntity{
power_source = {nature=true},
define_as = "PUTRESCENT_POTION",
type = "corpse", subtype = "blood",
name = "Wyrm Bile", unique=true, unided_name="putrescent potion",
display = "*", color=colors.VIOLET,
desc = [[A vial of thick, lumpy fluid. Who knows what this will do to you if you drink it?]],
cost = 3000,
use_simple = { name="drink the vile blood", use = function(self, who)
game.logPlayer(who, "#00FFFF#You drink the wyrm bile and feel forever transformed!")
who.unused_talents_types = who.unused_talents_types + 1
game.log("You have %d category point(s) to spend. Press G to use them.", who.unused_talents_types)
local str, dex, con, mag, wil, cun = rng.range(-3, 6), rng.range(-3, 6), rng.range(-3, 6), rng.range(-3, 6), rng.range(-3, 6), rng.range(-3, 6)
who:incStat("str", str) if str >= 0 then str="+"..str end
who:incStat("dex", dex) if dex >= 0 then dex="+"..dex end
who:incStat("mag", mag) if mag >= 0 then mag="+"..mag end
who:incStat("wil", wil) if wil >= 0 then wil="+"..wil end
who:incStat("cun", cun) if cun >= 0 then cun="+"..cun end
who:incStat("con", con) if con >= 0 then con="+"..con end
game.logPlayer(who, "#00FF00#Your stats have changed! (Str %s, Dex %s, Mag %s, Wil %s, Cun %s, Con %s)", str, dex, mag, wil, cun, con)
return true, "destroy", true
end}
}
newEntity{ base = "BASE_GEM",
define_as = "ATAMATHON_ACTIVATE",
subtype = "red",
name = "Atamathon's Lost Ruby Eye", color=colors.VIOLET, quest=true, unique=true, identified=true, image="object/ruby.png",
desc = [[One of the ruby eyes of the legendary giant golem: Atamathon.
It is said it was made by the halflings during the Age of Pyre as a weapon against the orcs. Even though it was destroyed it managed to deal a crippling blow by killing their leader, Garkul the Devourer.]],
material_level = 5,
cost = 100,
wielder = { inc_damage = {[DamageType.FIRE]=12} },
imbue_powers = { inc_damage = {[DamageType.FIRE]=12} },
}