Exemple #1
0
def _readExitQueueEffectSection(xmlCtx, section, flags, conditions):
    flagID = sub_parsers._parseID(xmlCtx, section, 'Specify a flag ID')
    if flagID not in flags:
        flags.append(flagID)
    return chapter.HasTargetEffect(flagID,
                                   chapter.Effect.EXIT_QUEUE,
                                   conditions=conditions)
Exemple #2
0
def _readGlobalDeactivateEffectSection(xmlCtx, section, flags, conditions):
    flagID = _parseID(xmlCtx, section, 'Specify a flag ID')
    if flagID not in flags:
        flags.append(flagID)
    return chapter.HasTargetEffect(flagID,
                                   chapter.Effect.GLOBAL_DEACTIVATE,
                                   conditions=conditions)
Exemple #3
0
def playTargetedEffect(targetID, effectType):
    instance = loader.g_loader.tutorial
    if instance and not instance._tutorialStopped:
        instance.storeEffectsInQueue(
            [chapter.HasTargetEffect(targetID, effectType)], benefit=True)
    else:
        LOG_DEBUG('Tutorial is not running.')
Exemple #4
0
def _readShowMessageSection(xmlCtx, section, _, conditions):
    messageID = _parseID(xmlCtx, section, 'Specify a message ID')
    return chapter.HasTargetEffect(messageID,
                                   chapter.Effect.SHOW_MESSAGE,
                                   conditions=conditions)
Exemple #5
0
def _readShowWindowSection(xmlCtx, section, _, conditions):
    windowID = _parseID(xmlCtx, section, 'Specify a window ID')
    return chapter.HasTargetEffect(windowID,
                                   chapter.Effect.SHOW_WINDOW,
                                   conditions=conditions)
Exemple #6
0
def _readShowDialogSection(xmlCtx, section, _, conditions):
    dialogID = _parseID(xmlCtx, section, 'Specify a dialog ID')
    return chapter.HasTargetEffect(dialogID,
                                   chapter.Effect.SHOW_DIALOG,
                                   conditions=conditions)
Exemple #7
0
def _readShowHintSection(xmlCtx, section, _, conditions):
    hintID = _parseID(xmlCtx, section, 'Specify a hint ID')
    return chapter.HasTargetEffect(hintID,
                                   chapter.Effect.SHOW_HINT,
                                   conditions=conditions)
Exemple #8
0
def _readRequestBonusEffectSection(xmlCtx, section, _, conditions):
    chapterID = section.asString
    return chapter.HasTargetEffect(chapterID,
                                   chapter.Effect.REQUEST_BONUS,
                                   conditions=conditions)
Exemple #9
0
def _readRunTriggerEffectSection(xmlCtx, section, _, conditions):
    triggerID = _parseID(xmlCtx, section, 'Specify a trigger ID')
    return chapter.HasTargetEffect(triggerID,
                                   chapter.Effect.RUN_TRIGGER,
                                   conditions=conditions)
Exemple #10
0
def _readNextTaskSection(xmlCtx, section, _, conditions):
    taskID = sub_parsers._parseID(xmlCtx, section, 'Specify a next task ID')
    return chapter.HasTargetEffect(taskID,
                                   chapter.Effect.NEXT_TASK,
                                   conditions=conditions)
Exemple #11
0
def _readGlobalActivateEffectSection(xmlCtx, section, flags, conditions):
    flagID = _parseID(xmlCtx, section, 'Specify a flag ID')
    return chapter.HasTargetEffect(flagID,
                                   chapter.Effect.GLOBAL_ACTIVATE,
                                   conditions=conditions)
Exemple #12
0
def _readCloseHintSection(xmlCtx, section, _, conditions):
    hintID = sub_parsers._parseID(xmlCtx, section, 'Specify a hint ID')
    return chapter.HasTargetEffect(hintID,
                                   chapter.Effect.CLOSE_HINT,
                                   conditions=conditions)
Exemple #13
0
def _readShowMarkerSection(xmlCtx, section, _, conditions):
    markerID = sub_parsers._parseID(xmlCtx, section, 'Specify a marker ID')
    return chapter.HasTargetEffect(markerID,
                                   chapter.Effect.SHOW_MARKER,
                                   conditions=conditions)
Exemple #14
0
def _readShowGreetingSection(xmlCtx, section, _, conditions):
    greetingID = sub_parsers._parseID(xmlCtx, section, 'Specify a greeting ID')
    return chapter.HasTargetEffect(greetingID,
                                   chapter.Effect.SHOW_GREETING,
                                   conditions=conditions)
Exemple #15
0
def _readTeleportSection(xmlCtx, section, _, conditions):
    pointID = sub_parsers._parseID(xmlCtx, section, 'Specify a point ID')
    return chapter.HasTargetEffect(pointID,
                                   chapter.Effect.TELEPORT,
                                   conditions=conditions)
Exemple #16
0
def _readPlayMusicSection(xmlCtx, section, _, conditions):
    messageID = _parseID(xmlCtx, section, 'Specify a music ID')
    return chapter.HasTargetEffect(messageID,
                                   chapter.Effect.PLAY_MUSIC,
                                   conditions=conditions)
Exemple #17
0
def _readInvokePlayerCmdSection(xmlCtx, section, _, conditions):
    commandID = _parseID(xmlCtx, section, 'Specify a command ID')
    return chapter.HasTargetEffect(commandID,
                                   chapter.Effect.INVOKE_PLAYER_CMD,
                                   conditions=conditions)
Exemple #18
0
def _readNextChapterEffectSection(xmlCtx, section, _, conditions):
    targetID = section.asString
    return chapter.HasTargetEffect(targetID,
                                   chapter.Effect.NEXT_CHAPTER,
                                   conditions=conditions)