2 <head><link rel="stylesheet" type="text/css" href="aymargeddon.css">
5 [$ if exists $fdat{'x'} and exists $fdat{'y'} $]
6 [- $udat{-loc} = $fdat{'x'}.'_'.$fdat{'y'}; -]
9 [$ if exists $udat{-id} and exists $udat{-game} and $udat{-loc} $]
17 my $game = $udat{-game};
18 my $user = $udat{-id};
19 my $loc = $udat{-loc};
21 my $db = DataBase->new();
22 my $aym = Aymargeddon->new($game,$user,$db);
23 $db->set_language($udat{-lang});
25 # maybe you cant see this field (for hackers, which try to look direct
26 # in the field via url)
27 unless ($aym->sight_of_field($loc)){
28 print OUT "Mogeln gildet nich!\n";
31 my ($ter,$own,$occ,$temple,$plague) =
32 $aym->read_field('TERRAIN,HOME,OCCUPANT,TEMPLE,PLAGUE',$loc);
38 $out .= $db->loc('FIELD_'.$ter).' '.Location::pretty($loc).' '.
39 $db->loc('PREP_IS_SG').' ';
41 $out .= $db->loc('OCCUPIED').' ';
44 $out .= $db->loc( ($aym->gender($occ) eq 'PLURAL') ?
45 'PPRO_DAT3_PL' : 'PPRO_DAT3_SG' );
47 # the field belongs to someone else
48 $out .= $db->loc('ART_DAT_PL').' ' if $aym->gender($occ) eq 'PLURAL';
49 $out .= $aym->charname($occ).' (<a href="command.epl?cmd=CH_STATUS&other='.
50 $occ.'">'.$aym->relation_string($occ).
51 '</a>, <a href="command.epl?cmd=SEND_MSG&other='.$occ.'">'.
52 $db->loc('SEND_MESSAGE').'</a>)';
55 $out .= $db->loc('NOT_OCCUPIED');
60 # some fields have some specials
62 $out .= $db->loc('HOMECITY');
63 } elsif ($temple eq 'Y') {
64 $out .= $db->loc('TEMPLE');
65 } elsif ($ter eq 'MOUNTAIN') {
66 $out .= $db->loc('HOMEHOLY');
68 if($ter ne 'ISLE' or $temple eq 'Y'){
69 $out .= ' '.$db->loc('PREP_OWN_SG').' ';
71 $out .= $db->loc( ($aym->gender($own) eq 'PLURAL') ?
72 'PPRO_DAT3_PL' : 'PPRO_DAT3_SG' );
73 } elsif ($occ == $own) {
74 my $gen = $aym->gender($own);
75 $out .= $db->loc( ($gen eq 'PLURAL') ? 'PPRO_DAT_PL' :
76 (($gen eq 'MALE') ? 'PPRO_DAT_M' : 'PPRO_DAT_F') );
78 $out .= $db->loc('ART_DAT_PL').' ' if $aym->gender($own) eq 'PLURAL';
79 $out .= $aym->charname($own).' (<a href="command.epl?cmd=CH_STATUS&other='.
80 $own.'">'.$aym->relation_string($own).
81 '</a>, <a href="command.epl?cmd=SEND_MSG&other='.$own.'">'.
82 $db->loc('SEND_MESSAGE').'</a>)';
87 $out .= $db->loc('PLAGUE_IN_FIELD',lc($plague)) if $plague;
94 $mob = $aym->mobiles_available($loc);
98 $out .= $db->loc('ADJ_HERE').' ';
99 $out .= $db->loc( ($mobcount == 1 and @{$mob->[0]}[4] == 1) ?
100 'PREP_IS_SG' : 'PREP_IS_PL' );
102 $out .= ($mobcount > 1) ? ":\n<p>" : ' ';
103 foreach $i (0..$mobcount-1) {
104 my ($oid,$otype,$oown,$oado,$ocnt,$ostat,$omove) = @{$mob->[$i]};
105 # check for MOVE_WITH
107 $out .= $aym->mobile_to_html( $loc,$own,$occ,$temple,$ter, @{$mob->[$i]});
110 foreach $j (0..$mobcount-1) {
111 ($xid,$xtype,$xown,$xado,$xcnt,$xstat,$xmove) = @{$mob->[$j]};
112 if ($xmove == $oid) {
114 $out .= ', '.$db->loc('MSG_TRANSPORTS').":<ul>\n";
118 $aym->mobile_to_html( $loc,$own,$occ,$temple,$ter, @{$mob->[$j]})."</li>\n";
124 $out .= ($i < $mobcount-1) ? ',' : '.';
127 } # end foreach $mobcount
130 ##################################
131 # general commands for this field:
132 ##################################
134 if ($aym->is_earthling($user)) {
135 $out .= "\n<p><a href=\"command.epl?cmd=DIE_ORDER\">".
136 $db->loc('CMD_DIE_ORDER').'</a>';
138 if ($aym->is_god($user)) {
139 if ($aym->is_arrival($loc)) {
140 $out .= "\n<p><a href=\"command.epl?cmd=INCARNATE&loc=$loc\">".
141 $db->loc('CMD_INCARNATE').'</a>';
143 if($aym->is_coast($loc)){
144 $out .= "\n<p><a href=\"command.epl?cmd=BUILD_ARK&loc=$loc\">".
145 $db->loc('CMD_BUILD_ARK').'</a>';
147 $out .= "\n<p><a href=\"command.epl?cmd=FLOOD&loc=$loc\">".
148 $db->loc('CMD_FLOOD').'</a>';
151 $out .= "\n<p><a href=\"command.epl?cmd=PLAGUE&loc=$loc\">".
152 $db->loc('CMD_PLAGUE').'</a>';
153 $out .= "\n<p><a href=\"command.epl?cmd=CH_LUCK\">".$db->loc('CMD_CH_LUCK').'</a>';
156 #############################
157 # show events for this field
158 #############################
160 $events = $aym->field_events($loc);
162 #print OUT Dumper $events;
163 $out .= "\n<p><strong>".$db->loc('PLAYER_EVENTS')."</strong><p>\n" if %$events;
164 for my $ev ( keys %$events) {
165 $out .= $aym->show_event($ev, 0) .'<p>';
168 ############################
169 # show unavailable units
170 ############################
173 #$mob = $aym->mobiles_available($loc,-1);
174 #$mobcount = $#{@$mob}+1;
178 # $out .= '<strong> '.$db->loc('UNAVAILABLE_UNITS').":</strong><p>";
179 # foreach $i (0..$mobcount-1) {
180 # ($oid,$otype,$oown,$oado,$ocnt,$ostat) = @{$mob->[$i]};
182 # if ($oown == $user) {
183 # $out .= $db->loc('PREP_OWN_PL').' '.$aym->mobile_string($otype,2);
184 # if ($otype eq 'PRIEST' or $otype eq 'PROPHET') {
185 # $out .= $db->loc('ADJ_ADORING').' '.$aym->charname($oado);
186 # } elsif ($otype eq 'HERO') {
187 # $out .= $db->loc('ADJ_ADORING');
188 # $out .= $aym->charname($oado).'</a>';
189 # } elsif ($otype eq 'AVATAR') {
190 # $out .= $aym->mobile_string($ostat,1);
193 # $out .= $aym->mobile_string($otype, $ocnt);
194 # if ($otype ne 'ARK') {
195 # $out .= ' '.$db->loc('PREP_OWN_SG').' ';
196 # $out .= $db->loc('ART_DAT_PL').' ' if $aym->gender($oown) eq 'PLURAL';
197 # $out .= $aym->charname($oown);
199 # if ($otype eq 'PRIEST' or $otype eq 'PROPHET'or $otype eq 'HERO') {
200 # $out .= $db->loc('ADJ_ADORING').' ';
201 # if ($oado == $user) {
202 # $out .= $db->loc( ($aym->gender($user) eq 'PLURAL') ?
203 # 'PPRO_DAT3_PL' : 'PPRO_DAT3_SG');
205 # $out .= $aym->charname($oado);
209 # $out .= ($i < $mobcount-1) ? ',' : '.';
211 # } # end foreach $mobcount
220 To view an Aymargeddon field, you must first <a href="login.epl" target="_top">login</a>,
221 because we need to know which game to display and for whom.