public void SetUp()
        {
            //Arrange
            sword        = new Sword("Espadon", 50, 0, "Corte Fugaz", false);
            goldenShield = new GoldenShield("Escudo Dorado", 0, 25, "Escudazo", false);
            orc          = new Orc("Thor", sword, goldenShield, "Tanque");

            bow = new Bow("Arco gigante", 60, 5, "Tira fuego", false);
            invisibilityCloak = new InvisibilityCloak("Capa magica", 0, 80, "Invisible", false);
            elf = new Elf("Ralf", bow, invisibilityCloak, "Escurridizo");
        }
Exemple #2
0
    private static Item [] InitializeDB()
    {
        Item [] db = new Item [20];

        db[0]   = new Slingshot(0);
        db[1]   = new Knife(1);
        db[2]   = new Medicine(2);
        db[3]   = new Repel(3);
        db[4]   = new InvisibilityCloak(4);
        db[5]   = new KeyItem(5, "Photography");
        db[6]   = new Pick(6);
        db[7]   = new KeyItem(7, "Map");
        db[8]   = new Poison(8);
        db[9]   = new KeyItem(9, "Key");
        db [10] = new Fruit(10, "Fruit", 0);
        db [11] = new Fruit(11, "Fruit", 1);
        db [12] = new Fruit(12, "Fruit", 2);
        db [13] = new Fruit(13, "Fruit", 3);
        db [14] = new Fruit(14, "Fruit", 4);
        db [15] = new Fruit(15, "Fruit", 5);
        return(db);
    }
Exemple #3
0
        static void Main(string[] args)
        {
            GoldenShield goldenShield = new GoldenShield("GoldenShield", 0, 25, "Escudo Protector", false);
            Sword        sword1       = new Sword("Katana", 50, 0, "Corte Fugaz", false);
            Orc          orc          = new Orc("Grom", sword1, goldenShield, "Tanque");
            Sword        sword2       = new Sword("Excalibur", 10, 0, "Corte Diagonal", false);

            orc.AttachSword(sword2);

            InvisibilityCloak invisibilityCloak = new InvisibilityCloak("Capa maxima", 0, 85, "Invisibilidad", false);
            Bow bow1 = new Bow("Arco gigante", 75, 5, "Tira fuego", false);
            Elf elf  = new Elf("Frank", bow1, invisibilityCloak, "Escurridizo");
            Bow bow2 = new Bow("Arco", 60, 5, "Automatico", false);

            elf.AttachBow(bow2);

            MagicStaff magicStaff = new MagicStaff("Varita", "Es mágica(?)", true);
            SpellBook  spellBook  = new SpellBook("Libro de Hechizos", "Tiene hechizos(?)", true);
            Wizard     wizard     = new Wizard("Harry", magicStaff, spellBook, "Support");
            Spell      spell      = new Spell("Lumos", "La varita enciende luz", true);

            wizard.LearnSpell(spell);

            Axe       axe1      = new Axe("El ejecutor", 65, 5, "Hacha giratoria", false);
            Axe       axe2      = new Axe("Verdugo", 70, 0, "Juicio final", false);
            Warhammer warhammer = new Warhammer("Mjölnir", 90, 10, "Aplastar y machacar", false);
            Dwarf     dwarf     = new Dwarf("Thorin", axe1, warhammer, "Luchador");

            dwarf.AttachAxe(axe2);

            wizard.Attack(orc);
            orc.Attack(dwarf);
            wizard.HealOrc(orc);
            dwarf.Attack(orc);
            dwarf.HealWizard(wizard);
            elf.Attack(orc);
        }
 public void SetUp()
 {
     cloak = new InvisibilityCloak("Velo de la noche", 0, 80, "Invisibilidad", true);
 }