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} $]
15 my $game = $udat{-game};
16 my $user = $udat{-id};
17 my $loc = $udat{-loc};
19 my $db = DataBase->new();
20 my $aym = Aymargeddon->new($game,$user,$db);
21 $db->set_language($udat{-lang});
23 # maybe you cant see this field (for hackers, which try to look direct
24 # in the field via url)
25 unless ($aym->sight_of_field($loc)){
26 print OUT "Mogeln gildet nich!\n";
29 my ($ter,$own,$occ,$temple,$plague) =
30 $aym->read_field('TERRAIN,HOME,OCCUPANT,TEMPLE,PLAGUE',$loc);
36 $out .= $db->loc('FIELD_'.$ter).' '.Location::pretty($loc).' '.
37 $db->loc('PREP_IS_SG').' ';
39 $out .= $db->loc('OCCUPIED').' ';
42 $out .= $db->loc( ($aym->gender($occ) eq 'PLURAL') ?
43 'PPRO_DAT3_PL' : 'PPRO_DAT3_SG' );
45 # the field belongs to someone else
46 $out .= $db->loc('ART_DAT_PL').' ' if $aym->gender($occ) eq 'PLURAL';
47 $out .= $aym->charname($occ).' (<a href="command.epl?cmd=CH_STATUS&other='.
48 $occ.'">'.$aym->relation_string($occ).
49 '</a>, <a href="command.epl?cmd=SEND_MSG&other='.$occ.'">'.
50 $db->loc('SEND_MESSAGE').'</a>)';
53 $out .= $db->loc('NOT_OCCUPIED');
58 # some fields have some specials
60 $out .= $db->loc('HOMECITY');
61 } elsif ($temple eq 'Y') {
62 $out .= $db->loc('TEMPLE');
63 } elsif ($ter eq 'MOUNTAIN') {
64 $out .= $db->loc('HOMEHOLY');
66 if($ter ne 'ISLE' or $temple eq 'Y'){
67 $out .= ' '.$db->loc('PREP_OWN_SG').' ';
69 $out .= $db->loc( ($aym->gender($own) eq 'PLURAL') ?
70 'PPRO_DAT3_PL' : 'PPRO_DAT3_SG' );
71 } elsif ($occ == $own) {
72 my $gen = $aym->gender($own);
73 $out .= $db->loc( ($gen eq 'PLURAL') ? 'PPRO_DAT_PL' :
74 (($gen eq 'MALE') ? 'PPRO_DAT_M' : 'PPRO_DAT_F') );
76 $out .= $db->loc('ART_DAT_PL').' ' if $aym->gender($own) eq 'PLURAL';
77 $out .= $aym->charname($own).' (<a href="command.epl?cmd=CH_STATUS&other='.
78 $own.'">'.$aym->relation_string($own).
79 '</a>, <a href="command.epl?cmd=SEND_MSG&other='.$own.'">'.
80 $db->loc('SEND_MESSAGE').'</a>)';
85 $out .= $db->loc('PLAGUE_IN_FIELD',lc($plague)) if $plague;
92 $mob = $aym->mobiles_available($loc);
93 $mobcount = $#{@$mob}+1;
96 $out .= $db->loc('ADJ_HERE').' ';
97 $out .= $db->loc( ($mobcount == 1 and @{$mob->[0]}[4] == 1) ?
98 'PREP_IS_SG' : 'PREP_IS_PL' );
100 $out .= ($mobcount > 1) ? ":\n<p>" : ' ';
101 foreach $i (0..$mobcount-1) {
102 my ($oid,$otype,$oown,$oado,$ocnt,$ostat,$omove) = @{$mob->[$i]};
103 # check for MOVE_WITH
105 $out .= $aym->mobile_to_html( $loc,$own,$occ,$temple,$ter, @{$mob->[$i]});
108 foreach $j (0..$mobcount-1) {
109 ($xid,$xtype,$xown,$xado,$xcnt,$xstat,$xmove) = @{$mob->[$j]};
110 if ($xmove == $oid) {
112 $out .= ', '.$db->loc('MSG_TRANSPORTS').":<ul>\n";
116 $aym->mobile_to_html( $loc,$own,$occ,$temple,$ter, @{$mob->[$j]})."</li>\n";
122 $out .= ($i < $mobcount-1) ? ',' : '.';
125 } # end foreach $mobcount
128 ##################################
129 # general commands for this field:
130 ##################################
132 if ($aym->is_earthling($user)) {
133 $out .= "\n<p><a href=\"command.epl?cmd=DIE_ORDER\">".
134 $db->loc('CMD_DIE_ORDER').'</a>';
136 if ($aym->is_god($user)) {
137 if ($aym->is_arrival($loc)) {
138 $out .= "\n<p><a href=\"command.epl?cmd=INCARNATE&loc=$loc\">".
139 $db->loc('CMD_INCARNATE').'</a>';
141 if($aym->is_coast($loc)){
142 $out .= "\n<p><a href=\"command.epl?cmd=BUILD_ARK&loc=$loc\">".
143 $db->loc('CMD_BUILD_ARK').'</a>';
145 $out .= "\n<p><a href=\"command.epl?cmd=FLOOD&loc=$loc\">".
146 $db->loc('CMD_FLOOD').'</a>';
149 $out .= "\n<p><a href=\"command.epl?cmd=PLAGUE&loc=$loc\">".
150 $db->loc('CMD_PLAGUE').'</a>';
151 $out .= "\n<p><a href=\"command.epl?cmd=CH_LUCK\">".$db->loc('CMD_CH_LUCK').'</a>';
154 #############################
155 # show events for this field
156 #############################
158 $events = $aym->field_events($loc);
160 #print OUT Dumper $events;
161 $out .= "\n<p><strong>".$db->loc('PLAYER_EVENTS')."</strong><p>\n" if %$events;
162 for my $ev ( keys %$events) {
163 $out .= $aym->show_event($ev, 0) .'<p>';
166 ############################
167 # show unavailable units
168 ############################
171 #$mob = $aym->mobiles_available($loc,-1);
172 #$mobcount = $#{@$mob}+1;
176 # $out .= '<strong> '.$db->loc('UNAVAILABLE_UNITS').":</strong><p>";
177 # foreach $i (0..$mobcount-1) {
178 # ($oid,$otype,$oown,$oado,$ocnt,$ostat) = @{$mob->[$i]};
180 # if ($oown == $user) {
181 # $out .= $db->loc('PREP_OWN_PL').' '.$aym->mobile_string($otype,2);
182 # if ($otype eq 'PRIEST' or $otype eq 'PROPHET') {
183 # $out .= $db->loc('ADJ_ADORING').' '.$aym->charname($oado);
184 # } elsif ($otype eq 'HERO') {
185 # $out .= $db->loc('ADJ_ADORING');
186 # $out .= $aym->charname($oado).'</a>';
187 # } elsif ($otype eq 'AVATAR') {
188 # $out .= $aym->mobile_string($ostat,1);
191 # $out .= $aym->mobile_string($otype, $ocnt);
192 # if ($otype ne 'ARK') {
193 # $out .= ' '.$db->loc('PREP_OWN_SG').' ';
194 # $out .= $db->loc('ART_DAT_PL').' ' if $aym->gender($oown) eq 'PLURAL';
195 # $out .= $aym->charname($oown);
197 # if ($otype eq 'PRIEST' or $otype eq 'PROPHET'or $otype eq 'HERO') {
198 # $out .= $db->loc('ADJ_ADORING').' ';
199 # if ($oado == $user) {
200 # $out .= $db->loc( ($aym->gender($user) eq 'PLURAL') ?
201 # 'PPRO_DAT3_PL' : 'PPRO_DAT3_SG');
203 # $out .= $aym->charname($oado);
207 # $out .= ($i < $mobcount-1) ? ',' : '.';
209 # } # end foreach $mobcount
218 To view an Aymargeddon field, you must first <a href="login.epl" target="_top">login</a>,
219 because we need to know which game to display and for whom.