Example #1
0
    public static Armor FromKey(ArmorKey key)
    {
        Armor ret = new Armor();
        switch(key) {
        //head
        case ArmorKey.LeatherCap:
            ret = new Armor() {
                type = ArmorSlotType.Head,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 1,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = 0,
                alterMovementPerActionPoint = 0
            };
            break;
        case ArmorKey.IronHelmet:
            ret = new Armor() {
                type = ArmorSlotType.Head,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 3,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = -0.15f,
                alterMovementPerActionPoint = -1
            };
            break;

        case ArmorKey.MagicianHat:
            ret = new Armor() {
                type = ArmorSlotType.Head,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 0,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = 0.15f,
                alterMovementPerActionPoint = 1
            };
            break;
        //chest
        case ArmorKey.LeatherVest:
            ret = new Armor() {
                type = ArmorSlotType.Chest,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 2,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = 0,
                alterMovementPerActionPoint = -1
            };
            break;

        case ArmorKey.IronPlate:
            ret = new Armor() {
                type = ArmorSlotType.Chest,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 3,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = -0.15f,
                alterMovementPerActionPoint = -2
            };
            break;

        case ArmorKey.MagicianCloak:
            ret = new Armor() {
                type = ArmorSlotType.Chest,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 0,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = 0.15f,
                alterMovementPerActionPoint = 2
            };
            break;
        //gauntlets
        case ArmorKey.LeatherGauntlet:
            ret = new Armor() {
                type = ArmorSlotType.Gauntlet,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 1,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = 0,
                alterMovementPerActionPoint = 0
            };
            break;

        case ArmorKey.IronGauntlet:
            ret = new Armor() {
                type = ArmorSlotType.Gauntlet,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 3,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = -0.15f,
                alterMovementPerActionPoint = 0
            };
            break;

        case ArmorKey.MagicianRing:
            ret = new Armor() {
                type = ArmorSlotType.Gauntlet,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 0,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = 0.15f,
                alterMovementPerActionPoint = 1
            };
            break;
        //legs

        case ArmorKey.LeatherBoots:
            ret = new Armor() {
                type = ArmorSlotType.Leg,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 1,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = 0,
                alterMovementPerActionPoint = 0
            };
            break;

        case ArmorKey.IronBoots:
            ret = new Armor() {
                type = ArmorSlotType.Leg,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 3,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = -0.15f,
                alterMovementPerActionPoint = -2
            };
            break;

        case ArmorKey.MagicianBoots:
            ret = new Armor() {
                type = ArmorSlotType.Leg,

                alterAttackChance = 0,
                alterAttackRange = 0,
                alterDamageReduction = 0,
                alterDamageBase = 0,
                alterDamageRollSides = 0,
                alterEvade = 0.15f,
                alterMovementPerActionPoint = 2
            };
            break;
        }
        return ret;
    }
Example #2
0
    public static Armor FromKey(ArmorKey key)
    {
        Armor ret = new Armor();

        switch (key)
        {
        case ArmorKey.LeatherCap:
            ret = new Armor()
            {
                type = ArmorSlotType.Head,
                alterMovementPerActionPoint = 0,
                alterAttackRange            = 0,
                alterDamageReduction        = 1,
                alterAttackChance           = 0.0f,
                alterEvade           = 0.0f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.IronHelm:
            ret = new Armor()
            {
                type = ArmorSlotType.Head,
                alterMovementPerActionPoint = -1,
                alterAttackRange            = 0,
                alterDamageReduction        = 3,
                alterAttackChance           = 0.0f,
                alterEvade           = -0.15f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.MagicianHat:
            ret = new Armor()
            {
                type = ArmorSlotType.Head,
                alterMovementPerActionPoint = 1,
                alterAttackRange            = 0,
                alterDamageReduction        = 1,
                alterAttackChance           = 0.0f,
                alterEvade           = 0.15f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.LeatherVest:
            ret = new Armor()
            {
                type = ArmorSlotType.Chest,
                alterMovementPerActionPoint = 0,
                alterAttackRange            = 0,
                alterDamageReduction        = 0,
                alterAttackChance           = 0.0f,
                alterEvade           = 0.0f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.IronPlate:
            ret = new Armor()
            {
                type = ArmorSlotType.Chest,
                alterMovementPerActionPoint = -2,
                alterAttackRange            = 0,
                alterDamageReduction        = 3,
                alterAttackChance           = 0.0f,
                alterEvade           = -0.15f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.MagicianRobe:
            ret = new Armor()
            {
                type = ArmorSlotType.Chest,
                alterMovementPerActionPoint = 2,
                alterAttackRange            = 0,
                alterDamageReduction        = 3,
                alterAttackChance           = 0.0f,
                alterEvade           = 0.15f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.LeatherGauntlet:
            ret = new Armor()
            {
                type = ArmorSlotType.Gauntlet,
                alterMovementPerActionPoint = 0,
                alterAttackRange            = 0,
                alterDamageReduction        = 1,
                alterAttackChance           = 0.0f,
                alterEvade           = 0.0f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.IronGauntlet:
            ret = new Armor()
            {
                type = ArmorSlotType.Gauntlet,
                alterMovementPerActionPoint = -2,
                alterAttackRange            = 0,
                alterDamageReduction        = 3,
                alterAttackChance           = 0.0f,
                alterEvade           = -0.15f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.MagicianRing:
            ret = new Armor()
            {
                type = ArmorSlotType.Gauntlet,
                alterMovementPerActionPoint = 1,
                alterAttackRange            = 0,
                alterDamageReduction        = 0,
                alterAttackChance           = 0.0f,
                alterEvade           = 0.15f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.IronBoots:
            ret = new Armor()
            {
                type = ArmorSlotType.Leg,
                alterMovementPerActionPoint = -2,
                alterAttackRange            = 0,
                alterDamageReduction        = 3,
                alterAttackChance           = 0.0f,
                alterEvade           = -0.15f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;

        case ArmorKey.MagicianBoots:
            ret = new Armor()
            {
                type = ArmorSlotType.Leg,
                alterMovementPerActionPoint = 2,
                alterAttackRange            = 0,
                alterDamageReduction        = 1,
                alterAttackChance           = 0.0f,
                alterEvade           = 0.0f,
                alterDamageBase      = 0.0f,
                alterDamageRollSides = 0.0f
            };
            break;
        }
        return(ret);
    }