a
    Žid?  ã                   @   s   d Z ddlZddlmZ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d"dd„Zd#dd„Zd$dd„Zg d¢ZdS )%a  
Adulthood Life Events
Everyday adult experiences, challenges, and milestones (ages 18+)

Events:
- firstApartment: Moving into first apartment alone (ages 18-25)
- workLifeBalance: Choosing between career and personal life (ages 25-50)
- forgotBirthdayCall: Forgot to call family on important day (ages 22-65)
- friendsDrifting: Realizing you've lost touch with friends (ages 25-40)
- unexpectedBill: Surprise expensive bill arrives (ages 20-65)
- promotionOpportunity: Job promotion offered with tradeoffs (ages 25-55)
- agingParent: Parent needs more help with daily tasks (ages 35-60)
- careerChangeDesire: Thinking about switching careers (ages 30-50)
- coworkerRivalry: Competitive relationship with colleague (ages 25-60)
- divorceConsideration: Serious relationship problems (ages 25-65)
é    N)ÚmessageFunctionÚquestionFunctionÚanswerOptionÚmessageFc                 C   sV  d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}tddd	td
ƒtddd	tdƒg}|dkrvt||| ||ƒS |dkrR|d |d jkr°| j d¡ | j j	d7  _	n¢|d |d jkrà| j d¡ | j j	d8  _	nr|d |d jkr| j d¡ | j j	d7  _	n@|d |d jkrR| j d¡ | j j	d8  _	| j j
d7  _
dS )z!Moving into first apartment aloneÚfirstApartmenté   é   é   éÐ  zbYou're looking at your first apartment. It's small and needs work, but it's yours. Do you take it?zSign the lease!éô  ©Ú	moneyCostzKeep lookingzFind a roommate firstéú   zStay with parents longerÚanswerÚoptionr   z_You signed the lease! It's expensive, but you have your own place now. Welcome to independence!é   zFYou decide to keep looking for something better. The search continues.é   é   z`You find a roommate to split the costs. It's not quite living alone, but it's a good compromise!é
   é   zqYou decide to stay with your parents a bit longer and save more money. It's practical, even if it's not exciting.éd   N)ÚaskedQuestionsÚcÚageYearsÚrandomr   r   r   ÚmessageQueueÚappendÚ	happinessÚmoney©ÚplayerÚtyper   ÚresponseÚfnameÚcheckÚanswerOptions© r&   ú=/var/www/lichun.app/lichun/ws/events/adulthood/life_events.pyr      s0    2

ü
r   c                 C   sÂ  d}|| j voN| jjdkoN| jjdkoN| jjdkoNt| jddƒoNdt ¡ d k}d	}td
ddtdƒtdddg}|dkrŠt||| ||ƒS |dkr¾|d |d jkr| j	 
d¡ | j jd7  _| j jd8  _| jD ]0}t|dƒrÚ|jdkrÚtd|jd ƒ|_ q¾qÚn°|d |d jkr~| j	 
d¡ | j jd7  _| jD ]6}t|dƒrD|jdkrDtd|jd ƒ|_ q¾qDn@|d |d jkr¾| j	 
d¡ | j jd7  _| j jd7  _dS )z)Choosing between career and personal lifeÚworkLifeBalancer   é2   ÚworkÚjobFr	   é¸  zSYour boss offers overtime pay, but you have plans with friends. What do you choose?zTake the overtimer   ©Ú
energyCostzKeep your planszSplit the differencer   r   r   r   zhYou take the overtime and cancel your plans. The extra money is nice, but your friends are disappointed.éÈ   ÚrelationshipÚfriendzNYou keep your plans with friends. Work can wait - memories are more important!r   r   zZYou work a few extra hours then meet your friends late. Not perfect, but you made it work!r   N)r   r   r   Ú
occupationÚgetattrr   r   r   r   r   r   r   r   ÚrÚhasattrr0   ÚmaxÚaffinityÚmin)r    r!   r   r"   r#   r$   r%   Úpersonr&   r&   r'   r(   5   s:    L

ý



r(   c                 C   s€   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}|r|dd„ | jD ƒ}|rnt |¡}td	|jd
 ƒ|_t||| |ƒS dS )z&Forgot to call family on important dayÚforgotBirthdayCallé   éA   r	   éˆ  zkYou realize you forgot to call your mom on her birthday. You feel terrible and quickly send a late message.c                 S   s$   g | ]}t |d ƒr|jdv r|‘qS )r0   )ÚparentÚmotherÚfatherZsibling)r5   r0   )Ú.0Úpr&   r&   r'   Ú
<listcomp>b   ó    z&forgotBirthdayCall.<locals>.<listcomp>r   r   N)	Úeventsr   r   r   r4   Úchoicer6   r7   r   )r    r!   r#   r$   r   Zfamily_membersZfamily_memberr&   r&   r'   r:   Z   s    2
r:   c                 C   sH   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}t||| |ƒS )z(Realizing you've lost touch with friendsÚfriendsDriftingr   é(   r	   é   z‡You scroll through your phone and realize you haven't talked to your best friend from college in over a year. When did you get so busy?)rE   r   r   r   r   ©r    r!   r#   r$   r   r&   r&   r'   rG   j   s    2rG   c                 C   s   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}|rŒg d¢}t |¡}t dd¡}td	| jj| ƒ| j_| j jd
8  _t	||| |ƒS dS )zSurprise expensive bill arrivesÚunexpectedBillr   r<   r	   r,   )z%Your car needs $800 in repairs. Ouch.zFThe medical bill is way higher than expected. There goes your savings.zFYou forgot to pay insurance and now there's a late fee plus penalties.zTYour laptop died and needs replacing. Why does this always happen at the worst time?r/   i   r   é   N)
rE   r   r   r   rF   Úrandintr6   r   r   r   )r    r!   r#   r$   Úmessagesr   Zcostr&   r&   r'   rK   s   s    2
rK   c                 C   sL  d}|| j voN| jjdkoN| jjdkoN| jjdkoNt| jddƒoNdt ¡ d k}d	}td
ddtdƒtddddg}|dkrŒt||| ||ƒS |dkrH|d |d jkrÖ| j	 
d¡ | j jd7  _| j jd8  _nr|d |d jkr| j	 
d¡ | j jd7  _n@|d |d jkrH| j	 
d¡ | j jd7  _| j jd7  _dS )z$Job promotion offered with tradeoffsÚpromotionOpportunityr   é7   r*   r+   Fr	   rI   zDYou're offered a promotion with more money but longer hours. Accept?zYes, take promotioné   r-   zNo, stay where you arezNegotiate better termsr   r   )ÚdiamondCostr.   r   r   r   zfYou accept the promotion! More money, more responsibility, more hours. Your work-life balance suffers.r   z`You decline the promotion. Your boss is surprised, but you value your free time more than money.r   z_You successfully negotiate better terms! More money with reasonable hours. Best of both worlds!i  r   N)r   r   r   r2   r3   r   r   r   r   r   r   r   r   r   r&   r&   r'   rO   Š   s*    L
ý
rO   c           	      C   s  d}d}| j D ],}t|dƒr|jdv rt|ddƒrd} q<q|| jvop| jjdkop| jjdkop|opd	t ¡ d
 k}d}tdddtdddtddddtdddg}|dkr¼t	||| ||ƒS |dkr|d |d j
