Esempio n. 1
0
        static void Main(string[] args)
        {
            Appearance forArch   = new Appearance(64, "Ирокез", "Ельф");
            Appearance forHealer = new Appearance(32, "Рыжий", "Человек");
            Appearance forUnit   = new Appearance(60, "Темные короткие", "Люди");

            Archer   ar  = new Archer(Bow.Bone3000);
            Archer   ar1 = new Archer(ar, Bow.Bone3000);
            Cavalier cv  = new Cavalier(Sword.StickFromTheYard);
            Unit     un  = new Unit(150, 200, 300, 400, "Пивовар", forUnit);
            Healer   hl  = new Healer(HealingDevice.MumScream);

            un.ShowInfo();

            ar.ShowInfo();
            ar1.ShowInfo();

            ar1.Attack(ar);

            ar1.ShowInfo();
            ar.ShowInfo();

            hl.HealUnit(ar);

            ar.ShowInfo();

            cv.Attack(ar);

            cv.ShowInfo();
            ar.ShowInfo();

            cv.ShowAppearance();
            un.ShowAppearance();
        }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     for (int i = 0; i < count; i++)
     {
         Warrior.LevelUp();
         Cavalier.LevelUp();
     }
 }
    public static void NewClass()
    {
        Cavalier.Clear();
        Cavalier.level = 0;
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.level    = 0;
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.name     = "Cavalier";
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.movement = 6;
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.classWeapons.classWeapon1.type = "Spears";
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.classWeapons.classWeapon1.rank = 3;
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.classWeapons.classWeapon2.type = "Axes";
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.classWeapons.classWeapon2.rank = 2;
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.caps = Cavalier.Caplist();

        LevelUpClass();
    }
Esempio n. 4
0
        public Plateau()
        {
            echiquier = new Piece[8, 8];
            pN1       = new Pion(false);
            pN2       = new Pion(false);
            pN3       = new Pion(false);
            pN4       = new Pion(false);
            pN5       = new Pion(false);
            pN6       = new Pion(false);
            pN7       = new Pion(false);
            pN8       = new Pion(false);

            pB1 = new Pion(true);
            pB2 = new Pion(true);
            pB3 = new Pion(true);
            pB4 = new Pion(true);
            pB5 = new Pion(true);
            pB6 = new Pion(true);
            pB7 = new Pion(true);
            pB8 = new Pion(true);

            cavN1 = new Cavalier(false);
            cavN2 = new Cavalier(false);

            cavB1 = new Cavalier(true);
            cavB2 = new Cavalier(true);

            fouN1 = new Fou(false);
            fouN2 = new Fou(false);

            fouB1 = new Fou(true);
            fouB2 = new Fou(true);

            tourN1 = new Tour(false);
            tourN2 = new Tour(false);

            tourB1 = new Tour(true);
            tourB2 = new Tour(true);

            reineN = new Reine(false);
            reineB = new Reine(true);

            roiN         = new Roi(false);
            roiB         = new Roi(true);
            roiB.Couleur = true;

            initierPlateau(echiquier);
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            #region
            // Se tiene un local que vende autos, y con el tiempo va agregando nuevos modelos,
            // y a la vez se agrega nuevas caracteristicas a los autos
            #endregion

            Singletone.Instancia.Producto = new Auto("Chevrolet Cavalier");
            Console.WriteLine(Singletone.Instancia.Producto.Detalle);

            Cavalier simple = new Cavalier();
            Llanta   cavalierMasUnaLlanta = new Llanta(simple);
            Luces    cavalierMasLuz       = new Luces(cavalierMasUnaLlanta);

            Console.WriteLine(cavalierMasLuz.getDescripcion());
            Console.ReadKey();
        }
    public static void LevelUpClass()
    {
        Cavalier.LevelUp();
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.level     = CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.level + 1;
        CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.modifiers = Cavalier.ModList();

        foreach (string id in CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.subbed)
        {
            Unit me = new Unit();
            foreach (Unit u in CurrentGame.game.storeroom.units)
            {
                if (id == u.unitID)
                {
                    u.unitClass.main.human.cavalier.modifiers = CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.modifiers;
                    u.unitClass.main.human.cavalier.level     = CurrentGame.game.memoryGeneral.humanClassProgress.cavalier.level;
                }
            }
        }
    }
    public void SetUpOpponent(string piece, int number)
    {
        Piece  p  = null;
        Sprite sp = null;

        switch (piece)
        {
        case "Pion":
        {
            p = new Pion();
            if (manager.playerColor == Tile.Colors.Blanc)
            {
                sp = PionNoir;
            }
            else
            {
                sp = PionBlanc;
            }
            break;
        }

        case "Tour":
        {
            p = new Tour();
            if (manager.playerColor == Tile.Colors.Blanc)
            {
                sp = TourNoir;
            }
            else
            {
                sp = TourBlanc;
            }
            break;
        }

        case "Cavalier":
        {
            p = new Cavalier();
            if (manager.playerColor == Tile.Colors.Blanc)
            {
                sp = CavalierNoir;
            }
            else
            {
                sp = CavalierBlanc;
            }
            break;
        }

        case "Fou":
        {
            p = new Fou();
            if (manager.playerColor == Tile.Colors.Blanc)
            {
                sp = FouNoir;
            }
            else
            {
                sp = FouBlanc;
            }
            break;
        }

        case "Dame":
        {
            p = new Dame();
            if (manager.playerColor == Tile.Colors.Blanc)
            {
                sp = DameNoir;
            }
            else
            {
                sp = DameBlanc;
            }
            break;
        }
        }

        switch (number)
        {
        case 1:
        {
            OppP1 = p;
            OppP1Sprite.sprite = sp;
            break;
        }

        case 2:
        {
            OppP2 = p;
            OppP2Sprite.sprite = sp;
            break;
        }

        case 3:
        {
            OppP3 = p;
            OppP3Sprite.sprite = sp;
            break;
        }
        }
    }
