summaryrefslogtreecommitdiff
path: root/conf/magic.conf
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2008-11-29 14:48:31 -0700
committerFate <fate-tmw@googlemail.com>2008-11-29 14:48:31 -0700
commitb22e985e12153ae49c90d36bcae9f88727f1789e (patch)
treed201b45bbccbf8ba13e47b4df002ff547ee7136f /conf/magic.conf
parent3ba5d56d872bf0a6afe2ef612ab74ffdc0eae2f7 (diff)
downloadserverdata-b22e985e12153ae49c90d36bcae9f88727f1789e.tar.gz
serverdata-b22e985e12153ae49c90d36bcae9f88727f1789e.tar.bz2
serverdata-b22e985e12153ae49c90d36bcae9f88727f1789e.tar.xz
serverdata-b22e985e12153ae49c90d36bcae9f88727f1789e.zip
Fixed bug in magic detection spell
Diffstat (limited to 'conf/magic.conf')
-rw-r--r--conf/magic.conf8
1 files changed, 3 insertions, 5 deletions
diff --git a/conf/magic.conf b/conf/magic.conf
index 5ae0bba1..d6262b41 100644
--- a/conf/magic.conf
+++ b/conf/magic.conf
@@ -45,7 +45,7 @@ CONST SCRIPT_XP_MASK = 0xffff
CONST SCRIPT_XP_SHIFT = 0
CONST SCRIPT_LASTSPELL_MASK = 0xff
CONST SCRIPT_LASTSPELL_SHIFT = 16
-CONST DEBUG = 1
+CONST DEBUG = 0
# Default sfx on caster
PROCEDURE default_effect() =
@@ -189,7 +189,7 @@ SPELL make-sulphur : "#T01" =
COMPONENTS ["PileOfAsh"])
=> EFFECT CALL adjust_spellpower(school);
CALL default_effect();
- CALL create_item("SulphurPowder", 1, "PileOfAsh", 50);
+ CALL create_item("SulphurPowder", 1 + spellpower / 100 + (random(max(1, 800 - spellpower)) / 180), "PileOfAsh", 50);
CALL gain_xp(1);
SPELL lesser-heal (target : STRING) : "#L00" =
@@ -280,7 +280,7 @@ SPELL detect-magic : "#G00" =
CALL default_effect();
range = 1 + spellpower / 50;
FOREACH NPC n IN rbox(location(caster), range)
- DO IF strstr(name_of(n), "#MAGIC") || strstr(name_of(n), "#_M")
+ DO IF (contains_string(name_of(n), "#MAGIC") || contains_string(name_of(n), "#_M"))
THEN sfx(n, SFX_DEFAULT, 0);
FOREACH SPELL s IN rbox(location(caster), range)
DO IF (s <> self_invocation)
@@ -354,14 +354,12 @@ SPELL lightning-strike : "#kig" =
area = location(caster);
FOREACH SPELL s IN rbox(location(caster), MAX_RAIN_SPELL_RADIUS + 1) DO
IF name_of(s) = "rain" THEN (
-# message(caster, "found-rain at " + s.area + " vs. " + location(caster) + " inside: " + is_in(location(caster), s.area));
IF is_in (location(caster), s.area)
THEN (in_rain = in_rain | 1;
area = area + s.area;);
IF is_in (location(target), s.area)
THEN in_rain = in_rain | 2;
);
-# message(caster, "in-rain : " + in_rain);
IF in_rain & 1
THEN (# caster standing in the rain? This is going to be fun.
used = 0;