kr6| j d¡ | j jd7  _| j D ]6}t|dƒ rü|jdv  rütd|jd ƒ|_ q qünÒ|d |d	 j
krh| j d¡ | j jd7  _n |d |d j
krØ| j d ¡ | j jd8  _| j D ]6}t|dƒrž|jdv ržtd|jd ƒ|_ qqžn0|d |d! j
kr| j d"¡ | j jd#7  _d$S )%z'Parent needs more help with daily tasksÚagingParentFr0   )r>   r?   r@   ÚaliveTé#   é<   r	   r=   zEYour parent is getting older and needs help. How do you support them?zVisit more oftenr   r-   zHire outside helpr   r   zMove them in with your   r/   ©r.   r   zEncourage siblings to helpr   )rR   r   r   r   z^You start visiting your parent more often. It's tiring but you're glad to spend time together.r   z[You hire a home care aide for your parent. It's expensive but gives everyone peace of mind.r   zcYour parent moves in with you. It's a big adjustment for everyone, but you're there for each other.r   zaYou coordinate with your siblings to share the caregiving. Teamwork makes it easier for everyone.rL   N)r4   r5   r0   r3   r   r   r   r   r   r   r   r   r   r   r8   r7   )	r    r!   r   r"   r#   Z
has_parentr9   r$   r%   r&   r&   r'   rS   ¦   sH    
 6


