Ejemplo n.º 1
0
def NextPress(save=1):
    if FeatWindow:
        FeatWindow.Unload()

    if save:
        # resave the feats
        featCount = FeatReqTable.GetRowCount()
        if CharGen:
            pc = GemRB.GetVar("Slot")
        else:
            pc = GemRB.GameGetSelectedPCSingle()
        for i in range(featCount):
            GemRB.SetFeat(pc, i, GemRB.GetVar("Feat " + str(i)))

    if CharGen:
        GemRB.SetNextScript("Spells")
    else:
        # handle toughness first, since hp is tricky
        ToughnessDiff = GemRB.GetVar("Feat 69") - GemRB.GetVar(
            "BaseFeatValue 69")
        if ToughnessDiff > 0:
            pc = GemRB.GameGetSelectedPCSingle()
            GemRB.SetPlayerStat(
                pc, IE_MAXHITPOINTS,
                GemRB.GetPlayerStat(pc, IE_MAXHITPOINTS, 1) +
                ToughnessDiff * 3, 0)
            GemRB.SetPlayerStat(
                pc, IE_HITPOINTS,
                GemRB.GetPlayerStat(pc, IE_HITPOINTS, 1) + ToughnessDiff * 3,
                0)

        # open up the next levelup window
        import Spells
        Spells.SetupSpellsWindow(0)
    return
Ejemplo n.º 2
0
def NextPress(save=1):
    GemRB.SetRepeatClickFlags(GEM_RK_DISABLE, OP_OR)
    if FeatWindow:
        FeatWindow.Unload()
    if CharGen:
        GemRB.SetNextScript("Spells")
        return

    if save:
        # resave the feats
        featCount = FeatReqTable.GetRowCount()
        pc = GemRB.GameGetSelectedPCSingle()
        for i in range(featCount):
            GemRB.SetFeat(pc, i, GemRB.GetVar("Feat " + str(i)))

    # open up the next levelup window
    import Spells
    Spells.SetupSpellsWindow(0)
    return