Ejemplo n.º 1
0
        public Armor(int inputID)
        {
            DatabaseConnection conn   = new DatabaseConnection();
            DatabaseReader     reader = conn.QueryRowFromTableWithID("Armor", inputID);

            ID = inputID;
            if (reader.NextRow())
            {
                Name        = reader.GetStringFromCol("Name");
                Description = reader.GetStringFromCol("Description");
                FlavorText  = reader.GetStringFromCol("Flavor_Text");

                int statusConditionsResitancesID = reader.GetIntFromCol("Status_Conditions_Resistances_FK");
                StatusConditionsResistances = new StatusConditionsResistances(statusConditionsResitancesID);

                Physical_Defense = reader.GetIntFromCol("Physical_Defense");
                Magic_Defense    = reader.GetIntFromCol("Magic_Defense");
            }
            reader.CloseReader();
            conn.CloseConnection();
        }
Ejemplo n.º 2
0
 override public string ToString()
 {
     return("{Armor: " + ID + ", Descriptor: " + Name.ToString() + ", DefenseModifier: "
            + StatusConditionsResistances.ToString() + ", Physical Defense: " + Physical_Defense + ", Magic_Defense: "
            + Magic_Defense + "}");
 }