ü


rS   c                 C   sx  d}|| j voN| jjdkoN| jjdkoN| jjdkoNt| jddƒoNdt ¡ d k}d	}td
dddtdƒtdddtdddg}|dkr–t||| ||ƒS |dkrt|d |d jkrÐ| j	 
d¡ | j jd7  _n¤|d |d jkr| j	 
d¡ | j jd8  _| j jd7  _nb|d |d jkrD| j	 
d¡ | j jd7  _n0|d |d jkrt| j	 
d¡ | j jd7  _dS )z Thinking about switching careersÚcareerChangeDesirerQ   r)   r*   r+   Fr	   r=   zVYou're tired of your job and dream of doing something different. Do you make a change?zQuit and pursue passioniè  rW   zStay in current jobzSide hustle firstr   r-   zGo back to schoolr   r   r   r   z]You quit your job to pursue your passion! It's scary and expensive, but you feel alive again!z`You decide to stay in your current job. It's safe, but you can't shake the feeling of 'what if?'r   r   r   zQYou start a side hustle while keeping your day job. It's exhausting but exciting!r   zdYou enroll in courses to change careers. It's a big investment, but you're hopeful about the future!N)r   r   r   r2   r3   r   r   r   r   r   r   r   r   r   r&   r&   r'   rX   Ô   s0    L

ü
rX   c                 C   sb   d}|| j voN| jjdkoN| jjdkoN| jjdkoNt| jddƒoNdt ¡ d k}d	}t||| |ƒS )
z'Competitive relationship with colleagueÚcoworkerRivalryr   rV   r*   r+   Fr	   rI   zWA new coworker is getting all the attention. You feel competitive and a little jealous.)rE   r   r   r2   r3   r   r   rJ   r&   r&   r'   rY   ó   s    LrY   c           
      C   sÌ  d}d}d}t | jddƒrPddlm} || | jjƒ}|rPt|dƒrP|jdk rPd	}|| jvo„| jjd
ko„| jjdko„|o„dt	 	¡ d k}d}t
dddddt
dddt
ddddt
dddg}	|dkrÔt||| ||	ƒS |dkrÈ|d |	d jkr(| j d¡ | j jd8  _|rÈtd |jd! ƒ|_n |d |	d jkrZ| j d"¡ | j jd8  _nn|d |	d# jkr˜| j d$¡ | j jd8  _|rÈd|_n0|d |	d% jkrÈ| j d&¡ | j jd8  _dS )'zSerious relationship problemsÚdivorceConsiderationFNÚpartnerr   )Ú
get_personr7   r   Tr   r<   r	   ip  zGYour marriage isn't what it used to be. Do you try to fix it or let go?zCouples therapyr   r   rQ   )r   rR   r.   zSeparate for nowrH   r-   ZDivorcer
   r)   )r   r.   zKeep trying aloner   r   z^You both commit to couples therapy. It's hard work, but you're fighting for your relationship.r   r   rL   zUYou decide to separate temporarily. Maybe some space will help you figure things out.r   z]You file for divorce. It's painful and expensive, but sometimes relationships can't be saved.r   zYYou keep trying to make it work on your own, but it's exhausting when it feels one-sided.)r3   r   Ú	functionsr\   r[   r5   r7   r   r   r   r   r   r   r   r   r   r8   )
r    r!   r   r"   r#   Zhas_troubled_relationshipr[   r\   r$   r%   r&   r&   r'   rZ   ü   sD    6

ü
rZ   )
r   r(   r:   rG   rK   rO   rS   rX   rY   rZ   )r   FF)r   FF)r   )r   )r   )r   FF)r   FF)r   FF)r   )r   FF)Ú__doc__r   Zevents.baser   r   r   r   r(   r:   rG   rK   rO   rS   rX   rY   rZ   Ú__all__r&   r&   r&   r'   Ú<module>   s   

%

	


.

	
,