diff options
Diffstat (limited to 'world/map')
-rw-r--r-- | world/map/conf/magic.conf.template | 143 | ||||
-rw-r--r-- | world/map/db/const.txt | 2 | ||||
-rw-r--r-- | world/map/db/skill_db.txt | 1 |
3 files changed, 145 insertions, 1 deletions
diff --git a/world/map/conf/magic.conf.template b/world/map/conf/magic.conf.template index 5b90df24..4933da9d 100644 --- a/world/map/conf/magic.conf.template +++ b/world/map/conf/magic.conf.template @@ -9,6 +9,7 @@ CONST WAR = 342 CONST TRANSMUTE = 343 CONST NATURE = 344 CONST ASTRAL = 345 +CONST DARK = 346 # Elements CONST ELT_NEUTRAL = 0 @@ -45,6 +46,7 @@ CONST SFX_ARROW_HAIL = 27 CONST SFX_BARRIER = 10 CONST SFX_UNBARRIER = 10 CONST SFX_HEAL = 3 +CONST SFX_LIGHTNING = 18 CONST MAX_RAIN_SPELL_RADIUS = 15 @@ -73,6 +75,9 @@ PROCEDURE default_effect() = PROCEDURE sfx_generic(target) = sfx(target, SFX_DEFAULT, 0); +PROCEDURE sfx_lightning(target) = + sfx(target, SFX_LIGHTNING, 0); + PROCEDURE set_var(name, mask, shift, value) = set_script_variable(caster, name, script_int(caster, name) & (neg (mask << shift)) | ((value & mask) << shift)); @@ -209,6 +214,15 @@ PROCEDURE summon_spell(mob_id, count, delay, lifetime, control_level) = if_then_else(skill(caster, ASTRAL) >= control_level, 2, 1), # pets when level is high enough count, lifetime); +PROCEDURE summon_dark_spell(mob_id, count, delay, lifetime, control_level) = + CALL default_effect(); + sfx(location, SFX_SUMMON_START, 0); + WAIT delay; + sfx(location, SFX_SUMMON_FIRE, 0); + spawn(rbox(location, 2), caster, mob_id, + if_then_else(skill(caster, DARK) >= control_level, 2, 1), # pets when level is high enough + count, lifetime); + PROCEDURE abort_on_area_shield(pos) = IF (is_exterior(pos) = 1 && (map_nr(pos) = 1 # Tulimshar ||map_nr(pos) = 9 # Hurnscald @@ -332,6 +346,8 @@ SPELL lesser-heal (target : STRING) : "#L00" = THEN ABORT;) CALL gain_heal_xp(min(200, max_hp(target) - hp(target)), 1, 2, 2); # report half values for non-instaheal CALL heal(target, 200); + IF skill(caster, DARK) > 1 + THEN status_change(caster, SC_HALT_REGENERATE, 0, 0, 0, 0, 2000); CALL gain_xp(1, 2); @@ -595,7 +611,14 @@ SPELL lay-on-hands (target : STRING) : "#L10" = ) CALL gain_heal_xp(power, 1, 1, 3); CALL quickheal(target, power); - status_change(caster, SC_HALT_REGENERATE, 0, 0, 0, 0, 10000); + t = 5000; # with dark magic skill you pay 1/20 of max hp but the regenerate cooldown is cut in half + school = DARK; + h = (max_hp(caster) / 20) * -1; + IF skill(caster, school) > level + THEN itemheal(caster, h, 0); + IF skill(caster, school) > level + THEN t = 10000; + status_change(caster, SC_HALT_REGENERATE, 0, 0, 0, 0, t); CALL gain_xp(min(4, payment / 100), 18); SPELL lightning-strike : "#W10" = @@ -691,6 +714,121 @@ SPELL magic-knuckles : "#W12" = CALL install_melee_spell(10 + spellpower / 10, 1300, 34); ATTRIGGER CALL melee_damage(target, 30, 5 + (str * 2)); +#SPELL death-wave : "#D10" = +# LET level = 1 +# school = DARK +# IN (MANA 75, CASTTIME 10000, +# REQUIRE skill(caster, MAGIC) > level, +# REQUIRE skill(caster, school) > level, +# REQUIRE (script_int(caster, "OrumQuest") > 50), +# COMPONENTS [5 * 704]) +# => EFFECT CALL adjust_spellpower(school); +# CALL default_effect(); +# CALL gain_xp(3, 30); +# sfx(location, SFX_SUMMON_START, 0); +# WAIT 500; +# sfx(location, SFX_SUMMON_FIRE, 0); +# IF hp(caster) < 220 +# THEN itemheal(caster, -220, 0); +# h = (hp(caster) / 2) * -1; +# itemheal(caster, h, 0); +# d = level(caster); +# damage = spellpower; +# damage_bonus = sqrt(spellpower) * 2; +# FOREACH MOB target IN rbox(location(caster), d / 20) DO +# (CALL elt_damage(target, damage, damage_bonus, ELT_HOLY, ELT_SHADOW, 15 + random(5));) + +LOCAL SPELL summon-snakes : "#D11" = + LET level = 1 + school = DARK + IN (MANA 40, CASTTIME 15000, + REQUIRE skill(caster, MAGIC) > level, + REQUIRE skill(caster, school) > level, + REQUIRE (script_int(caster, "OrumQuest") > 40), + COMPONENTS ["Root", "SnakeEgg"]) + => EFFECT CALL adjust_spellpower(school); + CALL default_effect(); + CALL gain_xp(3, 31); + CALL summon_dark_spell(1010, 1 + spellpower / 300, 4000 - (spellpower * 9), spellpower * 80, 2); + +#LOCAL SPELL summon-black-scorpions : "#D12" = +# LET level = 1 +# school = DARK +# IN (MANA 40, CASTTIME 15000, +# REQUIRE skill(caster, MAGIC) > level, +# REQUIRE skill(caster, school) > level, +# REQUIRE (script_int(caster, "OrumQuest") > 50), +# COMPONENTS ["Root", "BlackScorpionStinger"]) +# => EFFECT CALL adjust_spellpower(school); +# CALL default_effect(); +# CALL gain_xp(3, 32); +# CALL summon_dark_spell(1009, 1 + spellpower / 300, 4000 - (spellpower * 9), spellpower * 80, 2); + +#LOCAL SPELL summon-skeletons : "#D13" = # only release this if content has been adjusted or mob has been replaced with a nerfed one +# LET level = 1 +# school = DARK +# IN (MANA 50, CASTTIME 17000, +# REQUIRE skill(caster, MAGIC) > level, +# REQUIRE skill(caster, school) > level, +# REQUIRE (script_int(caster, "OrumQuest") > 50), +# COMPONENTS ["Bone", "DarkCrystal"]) +# => EFFECT CALL adjust_spellpower(school); +# CALL default_effect(); +# CALL gain_xp(3, 33); +# CALL summon_dark_spell(1043, spellpower / 325, 4000 - (spellpower * 9), spellpower * 70, 2); + +#SPELL shadow-strike : "#D14" = +# LET level = 1 +# school = DARK +# IN (MANA 20, CASTTIME 1300, +# REQUIRE skill(caster, MAGIC) > level, +# REQUIRE skill(caster, DARK) > 0, +# REQUIRE (script_int(caster, "OrumQuest") > 50), +# (REQUIRE skill(caster, school) > 2 OR COMPONENTS ["DarkCrystal"])) +# => EFFECT CALL adjust_spellpower(school); +# CALL default_effect(); +# damage = spellpower / 2; +# damage_bonus = 1 + (spellpower - 150); +# CALL install_attack_spell(1 + spellpower / 100, 2800, 8, 31); +# IF hp(caster) > 170 +# THEN itemheal(caster, -160, 0); +# CALL gain_xp(3, 34); +# ATTRIGGER CALL attack_check(target); +# CALL elt_damage (target, damage, damage_bonus, ELT_HOLY, ELT_SHADOW, 15 + random(5)); + +SPELL toxic-dart : "#D15" = + LET level = 1 + school = DARK + IN (MANA 15, CASTTIME 500, + REQUIRE (script_int(caster, "OrumQuest") > 37), + REQUIRE skill(caster, MAGIC) > level, + (REQUIRE skill(caster, school) > 2 OR COMPONENTS [2 * "Root"])) + => EFFECT CALL adjust_spellpower(school); + CALL default_effect(); + damage = 5 * sqrt(spellpower); + damage_bonus = 5 + level(caster) / 3; + CALL install_attack_spell(3 + spellpower / 75, + 1200, + 4, 31); + CALL gain_xp(3, 35); + ATTRIGGER CALL attack_check(target); + CALL elt_damage (target, damage, damage_bonus, ELT_NEUTRAL, ELT_POISON, 15); + IF (is_pc(target) && caster <> target) + THEN status_change(target, SC_POISON, 5 + max(15, spellpower / 15), 0, 0, 0, 5000 + (spellpower * 1200)); + +LOCAL SPELL summon-wickedmushroom : "#D16" = + LET level = 1 + school = DARK + IN (MANA 35, CASTTIME 15000, + REQUIRE skill(caster, MAGIC) > level, + REQUIRE (script_int(caster, "OrumQuest") > 36), + REQUIRE skill(caster, school) > level, + COMPONENTS ["SmallMushroom", "DarkCrystal"]) + => EFFECT CALL adjust_spellpower(school); + CALL default_effect(); + CALL gain_xp(3, 36); + CALL summon_dark_spell(1106, 1 + spellpower / 250 , 4000 - (spellpower * 9), spellpower * 80, 2); + SPELL flying-backpack (target : PC) : "#N10" = LET level = 1 school = NATURE @@ -738,6 +876,9 @@ SPELL happy-curse (target : PC) : "#N12" = REQUIRE rdistance(location(target), location(caster)) < 1 + spellpower / 100) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); + h = (max_hp(caster) / 2) * -1; + IF skill(caster, DARK) > 1 + THEN itemheal(caster, h, 0); FOR i = 0 TO (spellpower / 10) DO (emote(target, 3); WAIT 500;); CALL gain_xp(1, 23); diff --git a/world/map/db/const.txt b/world/map/db/const.txt index cc604257..657f5130 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -350,6 +350,7 @@ sfx_magic_war 4 sfx_magic_transmute 5 sfx_magic_nature 6 sfx_magic_astral 7 +sfx_magic_dark 8 // Special effects, interactive objects and emotion effects from client-data/effects.xml. FX_LEVELUP 0 @@ -500,6 +501,7 @@ SKILL_MAGIC_WAR 342 SKILL_MAGIC_TRANSMUTE 343 SKILL_MAGIC_NATURE 344 SKILL_MAGIC_ASTRAL 345 +SKILL_MAGIC_DARK 346 // Flags for the magic quests. MFLAG_DRANK_POTION 1 // Character drank at least one magic potion as prerequisite for the Mana Seed quest. diff --git a/world/map/db/skill_db.txt b/world/map/db/skill_db.txt index fe33d293..2496e25f 100644 --- a/world/map/db/skill_db.txt +++ b/world/map/db/skill_db.txt @@ -26,6 +26,7 @@ 343, 0, 0, 0, 0, 0, 0, 5, 0, no, 0, 0, 0, magic, 0, no, none, Transmutation_Magic//TMW_MAGIC_TRANSMUTE 344, 0, 0, 0, 0, 0, 0, 5, 0, no, 0, 0, 0, magic, 0, no, none, Nature_Magic//TMW_MAGIC_NATURE 345, 0, 0, 0, 0, 0, 0, 5, 0, no, 0, 0, 0, magic, 0, no, none, Astral_Magic//TMW_MAGIC_ASTRAL +346, 0, 0, 0, 0, 0, 0, 5, 0, no, 0, 0, 0, magic, 0, no, none, Dark_Magic//TMW_MAGIC_DARK 350, 0, 0, 0, 0, 0, 9, 10, 0, no, 0, 0, 0, weapon, 0, passive,agi, Brawling //TMW_BRAWLING 351, 0, 0, 0, 0, 0, 9, 10, 0, no, 0, 0, 0, weapon, 0, passive,luk, Lucky_Counter //TMW_LUCKY_COUNTER 352, 0, 0, 0, 0, 0, 9, 10, 0, no, 0, 0, 0, none, 0, passive,agi, Speed //TMW_SPEED |