a
    Ži’  ã                   @   sV   d Z ddlZddlm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 )ak  
Childhood Setback Events
Negative events and minor disappointments for young children (ages 2-18)

Events:
- lostFavoriteToy: Lost favorite toy causing sadness
- notInvitedToParty: Feeling excluded from a birthday party
- scolded: Getting in trouble with parents
- lostGame: Losing a game and playing poorly
- friendMovedAway: Best friend moving to another city
é    N)ÚmessageFunctionÚmessagec                 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!Lost favorite toy causing sadnessÚlostFavoriteToyé   é   é   i¸  zJYou lost your favorite toy and can't find it anywhere. You're heartbroken.é   é
   ©ÚeventsÚcÚageYearsÚrandomÚaddÚ	happinessÚenergyr   ©ÚplayerÚtypeÚfnameÚcheckr   © r   ú:/var/www/lichun.app/lichun/ws/events/childhood/setbacks.pyr      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&Feeling excluded from a birthday partyÚnotInvitedToPartyé   é   r   i   zcEveryone in your class is talking about a birthday party you weren't invited to. You feel left out.é   r	   )r   r   r   r   r   r   Úsocialr   r   r   r   r   r      s    2r   c                 C   sŒ   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|r~| j  |¡ | j jd8  _| jD ]}|jdv r`| jd	8  _q`t	||| |ƒS )
zGetting in trouble with parentsÚscoldedé   r   r   iÄ	  z>You got in trouble and your parents scolded you. You feel bad.r   )ZMotherZFatherZParentr	   )
r   r   r   r   r   r   ÚrÚtitleÚaffinityr   )r   r   r   r   r   Úpersonr   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 Losing a game and playing poorlyÚlostGamer   r   r   i¬  zOYour team lost the game and you played poorly. You're disappointed in yourself.r	   r
   r   r   r   r   r$   ?   s    2r$   c                 C   s¤   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|r–| j  |¡ | j jd8  _| j jd8  _d	d
„ | jD ƒ}|r–t |¡}| j	d8  _	t
||| |ƒS )z"Best friend moving to another cityÚfriendMovedAwayr   é   r   i@  zRYour best friend is moving to another city. You're sad you won't see them anymore.é   r   c                 S   s   g | ]}|j d kr|‘qS )ZFriend)r!   )Ú.0r#   r   r   r   Ú
<listcomp>Y   ó    z#friendMovedAway.<locals>.<listcomp>é   )r   r   r   r   r   r   r   r    Úchoicer"   r   )r   r   r   r   r   ZfriendsZfriendr   r   r   r%   M   s    2
r%   )r   r   r   r$   r%   )r   )r   )r   )r   )r   )
Ú__doc__r   Zevents.baser   r   r   r   r$   r%   Ú__all__r   r   r   r   Ú<module>   s   




