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.93 by root, Sat Mar 3 19:38:06 2007 UTC vs.
Revision 1.96 by root, Sun Mar 11 00:14:44 2007 UTC

4 4
5=cut 5=cut
6 6
7package Crossfire; 7package Crossfire;
8 8
9our $VERSION = '0.96'; 9our $VERSION = '0.97';
10 10
11use strict; 11use strict;
12 12
13use base 'Exporter'; 13use base 'Exporter';
14 14
166 '-=' => sub { $_[0][0] |= $MOVE_TYPE{$_[1]}; $_[0][1] &= ~$MOVE_TYPE{$_[1]}; &normalise }, 166 '-=' => sub { $_[0][0] |= $MOVE_TYPE{$_[1]}; $_[0][1] &= ~$MOVE_TYPE{$_[1]}; &normalise },
167 '/=' => sub { $_[0][0] &= ~$MOVE_TYPE{$_[1]}; &normalise }, 167 '/=' => sub { $_[0][0] &= ~$MOVE_TYPE{$_[1]}; &normalise },
168 'x=' => sub { 168 'x=' => sub {
169 my $cur = $_[0] >= $_[1]; 169 my $cur = $_[0] >= $_[1];
170 if (!defined $cur) { 170 if (!defined $cur) {
171 if ($_[0] >= "all") {
172 $_[0] -= $_[1];
173 } else {
171 $_[0] += $_[1]; 174 $_[0] += $_[1];
175 }
172 } elsif ($cur) { 176 } elsif ($cur) {
173 $_[0] -= $_[1]; 177 $_[0] -= $_[1];
174 } else { 178 } else {
175 $_[0] /= $_[1]; 179 $_[0] /= $_[1];
176 } 180 }
348 } else { 352 } else {
349 warn "object $ob->{_name} has unknown material ($ob->{material}) set.\n"; 353 warn "object $ob->{_name} has unknown material ($ob->{material}) set.\n";
350 } 354 }
351 } 355 }
352 356
357 # color_fg is used as default for magicmap if magicmap does not exist
358 $ob->{magicmap} ||= delete $ob->{color_fg} if exists $ob->{color_fg};
359
353 # nuke outdated or never supported fields 360 # nuke outdated or never supported fields
354 delete @$ob{qw( 361 delete @$ob{qw(
355 can_knockback can_parry can_impale can_cut can_dam_armour 362 can_knockback can_parry can_impale can_cut can_dam_armour
356 can_apply pass_thru can_pass_thru 363 can_apply pass_thru can_pass_thru
357 )}; 364 )};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines