ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/Deliantra.pm
(Generate patch)

Comparing deliantra/Deliantra/Deliantra.pm (file contents):
Revision 1.72 by root, Mon Sep 4 17:58:51 2006 UTC vs.
Revision 1.73 by root, Tue Sep 12 02:18:06 2006 UTC

193 193
194sub _add_resist($$$) { 194sub _add_resist($$$) {
195 my ($ob, $mask, $value) = @_; 195 my ($ob, $mask, $value) = @_;
196 196
197 while (my ($k, $v) = each %attack_mask) { 197 while (my ($k, $v) = each %attack_mask) {
198 $ob->{"resist_$k"} += $value if $mask & $v; 198 $ob->{"resist_$k"} = min 100, max -100, $ob->{"resist_$k"} + $value if $mask & $v;
199 } 199 }
200} 200}
201 201
202# object as in "Object xxx", i.e. archetypes 202# object as in "Object xxx", i.e. archetypes
203sub normalize_object($) { 203sub normalize_object($) {
288 slaying => delete $ob->{"event_${event}"}, 288 slaying => delete $ob->{"event_${event}"},
289 name => delete $ob->{"event_${event}_options"}, 289 name => delete $ob->{"event_${event}_options"},
290 }; 290 };
291 } 291 }
292 } 292 }
293
294 # some archetypes had "+3" instead of the canonical "3", so fix
295 $ob->{dam} *= 1 if exists $ob->{dam};
293 296
294 $ob 297 $ob
295} 298}
296 299
297# arch as in "arch xxx", ie.. objects 300# arch as in "arch xxx", ie.. objects

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines