a
    ŽiO5  ã                   @   sô   d Z ddlZddlmZmZmZ d/dd„Zd0dd	„Zd1d
d„Zd2dd„Z	d3dd„Z
d4dd„Zd5dd„Zd6dd„Zd7dd„Zd8dd„Zd9d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d@d(d)„ZdAd*d+„ZdBd,d-„Zg d.¢ZdS )Caä  
Negative Random Events
Unfortunate events and mishaps

Events:
- carCrash: Car accident with a deer
- oneTimeEventTest: Test event
- lowAffinity: Low affinity warning
- spilledDrink: Spilling drink on yourself
- phoneDropped: Dropping and potentially breaking phone
- birdPooped: Bird poops on you
- forgotWallet: Realizing you left wallet at home
- missedBus: Just missed the bus/train
- badHairDay: Having a terrible hair day
- caughtInRain: Getting caught in rain without umbrella
- lostKeys: Can't find keys anywhere
- ruinedClothes: Ruined favorite outfit
- badRestaurantExperience: Terrible restaurant service and food
- sleepThroughAlarm: Sleeping through alarm and being late
- packageStolen: Package stolen from doorstep
- phoneBreakdown: Phone completely died, need new one
- dataLoss: Computer crashed and lost important files
- socialMediaCanceled: Being 'cancelled' on social media
- cyberbullying: Being cyberbullied online
- accountHacked: Accounts hacked with embarrassing posts
é    N)ÚmessageFunctionÚquestionFunctionÚanswerOptionÚmessageFc                 C   sè   d}|| j vo$| jjo$dt ¡ d k}d}tdddtdd	d
tdddg}|dkrdt||| ||ƒS |dkrä|d |d krŠ| j d¡ nZ|d |d kr¸| j jd8  _| j d¡ n,|d |d krä| j jd8  _| j d¡ dS )zCar accident with a deerÚcarCrashé   i † z>You're driving at night and a deer jumps in front of your car.zSwerve lefté   )ÚdiamondCostzHit the brakesé2   )Ú	moneyCostzSpeed up)Ú
energyCostÚanswerÚoptionr   zbIts a quiet night and no other cars are on the road. You swerve around the deer without a scratch!zzYou slam the breaks but still hit the deer. You (and the deer) are safe, but the windshield will need some costly repairs!é   é
   z^...Why would you speed up? You hit the deer at full speed and spent the night in the hospital.N)	ÚaskedQuestionsÚcÚcanDriveÚrandomr   r   ÚmessageQueueÚappendÚ	happiness)ÚplayerÚtyper   ÚresponseÚfnameÚcheckÚanswerOptions© r   ú7/var/www/lichun.app/lichun/ws/events/random/negative.pyr       s    ""r   c                 C   sZ   d}|| j vo| jjdk}|dkrV|rVddlm} | j  |¡ | jj |dddd¡ d	S )
z
Test eventÚoneTimeEventTestr   r   )ÚoneTimeEventzOct 10thz,Are you today's date? Because you're 10/10!!z10-10)Útitler   ÚdateN)Úeventsr   ÚageDaysÚ	functionsr!   ÚaddÚoneTimeEventsr   )r   r   r   r   r   r   r!   r   r   r   r    3   s    r    c                 C   st   | j D ]h}d}d}||j |j }|jdk r|| jvrd}d|j d |j d |j d }t||| |ƒ  S qdS )	zLow affinity warningFÚlowAffinityiÎÿÿÿTzYour ú z, deeply dislikes you after years of neglect.N)ÚrÚ	firstnameÚlastnameÚaffinityr$   r"   r   )r   r   Úpersonr   r   r   r   r   r   r)   =   s    
"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8  _| j jd8  _t||| |ƒS )	zSpilling drink on yourselfÚspilledDrinké   éd   r   iˆ  zEYou spilled coffee/juice all over yourself. Great start to the day...r   r   ©r$   r   ÚageYearsr   r'   r   Úenergyr   ©r   r   r   r   r   r   r   r   r0   I   s    2r0   c                 C   sü   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|dkrZg d¢}t||| ||ƒS |dkrøt g d	¢¡}|d
kr–| j d¡ | j jd7  _nb|dkrÌ| j d¡ | j jd8  _| j j	d8  _	n,| j d¡ | j jd8  _| j j	d8  _	dS )z'Dropping and potentially breaking phoneÚphoneDroppedé   r2   r   i'  z'You dropped your phone! Did it survive?r   )z
It's fine!zScreen crackedzCompletely shattered)r   r   r   r   r   r   r   z9Phew! Your phone is perfectly fine. That was a close one!r   z=Oh no! The screen is cracked. You'll need to get it repaired.é   éÈ   z@The phone is completely shattered. You'll need to buy a new one.é   éô  N)
r   r   r4   r   r   Úchoicer   r   r   Úmoney)r   r   r   r   r   r   r   Zoutcomer   r   r   r7   W   s$    2r7   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8  _t||| |ƒS )zBird poops on youÚ
birdPoopedr   r2   r   i@  zIA bird pooped on you. People say it's good luck, but it just feels gross.r   ©r$   r   r4   r   r'   r   r   r6   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8  _| j jd8  _t||| |ƒS )	z!Realizing you left wallet at homeÚforgotWalleté   r2   r   ip  zKYou're at the checkout and realize you forgot your wallet. So embarrassing!r9   r   )r$   r   r4   r   r'   r   Úsocialr   r6   r   r   r   rA      s    2rA   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8  _| j jd8  _t||| |ƒS )zJust missed the bus/trainÚ	missedBusr   r2   r   iX  z_You ran for the bus but it pulled away right as you got there. Now you have to wait 20 minutes.r3   r6   r   r   r   rD      s    2rD   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8  _t||| |ƒS )zHaving a terrible hair dayÚ
badHairDayr8   é(   r   é  zGYour hair looks terrible today and there's nothing you can do about it.r   r@   r6   r   r   r   rE   ›   s    2rE   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8  _| j jd8  _t||| |ƒS )z'Getting caught in rain without umbrellaÚcaughtInRainr   r2   r   r<   z@You got caught in a downpour without an umbrella. You're soaked.r   )r$   r   r4   r   r'   r   Úhealthr   r6   r   r   r   rH   ©   s    2rH   c                 C   sˆ   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|rz| j  |¡ | j jd8  _| j jd7  _| j jd8  _t||| |ƒS )	zCan't find keys anywhereÚlostKeysr8   r2   r   éÂ  z;You can't find your keys anywhere. You're going to be late.r   r9   ©	r$   r   r4   r   r'   r   Ústressr5   r   r6   r   r   r   rJ   ·   s    2rJ   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8  _| j jd8  _t||| |ƒS )	zRuined favorite outfitÚruinedClothesr   r2   r   r<   z4You ruined your favorite outfit. It's beyond repair.r9   r
   ©r$   r   r4   r   r'   r   r>   r   r6   r   r   r   rN   Æ   s    2rN   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8  _| j jd8  _t||| |ƒS )	z$Terrible restaurant service and foodÚbadRestaurantExperiencerB   r2   r   rK   zETerrible service and bad food at a restaurant. What a waste of money.r9   é<   rO   r6   r   r   r   rP   Ô   s    2rP   c                 C   sˆ   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|rz| j  |¡ | j jd8  _| j jd7  _| j jd	8  _t||| |ƒS )
z%Sleeping through alarm and being lateÚsleepThroughAlarmr8   r2   r   rG   zNYou slept through your alarm! You're going to be late for something important.r9   é   r   rL   r6   r   r   r   rR   â   s    2rR   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8  _| j jd8  _t||| |ƒS )zPackage stolen from doorstepÚpackageStolené   r2   r   r<   z4Someone stole the package from your doorstep. Great.rS   rO   r6   r   r   r   rT   ñ   s    2rT   c                 C   sˆ   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|rz| j  |¡ | j jd8  _| j jd8  _| j jd	7  _t||| |ƒS )
z#Phone completely died, need new oneÚphoneBreakdownr8   r2   r   i°  z2Your phone completely died. You'll need a new one.iX  rS   r9   )	r$   r   r4   r   r'   r>   r   rM   r   r6   r   r   r   rV     s    2rV   c                 C   sˆ   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|rz| j  |¡ | j jd8  _| j jd7  _| j jd	8  _t||| |ƒS )
z)Computer crashed and lost important filesÚdataLossrB   r2   r   éÜ  zJYour computer crashed and you lost important files. All that work... gone.r;   é#   rF   rL   r6   r   r   r   rW     s    2rW   c                 C   s    d}t | jdƒo| jj}|| jvoL| jjdkoL| jjdkoL|oLdt ¡ d k}d}|r’| j |¡ | j jd8  _| j jd	8  _| j j	d7  _	t
||| |ƒS )
z!Being 'cancelled' on social mediaÚsocialMediaCanceledÚhasSocialMediarB   rF   r   iÐ  zRYou're being 'cancelled' on social media. People you don't know are attacking you.rY   r;   )Úhasattrr   r[   r$   r4   r   r'   r   rC   rM   r   ©r   r   r   Zhas_social_mediar   r   r   r   r   rZ   !  s    6rZ   c                 C   s   d}t | jdƒo| jj}|| jvoL| jjdkoL| jjdkoL|oLdt ¡ d k}d}|r‚| j |¡ | j jd8  _| j jd	7  _t	||| |ƒS )
zBeing cyberbullied onlineÚcyberbullyingr[   r   é   r   rX   zDYou're being cyberbullied. The constant harassment is taking a toll.rY   rF   )
r\   r   r[   r$   r4   r   r'   r   rM   r   r]   r   r   r   r^   1  s    6r^   c                 C   sˆ   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|rz| j  |¡ | j jd8  _| j jd8  _| j jd7  _t||| |ƒS )	z'Accounts hacked with embarrassing postsÚaccountHackedé   r2   r   i  zIYour accounts were hacked and embarrassing posts were made. Everyone saw.r_   r;   )	r$   r   r4   r   r'   r   rC   rM   r   r6   r   r   r   r`   A  s    2r`   )r   r    r)   r0   r7   r?   rA   rD   rE   rH   rJ   rN   rP   rR   rT   rV   rW   rZ   r^   r`   )r   FF)r   FF)r   )r   )r   FF)r   )r   )r   )r   )r   )r   )r   )r   )r   )r   )r   )r   )r   )r   )r   )Ú__doc__r   Zevents.baser   r   r   r   r    r)   r0   r7   r?   rA   rD   rE   rH   rJ   rN   rP   rR   rT   rV   rW   rZ   r^   r`   Ú__all__r   r   r   r   Ú<module>   s.   




















