a
    Žix  ã                   @   st   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ddd„Z	ddd„Z
ddd„Zg d¢ZdS )a5  
Social & Relationship Problem Events
Negative events related to social situations, friendships, and romantic relationships

Events:
- publicEmbarrassment: Hugely embarrassing moment in public
- friendshipBetrayal: Friend talking behind your back
- romanticRejection: Confession of feelings rejected
- breakup: Relationship ending with heartbreak
- socialMediaDrama: Drama on social media involving you
- leftOutOfGroup: Friend group making plans without you
- argumentWithFriend: Big fight with a close friend
- partyDisaster: Party you threw going terribly wrong
é    N)ÚmessageFunctionÚmessagec                 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 )
z5Hugely embarrassing moment in front of lots of peopleÚpublicEmbarrassmenté
   é   é   i   zWYou had a hugely embarrassing moment in front of lots of people. You want to disappear.é   é   é   )	ÚeventsÚcÚageYearsÚrandomÚaddÚ	happinessÚsocialÚstressr   ©ÚplayerÚtypeÚfnameÚcheckr   © r   ú7/var/www/lichun.app/lichun/ws/events/negative/social.pyr      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(Friend has been talking behind your backÚfriendshipBetrayalr   éd   r   éè  zUYou found out a friend has been talking behind your back. You feel hurt and betrayed.r   r	   c                 S   s   g | ]}|j d kr|‘qS ©ÚFriend©Útitle©Ú.0Úpersonr   r   r   Ú
<listcomp>/   ó    z&friendshipBetrayal.<locals>.<listcomp>é(   ©r   r   r   r   r   r   r   ÚrÚchoiceÚaffinityr   ©r   r   r   r   r   ÚfriendsÚfriendr   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}|rz| j  |¡ | j jd8  _| j jd8  _| j jd7  _t||| |ƒS )z.Confessed feelings to someone and got rejectedÚromanticRejectioné   r   r   iÜ  zHYou confessed your feelings to someone and they rejected you. It stings.r	   )	r   r   r   r   r   r   Úenergyr   r   r   r   r   r   r.   7   s    2r.   c           	      C   sÚ   d}| j jdu}d}|rVz0ddlm} || | j jƒ}|rF|jdk rFd}W n   Y n0 || jvoŽ| j jdkoŽ| j jd	koŽ|oŽ|oŽd
t ¡ d k}d}|rÌ| j |¡ | j  j	d8  _	| j  j
d8  _
d| j _t||| |ƒS )z#Relationship ending with heartbreakÚbreakupNFr   )Ú
get_personr&   Té   r   r   éÐ  zOYour relationship ended. You're heartbroken and don't know how to move forward.r   )r   ÚpartnerÚ	functionsr2   r*   r   r   r   r   r   r0   r   )	r   r   r   Zhas_partnerZpartner_low_affinityr2   r5   r   r   r   r   r   r1   F   s:    

ÿ
þýüûr1   c                 C   s˜   d}| j jdk}|| jvoD| j jdkoD| j jdkoD|oDdt ¡ d k}d}|rŠ| j |¡ | j  jd8  _| j  jd8  _| j  jd7  _t||| |ƒS )z#Drama on social media involving youÚsocialMediaDramaé   r   r   i°  zSDrama on social media involving you. Everyone is talking about it and taking sides.r   )	r   r   r   r   r   r   r   r   r   )r   r   r   Úhas_social_mediar   r   r   r   r   r7   k   s$    

ÿ
þýür7   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#Friend group made plans without youÚleftOutOfGroupr   r   r   i„  z^Your friend group made plans without you. You saw the photos and realize you've been excluded.r	   )r   r   r   r   r   r   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Big fight with a close friendÚargumentWithFriendé   r   r   r   zSYou had a big fight with a close friend. Things were said that can't be taken back.r	   r
   c                 S   s   g | ]}|j d kr|‘qS r   r   r!   r   r   r   r$   ž   r%   z&argumentWithFriend.<locals>.<listcomp>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  _| jjdkrˆ| j jd8  _nd	| j_| j jd
7  _t	||| |ƒS )z#Party you threw went terribly wrongÚpartyDisasteré   r   r   r4   zdYou threw a party and it went terribly wrong. People are talking about it for all the wrong reasons.r   éÈ   r   r	   )
r   r   r   r   r   r   r   Úmoneyr   r   r   r   r   r   r=   ¦   s    2r=   )r   r   r.   r1   r7   r:   r;   r=   )r   )r   )r   )r   )r   )r   )r   )r   )Ú__doc__r   Zevents.baser   r   r   r.   r1   r7   r:   r;   r=   Ú__all__r   r   r   r   Ú<module>   s   



%



