# beg1

if $ARGS[0] = 'start':
    *clr & cla
    menu_off = 1
    gs 'stat'
    minut += 60
    kolsorev += 1
    razdtumbler = 0
    begmon = month
    begminus = 0

    if razradbeg = 0:
        'You''re registered for an amateur''s race. The results will determine if you join the club''s junior squad and entry in the semi-professional runner circuit.'

        act 'Go to the track field.':gt 'beg1', 'br'
    elseif razradbeg = 1:
        'As a member of your club''s junior squad, you''re registered for a semi-professional''s race. The results will determine if you join the veteran squad.'

        act 'Go to the track field.':gt 'beg1', 'kms'
    elseif razradbeg = 2:
        'As a member of your club''s veteran squad, you''re registered for a semi-professional''s race. The results will determine your entry in the professional runner circuit.'

        act 'Go to the track field.':gt 'beg1', 'ross'
    elseif razradbeg >= 3 and razradbeg < 14:
        'As one of your club''s best athletes, you can take part in a series of qualifying races in the professional circuit. Winning 9 out of 11 would qualify you for the St. Petersburg Track Championship, that is celebrated seasonally.'
        nl
        'Qualifying Races Attended: <<razradbeg - 3>>' 
        'Qualifying Races Won: <<razradbegK>>'

        act 'Go to the stadium':gt 'beg1', 'kval'
    elseif razradbeg = 14 and razradbegK < 9:
        cla
        razradbegK = 0
        razradbeg = 3
        'You were unable to qualify for the St. Petersburg Championship.'

        ! WD: Argument is 'dressing room'
        act 'Go back to the dressing room':gt 'fit', 'dressing room'
    elseif razradbeg = 14 and razradbegK >= 9:
        cla
        razradbegK = 0
        razradbeg = 3
        'You qualified for the <<year>> St. Petersburg Track Championship, taking place this season in the Petrovsky Stadium.'

        act 'Go to the stadium':gt 'beg1', 'evro'
    end
end

if $ARGS[0] = 'br':
    cla
    run_exp += 1
    fat -= 2
    gs 'sweat', 'add', 30
    pcs_stam -= 30
    
    begminus = 0
    if bmi_calc > 25: 
        begminus = ((bmi_calc - 25)*4)
    elseif bmi_calc < 18:
        begminus = ((25 - bmi_calc)*6)
    end
    begresult = pcs_run - begminus
    
    '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/race/begsor.jpg"></center>'
    'Your discipline: The Women''s 400 Meter Dash.' 
    'After changing into your running gear, you spend some time warming up near the track before the race starts. Beyond some casual bystanders and encouraging familiars, no spectators are attending this competition.' 
    'When you and the other runners are called, you walk to your starting position, tense but ready.' 
    wait 725
    'You get in position. Then, you hear the starting shot: The race begins!'
    wait 725
    'On your marks...'
    wait 725
    'Get set...'
    wait 725
    'Go! - You''re away!'
    wait 725
    
    if begresult < 5:  
        'Sadly, you barely managed to reach the finish line, walking the last 100 meters. Of course, you came in last - but you also made a bit of a fool of yourself.'
    elseif begresult < 10:
        'You performed well for an amateur but still only came in last (8th place).'
    elseif begresult < 15:
        'You fought hard, but managed to only take the penultimate place (7th place).'
    elseif begresult < 20:
        'You fought hard, but only managed to take 6th place.'
    elseif begresult < 35:
        'You fought hard, but only managed to take 5th place.'
    elseif begresult < 40:
        'You fought hard, but only managed to take 4th place.'
    elseif begresult < 45:
        gs 'fame', 'city', 'running', 1
        bronzebeg += 1 & money += 150 & 'You fought hard and managed to take 3rd place, earning a prize: You receive a bronze badge and a prize of 150 <b>₽</b>'
    elseif begresult < 50:
        gs 'fame', 'city', 'running', rand(1,2)
        silverbeg += 1 & money += 300 & 'You fought hard and managed to take 2nd place, earning a prize: You receive a silver badge and a prize of 300 <b>₽</b>'
    else
        gs 'fame', 'city', 'running', rand(1,3)
        razradbeg = 1 & goldbeg += 1 & money += 600 & 'You fought hard and managed to take 1st place! You receive a gold badge, a prize of 600 <b>₽</b> and are now part of your club''s junior squad, performing at the semi-professional level.'
    end
    
    act 'Leave':gt 'fit', 'dressing room'
end

