diff options
author | Fate <fate-tmw@googlemail.com> | 2008-12-31 11:35:01 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-12-31 11:35:01 -0700 |
commit | 8e2419ffd3aa0cc4e564e82b2cfac0b227a7af05 (patch) | |
tree | 08efa10d38956497a98215f4403e7d7fd799cbd4 /conf | |
parent | 781b8bbd160edf9a677fdd8075739ef378b6d57d (diff) | |
download | serverdata-8e2419ffd3aa0cc4e564e82b2cfac0b227a7af05.tar.gz serverdata-8e2419ffd3aa0cc4e564e82b2cfac0b227a7af05.tar.bz2 serverdata-8e2419ffd3aa0cc4e564e82b2cfac0b227a7af05.tar.xz serverdata-8e2419ffd3aa0cc4e564e82b2cfac0b227a7af05.zip |
Pre-planned level 0 spells all available (except for 'make sulphur' and 'detect magic')
Diffstat (limited to 'conf')
-rw-r--r-- | conf/magic.conf | 69 |
1 files changed, 61 insertions, 8 deletions
diff --git a/conf/magic.conf b/conf/magic.conf index 21a8ddf8..83fe031d 100644 --- a/conf/magic.conf +++ b/conf/magic.conf @@ -48,6 +48,8 @@ CONST SCRIPT_XP_MASK = 0xffff CONST SCRIPT_XP_SHIFT = 0 CONST SCRIPT_LASTSPELL_MASK = 0xff CONST SCRIPT_LASTSPELL_SHIFT = 16 +CONST SCRIPT_HEALSPELL_MASK = 0xff +CONST SCRIPT_HEALSPELL_SHIFT = 24 CONST DEBUG = 0 # Default sfx on caster @@ -60,6 +62,16 @@ PROCEDURE sfx_generic(target) = PROCEDURE set_var(name, mask, shift, value) = set_script_variable(caster, name, script_int(caster, name) & (neg (mask << shift)) | ((value & mask) << shift)); +PROCEDURE gain_heal_xp(value, gain) = # `gain' influences the likelihood of an increase + last_heal_xp = (script_int(caster, SCRIPT_XP) >> SCRIPT_HEALSPELL_SHIFT) & SCRIPT_HEALSPELL_MASK; + IF (target <> caster + && value > (20 + last_heal_xp + random(last_heal_xp + 1) + random(last_heal_xp + 1))) ( + heal_xp = last_heal_xp + gain; + IF (heal_xp > SCRIPT_HEALSPELL_MASK) + heal_xp = SCRIPT_HEALSPELL_MASK; + set_var(SCRIPT_XP, SCRIPT_HEALSPELL_MASK, SCRIPT_HEALSPELL_SHIFT, heal_xp); + ) + PROCEDURE gain_xp(gain) = IF (level + 3 > skill(caster, MAGIC)) # Level 4 and 5 magic users don't gain anything from spell levels 0 resp. 0+1 THEN ( @@ -214,8 +226,9 @@ SPELL lesser-heal (target : STRING) : "#L00" = THEN (IF ((target = "mouboo" || target = "Mouboo") && rdistance(location(caster), location(npc("Mouboo"))) < 2 + (spellpower / 100)) THEN { mes "Your spell seems to have no effect on the mouboo."; next; close; } - ELSE target = caster); + ELSE target = caster;) ELSE target = pc(target); + CALL gain_heal_xp(100, 1); # report half values for non-instaheal CALL heal(target, 200); CALL gain_xp(1); @@ -272,7 +285,7 @@ SPELL aggravate : "#N00" = LOCAL SPELL summon-maggots : "#A00" = LET level = 0 school = ASTRAL - IN (MANA 21, CASTTIME 6000, + IN (MANA 21, CASTTIME 20000, REQUIRE skill(caster, MAGIC) > level, COMPONENTS ["MaggotSlime"]) => EFFECT CALL adjust_spellpower(school); @@ -384,7 +397,7 @@ SPELL lay-on-hands (target : STRING) : "#L10" = }) ELSE (target = caster; needed = max_hp(target) - hp(target); - )); + )) ELSE (target = pc(target); needed = max_hp(target) - hp(target);) @@ -397,8 +410,7 @@ SPELL lay-on-hands (target : STRING) : "#L10" = ELSE (payment = available; power = (available * 200) / pay_fraction; ) - - instaheal(caster, 0 - payment, 0); + CALL gain_heal_xp(power, 1); CALL quickheal(target, power); status_change(caster, SC_HALT_REGENERATE, 0, 0, 0, 0, 10000); IF ((caster <> target) && (payment >= 100)) @@ -550,6 +562,11 @@ LOCAL SPELL rain : "#N13" = CALL gain_xp(1); range = min(MAX_RAIN_SPELL_RADIUS, 3 + spellpower / 30); area = rbox(location(caster), range); + IF (is_in(location(npc("#DruidTree0#_M", area))) + || is_in(location(npc("#DruidTree1#_M", area)))) { + set @flag, 1; + callfunc "QuestTreeTrigger"; + }; FOR i = 0 TO spellpower DO ( FOR j = 0 TO spellpower / 100 DO ( location = random_location(area); @@ -583,7 +600,7 @@ SPELL barrier (target : PC) : "#A10" = LOCAL SPELL summon-scorps : "#A11" = LET level = 1 school = ASTRAL - IN (MANA 33, CASTTIME 3000, + IN (MANA 33, CASTTIME 20000, REQUIRE skill(caster, MAGIC) > level, REQUIRE skill(caster, school) > level, COMPONENTS ["ScorpionStinger"]) @@ -595,7 +612,7 @@ LOCAL SPELL summon-scorps : "#A11" = LOCAL SPELL summon-red-scorps : "#A12" = LET level = 1 school = ASTRAL - IN (MANA 39, CASTTIME 3000, + IN (MANA 39, CASTTIME 20000, REQUIRE skill(caster, MAGIC) > level, REQUIRE skill(caster, school) > level, COMPONENTS ["RedScorpionStinger"]) @@ -646,7 +663,8 @@ SPELL enchant-lifestone : "#G12" = IN (MANA 15, CASTTIME 4000, REQUIRE skill(caster, MAGIC) > level, REQUIRE skill(caster, school) > level, - (COMPONENTS ["BugLeg"] OR COMPONENTS["MaggotSlime"])) + (COMPONENTS ["MaggotSlime"] OR COMPONENTS["BugLeg"] + OR COMPONENTS ["MauveHerb", "AlizarinHerb", "CobaltHerb", "GambogeHerb"])) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); create_item(caster, "LifeStone", 1); @@ -874,3 +892,38 @@ LOCAL SPELL mouboo-smell : "#s" = FOREACH PC p IN rbox(location(caster), 30) DO message(p, "You notice a strange smell all around you."); + + +PROCEDURE hug_tree(target) = + IF (target = "" + || target = "tree" || target = "tree*" + || target = "Tree" || target = "Tree*" + || target = "druid" || target = "druid*" + || target = "Druid" || target = "Druid*") { + set @flag, 2; + callfunc "QuestTreeTrigger"; + }; + +NONMAGIC SPELL hug0 (target : STRING) : "hug" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug1 (target : STRING) : "*hug*" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug2 (target : STRING) : "*hug" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug3 (target : STRING) : "hugs" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug4 (target : STRING) : "*hugs*" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug5 (target : STRING) : "*hugs" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); |