Exemplo n.º 1
0
 internal ChampItemPair(PlayerClassNum p, ItemID i)
 {
     hero = p;
     item = i;
     id = sID++;
     if (sID > 16)
         throw new Exception();
 }
Exemplo n.º 2
0
        internal static String getClassName(PlayerClassNum p)
        {
            switch (p)
            {
                case PlayerClassNum.vang:
                    return "Vanguard";
                case PlayerClassNum.assa:
                    return "Assassin";
                case PlayerClassNum.mage:
                    return "Mage";
                case PlayerClassNum.puri:
                    return "Purifier";
                case PlayerClassNum.archer:
                    return "Archer";
                case PlayerClassNum.bard:
                    return "Bard";
                //heros
                case PlayerClassNum.goodfraiser:
                    return "Good Fraizer";
            }

            return("noname");
        }
Exemplo n.º 3
0
        internal static Color getClassColor(PlayerClassNum p)
        {
            switch (p) {
            case PlayerClassNum.vang:
                return new Color(255,165,0);
            case PlayerClassNum.assa:
                return new Color(186, 85, 211);
            case PlayerClassNum.mage:
                return Color.Red;
            case PlayerClassNum.puri:
                return Color.Green;
            case PlayerClassNum.archer:
                return Color.Yellow;
            case PlayerClassNum.bard:
                return Color.Blue;
            case PlayerClassNum.none:
                return new Color(190, 190, 190);
            //heros
            case PlayerClassNum.goodfraiser:
                return new Color(255,215,0);
            }

            return Color.Black;
        }
Exemplo n.º 4
0
 private static Texture getUnitTexture(PlayerClassNum id)
 {
     switch(id){
         case PlayerClassNum.archer:
             return arch;
         case PlayerClassNum.assa:
             return assa;
         case PlayerClassNum.bard:
             return bard;
         case PlayerClassNum.mage:
             return pyro;
         case PlayerClassNum.puri:
             return puri;
         case PlayerClassNum.vang:
             return vang;
         default:
             throw new Exception("id: " + id + " not allowed here");
     }
 }
Exemplo n.º 5
0
 internal static List<PlayerClassI> makeRaid(PlayerClassNum[] raidComp, Vector2f start)
 {
     List<PlayerClassI> l = new List<PlayerClassI>();
     int i = 0, j = 0;
     int vnum = 1, anum = 1, pnum = 1, mnum = 1, arnum = 1, bnum = 1;
     foreach (PlayerClassNum p in raidComp) {
         Vector2f spot = new Vector2f(start.X + 40 * i, start.Y + 40 * j);
         switch (p) {
         case PlayerClassNum.vang:
             l.Add(new Vanguard(spot, "Vanguard " + vnum));
             vnum++;
             break;
         case PlayerClassNum.assa:
             l.Add(new Assassin(spot, "Assassin " + anum));
             anum++;
             break;
         case PlayerClassNum.mage:
             l.Add(new Mage(spot, "Flame Mage " + mnum));
             mnum++;
             break;
         case PlayerClassNum.puri:
             l.Add(new Puri(spot, "Purifier " + pnum));
             pnum++;
             break;
         case PlayerClassNum.archer:
             l.Add(new Archer(spot, "Archer " + arnum));
             arnum++;
             break;
         case PlayerClassNum.bard:
             l.Add(new Bard(spot, "Bard " + bnum));
             bnum++;
             break;
         //heroes
         case PlayerClassNum.goodfraiser:
             l.Add(new GoodFraiser(spot, "Good Fraiser"));
             break;
         }
         i++;
         if (i % 7 == 0) { j++; i = 0; }
     }
     return l;
 }
Exemplo n.º 6
0
 internal static int getPlayerAmt(PlayerClassNum[] raidComp)
 {
     int i = 0;
     foreach (PlayerClassNum p in raidComp) {
         if (p != PlayerClassNum.none) i++;
     }
     return i;
 }
Exemplo n.º 7
0
 public void LoadContent(BossFight bossFight, PlayerClassNum[] raidComp, Hashtable raidSetup)
 {
     LoadContent(bossFight, raidComp);
     PositionFactory.getSetupRaid(getAlivePlayerMoveables(), raidSetup);
 }
Exemplo n.º 8
0
        //oldish one
        public void LoadContent(BossFight bossFight, PlayerClassNum[] raidComp)
        {
            this.LoadContent(bossFight);

            List<PlayerClassI> playerRaid = PlayerClassI.makeRaid(raidComp, new Vector2f(191,50));
            //TODO preset spots specific to bossfight
            foreach (PlayerClassI p in playerRaid) {
                //place all in moveables
                moveables.Add(p);
            }
            List<Enemy> enemys = bossFight.getEnemies();
            foreach (Moveable m in enemys)
            {
                moveables.Add(m);
            }
            if (enemys.Count >= 1) mainEnemy = enemys[0];

            selected = playerRaid[0];
            playerAmt = playerRaid.Count;

            raidFrames = new RaidFrames(this, playerRaid, new Vector2f(5,200));
        }
Exemplo n.º 9
0
 internal ChampItemPair(PlayerClassNum p, ItemID i, int id)
 {
     hero = p;
     item = i;
     this.id = id;
 }
Exemplo n.º 10
0
 internal void addHero( PlayerClassNum pNum, ItemID item)
 {
     champs.Add(new ChampItemPair(pNum, item));
 }
Exemplo n.º 11
0
 internal void addUnlockedClass(PlayerClassNum newClass)
 {
     unlockedHeroes.Add(newClass);
 }
Exemplo n.º 12
0
        private void addClassToRaid(PlayerClassNum id)
        {
            if (currentAmt >= limit) return;

            for (int i = 0; i < raid.Length;i++ ) {
                if (raid[i] == PlayerClassNum.none) {
                    raid[i] = id;
                    currentAmt++;
                    break;
                }
            }
        }
Exemplo n.º 13
0
 //old version!!
 internal void startBossFight(BossFight bossFight, PlayerClassNum[] raidComp) {
     inGame = new InGame();
     BossFightID id = bossFight.getFightID();
     if (lastRaid != null && id == lastBossID) {
         inGame.LoadContent(bossFight, raidComp, lastRaid);
     } else {
         inGame.LoadContent(bossFight, raidComp);
     }
     gameState = GameState.inGame;
     lastBossID = id;
     lastRaidComp = raidComp;
 }