这是python基础(
随便写的:
[RenPy] 纯文本查看 复制代码 label start:
python:
flag_value = 0 # 好感度
choice_list = [('可爱', 1), ('美丽', 0), ('优雅', 2)]
def get_choice(num, choice_list):
if num >= len(choice_list):
return choice_list
re = []
for i in range(num):
x = renpy.random.choice(choice_list)
while x in re:
x = renpy.random.choice(choice_list)
re.append(x)
return re
'xxx' 'balabala~'
$ x = menu(get_choice(2, choice_list), interact=True, screen="choice")
$ flag_value += x
'xxx' '当前好感度为:[flag_value]'
$ x = menu(get_choice(2, choice_list), interact=True, screen="choice")
$ flag_value += x
'xxx' '当前好感度为:[flag_value]' |