comparison warfare.pl @ 263:83e3ce37779d

refined army scheme
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sat, 22 Nov 2008 03:33:38 +0800
parents 2488d31240b7
children 53827cc442b6
comparison
equal deleted inserted replaced
262:1b435cd26a7b 263:83e3ce37779d
62 return 0; 62 return 0;
63 } 63 }
64 64
65 sub is_army_available { 65 sub is_army_available {
66 my ($self, $city) = @_; 66 my ($self, $city) = @_;
67 return ($city->{army}->{Swordsman} >= 2 ) ? 1 : 0; 67 # 方陣撞不死
68 return ($city->{army}->{Swordsman} >= 2 && $city->{army}->{Phalanx} >= 1) ? 1 : 0;
68 } 69 }
69 70
70 sub locateVictim { 71 sub locateVictim {
71 my ($self, $city, $x, $y, $tradegood) = @_; 72 my ($self, $city, $x, $y, $tradegood) = @_;
72 73