123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- # havana_crossfit_funcs
- !! set up wods
- if $ARGS[0] = 'setup_wod':
- killvar '$crossfit_wods'
- killvar 'wod_min_score'
- killvar 'wod_max_score'
- killvar '$wod_type'
- killvar '$wod_video'
- gs 'havana_crossfit_funcs', 'add_wod', 'Fran', 120, 600, 'for_time', 'pullup'
- gs 'havana_crossfit_funcs', 'add_wod', 'Nancy', 600, 1200, 'for_time', 'ohs'
- gs 'havana_crossfit_funcs', 'add_wod', 'Isabel', 90, 600, 'for_time', 'snatch'
- gs 'havana_crossfit_funcs', 'add_wod', 'Open 17.1', 600, 1200, 'for_time', 'dumbbell_snatch'
- gs 'havana_crossfit_funcs', 'add_wod', 'Open 16.1', 1300, 100, 'for_rounds', 'overhead_lunge'
- gs 'havana_crossfit_funcs', 'add_wod', 'Karen', 300, 720, 'for_time', 'wallball'
- end
- if $ARGS[0] = 'Fran':
- '- Thruster 65 lbs'
- '- Pull-ups'
- '21-15-9 repetitions each, for time'
- end
- if $ARGS[0] = 'Nancy':
- '- 400 meter run'
- '- Overhead squat 65 lbs x 15'
- '5 rounds for time'
- end
- if $ARGS[0] = 'Isabel':
- '- Snatch 95 pounds'
- '30 repetitions for time'
- end
- if $ARGS[0] = 'Open 17.1':
- ' - 10 dumbbell snatches'
- ' - 15 burpee box jump-overs'
- ' - 20 dumbbell snatches'
- ' - 15 burpee box jump-overs'
- ' - 30 dumbbell snatches'
- ' - 15 burpee box jump-overs'
- ' - 40 dumbbell snatches'
- ' - 15 burpee box jump-overs'
- ' - 50 dumbbell snatches'
- ' - 15 burpee box jump-overs'
- 'For time'
- end
- if $ARGS[0] = 'Open 16.1':
- ' - 25-ft. overhead walking lunge'
- ' - 8 burpees'
- ' - 25-ft. overhead walking lunge'
- ' - 8 chest-to-bar pull-ups'
- 'Complete as many rounds and reps as possible in 20 minutes'
- end
- if $ARGS[0] = 'Karen':
- '- 150 wallball shots'
- 'For time'
- end
- if $ARGS[0] = 'add_wod':
- $crossfit_wods[] = $ARGS[1]
- wod_min_score[$ARGS[1]] = ARGS[2]
- wod_max_score[$ARGS[1]] = ARGS[3]
- $wod_type[$ARGS[1]] = $ARGS[4]
- $wod_video[$ARGS[1]] = $ARGS[5]
- end
- if $ARGS[0] = 'recordstring':
- if ARGS[2] = 0:
- $result = 'No score yet'
- else
- wod_score = wod_min_score[$ARGS[1]] + (wod_max_score[$ARGS[1]] - wod_min_score[$ARGS[1]]) * ARGS[2] / 100
- if $wod_type[$ARGS[1]] = 'for_time':
- $result = '<<wod_score/60>> minutes and <<wod_score - (wod_score/60)*60>> seconds'
- end
- if $wod_type[$ARGS[1]] = 'for_rounds':
- $result = '<<wod_score/100>> rounds and <<wod_score - (wod_score/100)*100>>% of the last one'
- end
- end
- end
- if $ARGS[0] = 'update_box_records':
- if last_box_record_update = 0 or last_box_record_update + 30 < daystart:
- number_of_box_record_updates = 30
- else
- number_of_box_record_updates = daystart - last_box_record_update
- end
- last_box_record_update = daystart
- current_record_update_count = 0
- :recordupdateloop
- if current_record_update_count < number_of_box_record_updates:
- gs 'havana_crossfit_funcs', 'box_records'
- current_record_update_count += 1
- jump 'recordupdateloop'
- end
- killvar 'current_record_update_count'
- killvar 'number_of_box_record_updates'
- end
- if $ARGS[0] = 'box_records':
- crossfit_record_it = 0
- :recordgeneratorloop
- if crossfit_record_it < arrsize('$crossfit_wods'):
- $crossfit_wod = $crossfit_wods[crossfit_record_it]
- new_record_wod_time = max(1, (100 - (100 * (rand(40,100) + rand(0,100) + rand(0,100) + rand(0,100)) / 400)))
- if box_wod_record[$crossfit_wod] = 0 or box_wod_record[$crossfit_wod] > new_record_wod_time:
- box_wod_record[$crossfit_wod] = new_record_wod_time
- !! record holder changes only in 1/3rd of the cases from previous holder, or if sveta is record holder
- if rand(0, 2) = 0 OR $box_wod_record_holder[$crossfit_wod] = '' OR $box_wod_record_holder[$crossfit_wod] = $pcs_nickname:
- gs 'npcrnamefile', 'rusFemale'
- $box_wod_record_holder[$crossfit_wod] = $npctempgn[1]
- end
- end
- crossfit_record_it += 1
- jump 'recordgeneratorloop'
- end
- killvar 'crossfit_record_it'
- killvar 'new_record_wod_time'
- killvar '$crossfit_wod'
- end
- --- havana_crossfit_funcs ---------------------------------
|