summaryrefslogtreecommitdiff
path: root/src/map/magic.c
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2008-11-02 00:19:12 +0000
committerJared Adams <jaxad0127@gmail.com>2008-11-02 00:19:12 +0000
commit8d356dbe3f056474700fcbdd563d8ea437b1464e (patch)
tree682694884b5cae5a9f6ec9136619ac2a90c8f73e /src/map/magic.c
parentff4ed0b105b016aa3a7dad07db5fb00456bbe822 (diff)
downloadtmwa-8d356dbe3f056474700fcbdd563d8ea437b1464e.tar.gz
tmwa-8d356dbe3f056474700fcbdd563d8ea437b1464e.tar.bz2
tmwa-8d356dbe3f056474700fcbdd563d8ea437b1464e.tar.xz
tmwa-8d356dbe3f056474700fcbdd563d8ea437b1464e.zip
* Minor cleanup in login server
* Char server now records client version and reports it to map server * Map server will now report all skills (even ones with dangerous indices) for client version 1 and above * Use status change val1 (instead of val2) index for speed potions, so that they can be triggered more easily from within scripts * Item database now also keeps track of the effect that items have on the spower stat * spower is now based on level + int*2 + modifier (see last point) * Minor bugfixes in support functionality for the SLang interpreter - Do not restart the map server without also restarting the char server, as the interserver protocol has changed slightly! (patch by fate)
Diffstat (limited to 'src/map/magic.c')
-rw-r--r--src/map/magic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/magic.c b/src/map/magic.c
index 0fc2881..bc25b07 100644
--- a/src/map/magic.c
+++ b/src/map/magic.c
@@ -56,7 +56,7 @@ int
magic_message(character_t *caster,
char *spell_, size_t spell_len)
{
- int power = caster->status.base_level + caster->status.int_;
+ int power = caster->status.base_level + (caster->status.int_ * 2) + caster->spellpower_bonus_current;
char *invocation_base = spell_ + 8;
char *source_invocation = strchr(invocation_base, ':');
spell_t *spell;
@@ -78,7 +78,7 @@ magic_message(character_t *caster,
if (spell) {
int near_miss;
env_t *env = spell_create_env(&magic_conf, spell, caster, power, parameter);
- effect_set_t *effects = spell_trigger(spell, caster, env, &near_miss);
+ effect_set_t *effects = (power < 1) ? NULL : spell_trigger(spell, caster, env, &near_miss);
#ifdef DEBUG
fprintf(stderr, "Found spell `%s', triggered = %d\n", spell_, effects != NULL);