erste vorarbeiten für JSON
[aymargeddon/current.git] / src / AymCommand.pm
index 37dabba..e6099ae 100644 (file)
@@ -1,23 +1,24 @@
-
 ##########################################################################
 #
-#   Copyright (c) 2003 Aymargeddon Development Team
-#
-#   This file is part of "Last days of Aymargeddon"
-#
-#   Aymargeddon is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the Free
-#   Software Foundation; either version 2 of the License, or (at your option)
-#   any later version.
-#
-#   Aymargeddon is distributed in the hope that it will be useful, but WITHOUT
-#   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-#   more details.
-#   You should have received a copy of the GNU General Public License along
-#   with this program; if not, write to the Free Software Foundation, Inc., 675
-#   Mass Ave, Cambridge, MA 02139, USA.
-#
+#   Copyright (c) 2003-2012 Aymargeddon Development Team
+#
+#   This file is part of "Last days of Aymargeddon" - a massive multi player
+#   onine game of strategy     
+#   
+#        This program is free software: you can redistribute it and/or modify
+#       it under the terms of the GNU Affero General Public License as
+#        published by the Free Software Foundation, either version 3 of the
+#       License, or (at your option) any later version.
+#    
+#        This program is distributed in the hope that it will be useful,
+#       but WITHOUT ANY WARRANTY; without even the implied warranty of
+#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+#    See the GNU Affero General Public License for more details.
+#    
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#    
 ###########################################################################
 #
 
@@ -1895,10 +1896,16 @@ sub first_phase{
   # calculate duration
   $self->setDuration($::conf->{-DURATION}->{-BUILD_ARK});
 
-  $self->event($self->{-location},
-              'EVENT_BUILD_ARK');
+  my $loc = $self->{-location};
+  
+  $self->event($loc,'EVENT_BUILD_ARK');
 
   $self->use_mana();
+  
+  $self->{-affected} = {
+      -fields => [$loc],
+      -mana => $self->{-player},
+  };
 
   return $self->{-duration};
 }