if $ARGS[0] = 'kms':
    cla
    run_exp += 1
    fat -= 2
    gs 'sweat', 'add', 30
    pcs_stam -= 30
    
    begminus = 0
    if bmi_calc > 25: 
        begminus = ((bmi_calc - 25)*4)
    elseif bmi_calc < 18:
        begminus = ((25 - bmi_calc)*6)
    end
    begresult = pcs_run - begminus
    
    '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/race/begsor.jpg"></center>'
    'Your discipline: The Women''s 400 Meter Dash.' 
    'After changing into your running gear, you spend some time warming up near the track before the race starts. Beyond the encouraging familiars, now, you appreciate some genuinely interested spectators, some with cameras, but, even with that, no more than a hundred spectators are attending this competition. The track field is far from full.' 
    'When you and the other runners are called, you walk to your starting position, tense but ready.' 
    wait 725
    'You get in position. Then, you hear the starting shot: The race begins!'
    wait 725
    'On your marks...'
    wait 725
    'Get set...'
    wait 725
    'Go! - You''re away!'
    wait 725

    if begresult < 20:
        razradbeg = 0 & 'But you barely managed to reach the finish line, walking the last 100 meters. Of course, you came in last - but you also made of a fool of yourself. People on the ranks seem to be asking themselves how you even managed to make it this far. Maybe they are right? Your performance is so atrocious that the coach decides to return you to the amateur rank.'
    elseif begresult < 25:
        'You fought hard but still have a lot of work ahead of you if you want to be better than your competition. You didn''t manage to reach any classification.'
    elseif begresult < 30:
        'You fought hard but still have a lot of work ahead of you if you want to be better than your competition. You only came in last (8th place).'
    elseif begresult < 35:
        'You fought hard, but managed to only take the penultimate place (7th place).'
    elseif begresult < 40:
        'You fought hard, but only managed to take 6th place.'
    elseif begresult < 45:
        'You fought hard, but only managed to take 5th place.'
    elseif begresult < 50:
        gs 'fame', 'city', 'running', 1
        'You fought hard, but only managed to take 4th place.'
    elseif begresult < 55:
        gs 'fame', 'city', 'running', rand(1,2)
        bronzebeg += 1 & money += 300 & 'You fought hard and managed to take 3rd place, earning a prize: You get a bronze medal and a prize of 300 <b>₽</b>'
    elseif begresult < 60:
        gs 'fame', 'city', 'running', rand(1,3)
        silverbeg += 1 & money += 600 & 'You fought hard and managed to take 2nd place, earning a prize: You get a silver medal and a prize of 600 <b>₽</b>'
    else
        gs 'fame', 'city', 'running', rand(1,4)
        razradbeg = 3 & goldbeg += 1 & money += 1000 & 'You fought hard and managed to take 1st place! You get a gold medal, a prize of 1,000 <b>₽</b> and are now part of your club''s veteran squad, performing at the semi-professional level.'
    end
    act 'Leave':gt 'fit', 'dressing room'
end

if $ARGS[0] = 'ross':
    cla
    run_exp += 1
    fat -= 2
    gs 'sweat', 'add', 30
    pcs_stam -= 30
    
    begminus = 0
    if bmi_calc > 25: 
        begminus = ((bmi_calc - 25)*4)
    elseif bmi_calc < 18:
        begminus = ((25 - bmi_calc)*6)
    end
    begresult = pcs_run - begminus
    
    '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/race/begsor.jpg"></center>'
    'Your discipline: The Women''s 400 Meter Dash.' 
    'After changing into your running gear, you spend some time warming up near the track before the race starts. Familiars, the club''s fans, track''s lovers and students on a school trip, fill the place. You even see some photo journalists. All of them showing genuine interest in this competition. A gross appraisal put the spectators'' numbers in several hundred attending this competition. The track field is in full occupation.' 
    'When you and the other runners are called, you walk to your starting position, tense but ready.' 
    wait 725
    'You get in position. Then, you hear the starting shot: The race begins!'
    wait 725
    'On your marks...'
    wait 725
    'Get set...'
    wait 725
    'Go! - You''re away!'
    wait 725

    if begresult < 30:
        razradbeg = 1 & 'But you barely managed to reach the finish line, walking the last 100 meters. Of course, you came in last - but you also made of a fool of yourself. People on the ranks seem to be asking themselves how you even managed to make it this far. Maybe they are right? Your performance is so atrocious that the coach decides to return you to the junior rank.'
    elseif begresult < 35:
        'You fought hard but still have a lot of work ahead of you if you want to be better than your competition. You didn''t manage to reach any classification.'
    elseif begresult < 40:
        'You fought hard but still have a lot of work ahead of you if you want to be better than your competition. You only came in last (8th place).'
    elseif begresult < 45:
        'You fought hard, but managed to only take the penultimate place (7th place).'
    elseif begresult < 50:
        'You fought hard, but only managed to take 6th place.'
    elseif begresult < 55:
        gs 'fame', 'city', 'running', 1
        'You fought hard, but only managed to take 5th place.'
    elseif begresult < 60:
        gs 'fame', 'city', 'running', rand(1,2)
        'You fought hard, but only managed to take 4th place.'
    elseif begresult < 65:
        gs 'fame', 'city', 'running', rand(1,3)
        bronzebeg += 1 & money += 600 & 'You fought hard and managed to take 3rd place, earning a prize: You get a bronze medal and a prize of 600 <b>₽</b>'
    elseif begresult < 70:
        gs 'fame', 'city', 'running', rand(1,4)
        silverbeg += 1 & money += 1000 & 'You fought hard and managed to take 2nd place, earning a prize: You get a silver medal and a prize of 1,000 <b>₽</b>'
    else
        gs 'fame', 'city', 'running', rand(1,5)
        razradbeg = 3 & goldbeg += 1 & money += 1500 & 'You fought hard and managed to take 1st place! You get a gold medal, a prize of 1,500 <b>₽</b> and gain entry to the professional circuit.'
    end
    act 'Leave':gt 'fit', 'dressing room'
end

if $ARGS[0] = 'kval':
    cla
    run_exp += 1
    fat -= 2
    gs 'sweat', 'add', 30
    pcs_stam -= 30
    razradbeg += 1
    minut += 60
    
    begminus = 0
    if bmi_calc > 25: 
        begminus = ((bmi_calc - 25)*4)
    elseif bmi_calc < 18:
        begminus = ((25 - bmi_calc)*6)
    end
    begresult = pcs_run - begminus
    
    '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/race/begsor.jpg"></center>'
    'Your discipline: The Women''s 400 Meter Dash.'  
    'At the professional level, your club takes you, to the Petrovsky Stadium. After changing into your running gear, you spend some time warming up before the race starts and observe the current attendance. Now, this is what you call a spectacle. Thousands of people, come to see the race, including photo journalists, TV crews and all class of sports enthusiasts. Even with that, the stadium is far from full, with maybe a quarter capacity, that is around 5000 spectators.'
!! Took the Krestovsky Stadium for reference. !!THX note. the  Krestovsky Stadium is football-only. Better use the Petrovsky Stadium(20000), have track fields.
    'When you and the other runners are called, you walk to your starting position, tense but ready.' 
    wait 725
    'You get in position. Then, you hear the starting shot: The race begins!'
    wait 725
    'On your marks...'
    wait 725
    'Get set...'
    wait 725
    'Go! - You''re away!'
    wait 725

    if begresult < 40:
        razradbeg = 2 & razradbegK = 0 & 'But you barely managed to reach the finish line, walking the last 100 meters. Of course, you came in last - but you also made of a fool of yourself. People on the ranks seem to be asking themselves how you even managed to make it this far. Maybe they are right? Your performance is so atrocious that the coach decides to return you to the semi-professional rank.'
    elseif begresult < 45:
        'You fought hard but still have a lot of work ahead of you if you want to be better than your competition. You didn''t manage to reach any classification.'
    elseif begresult < 50:
        'You fought hard but still have a lot of work ahead of you if you want to be better than your competition. You only came in last (8th place).'
    elseif begresult < 55:
        'You fought hard, but managed to only take the penultimate place (7th place).'
    elseif begresult < 60:
        gs 'fame', 'city', 'running', 1
        'You fought hard, but only managed to take 6th place.'
    elseif begresult < 65:
        gs 'fame', 'city', 'running', rand(1,2)
        'You fought hard, but only managed to take 5th place.'
    elseif begresult < 70:
        gs 'fame', 'city', 'running', rand(1,3)
        'You fought hard, but only managed to take 4th place.'
    elseif begresult < 75:
        gs 'fame', 'city', 'running', rand(1,4)
        gs 'fame', 'pav', 'running', 1
        razradbegK += 1 & bronzebeg += 1 & money += 1000 & 'You fought hard and managed to take 3rd place, earning a prize. You get a bronze badge and a prize of 1,000 <b>₽</b>, but sadly, only the 1st place adds to your qualification for the European championship.'
    elseif begresult < 80:
        gs 'fame', 'city', 'running', rand(1,5)
        gs 'fame', 'pav', 'running', rand(1,2)
        razradbegK += 1 & silverbeg += 1 & money += 1500 & 'You fought hard and managed to take 2nd place, earning a prize. You get a silver medal and a prize of 1,500 <b>₽</b>, but sadly, only the 1st place adds to your qualification for the European championship.'
    else
        gs 'fame', 'city', 'running', rand(1,6)
        gs 'fame', 'pav', 'running', rand(1,3)
        razradbegK += 1 & goldbeg += 1 & money += 2000 & 'You fought hard and managed to take 1st place! You get a gold medal, a prize of 2,000 <b>₽</b> and are one step closer to qualifying for the St. Petersburg Championship.'
    end
    act 'Leave':gt 'fit', 'dressing room'
