Randomize point rewarding choices

This commit is contained in:
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 = []
init python:
import random
import webbrowser
#function for insult layers
@ -48,6 +49,12 @@ init python:
if persistent.autoup == None:
persistent.autoup = False
def randomize_choices(choices):
# fine for size of 2
if (renpy.random.randint(0, 1)):
choices.reverse()
return choices
pass
transform randPosition:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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