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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 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 200 201 202 203 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 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 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
|
-- Spells that are stick or artifacts/... only
DEVICE_HEAL_MONSTER = add_spell
{
["name"] = "Heal Monster",
["school"] = {SCHOOL_DEVICE},
["level"] = 3,
["mana"] = 5,
["mana_max"] = 20,
["fail"] = 15,
["random"] = -1,
["stick"] =
{
["charge"] = { 10, 10 },
[TV_WAND] =
{
["rarity"] = 17,
["base_level"] = { 1, 15 },
["max_level"] = { 20, 50 },
},
},
["spell"] = function()
local ret, dir = get_aim_dir()
if ret == FALSE then return end
return fire_ball(GF_OLD_HEAL, dir, 20 + get_level(DEVICE_HEAL_MONSTER, 380), 0)
end,
["info"] = function()
return "heal "..(20 + get_level(DEVICE_HEAL_MONSTER, 380))
end,
["desc"] = {
"Heals a monster",
}
}
DEVICE_SPEED_MONSTER = add_spell
{
["name"] = "Haste Monster",
["school"] = {SCHOOL_DEVICE},
["level"] = 10,
["mana"] = 10,
["mana_max"] = 10,
["fail"] = 30,
["random"] = -1,
["stick"] =
{
["charge"] = { 10, 5 },
[TV_WAND] =
{
["rarity"] = 7,
["base_level"] = { 1, 1 },
["max_level"] = { 20, 50 },
},
},
["spell"] = function()
local ret, dir = get_aim_dir()
if ret == FALSE then return end
return fire_ball(GF_OLD_SPEED, dir, 1, 0)
end,
["info"] = function()
return "speed +10"
end,
["desc"] = {
"Haste a monster",
}
}
DEVICE_WISH = add_spell
{
["name"] = "Wish",
["school"] = {SCHOOL_DEVICE},
["level"] = 50,
["mana"] = 400,
["mana_max"] = 400,
["fail"] = 99,
["random"] = -1,
["stick"] =
{
["charge"] = { 1, 2 },
[TV_STAFF] =
{
["rarity"] = 98,
["base_level"] = { 1, 1 },
["max_level"] = { 1, 1 },
},
},
["spell"] = function()
make_wish()
return TRUE
end,
["info"] = function()
return ""
end,
["desc"] = {
"This grants you a wish, beware of what you ask for!",
}
}
DEVICE_SUMMON = add_spell
{
["name"] = "Summon",
["school"] = {SCHOOL_DEVICE},
["level"] = 5,
["mana"] = 5,
["mana_max"] = 25,
["fail"] = 20,
["random"] = -1,
["stick"] =
{
["charge"] = { 1, 20 },
[TV_STAFF] =
{
["rarity"] = 13,
["base_level"] = { 1, 40 },
["max_level"] = { 25, 50 },
},
},
["spell"] = function()
local i, obvious
obvious = nil
for i = 1, 4 + get_level(DEVICE_SUMMON, 30) do
obvious = is_obvious(summon_specific(player.py, player.px, dun_level, 0), obvious)
end
return obvious
end,
["info"] = function()
return ""
end,
["desc"] = {
"Summons hostile monsters near you",
}
}
DEVICE_MANA = add_spell
{
["name"] = "Mana",
["school"] = {SCHOOL_DEVICE},
["level"] = 30,
["mana"] = 1,
["mana_max"] = 1,
["fail"] = 80,
["random"] = -1,
["stick"] =
{
["charge"] = { 2, 3 },
[TV_STAFF] =
{
["rarity"] = 78,
["base_level"] = { 1, 5 },
["max_level"] = { 20, 35 },
},
},
["spell"] = function()
increase_mana((player.msp * (20 + get_level(DEVICE_MANA, 50))) / 100)
return TRUE
end,
["info"] = function()
return "restore "..(20 + get_level(DEVICE_MANA, 50)).."%"
end,
["desc"] = {
"Restores a part(or all) of your mana",
}
}
DEVICE_NOTHING = add_spell
{
["name"] = "Nothing",
["school"] = {SCHOOL_DEVICE},
["level"] = 1,
["mana"] = 0,
["mana_max"] = 0,
["fail"] = 0,
["random"] = -1,
["stick"] =
{
["charge"] = { 0, 0 },
[TV_WAND] =
{
["rarity"] = 3,
["base_level"] = { 1, 1 },
["max_level"] = { 1, 1 },
},
[TV_STAFF] =
{
["rarity"] = 3,
["base_level"] = { 1, 1 },
["max_level"] = { 1, 1},
},
},
["spell"] = function()
return FALSE
end,
["info"] = function()
return ""
end,
["desc"] = {
"It does nothing.",
}
}
DEVICE_LEBOHAUM = add_spell
{
["name"] = "Artifact Lebauhaum",
["school"] = {SCHOOL_DEVICE},
["level"] = 1,
["mana"] = 0,
["mana_max"] = 0,
["fail"] = 0,
["random"] = -1,
["activate"] = 3,
["spell"] = function()
msg_print("You hear a little song in your head in some unknown tongue:")
msg_print("'Avec le casque Lebohaum y a jamais d'anicroches, je parcours les dongeons,")
msg_print("j'en prend plein la caboche. Avec le casque Lebohaum, tout ces monstres a la")
msg_print("con, je leur met bien profond: c'est moi le maitre du dongeon!'")
end,
["info"] = function()
return ""
end,
["desc"] = {
"sing a cheerful song",
}
}
DEVICE_MAGGOT = add_spell
{
["name"] = "Artifact Maggot",
["school"] = {SCHOOL_DEVICE},
["level"] = 1,
["mana"] = 7,
["mana_max"] = 7,
["fail"] = 20,
["random"] = -1,
["activate"] = { 10, 50 },
["spell"] = function()
local ret, dir = get_aim_dir()
if ret == FALSE then return end
return fire_ball(GF_TURN_ALL, dir, 40, 2)
end,
["info"] = function()
return "power 40 rad 2"
end,
["desc"] = {
"terrify",
}
}
DEVICE_HOLY_FIRE = add_spell
{
["name"] = "Holy Fire of Mithrandir",
["school"] = {SCHOOL_DEVICE},
["level"] = 30,
["mana"] = 50,
["mana_max"] = 150,
["fail"] = 75,
["random"] = -1,
["stick"] =
{
["charge"] = { 2, 5 },
[TV_STAFF] =
{
-- Rarity higher than 100 to be sure to not have it generated randomly
["rarity"] = 999,
["base_level"] = { 1, 1 },
["max_level"] = { 35, 35 },
},
},
["spell"] = function()
return project_los(GF_HOLY_FIRE, 50 + get_level(DEVICE_HOLY_FIRE, 300))
end,
["info"] = function()
return "dam "..(50 + get_level(DEVICE_HOLY_FIRE, 250))
end,
["desc"] = {
"The Holy Fire created by this staff will deeply(double damage) burn",
"all that is evil.",
}
}
-- Ok the Eternal Flame, to craete one of the 4 ultimate arts
-- needed to enter the last level of the Void
DEVICE_ETERNAL_FLAME = add_spell
{
["name"] = "Artifact Eternal Flame",
["school"] = {SCHOOL_DEVICE},
["level"] = 1,
["mana"] = 0,
["mana_max"] = 0,
["fail"] = 0,
["random"] = -1,
["activate"] = { 0, 0 },
["spell"] = function(flame_item)
local ret, item, obj
ret, item = get_item("Which object do you want to imbue?",
"You have no objects to imbue.",
bor(USE_INVEN),
function (obj)
if obj.name1 > 0 or obj.name2 > 0 then return FALSE end
if (obj.tval == TV_SWORD) and (obj.sval == SV_LONG_SWORD) then
return TRUE
elseif (obj.tval == TV_MSTAFF) and (obj.sval == SV_MSTAFF) then
return TRUE
elseif (obj.tval == TV_BOW) and (obj.sval == SV_HEAVY_XBOW) then
return TRUE
elseif (obj.tval == TV_DRAG_ARMOR) and (obj.sval == SV_DRAGON_POWER) then
return TRUE
end
return FALSE
end
)
if ret == FALSE then return FALSE end
obj = get_object(item)
if (obj.tval == TV_SWORD) and (obj.sval == SV_LONG_SWORD) then
obj.name1 = 147
elseif (obj.tval == TV_MSTAFF) and (obj.sval == SV_MSTAFF) then
obj.name1 = 127
elseif (obj.tval == TV_BOW) and (obj.sval == SV_HEAVY_XBOW) then
obj.name1 = 152
elseif (obj.tval == TV_DRAG_ARMOR) and (obj.sval == SV_DRAGON_POWER) then
obj.name1 = 17
end
apply_magic(obj, -1, TRUE, TRUE, TRUE)
obj.found = OBJ_FOUND_SELFMADE
inven_item_increase(flame_item, -1)
inven_item_describe(flame_item)
inven_item_optimize(flame_item)
return TRUE
end,
["info"] = function()
return ""
end,
["desc"] = {
"Imbuing an object with the eternal fire",
}
}
-- And one more silly activation :)
DEVICE_DURANDIL = add_spell
{
["name"] = "Artifact Durandil",
["school"] = {SCHOOL_DEVICE},
["level"] = 1,
["mana"] = 0,
["mana_max"] = 0,
["fail"] = 0,
["random"] = -1,
["activate"] = 3,
["spell"] = function()
msg_print("You hear a little song in your head in some unknown tongue:")
msg_print("'Les epees Durandils sont forgees dans les mines par des nains.")
msg_print("Avec ca c'est facile de tuer un troll avec une seule main. Pas besoin")
msg_print("de super entrainement nis de niveau 28. Quand tu sors l'instrument")
msg_print("c'est l'ennemi qui prend la fuite! Avec ton epee Durandil quand tu")
msg_print("parcours les chemins, tu massacre sans peine les brigands et les gobelins,")
msg_print("les rats geants, les ogres mutants, les zombies et les liches, tu les")
msg_print("decoupe en tranches comme si c'etait des parts de quiches.")
msg_print("Les epees Durandil! Les epees Durandil!")
msg_print("Quand tu la sort dans un dongeon au moins t'as pas l'air debile.")
msg_print("C'est l'arme des bourins qui savent etre subtils.")
msg_print("Ne partez pas a l'aventure sans votre epee Durandil!'")
end,
["info"] = function()
return ""
end,
["desc"] = {
"sing a cheerful song",
}
}
DEVICE_THUNDERLORDS = add_spell
{
["name"] = "Artifact Thunderlords",
["school"] = {SCHOOL_DEVICE},
["level"] = 1,
["mana"] = 1,
["mana_max"] = 1,
["fail"] = 20,
["random"] = -1,
["stick"] =
{
["charge"] = { 3, 3 },
[TV_STAFF] =
{
-- Rarity higher than 100 to be sure to not have it generated randomly
["rarity"] = 999,
["base_level"] = { 1, 1 },
["max_level"] = { 1, 1 },
},
},
["spell"] = function()
if dun_level > 0 then
msg_print("As you blow the horn a thunderlord pops out of nowhere and grabs you.")
recall_player(0, 1)
else
msg_print("You cannot use it there.")
end
return TRUE
end,
["info"] = function()
return ""
end,
["desc"] = {
"A thunderlord will appear to transport you quickly to the surface.",
}
}
--[[ Template
DEVICE_ = add_spell
{
["name"] = "",
["school"] = {SCHOOL_DEVICE},
["level"] = 1,
["mana"] = 2,
["mana_max"] = 15,
["fail"] = 10,
["random"] = -1,
["stick"] =
{
["charge"] = { 10, 5 },
[TV_STAFF] =
{
["rarity"] = 7,
["base_level"] = { 1, 15 },
["max_level"] = { 25, 50 },
},
},
["spell"] = function()
return FALSE
end,
["info"] = function()
return ""
end,
["desc"] = {
"",
}
}
]]
|