ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/spell_util.C
(Generate patch)

Comparing deliantra/server/server/spell_util.C (file contents):
Revision 1.77 by root, Sun Sep 28 15:49:08 2008 UTC vs.
Revision 1.78 by root, Sun Sep 28 15:51:04 2008 UTC

104{ 104{
105 if (caster->path_denied & spell->path_attuned) 105 if (caster->path_denied & spell->path_attuned)
106 return 1; 106 return 1;
107 107
108 int new_level = spell->level 108 int new_level = spell->level
109 + (caster->path_repelled & spell->path_attuned ? +8 : 0) 109 + (caster->path_repelled & spell->path_attuned ? +ATTUNE_REPELL : 0)
110 + (caster->path_attuned & spell->path_attuned ? -8 : 0); 110 + (caster->path_attuned & spell->path_attuned ? -ATTUNE_REPELL : 0);
111 111
112 return max (1, new_level); 112 return max (1, new_level);
113} 113}
114 114
115/* This function returns the effective level the spell 115/* This function returns the effective level the spell
138 level = caster->contr->last_skill_ob[i]->level; 138 level = caster->contr->last_skill_ob[i]->level;
139 break; 139 break;
140 } 140 }
141 141
142 /* Got valid caster level. Now adjust for attunement */ 142 /* Got valid caster level. Now adjust for attunement */
143 level += caster->path_repelled & spell->path_attuned ? -8 : 0; 143 level += caster->path_repelled & spell->path_attuned ? -ATTUNE_REPELL : 0;
144 level += caster->path_attuned & spell->path_attuned ? +8 : 0; 144 level += caster->path_attuned & spell->path_attuned ? +ATTUNE_REPELL : 0;
145 145
146 /* Always make this at least 1. If this is zero, we get divide by zero 146 /* Always make this at least 1. If this is zero, we get divide by zero
147 * errors in various places. 147 * errors in various places.
148 */ 148 */
149 return max (level, 1); 149 return max (level, 1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines