Ñò
¹)~Ic           @   sV  d  d k  Z  d  d k Z d  d k l Z l Z l Z e d d d d d d d d ƒ Z e d „  e i ƒ  Dƒ ƒ Z e	 e
 Z Z e d e d e ƒ e d e d e ƒ e d e d e ƒ e d e d e ƒ e d e d e ƒ e ƒ  g Z xR e D]J Z xA e i ƒ  D]3 \ Z Z e o e e e e <qþ e e e e <qþ Wqë Wd	 e i f d
 „  ƒ  YZ d S(   iÿÿÿÿN(   t   casht   cput   laborR   g333333ó?t   stealtht   thriftt   speedc         c   s)   x" |  ] \ } } | d  | f Vq Wd S(   i   N(    (   t   .0t   kt   v(    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pys	   <genexpr>   s   	 t   Locationc           B   sz   e  Z g  Z d  Z e ƒ  Z d „  Z e d „  ƒ Z e d „  ƒ Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d	 „  Z RS(
   t    c         C   sa   t  t |  ƒ i | d d | ƒ | d d | d d |  _ |  _ | |  _ | |  _ g  |  _ d  S(   NR
   i    g      YÀi   (   i    i    i    (   t   superR	   t   __init__t   xt   yt   absolutet   safetyt   bases(   t   selft   idt   positionR   R   t   prerequisites(    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyR   :   s
    #		c         C   s   t  i i |  j S(    (   t   gt   plt   last_discovery(   R   (    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyt   <lambda>E   s    c         C   s   t  i i |  j S(    (   R   R   t   prev_discovery(   R   (    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyR   F   s    c         C   si   d } |  i  o | d 9} n |  i o | d 9} n d |  i j o | |  i d :} n t | d ƒ S(   Ni   g333333ó?gš™™™™™ñ?R   id   (   t   had_last_discoveryt   had_prev_discoveryt	   modifierst   int(   R   t   discovery_bonus(    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyR   H   s    

c         C   sŽ   d |  i  j oA |  i  d } t | t | ƒ | t <t | t | ƒ | t <n d |  i  j o) |  i  d } t | t | ƒ | t <n d  S(   NR   R   (   R   R   R    R   R   (   R   t   costt   mod(    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyt   modify_costR   s    c         C   s=   d |  i  j o) |  i  d } t | t | ƒ | t <n d  S(   NR   (   R   R   R    (   R   t   maintenanceR!   (    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyt   modify_maintenancea   s    c         C   sW   |  i  i | ƒ |  | _ |  i | i ƒ |  i | i ƒ |  i | i ƒ | i ƒ  d  S(   N(	   R   t   appendt   locationR"   t
   total_costt	   cost_leftR$   R#   t
   recalc_cpu(   R   t   base(    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyt   add_baseh   s    	c         C   s   t  |  i ƒ S(   N(   t   hashR   (   R   (    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyt   __hash__s   s    c         C   sA   t  | ƒ t t f j o t |  i | ƒ St |  i | i ƒ Sd  S(   N(   t   typet   strt   unicodet   cmpR   (   R   t   other(    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyt   __cmp__v   s    (   t   __name__t
   __module__t   citiest   hotkeyt   dictR   R   t   propertyR   R   R   R"   R$   R+   R-   R3   (    (    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyR	   0   s   			
				(   R   t   buyableR    R   R   R8   t   bonus_levelst	   iteritemst   penalty_levelst   Truet   Falset   bonust   penaltyt   modifier_setst   sett	   attributet   is_bonust   BuyableClassR	   (    (    (    sF   /home/trcarlson/Desktop/python/endg-singularity/trunk/code/location.pyt   <module>   s&   !  