Esempio n. 8
0
    public Echiquier(int[] tabVal)
    {
        tab = new Piece[8, 8];

        for (int i = 0; i < tabVal.Length; i++)
        {
            int y = i >> 3; //optimisation
            int x = (i & (8 - 1));
            //match all white pawns
            switch (tabVal[i])
            {
            case PP:
            case P:
                tab[x, y] = new Pion(false, x, y, this);
                mine.Add(tab[x, y]);
                break;

            case TG:
            case TD:
                tab[x, y] = new Tour(false, x, y, this);
                mine.Add(tab[x, y]);
                break;

            case CG:
            case CD:
                tab[x, y] = new Cavalier(false, x, y, this);
                mine.Add(tab[x, y]);
                break;

            case F:
                tab[x, y] = new Fou(false, x, y, this);
                mine.Add(tab[x, y]);
                break;

            case D:
                tab[x, y] = new Dame(false, x, y, this);
                mine.Add(tab[x, y]);
                break;

            case R:

                tab[x, y] = new Roi(false, x, y, this);
                mine.Add(tab[x, y]);
                break;

            case -PP:
            case -P:
                tab[x, y] = new PionNoir(true, x, y, this);
                yours.Add(tab[x, y]);
                break;

            case -TG:
            case -TD:
                tab[x, y] = new Tour(true, x, y, this);
                yours.Add(tab[x, y]);
                break;

            case -CG:
            case -CD:
                tab[x, y] = new Cavalier(true, x, y, this);
                yours.Add(tab[x, y]);
                break;

            case -F:
                tab[x, y] = new Fou(true, x, y, this);
                yours.Add(tab[x, y]);
                break;

            case -D:
                tab[x, y] = new Dame(true, x, y, this);
                yours.Add(tab[x, y]);
                break;

            case -R:

                tab[x, y] = new Roi(true, x, y, this);
                yours.Add(tab[x, y]);
                break;

            default:
                tab[x, y] = new Piece(0, true, x, y, this);
                break;
            }
        }
    }