end

if $ARGS[0] = 'evro':
    cla
    run_exp += 1
    fat -= 2
    gs 'sweat', 'add', 30
    pcs_stam -= 30
    minut += 120
    
    begminus = 0
    if bmi_calc > 25: 
        begminus = ((bmi_calc - 25)*4)
    elseif bmi_calc < 18:
        begminus = ((25 - bmi_calc)*6)
    end
    begresult = pcs_run - begminus
    
    '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/race/begsor.jpg"></center>'
    'Your discipline: The Women''s 400 Meter Dash.' 
    'This is the highest competition in the St. Petersburg area. From here, the professional runners, jump to the regional, national and eventually international scene. You will eventually reach those levels, with the possibility to reach the country Olympic Team, but for the moment, it is better if you concentrate on reaching the St. Petersburg Championship.'   
    'After changing into your running gear, you spend some time warming up before the race starts and observe the current attendance. The Petrovsky Stadium''s personnel is in full gear to manage the wave of spectators, journalist, and others that run around. Even with the fact, that track & field don''t attract the same attention level that football, it is evident that this is a great event, with maybe around 10000 spectators.'
    'When you and the other runners are called, you walk to your starting position, tense but ready.' 
    wait 725
    'You get in position. Then, you hear the starting shot: The race begins!'
    wait 725
    'On your marks...'
    wait 725
    'Get set...'
    wait 725
    'Go! - You''re away!'
    wait 725

    if begresult < 50:
        razradbeg = 2 & razradbegK = 0 & 'But you barely managed to reach the finish line, walking the last 100 meters. Of course, you came in last - but you also made of a fool of yourself. People on the ranks seem to be asking themselves how you even managed to make it this far. Maybe they are right? Your performance is so atrocious that the coach decide to return you to the semi-proffessional rank.'
        gs 'fame', 'city', 'running', rand(1,6)
    elseif begresult < 55:
        'You fought hard but still have a lot of work ahead of you if you want to be better than your competition. You didn''t manage to reach any clasification.'    
        gs 'fame', 'city', 'running', rand(1,7)
    elseif begresult < 60:
        gs 'fame', 'city', 'running', rand(1,8)
        gs 'fame', 'pav', 'running', 1
        'You fought hard but still have a lot of work ahead of you if you want to be better than your competition. You only came in last (8th place).'
    elseif begresult < 65:
        gs 'fame', 'city', 'running', rand(1,9)
        gs 'fame', 'pav', 'running', rand(1,2)
        'You fought hard, but managed to only take the penultimate place (7th place).'
    elseif begresult < 70:
        gs 'fame', 'city', 'running', rand(1,10)
        gs 'fame', 'pav', 'running', rand(1,3)
        'You fought hard, but only managed to take 6th place.'
    elseif begresult < 75:
        gs 'fame', 'city', 'running', rand(2,12)
        gs 'fame', 'pav', 'running', rand(1,4)
        'You fought hard, but only managed to take 5th place.'
    elseif begresult < 80:
        gs 'fame', 'city', 'running', rand(3,13)
        'You fought hard, but only managed to take 4th place.'
    elseif begresult < 85:
        gs 'fame', 'city', 'running', rand(4,14)
        gs 'fame', 'pav', 'running', rand(1,5)
        gs 'fame', 'village', 'running', 1
        razradbegEB += 1
        money += 10000
        'You fought hard and managed to take 3rd place, earning a prize. You get a bronze medal and a prize of 10,000 <b>₽</b>'
    elseif begresult < 90:
        gs 'fame', 'city', 'running', rand(5,15)
        gs 'fame', 'pav', 'running', rand(1,6)
        gs 'fame', 'village', 'running', rand(1,2)
        razradbegES += 1
        money += 15000
        'You fought hard and managed to take 2nd place, earning a prize. You get a silver medal and a prize of 15,000 <b>₽</b>'
    else 
        gs 'fame', 'city', 'running', rand(6,16)
        gs 'fame', 'pav', 'running', rand(1,7)
        gs 'fame', 'village', 'running', rand(1,3)
        razradbegEG += 1
        money += 20000
        'You fought hard and managed to take 1st place. You get a gold medal, a prize of 20,000 <b>₽</b> and are now the "St. Petersburg Track Champion"!'
    end

    act 'Leave':gt 'fit', 'dressing room'
end

--- beg1 ---------------------------------

