Andrettin / Wyrmsun

Strategy game based on history, mythology and fiction
http://andrettin.github.io/
GNU General Public License v2.0
301 stars 47 forks source link

Saving and loading doesn't reset some values #111

Closed KroArtem closed 8 years ago

KroArtem commented 8 years ago

Unzip this file game.sav.zip Then load the game. Then save it. Load it again. Vigil's damage will increase. Seems like these values are not reset or are saved incorrectly. Attaching Vigil's lua file too.

DefineCustomHero("Vigil", {
    Name = "Vigil",
    Gender = "male",
    Civilization = "dwarf",
    Type = "unit-dwarven-thane",
    Trait = "upgrade-dextrous",
    HairVariation = "black-hair",
    Level = 11,
    ExperiencePercent = 6,
    Abilities = {"upgrade-eagle-eye", "upgrade-critical-strike", "upgrade-stun", "upgrade-axe-mastery", "upgrade-deadly-precision", "upgrade-leadership", "upgrade-mace-mastery"},
    ReadWorks = {"upgrade-work-reginsmol", "upgrade-work-wid-dweorg", "upgrade-work-thursagans-book", "upgrade-work-fafnismol"},
    Items = {
        {
            "type", "unit-ring",
            "suffix", "upgrade-item-suffix-of-vision",
            "equipped", true
        },
        {
            "type", "unit-thrymgjol-shield",
            "suffix", "upgrade-item-suffix-of-thorns",
        },
        {
            "type", "unit-amulet",
            "suffix", "upgrade-item-suffix-of-thorns",
        },
        {
            "type", "unit-ring",
            "prefix", "upgrade-item-prefix-vicious",
            "equipped", true
        },
        {
            "type", "unit-potion-of-healing",
        },
        {
            "type", "unit-potion-of-healing",
        },
        {
            "type", "unit-potion-of-healing",
        },
        {
            "type", "unit-potion-of-healing",
        },
        {
            "type", "unit-potion-of-healing",
        },
        {
            "type", "unit-potion-of-healing",
        },
        {
            "type", "unit-kite-shield",
            "suffix", "upgrade-item-suffix-of-the-colossus",
            "equipped", true
        },
        {
            "type", "unit-amulet",
            "suffix", "upgrade-item-suffix-of-regeneration",
            "equipped", true
        },
        {
            "type", "unit-potion-of-healing",
        },
        {
            "type", "unit-potion-of-healing",
        },
        {
            "type", "unit-battle-axe",
            "prefix", "upgrade-item-prefix-vicious",
            "suffix", "upgrade-item-suffix-of-accuracy",
            "equipped", true
        }
    },
})
Andrettin commented 8 years ago

Thank you! This is fixed now: https://github.com/Andrettin/Wyrmgus/commit/0496757d8ee700863050735880a44733909ddc75