Randomize point rewarding choices

This commit is contained in:
nutbuster 2022-11-02 12:07:52 +11:00
parent b586e8f4e9
commit dc2abc5494
8 changed files with 116 additions and 120 deletions

View file

@ -20,6 +20,7 @@ init -1 python:
mod_menu_access = [] mod_menu_access = []
init python: init python:
import random import random
import webbrowser import webbrowser
#function for insult layers #function for insult layers
@ -48,6 +49,12 @@ init python:
if persistent.autoup == None: if persistent.autoup == None:
persistent.autoup = False persistent.autoup = False
def randomize_choices(choices):
# fine for size of 2
if (renpy.random.randint(0, 1)):
choices.reverse()
return choices
pass pass
transform randPosition: transform randPosition:

View file

@ -1679,14 +1679,13 @@ label chapter_3:
window auto window auto
pause .5 pause .5
menu: python:
"Speak Up": #menu item text then label to jump into
pause .5 choices = [(_('Speak Up'), '.GuitarQuestionSpeakUp'),
jump .GuitarQuestionSpeakUp (_('Stay Silent'), '.GuitarQuestionStaySilent')]
"Stay Silent": _value = renpy.display_menu(randomize_choices(choices))
pause .5 renpy.pause(0.5)
jump .GuitarQuestionStaySilent renpy.jump(_value)
label .GuitarQuestionSpeakUp: label .GuitarQuestionSpeakUp:

View file

@ -644,13 +644,13 @@ label chapter_4:
pause .5 pause .5
stop music fadeout 5 stop music fadeout 5
menu:
"Heads, ask Fang for help": python:
pause .5 choices = [(_('Heads, ask Fang for help'), '.Heads'),
jump .Heads (_('Tails, leave Fang alone'), '.Tails')]
"Tails, leave Fang alone": _value = renpy.display_menu(randomize_choices(choices))
pause .5 renpy.pause(0.5)
jump .Tails renpy.jump(_value)
label .Heads: label .Heads:

View file

@ -1181,17 +1181,13 @@ label chapter_5:
window auto window auto
pause .5 pause .5
menu: python:
choices = [(_('Explain it to her honestly, she should understand by now'), '.beHonest'),
"Explain it to her honestly, she should understand by now": (_('Joking is a good way to move past mistakes.'), '.jokeAround')]
stop music fadeout 3 _value = renpy.display_menu(randomize_choices(choices))
pause .5 renpy.music.stop(fadeout=3)
jump .beHonest renpy.pause(0.5)
renpy.jump(_value)
"Joking is a good way to move past mistakes.":
stop music fadeout 3
pause .5
jump .jokeAround
label .beHonest: label .beHonest:
@ -3272,12 +3268,16 @@ label chapter_5:
window auto window auto
pause .5 pause .5
menu: python:
"Stay quiet...": choices = [(_('Stay quiet...'), None),
pause .5 (_('Interrupt'), '.interrupt4')]
"Interrupt": choices = randomize_choices(choices)
pause .5 _value = renpy.display_menu(choices)
jump .interrupt4b _tick = 1
renpy.pause(0.5)
if _value != None:
renpy.jump(_value+chr(0x61+_tick))
"Theres a time to speak and a time to listen." "Theres a time to speak and a time to listen."
pause .5 pause .5
@ -3407,12 +3407,12 @@ label chapter_5:
window auto window auto
pause .5 pause .5
menu: python:
"Stay quiet...": _value = renpy.display_menu(choices)
pause .5 _tick += 1
"Interrupt": renpy.pause(0.5)
pause .5 if _value != None:
jump .interrupt4c renpy.jump(_value+chr(0x61+_tick))
$ wingStory = True $ wingStory = True
@ -3496,12 +3496,12 @@ label chapter_5:
window auto window auto
pause .5 pause .5
menu: python:
"Stay quiet...": _value = renpy.display_menu(choices)
pause .5 _tick += 1
"Interrupt": renpy.pause(0.5)
pause .5 if _value != None:
jump .interrupt4d renpy.jump(_value+chr(0x61+_tick))
show fang: show fang:
easein_quart 1 xalign 0.2 easein_quart 1 xalign 0.2
@ -3578,12 +3578,12 @@ label chapter_5:
window auto window auto
pause .5 pause .5
menu: python:
"Stay quiet...": _value = renpy.display_menu(choices)
pause .5 _tick += 1
"Interrupt": renpy.pause(0.5)
pause .5 if _value != None:
jump .interrupt4e renpy.jump(_value+chr(0x61+_tick))
$ fangscore += 1 $ fangscore += 1
$ anonscore += 1 $ anonscore += 1

View file

@ -1696,14 +1696,12 @@ label chapter_6:
window auto window auto
pause .5 pause .5
menu: python:
"Excuse myself": choices = [(_('Excuse myself'), '.AnonExcusesHimself'),
pause .5 (_('Wait for Fang'), '.AnonWaitsForFang')]
jump .AnonExcusesHimself _value = renpy.display_menu(randomize_choices(choices))
"Wait for Fang": renpy.pause(0.5)
pause .5 renpy.jump(_value)
jump .AnonWaitsForFang
label .AnonExcusesHimself: label .AnonExcusesHimself:
@ -2088,13 +2086,12 @@ label chapter_6:
window auto window auto
pause .5 pause .5
menu: python:
"Ask Naser": choices = [(_('Ask Naser'), '.AskNaser'),
pause .5 (_('Ask Fang'), '.AskFang')]
jump .AskNaser _value = renpy.display_menu(randomize_choices(choices))
"Ask Fang": renpy.pause(0.5)
pause .5 renpy.jump(_value)
jump .AskFang
label .AskNaser: label .AskNaser:

View file

@ -470,11 +470,11 @@ label chapter_7:
pause .5 pause .5
define LeftStage = False define LeftStage = False
menu:
"Leave the stage as-is": python:
jump LeaveStageAsIs choices = [(_('Leave the stage as-is'), 'LeaveStageAsIs'),
"Fix the cables": (_('Fix the cables'), 'FixCables')]
jump FixCables renpy.jump(renpy.display_menu(randomize_choices(choices)))
label LeaveStageAsIs: label LeaveStageAsIs:
$ anonscore += 1 $ anonscore += 1

View file

@ -619,11 +619,10 @@ label chapter_8:
window auto window auto
pause .5 pause .5
menu: python:
"Play The Guitar": choices = [(_('Play The Guitar'), '.LetFangPlayGuit'),
jump LetFangPlayGuit (_('Get to Studying'), '.GetStartedOnStudy')]
"Get to Studying": renpy.jump(renpy.display_menu(randomize_choices(choices)))
jump GetStartedOnStudy
label LetFangPlayGuit: label LetFangPlayGuit:

View file

@ -1076,18 +1076,12 @@ label chapter_9:
$ TalkedWithTrish = 0 $ TalkedWithTrish = 0
menu: python:
choices = [(_('Talk with Trish'), '.TalkWithTrish'),
"Talk with Trish": (_('Ignore Trish'), '.IgnoreTrish')]
_value = renpy.display_menu(randomize_choices(choices))
pause .5 renpy.pause(0.5)
jump .TalkWithTrish renpy.jump(_value)
"Ignore Trish":
pause .5
jump .IgnoreTrish
label .TalkWithTrish: label .TalkWithTrish: