a
    Živ  ã                   @   sn   d Z ddlZddlmZmZ ddd„Zddd	„Zdd
d„Zddd„Zddd„Z	ddd„Z
ddd„Zg d¢ZdS )aˆ  
Positive Random Events
Lucky, positive surprise events

Events:
- foundAPenny: Finding a lucky penny
- freeConcert: Free concert tickets
- foundMoneyStreet: Finding money on the ground
- freeUpgrade: Unexpected upgrade or free item
- unexpectedCompliment: Stranger gives sincere compliment
- perfectParkingSpot: Finding the perfect parking spot
- rainbowSighting: Seeing a beautiful rainbow
é    N)ÚmessageFunctionÚquestionFunctionÚmessageFc                 C   s’   d}|| j vo(| jjdko(dt ¡ d k}d}|dkrNddg}t||| ||ƒS |dkrŽ|d	 dkrŽ| j d
¡ | j jd7  _| j jd7  _dS )zFinding a lucky pennyÚfoundAPennyé   é   i@B z9You see something shiny on the ground. Do you pick it up?Úanswerz
Pick it upzLeave it on the groundÚoptionzRYou pick up a penny. Find a penny, pick it up, all day long you'll have good luck!g{®Gáz„?N)	ÚaskedQuestionsÚcÚageYearsÚrandomr   ÚmessageQueueÚappendÚmoneyÚ	happiness)ÚplayerÚtyper   ÚresponseÚfnameÚcheckÚanswerOptions© r   ú7/var/www/lichun.app/lichun/ws/events/random/positive.pyr      s    &r   c                 C   s’   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}d}|dkrPt||| |ƒS |dkrŽ|d d	kr‚| j d
¡ | j jd7  _n| j d¡ dS )zFree concert ticketsÚfreeConcerté   éd   r   iè  zŒYour favorite Band is coming to town and tickets are pricey. You see that there is an enter-to-win competition online. Do you want to enter?r   r	   ÚYeszŽA day after entering the competition you receive a phone call from the concert venue confirming that you just won two tickets to see the band!é
   zPA week passes and you never hear if you won tickets. Oh well, perhaps next time!N)r
   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   "   s    2r   c                 C   sx   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|rj| j  |¡ | j jd7  _| j jd7  _t||| |ƒS )	zFinding money on the groundÚfoundMoneyStreeté   r   r   iˆ  z0You found a $20 bill on the sidewalk! Lucky day!é   r   )Úeventsr   r   r   Úaddr   r   r   ©r   r   r   r   r   r   r   r   r   1   s    2r   c                 C   sv   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}g d¢}t |¡}|rh| j  |¡ | j jd7  _t||| |ƒS )zUnexpected upgrade or free itemÚfreeUpgradeé   r   r   i@  )z&The coffee shop gave you a free drink!z(Your flight got upgraded to first class!z(You won a raffle you forgot you entered!z&Your food order came with extra fries!é   )r"   r   r   r   Úchoicer#   r   r   )r   r   r   r   Úmessagesr   r   r   r   r%   ?   s    2
r%   c                 C   sx   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|rj| j  |¡ | j jd7  _| j jd7  _t||| |ƒS )z!Stranger gives sincere complimentÚunexpectedComplimentr   r   r   ip  z;A stranger complimented you today. It really made your day!r   )r"   r   r   r   r#   r   Úsocialr   r$   r   r   r   r*   T   s    2r*   c                 C   sp   d}|| j vo<| jjdko<| jjdko<| jjo<dt ¡ d k}d}|rb| j  |¡ | j jd7  _t||| |ƒS )z Finding the perfect parking spotÚperfectParkingSpotr&   r   r   iX  z]Right as you arrived, someone pulled out of the perfect parking spot. It's the little things!r   )r"   r   r   ÚcanDriver   r#   r   r   r$   r   r   r   r,   b   s    :r,   c                 C   sh   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|rZ| j  |¡ | j jd7  _t||| |ƒS )zSeeing a beautiful rainbowÚrainbowSightingé   r   r   i'  zGYou saw a beautiful double rainbow today. You stopped to appreciate it.r   )r"   r   r   r   r#   r   r   r$   r   r   r   r.   o   s    2r.   )r   r   r   r%   r*   r,   r.   )r   FF)r   FF)r   )r   )r   )r   )r   )Ú__doc__r   Zevents.baser   r   r   r   r   r%   r*   r,   r.   Ú__all__r   r   r   r   Ú<module>   s   






