if storypos in story: screen.blit(maps[currentmap], [0, 0]) beat = story[storypos] # Check to see if it's dialogue if "dialogue" in beat["beat-type"]: # Fill in the shared info charL = characters["none"] if "leftChar" in beat: charL = characters[beat["leftChar"]] charR = characters["none"] if "rightChar" in beat: charR = characters[beat["rightChar"]] moodL = "neutral" if "moodL" in beat: moodL = beat["moodL"] moodR = "neutral" if "moodR" in beat: moodR = beat["moodR"] speaking = "" text = beat["dialogue"] dialogue = [] if "choices" in beat: dialogue = beat["choices"][0] targets = [] disableOptions = [False, False, False] if "memories" in beat: targets = beat["memories"][0] default = beat["memories"][1] spot = 0 for list in targets: # Get the list of possible choices #print(f'{spot} - Checking {list} against {memory}') if testLists(list, memory): disableOptions[spot] = not default[spot] spot += 1 # print(disableOptions) result = draw_dialogue( charL, charR, moodL, moodR, speaking, text, dialogue, disableOptions) if result != -1: if not clickstop: #print(f'Result: {result}') if dialogue: storypos = beat["choices"][1][result] else: storypos = beat["next"] # If it isn't, go over the non-dialogue beats else: if beat["beat-type"] == "make-memory": memory.append(beat["memory"]) storypos = beat["next"] if beat["beat-type"] == "check-memory": count = 0 for item in memory: if item in beat["target-memories"]: count += 1 if count >= beat["target"]: storypos = beat["success"] else: storypos = beat["failure"] # Check global tags if "music" in beat: if beat["music"] in music: musicbox.changeTrack(music[beat["music"]]) else: print(f'Invalid track {beat["music"]}!') if "map" in beat: if beat["map"] in maps: currentmap = beat["map"] else: print(f'Invalid map {beat["map"]}!') else: menu = 0