version 1.13 | | version 1.14 |
---|
| | |
&info("looking ..."); | | &info("looking ..."); |
&traverse($root); | | &traverse($root); |
| | |
| | $attacktype{ 'physical' } = ( 1 << 0 ); |
| | $attacktype{ 'magic' } = ( 1 << 1 ); |
| | $attacktype{ 'fire' } = ( 1 << 2 ); |
| | $attacktype{ 'electricity' } = ( 1 << 3 ); |
| | $attacktype{ 'cold' } = ( 1 << 4 ); |
| | $attacktype{ 'confusion' } = ( 1 << 5 ); |
| | $attacktype{ 'acid' } = ( 1 << 6 ); |
| | $attacktype{ 'drain' } = ( 1 << 7 ); |
| | $attacktype{ 'weaponmagic' } = ( 1 << 8 ); |
| | $attacktype{ 'ghosthit' } = ( 1 << 9 ); |
| | $attacktype{ 'poison' } = ( 1 << 10 ); |
| | $attacktype{ 'slow' } = ( 1 << 11 ); |
| | $attacktype{ 'paralyze' } = ( 1 << 12 ); |
| | $attacktype{ 'turnundead' } = ( 1 << 13 ); |
| | $attacktype{ 'fear' } = ( 1 << 14 ); |
| | $attacktype{ 'cancellation' } = ( 1 << 15 ); |
| | $attacktype{ 'deplete' } = ( 1 << 16 ); |
| | $attacktype{ 'death' } = ( 1 << 17 ); |
| | $attacktype{ 'chaos' } = ( 1 << 18 ); |
| | $attacktype{ 'counterspell' } = ( 1 << 19 ); |
| | $attacktype{ 'godpower' } = ( 1 << 20 ); |
| | $attacktype{ 'holyword' } = ( 1 << 21 ); |
| | $attacktype{ 'blind' } = ( 1 << 22 ); |
| | $attacktype{ 'internal' } = ( 1 << 23 ); |
| | $attacktype{ 'lifestealing' } = ( 1 << 24 ); |
| | $attacktype{ 'disease' } = ( 1 << 25 ); |
| | |
&info("writing ...$archetypes"); | | &info("writing ...$archetypes"); |
open(ARCH,">".$archetypes) || &die("cannot open ".$archetypes); | | open(ARCH,">".$archetypes) || &die("cannot open ".$archetypes); |
&archsOut; | | &archsOut; |
| | |
$mm = $values[0]; | | $mm = $values[0]; |
next line; | | next line; |
} | | } |
| | if ($var eq "attacktype") { |
| | $at = 0; |
| | foreach $t ( @values ) { |
| | if ( $t =~ /\d+/ ) { |
| | $at += $t; |
| | } else { |
| | if ( defined( $attacktype{ $t } ) ) { |
| | $at += $attacktype{ $t }; |
| | } else { |
| | &warn($arch . " has invalid attacktype " . $t); |
| | } |
| | } |
| | } |
| | $_ = $var . ' ' . $at; |
| | } |
if ($var eq "is_floor") { | | if ($var eq "is_floor") { |
$floor = $values[0]; | | $floor = $values[0]; |
# is_floor is also needed for archs, so let it pass | | # is_floor is also needed for archs, so let it pass |