Example #1
0
 public Armour(string armourName, string armourType, int price, float weight, ArmourLocation location, int defenceValue, int defenceModifier, params string[] allowableClasses)
     : base(armourName, armourType, price, weight, allowableClasses)
 {
     ArmourLocation  = location;
     DefenceValue    = defenceValue;
     DefenceModifier = defenceModifier;
 }
Example #2
0
 public Armour(string aName, char aGlyph, Colour aColour, Location3i l,
     ArmourLocation aArmourLocation)
     : base(ItemType.Armour, aName, aGlyph, aColour, l)
 {
     ArmourLocation = aArmourLocation;
     Condition = 100;
 }
Example #3
0
 public Armour(string armourName, string armourType, int price, float weight, ArmourLocation location, int defenceValue, int defenceModifier, params string[] allowableClasses)
     : base(armourName, armourType, price, weight, allowableClasses)
 {
     ArmourLocation = location;
     DefenceValue = defenceValue;
     DefenceModifier = defenceModifier;
 }
Example #4
0
        public Armour(ArmourLocation location)
        {
            this.id            = ((int)location * -1) - 2;
            this.Equippable    = false;
            this.weight        = 0;
            this.value         = 0;
            this.speed         = 0;
            this.speedbonus    = 0;
            this.strengthbonus = 0;
            this.hpbonus       = 0;
            this.type          = ItemType.Armour;
            protection         = new Dictionary <DamageType, int>();
            foreach (DamageType type in Enum.GetValues(typeof(DamageType)))
            {
                protection[type] = 0;
            }
            bonus = new Dictionary <Stat, int>();
            foreach (Stat stat in Enum.GetValues(typeof(Stat)))
            {
                bonus[stat] = 0;
            }

            switch (location)
            {
            case ArmourLocation.Torso:
                this.name     = "T-Shirt";
                this.info     = "This simple t-shirt provides no protection against enemy attacks.";
                this.location = ArmourLocation.Torso;
                break;

            case ArmourLocation.Legs:
                this.name     = "Jeans";
                this.info     = "These plain, denim jeans don't prevent any damage, but at least they stop everyone from being able to see your junk.";
                this.location = ArmourLocation.Legs;
                break;

            case ArmourLocation.Head:
                this.name     = "Head of Hair";
                this.info     = "Your luscious, flowing locks provide no armour.";
                this.location = ArmourLocation.Head;
                break;

            case ArmourLocation.Hands:
                this.name     = "Bare Hands";
                this.info     = "Can be formed into 'rock', 'paper' and 'scissor' configurations.";
                this.location = ArmourLocation.Hands;
                break;

            case ArmourLocation.Feet:
                this.name     = "Bare Feet";
                this.info     = "You don't even have any socks. You will take double damage from any lego-based attacks.";
                this.location = ArmourLocation.Feet;
                break;

            default:
                break;
            }
        }
Example #5
0
        public Armour(ArmourLocation location)
        {
            this.id = ((int)location * -1) - 2;
            this.Equippable = false;
            this.weight = 0;
            this.value = 0;
            this.speed = 0;
            this.speedbonus = 0;
            this.strengthbonus = 0;
            this.hpbonus = 0;
            this.type = ItemType.Armour;
            protection = new Dictionary<DamageType, int>();
            foreach (DamageType type in Enum.GetValues(typeof(DamageType)))
            {
                protection[type] = 0;
            }
            bonus = new Dictionary<Stat,int>();
            foreach (Stat stat in Enum.GetValues(typeof(Stat)))
            {
                bonus[stat] = 0;
            }

            switch (location)
            {
                case ArmourLocation.Torso:
                    this.name = "T-Shirt";
                    this.info = "This simple t-shirt provides no protection against enemy attacks.";
                    this.location = ArmourLocation.Torso;
                    break;
                case ArmourLocation.Legs:
                    this.name = "Jeans";
                    this.info = "These plain, denim jeans don't prevent any damage, but at least they stop everyone from being able to see your junk.";
                    this.location = ArmourLocation.Legs;
                    break;
                case ArmourLocation.Head:
                    this.name = "Head of Hair";
                    this.info = "Your luscious, flowing locks provide no armour.";
                    this.location = ArmourLocation.Head;
                    break;
                case ArmourLocation.Hands:
                    this.name = "Bare Hands";
                    this.info = "Can be formed into 'rock', 'paper' and 'scissor' configurations.";
                    this.location = ArmourLocation.Hands;
                    break;
                case ArmourLocation.Feet:
                    this.name = "Bare Feet";
                    this.info = "You don't even have any socks. You will take double damage from any lego-based attacks.";
                    this.location = ArmourLocation.Feet;
                    break;
                default:
                    break;
            }
        }
Example #6
0
        public override string ToString()
        {
            string ArmourString = base.ToString() + ", ";

            ArmourString += ArmourLocation.ToString() + ", ";
            ArmourString += DefenceValue.ToString() + ", ";
            ArmourString += DefenceModifier.ToString();

            foreach (string s in AllowableClasses)
            {
                ArmourString += ", " + s;
            }

            return(ArmourString);
        }
 public static List<Armour> Location(this List<Armour> inventory, ArmourLocation location)
 {
     return inventory.FindAll(delegate(Armour x) { return x.Location == location; });
 }
 public static List<Item> ArmourAsItems(this List<Item> inventory, ArmourLocation location)
 {
     return inventory.Armour(location).Cast<Item>().ToList();
 }
Example #9
0
 public void UnequipArmour(ArmourLocation location)
 {
     equippedArmour[location] = new Armour(location);
     this.OnLoadoutChanged();
 }
Example #10
0
 public Armour(int itemid) : base(itemid)
 {
     location        = StatParser.ParseArmourLocation(ItemStats.GetStat(itemid, "location"));
     this.Equippable = true;
 }
 public static List <Armour> Location(this List <Armour> inventory, ArmourLocation location)
 {
     return(inventory.FindAll(delegate(Armour x) { return x.Location == location; }));
 }
 public static List <Item> ArmourAsItems(this List <Item> inventory, ArmourLocation location)
 {
     return(inventory.Armour(location).Cast <Item>().ToList());
 }
Example #13
0
 public Armour(int itemid)
     : base(itemid)
 {
     location = StatParser.ParseArmourLocation(ItemStats.GetStat(itemid, "location"));
     this.Equippable = true;
 }
Example #14
0
 public void UnequipArmour(ArmourLocation location)
 {
     equippedArmour[location] = new Armour(location);
     this.OnLoadoutChanged();
 }