Ñò
�"lPc           @   s=  d  d k  Z  d  d k Z d  d k l Z d „  Z d  d „ Z d „  Z d „  Z d „  Z d „  Z	 d	 „  Z
 d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z  d  „  Z! d S(!   iÿÿÿÿN(   t   RECORD_CONFIGSc         C   s�   h  } t  | i ƒ  ƒ } |  d | | d <|  d } xb t t t i ƒ ƒ D]K } t | | ƒ d j o qJ n | | | | d i d t | ƒ g ƒ <qJ W| S(   Nt   vehiclesInTreest
   tankExpertt   vehiclesInTreesByNationi    t    (   t   sett   iterkeyst   xranget   lent   nationst   NAMESt   joint   str(   t   cachet   vehTypeFragst   rest   killedVehTypesR   t	   nationIdx(    (    s&   scripts/common/dossiers/dependences.pyt   getTankExpertRequirements   s    
 +c         C   s³   h  } |  d | | | d <|  d } | d j o t  t t i ƒ ƒ } n
 | g } xW | D]O } t | | ƒ d j o q\ n | | | | | d i d t | ƒ g ƒ <q\ W| S(   NR   t   mechanicEngineerR   iÿÿÿÿi    R   (   t   rangeR   R	   R
   R   R   (   R   t   defaultUnlockst   unlockst   nationIDR   R   t	   nationIDsR   (    (    s&   scripts/common/dossiers/dependences.pyt   getMechanicEngineerRequirements"   s    
	 /c         C   sX   t  i t ƒ } xB |  i ƒ  D]4 \ } \ } } x | D] } | | i | ƒ q5 Wq W| S(   N(   t   collectionst   defaultdictt   listt	   iteritemst   append(   t   dependenciest   dependencies2t   recordt   affectingRecordst   updatert   affectingRecord(    (    s&   scripts/common/dossiers/dependences.pyt   buildDependencies26   s      c         C   s   |  d | | |  d <d  S(   Nt   battleHeroes(    (   t   dossierDescrR$   t   valuet	   prevValue(    (    s&   scripts/common/dossiers/dependences.pyt   updateBattleHeroes?   s    c   	      C   s’   t  d } |  d } t | ƒ } x9 t d | d ƒ D]  } | | | | j o Pq4 q4 Wd  S|  d } | d j p | | j o | |  d <n d  S(   Nt   medalKayR&   i   i    (   R    R   R   (	   R'   R$   R(   R)   t   medalKayCfgR&   t   maxMedalClasst
   medalClasst   curClass(    (    s&   scripts/common/dossiers/dependences.pyt   updateMedalKayD   s    

 	
c   	      C   s’   t  d } |  d } t | ƒ } x9 t d | d ƒ D]  } | | | | j o Pq4 q4 Wd  S|  d } | d j p | | j o | |  d <n d  S(   Nt   medalCariust   fragsi   i    (   R    R   R   (	   R'   R$   R(   R)   t   medalCariusCfgR2   R-   R.   R/   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMedalCariusS   s    

 	
c   
      C   s    t  d } |  d } |  d } t | ƒ } x= t d | d ƒ D]$ } | | | | | j o Pq> q> Wd  S|  d }	 |	 d j p |	 | j o | |  d <n d  S(   Nt   medalKnispelt   damageDealtt   damageReceivedi   i    (   R    R   R   (
   R'   R$   R(   R)   t   medalKnispelCfgR6   R7   R-   R.   R/   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMedalKnispelb   s    


 	
c   	      C   s’   t  d } |  d } t | ƒ } x9 t d | d ƒ D]  } | | | | j o Pq4 q4 Wd  S|  d } | d j p | | j o | |  d <n d  S(   Nt   medalPoppelt   spottedi   i    (   R    R   R   (	   R'   R$   R(   R)   t   medalPoppelCfgR;   R-   R.   R/   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMedalPoppelr   s    

 	
c   	      C   s’   t  d } |  d } t | ƒ } x9 t d | d ƒ D]  } | | | | j o Pq4 q4 Wd  S|  d } | d j p | | j o | |  d <n d  S(   Nt   medalAbramst   winAndSurvivedi   i    (   R    R   R   (	   R'   R$   R(   R)   t   medalAbramsCfgR?   R-   R.   R/   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMedalAbrams�   s    

 	
c   	      C   s’   t  d } |  d } t | ƒ } x9 t d | d ƒ D]  } | | | | j o Pq4 q4 Wd  S|  d } | d j p | | j o | |  d <n d  S(   Nt   medalLeClerct   capturePointsi   i    (   R    R   R   (	   R'   R$   R(   R)   t   medalLeClercCfgRC   R-   R.   R/   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMedalLeClerc�   s    

 	
c   	      C   s’   t  d } |  d } t | ƒ } x9 t d | d ƒ D]  } | | | | j o Pq4 q4 Wd  S|  d } | d j p | | j o | |  d <n d  S(   Nt   medalLavrinenkot   droppedCapturePointsi   i    (   R    R   R   (	   R'   R$   R(   R)   t   medalLavrinenkoCfgRG   R-   R.   R/   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMedalLavrinenkoŸ   s    

 	
c   	      C   s’   t  d } |  d } t | ƒ } x9 t d | d ƒ D]  } | | | | j o Pq4 q4 Wd  S|  d } | d j p | | j o | |  d <n d  S(   Nt
   medalEkinst   frags8pi   i    (   R    R   R   (	   R'   R$   R(   R)   t   medalEkinsCfgR2   R-   R.   R/   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMedalEkins®   s    

 	
c         C   sL   t  d } |  d } t | | ƒ \ } } |  d | j o | |  d <n d  S(   Nt   beasthuntert
   fragsBeast(   R    t   divmod(   R'   R$   R(   R)   t   minFragst
   beastFragst   medalst   series(    (    s&   scripts/common/dossiers/dependences.pyt   updateBeasthunter½   s
    

c         C   sL   t  d } |  d } t | | ƒ \ } } |  d | j o | |  d <n d  S(   Nt   sinait
   fragsSinai(   R    RP   (   R'   R$   R(   R)   RQ   t
   sinaiFragsRS   RT   (    (    s&   scripts/common/dossiers/dependences.pyt   updateSinaiÆ   s
    

c         C   sL   t  d } |  d } t | | ƒ \ } } |  d | j o | |  d <n d  S(   Nt   pattonValleyt   fragsPatton(   R    RP   (   R'   R$   R(   R)   RQ   R[   RS   RT   (    (    s&   scripts/common/dossiers/dependences.pyt   updatePattonValleyÏ   s
    

c   	      C   s\   t  d } | d i |  d d ƒ } t | | ƒ \ } } | d | j o | | d <n d  S(   Nt	   mousebaneR   t   mausTypeCompDescri    (   R    t   getRP   (	   R   R'   R$   R(   R)   RQ   t	   mausFragsRS   RT   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMousebaneØ   s
    
c   
      C   sÈ   t  |  | ƒ } t  |  | ƒ } t ƒ  } x> | i ƒ  D]0 \ } }	 t |	 ƒ d j o | i | ƒ q4 q4 Wx> | i ƒ  D]0 \ } }	 t |	 ƒ d j o | i | ƒ qu qu Wx | D] } t | | <q° Wd  S(   Ni    (   R   R   R   R   t   addt   discardt   True(
   R   R'   R$   R   R)   R   t   resOldt   tankExpertsR!   R(   (    (    s&   scripts/common/dossiers/dependences.pyt   updateTankExpertá   s    	   c         C   sW   t  | | | | ƒ } x; | i ƒ  D]- \ } } t | ƒ d j o t |  | <q" q" Wd  S(   Ni    (   R   R   R   Rd   (   R'   R   R   R   R   R   R!   R(   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMechanicEngineeró   s
     c         C   s1   |  d } |  d | j o |  d |  d <n d  S(   Nt   maxSniperSeriest   sniperSeries(    (   R'   R$   R(   R)   Ri   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMaxSniperSeriesü   s    
c         C   s-   t  d } |  d | j o d |  d <n d  S(   Nt   titleSniperRi   i   (   R    (   R'   R$   R(   R)   t	   minLength(    (    s&   scripts/common/dossiers/dependences.pyt   updateTitleSniper  s    
c         C   s1   |  d } |  d | j o |  d |  d <n d  S(   Nt   maxInvincibleSeriest   invincibleSeries(    (   R'   R$   R(   R)   Ro   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMaxInvincibleSeries
  s    
c         C   s-   t  d } |  d | j o d |  d <n d  S(   Nt
   invincibleRo   i   (   R    (   R'   R$   R(   R)   Rm   (    (    s&   scripts/common/dossiers/dependences.pyt   updateInvincible  s    
c         C   s1   |  d } |  d | j o |  d |  d <n d  S(   Nt   maxDiehardSeriest   diehardSeries(    (   R'   R$   R(   R)   Rt   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMaxDiehardSeries  s    
c         C   s-   t  d } |  d | j o d |  d <n d  S(   Nt   diehardRt   i   (   R    (   R'   R$   R(   R)   Rm   (    (    s&   scripts/common/dossiers/dependences.pyt   updateDiehard  s    
c         C   s1   |  d } |  d | j o |  d |  d <n d  S(   Nt   maxKillingSeriest   killingSeries(    (   R'   R$   R(   R)   Ry   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMaxKillingSeries&  s    
c         C   s-   t  d } |  d | j o d |  d <n d  S(   Nt   handOfDeathRy   i   (   R    (   R'   R$   R(   R)   Rm   (    (    s&   scripts/common/dossiers/dependences.pyt   updateHandOfDeath-  s    
c         C   s1   |  d } |  d | j o |  d |  d <n d  S(   Nt   maxPiercingSeriest   piercingSeries(    (   R'   R$   R(   R)   R~   (    (    s&   scripts/common/dossiers/dependences.pyt   updateMaxPiercingSeries4  s    
c         C   s-   t  d } |  d | j o d |  d <n d  S(   Nt   armorPiercerR~   i   (   R    (   R'   R$   R(   R)   Rm   (    (    s&   scripts/common/dossiers/dependences.pyt   updateArmorPiercer;  s    
c         C   s-   t  d } |  d | j o d |  d <n d  S(   Nt
   lumberjackt   treesCuti   (   R    (   R'   R$   R(   R)   t   minTrees(    (    s&   scripts/common/dossiers/dependences.pyt   updateLumberjackB  s    
c         C   s   t  |  d ƒ } x^ | D]V } | d j o | i | ƒ q | d j  o% y | i t | ƒ ƒ Wqm qm Xq q W| |  d <d  S(   Nt   rareAchievementsi    (   R   R   t   removet   abs(   R'   t   achievementst   newAchievementst   achievement(    (    s&   scripts/common/dossiers/dependences.pyt   updateRareAchievementsI  s       ("   R	   R   t   configR    R   R   R%   R*   R0   R4   R9   R=   RA   RE   RI   RM   RU   RY   R\   Ra   Rg   Rh   Rk   Rn   Rq   Rs   Rv   Rx   R{   R}   R€   R‚   R†   R�   (    (    (    s&   scripts/common/dossiers/dependences.pyt   <module>   s@   																																			