:: school_lesson_math
<<switch $location_var[$here][0]>>
	<<case 'getData'>>
		<<set $result = {
			label:'Math',
			varname:'math',
			teacherId:'A26',
			flags: {
				start:'own',
				askQuestion:{
					label: 'default',
					content: 'own'
				},
				daydream:{
					label: 'default',
					content: 'own'
				},
				dontPayAttention:{
					label: 'default',
					content: 'default'
				},
				skills:{
					intelligence: 0.5
				}
			}
		}>>
	<<case 'start'>>
			<<image "characters/shared/headshots_main/big26.jpg">>
			<<either>>
				<p>You sit in your seat just as <<npc _schoolClassEvent.teacherId>><</npc>> stands up to begin his lesson. He casually leans against the desk, then crosses his arms as he begins the lesson. "Today we will be learning about problem solving. The most important thing about solving a problem is to know what answer you are looking for, especially with word problems. You will need to know the question that you need to answer. Here is an example: If Anna had four bottle caps and Dina had two pebbles, then how many bottle caps do they have in total? Anyone?"</p>
				<<either>>
					<p>A few students raise their hands and <<npc _schoolClassEvent.teacherId>><</npc>> points to Arkadi, who answers "They have six of course because four plus two equals six." <<npc _schoolClassEvent.teacherId>><</npc>> chuckles as he replies "Of course four plus two is six, but are those the number of BOTTLE CAPS they have? The correct answer is no. Anna has four bottle caps and Dina has two PEBBLES, not bottle caps. You need to pay better attention to the actual question." Some of the other boys begin laughing at Arkadi while some of the girls giggle.</p>
					<<npc _schoolClassEvent.teacherId>><</npc>> continues. "Do not let the numbers fool you. Understanding the question is the most important part of answering it. Now I'm going to hand out some sheets with multiple choice questions and all of you will have 10 minutes to answer each one." He reaches for some papers and begins handing them out while Arkadi crosses his arms, trying to ignore some of the others laughing at him.
				<<or>>
					<p>A few students raise their hands and <<npc _schoolClassEvent.teacherId>><</npc>> points to Natalia, who answers "The answer is four because Anna is the only one with bottle caps. Dina only has pebbles, which might as well not be mentioned as it does not pertain to the answer needed." <<npc _schoolClassEvent.teacherId>><</npc>> tilts his head in surprise at Natalia's answer while <<npc 'A18'>><</npc>> whispers to one of the other girls. "Wow, she is really smart. Is she studying to be a teacher or something?"</p>
					<<npc _schoolClassEvent.teacherId>><</npc>> nods his head then responds. "Precisely. The involvement of Dina was only to deceive the one answering the question, which is why it is referred to as a ''trick question''. Now I would like to see who was paying attention and who was dozing off. I will be handing out some sheets with multiple choice questions and all of you will have 10 minutes to answer each one." He reaches for some papers on his desk and begins handing them out.
				<</either>>
			<<or>>
				<p>You take a few seconds to sit down and get yourself settled in when <<npc _schoolClassEvent.teacherId>><</npc>> stands up to begin today's lesson. "Math determines many important aspects of daily life. For example, you need math to determine the current date and time. If today is the 17th, then tomorrow will be the 18th. How do I know that? Seventeen plus one equals eighteen. Time is no different and some countries have different ways of displaying time. For example, some display time in 12 hour increments, showing 17:00 as 5pm."</p>
				<<either ($npc('A189').grupTipe == 4 ? 1 : 0)>>
					<<if getvar("$NikoPayback") > 0>>
						<<set $mathNikoimg = 'images/characters/pavlovsk/school/boy/niko/nikomisc/avatars/week.jpg'>>
					<<else>>
						<<set $mathNikoimg = 'images/characters/pavlovsk/school/boy/niko/nikoev/avatars/week.jpg'>>
					<</if>>
					<p><<npc _schoolClassEvent.teacherId>><</npc>> pauses and turns to the door as Niko casually strolls in. <<npc _schoolClassEvent.teacherId>><</npc>> crosses his arms. "Late again I see. What is the reason for it this time?" Niko takes a second to collect his thoughts.</p>
					<<set $mathNikoimg to null>>
					<<either>>
						<p>"I was on my way to class when this crazy old lady began shouting at me, so I asked her what was wrong. She told me that I stepped on her dress when I was nowhere near her. She created a big scene and I had to deal with that, which is why I'm late." <<npc _schoolClassEvent.teacherId>><</npc>> sighs and shakes his head. "So an old woman screamed at you and created a big scene because you stepped on her dress, which you didn't actually step on? Do I have that right?"</p>
						<p>Niko shrugs and continues walking toward his seat while <<npc _schoolClassEvent.teacherId>><</npc>> says "Fine, but try not to anger any more old ladies, will you?" Niko uses his thumb to point to <<npc 'A18'>><</npc>> as he jokingly replies "I can't control when <<npc 'A18'>><</npc>> gets angry at me." <<npc 'A18'>><</npc>> recoils, obviously caught off guard and offended by his comment. She lifts her fist and punches Niko several times in the arm before <<npc _schoolClassEvent.teacherId>><</npc>> breaks it up with a stern voice. "Hey, knock it off you two! Niko, sit down before I send you to the principal's office!"</p>
						<p>Niko casually sits down while rubbing his arm and opens his mouth to speak, only to get cut off by <<npc _schoolClassEvent.teacherId>><</npc>>. "Not another word! Alright, let's get back to the lesson, unless someone would like to visit the principal's office instead?" He looks at Niko, who shakes his head, and the class remains silent as <<npc _schoolClassEvent.teacherId>><</npc>> begins handing out worksheets. He's obviously not in a good mood.</p>
					<<or>>
						<p>"While I was on my way to class, some braindead bimbo spilled her coffee on my uniform, so I had to head back home to clean up. You wouldn't want me to arrive covered in coffee, right?" <<npc _schoolClassEvent.teacherId>><</npc>> sighs before responding. "So you couldn't run home and change your shirt before the start of class?"</p>
						"Well I had to clean the coffee from my hair as well as restyle it and that takes time," Niko replies.
						<p><<npc 'A18'>><</npc>> chimes in. "Why even bother washing the coffee off? You always look like a greasy punk anyway."</p>
						Niko leans toward <<npc 'A18'>><</npc>> and says "You don't have to play hard to get. If you want my attention, then you need only ask."
						<p>"I should tell you that I've been looking for a handsome, strong and sexy man in my life..." she whispers in a seductive tone. "Oh yeah?" Niko whispers in reply.</p>
						<p>"That's why I have no interest in dating losers like you!" she laughs in his face and he clenches his fist before walking to his seat.</p>
						<p>"Are you two love birds done? Can we begin the lesson now?" <<npc _schoolClassEvent.teacherId>><</npc>> interrupts and <<npc 'A18'>><</npc>> continues laughing as Niko remains silent, obviously upset. <<npc _schoolClassEvent.teacherId>><</npc>> begins handing out some worksheets to the class. As he hands Niko a sheet, he quips "Try to leave earlier so that you can arrive here on time. It's not hard."</p>
					<<or>>
						"There must have been a power outage in my house this morning because my alarm wasn''t working."
						<<npc _schoolClassEvent.teacherId>><</npc>> looks at him with an intrigued look. "Strange, I haven''t heard about any power outages this morning."
						Niko shrugs as he responds. "It might be a faulty wire in my house or something."
						<p><<npc _schoolClassEvent.teacherId>><</npc>> crosses his arms. "Why do all these things seem to happen to you before my class?"</p>
						<p>Niko shrugs again before saying "I guess I'm just unlucky." Igor scoffs before adding "Don't you ever get tired of lying? You're really bad at it."</p>
						<p>Niko turns to Igor and quickly approaches him before grabbing onto his collar. "You have something to say to me, faggot? I'll knock your teeth out!" Igor leans back with a frightful look on his face as he replies "No, no I didn't... I'm sorry, I'm sorry."</p>
						<p><<npc _schoolClassEvent.teacherId>><</npc>> slams a textbook on his desk before shouting "Nikolai! Knock it off and either get in your seat or go to the principal's office!" Niko slightly lunges forward to trick Igor into thinking that he will punch him, which ends up working. Igor pulls back and covers his face with his arms as Niko chuckles before walking to his seat. "Enough interruptions, let us begin today's lesson. I hope you've all been studying because today's lesson will have many tough questions for you to answer." <<npc _schoolClassEvent.teacherId>><</npc>> says as he begins handing out some worksheets to the class.</p>
					<</either>>
				<<or>>
					<p>Dimka scoffs as he says "Why would they do that? That sounds stupid to me."</p>
					<p><<npc _schoolClassEvent.teacherId>><</npc>> chuckles. "Ahh Dmitri, it was nice of you to raise your hand and volunteer to answer my next question." Dimka facepalms as <<npc _schoolClassEvent.teacherId>><</npc>> continues. "If the current time is 4am and you have a dentist appointment at 2pm, then how long do you have to wait until your dentist appointment begins? Remember that you need to calculate the numbers while keeping the 12 hour timezones in mind."</p>
					<p>"If it is really 4am, then I would probably go to sleep and figure it out in the morning." Many of the students, along with <<npc _schoolClassEvent.teacherId>><</npc>>, begin laughing. "That wasn't exactly the answer I was looking for, but I can forgive it. The answer for that question was ten hours." He grabs a piece of chalk and begins writing on the chalkboard; "A simple way of figuring it out is by looking at the arrival time. The time for arriving is 2pm, which means that it is two hours after twelve.</p>
					Those added together equals fourteen. Lastly, we need to subtract the current time from this to eliminate the time already passed. Fourteen minus four equals ten, giving us our answer."
					"Yeah that's... real simple." Dimka sarcastically replies and Igor laughs as <<npc _schoolClassEvent.teacherId>><</npc>> responds with a smirk on his face. "With practice it will be. Speaking of which, I will begin handing out some simple problems for you to solve." He reaches for some papers on his desk and begins handing them out.
				<</either>>
			<<or>>
				<p>You walk into the classroom and sit at your desk just as <<npc _schoolClassEvent.teacherId>><</npc>> gets up to begin today's lesson. "Alright, I would like to know how much you all know of numbers. Can anyone tell me what the smallest number in existence? is"</p>
				<<either>>
					<<npc 'A18'>><</npc>> raises her hand and <<npc _schoolClassEvent.teacherId>><</npc>> points to her. "Miss <<=$npc('A18').lastname>>."
					<p>"Isn't the smallest number the size of <<npc 'A4'>><</npc>>'s dick?" she answers and <<npc 'A4'>><</npc>> recoils in shock as <<npc _schoolClassEvent.teacherId>><</npc>>, with a stern look on his face, responds "No that is not the answer and I would appreciate it if you would take this question seriously.</p>
				<<or>>
					<p>Natasha raises her hand and says "Isn't that a trick question? Numbers have no ending point, so finding the lowest number shouldn't be possible."</p>
					<<npc _schoolClassEvent.teacherId>><</npc>> nods his head approvingly before responding. "That is correct. Numbers are without end, so finding a lowest point is impossible."
				<<or>>
					<p>No one raises their hand, so <<npc _schoolClassEvent.teacherId>><</npc>> points out Igor, who looks around the room in confusion before saying "Uhh, it's negative infinity right?" <<npc _schoolClassEvent.teacherId>><</npc>> shakes his head. "Is infinity a number?"</p>
					<p>"Um I guess so... Right?" Igor asks sheepishly.</p>
					"No, it is not. Infinity is a never ending stream sequence of numbers, not a singular number." <<npc _schoolClassEvent.teacherId>><</npc>> replies.
				<</either>>
				The smallest number in existence is... nothing. There is no smallest number. Numbers can go beyond negative in an infinite cycle and infinity has no bottom point, so finding the smallest number is an impossibility during an infinite cycle. I will be handing out some worksheet with negative and positive number problems. Try to answer as many as possible in the next 15 minutes." He then begins handing out worksheets to the class.
			<</either>>

	<<case 'askQuestion'>>
		<<image "locations/pavlovsk/school/classroom/class1.jpg">>
		<p>
			You take a second to ask a question about a part of the lesson that you don't fully understand.
			<<npc _schoolClassEvent.teacherId>><</npc>> nods approvingly then says
			"Sure thing, we can go over the solution again and I will show you the many ways that you can find the solution to these problems."
			He happily spends some time explaining the topic in greater detail and answers any questions you might have,
			teaching you some new ways of solving many problems in the process.
		</p>
	<<case 'daydream'>>
		<<actCLA 'Daydream'>>
			<<either (getvar("$VKHappyHome") < 2 and getvar("$VKPuppetDream") == 0) ? 2 : 0>>
				<<gt 'NikoDreams' 'Puppeteer'>>
			<<or 6>>
				<<image "characters/pavlovsk/school/boy/niko/nikomisc/nightmares/class/rest.jpg">>
				<p>You can feel the day dragging on slowly, so you rest your head on the desk, trying your best to focus on anything but today's lesson. The light occasionally creeps in between your arms, so you keep re-adjusting until it stops, causing you to feel at peace as you slumber through the lesson.</p>
				<<actCLA 'Wake up'>>
					<<image "characters/pavlovsk/school/boy/niko/nikomisc/nightmares/class/leave.jpg">>
					You awaken to the bell ringing, signaling the end of the class. You immediately see your other classmates getting up to leave the class as you collect your things to join them.
					<<actCLA 'Leave class'>><<gs 'school_schedule'>><</actCLA>>
				<</actCLA>>
			<<or 6>>
				<<set $VKrand = rand(1,3)>>
				<<image "locations/pavlovsk/school/classroom/sleeping.jpg">>
				You're far too tired to pay attention in class today. You don't even know what the lesson is about as you continuously doze off. After what feels like a few seconds, you suddenly hear <<npc _schoolClassEvent.teacherId>><</npc>> call your name. Everyone''s eyes are on you. "I asked you for the answer to my question," <<npc _schoolClassEvent.teacherId>><</npc>> tells you.
				<<if (getvar("$VKrand") == 1 and $npc('A2').rel >= 80) or (getvar("$VKrand") == 1 and $quest('school').func('isGroupMember','nerds'))>>
					<p>You nervously look around the room, not knowing what the question was when you faintly hear "Psst!" You look at Artem and see him holding up a paper scrap behind his seat which has the answer written out. You confidently look toward <<npc _schoolClassEvent.teacherId>><</npc>> before telling him the correct answer, resulting in a surprised look on his face before he says "Hmm. Very good, but do try to keep your head up during class, okay?" You give him a nod before he continues his lesson.</p>
				<<elseif (getvar("$VKrand") == 2 and $npc('A12').rel >= 80) or (getvar("$VKrand") == 2 and $quest('school').func('isGroupMember','nerds'))>>
					<p>You nervously look around the room, not knowing what the question was when you hear Natalia ask <<npc _schoolClassEvent.teacherId>><</npc>> "Why was the problem structured like that? I thought that finding X came after finding Y?" <<npc _schoolClassEvent.teacherId>><</npc>> turns to Natalia and says "There is no order in which one we find first. I just used the one earlier in the equation. You can always choose the one that you solve as long as you end up solving both before reaching the second half of the problem."</p>
					Natalia nods with a smile as <<npc _schoolClassEvent.teacherId>><</npc>> turns around and continues his lesson, completely forgetting about you. Natalia turns to you with a warm smile then turns back toward <<npc _schoolClassEvent.teacherId>><</npc>> for the rest of the class.
				<<elseif getvar("$VKrand") == 3 and getvar("$NikoLuv") >= 2 and $npc('A189').grupTipe == 4>>
					<<video "locations/pavlovsk/school/classroom/crash.mp4">>
					<p>You nervously look around the room, not knowing what the question was when you suddenly hear Evgeny let out a yelp as his chair is pulled out from under him, causing him to fall to the ground. <<npc _schoolClassEvent.teacherId>><</npc>> recoils in shock before suddenly shouting "NIKOLAI! WHAT HAS GOTTEN INTO YOU!?" Niko and most of the class are laughing loudly as <<npc _schoolClassEvent.teacherId>><</npc>> shouts out "NIKOLAI GO TO THE PRINCIPAL'S OFFICE NOW!" Niko packs his stuff in his bag and heads toward the door, giving you a wink as he passes by.</p>
				<<elseif getvar("$class['school_math_grade']") >= 80>>
					You nervously look around the room, not knowing what the question was. You pretend to clear your throat while you quickly study the equation on the board, then quickly solve the problem in your head before answering the question correctly. <<npc _schoolClassEvent.teacherId>><</npc>> gives you a satisfied nod before responding "Very good, but try and keep your head up during class, if you don't mind."
				<<else>>
					<h2>Math Class</h2>
					<<image "characters/shared/headshots_main/big26.jpg">>
					You're feeling far too tired to pay attention in class today. You don't even know what the lesson is about as you continuously doze off. After what feels like a few minutes, you suddenly hear <<npc _schoolClassEvent.teacherId>><</npc>> call your name. Everyone''s eyes are on you and you realize that you were just asked a question about the topic.
					<p>You take your best guess at what <<npc _schoolClassEvent.teacherId>><</npc>> was asking and some of your classmates snicker at your obviously wrong answer as <<npc _schoolClassEvent.teacherId>><</npc>> says "Sleeping in class, huh? You're never going to get anywhere in life that way, unless you end up working as a politician."</p>
					He then chuckles to himself before saying "Just try to stay awake this time." Before continuing his lesson, he asks for someone else to inform you of the correct answer. You still feel embarrassed, but the sudden adrenaline surge helps you to stay awake for the rest of the lesson.
					<<act 'Wait for the end of the lesson'>>
						<<gt 'gschool_lessonsev2' 'math'>>
					<</act>>
				<</if>>
				<<act 'Wait for the end of the lesson'>>
					<<gt 'gschool_lessonsev2' 'math'>>
				<</act>>
			<<or 6>>
				<<image "locations/pavlovsk/school/classroom/caughtsleeping.jpg">>
				<p>Today's lesson doesn't particularly interest you and you find yourself drifting off constantly. After a while, you notice that <<npc _schoolClassEvent.teacherId>><</npc>> has paused his lesson and is giving you a stern look. "Miss $pc.name_last, maybe you would like to explain what I have just went over?" You give him a puzzled look while trying to figure out what to say. You feel embarrassed having the class stare at you.</p>
				<<actCLA 'Reluctantly pay attention'>>
					<<run $quest('school').func('class_activity_attributes','math' $pc.skillLevel("intelligence"))>>
					<<image "locations/pavlovsk/school/bathroom/angryteacher.jpg">>
					<p><<npc _schoolClassEvent.teacherId>><</npc>> sighs. "You don't know do you? Then at least try to pay attention. Many things that we need in life require some effort from us all. It's not always fun, but some of the things we learn make life easier in the future, leading to even more pleasant times." Not knowing what to say, you simply nod as he turns around and continues his lesson. You sit through the rest of the lesson in silence while your mind drifts elsewhere. You can't focus on the lesson at all.</p>
					<<act 'Wait for the end of the lesson'>>
						<<gt 'gschool_lessonsev2' 'math'>>
					<</act>>
				<</actCLA>>
				<<actCLA 'Give him an attitude' undefined `{willpower:['misc','self','medium']}`>>
					<<set $demerit += 5>>
					<<run $quest('school').func('groupRelInc','cool',1)>>
					<<run $quest('school').func('groupRelInc','gopniks',2)>>
					<<run $quest('school').func('groupRelInc','nerds',-1)>>
					<<image "locations/pavlovsk/school/classroom/kickedout.jpg">>
					<p>"Of course. Please continue your super-fascinating lesson. Just keep it a bit upbeat please. If you talk any slower, I might fall asleep!" you answer boldly.</p>
					<p>The whole class bursts into laughter and <<npc _schoolClassEvent.teacherId>><</npc>> has a rough time getting everyone to quiet down. "Miss $pc.name_last, do you find this kind of behavior amusing? Or are you just seeking attention? Try to answer this question for yourself while you head to the principal's office." He then points to the door.</p>
					<<actCLA 'Don`t leave the classroom' undefined `{willpower:['misc','self','medium']}`>>
						<<set $demerit += 5>>
						<<run $quest('school').func('groupRelInc','gopniks',1)>>
						<<run $quest('school').func('groupRelInc','nerds',-2)>>
						<<image "locations/pavlovsk/school/classroom/bitchflip.jpg">>
						<p>"What good would that do? I'm not interrupting your class, so just leave me alone. I'm having some... girl problems," you answer brashly, not having any intentions of getting up. <<npc _schoolClassEvent.teacherId>><</npc>> sighs and shakes his head. "If you're having some personal issues, then I won't punish you for that, but do try to pay attention if you can. I'm only trying to prepare you all for the future."</p>
						You remain silent as <<npc _schoolClassEvent.teacherId>><</npc>> turns around and continues his lesson. You obviously have no interest in learning anything today. You hear one of the boys behind you mutter "It must be that time of the month..." You turn around to flip him off.
						<<actCLA 'Wait for the end of the lesson'>><<gs 'school_schedule'>><</actCLA>>
					<</actCLA>>

					<<actCLA 'Go to principal`s office'>>
						<<set $demerit += 10 + $school_bunk * 5>> <<gt 'gschool_office' 'principal'>>
					<</actCLA>>
				<</actCLA>>
			<</either>>
		<</actCLA>>
	<<default>>
		<p>
			Placeholder $location_var[$here][0]
		</p>

<</switch>>
