示例#1
0
        internal static string getBossFightName(BossFightID fight)
        {
            switch (fight) {
            case BossFightID.buseyBoss:
                return BuseyBossFight.getName();
            case BossFightID.tomHanks:
                return EvilTomHanksFight.getName();
            case BossFightID.dpsCheck:
                return CheckDPSBossFight.getName();
            case BossFightID.fraiser:
                return EvilFraiserFight.getName();
            }

            return "not found";
        }
示例#2
0
        //TODO the stuff below this will be useless once getBossInfo is implemented
        internal static BossFightRecord getBossFightRecord(BossFightID fight)
        {
            return getBossInfo(fight).records;
            /*switch (fight) {
            case BossFightID.buseyBoss:
                return BuseyBossFight.getBossFightRecord();
            case BossFightID.tomHanks:
                return EvilTomHanksFight.getBossFightRecord();
            case BossFightID.dpsCheck:
                return CheckDPSBossFight.getBossFightRecord();
            case BossFightID.fraiser:
                return EvilFraiserFight.getBossFightRecord();
                cas
            }

            return new BossFightRecord();*/
        }
示例#3
0
        internal static BossFight getBossFight(BossFightID fight)
        {
            switch (fight) {
            case BossFightID.buseyBoss:
                return new BuseyBossFight();
            case BossFightID.tomHanks:
                return new EvilTomHanksFight();
            case BossFightID.dpsCheck:
                return new CheckDPSBossFight();
            case BossFightID.fraiser:
                return new EvilFraiserFight();
            case BossFightID.urisdor:
                return new UrsidorBossFight();
            }

            return null;
        }
示例#4
0
        internal RaidSelect2(BossFightID boss, Barracks barracks)
        {
            backButton = new Button(new IntRect(BACK_BUTTON_X, BUTTONS_Y, 50, 50),backButtonTexture);
            clearButton = new Button(new IntRect(CLEAR_BUTTON_X, BUTTONS_Y, 50, 50), clearButtonTexture);
            startButton = new Button(new IntRect(START_BUTTON_X, BUTTONS_Y, 200, 50), startButtonTexture);

            this.boss = boss;
            maxPlayers = (short)BossFightLibrary.getBossInfo(boss).maxplayers;
            barracksScrollList = new BarracksScrollList(barracks,new Vector2f(0, 210));
            pillarGroup = new PillarGroup(new FloatRect(200, 180,600,420));

            bossString = new Text(BossFightLibrary.getBossInfo(boss).name.ToUpper(), GameBox.pixelzimFont, 30U);
            bossString.Color = Color.White;
            bossString.Position = new Vector2f(265, 130);

            worldString = new Text("FOREST", GameBox.pixelzimFont, 30U);
            worldString.Color = Color.White;
            worldString.Position = new Vector2f(685, 130);

            barracksString = new Text("BARRACKS", GameBox.pixelzimFont, 30U);
            barracksString.Color = Color.White;
            barracksString.Position = new Vector2f(11, 175);

            currentPlayersString = new Text(currentPlayerAmt + "/" + maxPlayers, GameBox.corbalFont, 30U);
            currentPlayersString.Color = new Color(140,240,70);
            currentPlayersString.Position = new Vector2f(550, 400);

            draggedString = new Text("", GameBox.corbalFont, 30U);
            draggedString.Color = Color.White;

            //bossArtSprite, locationSprite, raidpartybgSprite, barracksListSprite;
            bossArtSprite = new Sprite(bossArt);
            bossArtSprite.Position = new Vector2f(0, 0);
            locationSprite = new Sprite(locationmarkerTexture);
            locationSprite.Position = new Vector2f(400, 0);
            raidpartybgSprite = new Sprite(raidpartybgTexture);
            raidpartybgSprite.Position = new Vector2f(200, 180);
            barracksListSprite = new Sprite(barracksListTexture);
            barracksListSprite.Position = new Vector2f(0, 180);
        }
示例#5
0
 internal static BossStarInfo getBossStarInfo(BossFightID id)
 {
     return (BossStarInfo)stars[id];
 }
示例#6
0
        private string getTimeString(BossFightID n)
        {
            BossFightRecord r = BossFightLibrary.getBossFightRecord(n);
            BossStarInfo i = (BossStarInfo)stars[n];
            if (r.timeForStars == null) return "nullers";
            string s = i.seconds + " G:" + r.timeForStars[0] + " S:" + r.timeForStars[1] + " B:" + r.timeForStars[2];

            return s;
        }
示例#7
0
 internal void Update(double gameTime, SimpleMouseState mouseState)
 {
     if(selectedFight != BossFightID.none)
         if (mouseState.left && makeGroupButton.didHit(mouseState.getPos()) ) {
             GameBox.getInstance().initRaidSelect(selectedFight);
         }
     if (mouseState.left) {
         foreach (BossListButton b in bossListButtons) {
             if (b.didHit(mouseState.getPos())) {
                 selectedFight = b.getBossFight();
                 selectedStars = (BossStarInfo)stars[selectedFight];
             }
         }
     }
 }
示例#8
0
        internal PostFight(BossFightID id, double timeSecond, int playerAmt, DamageMeter damageMeter, bool win, int enrageTimer, Hashtable lastRaid)
        {
            nextButton = new Button(new IntRect(571, 526, 195, 61));
            restartButton = new Button(new IntRect(234, 526, 191, 64));
            reformPartyButton = new Button(new IntRect(16, 501, 158, 75));

            this.id = id;
            this.timeSecond = timeSecond;
            this.playerAmt = playerAmt;
            this.damageMeter = damageMeter;
            this.win = win;
            this.enrageTimer = enrageTimer;
            this.lastRaid = lastRaid;

            fightStars = BossSelect.getBossStarInfo(id);
            fightRecord = BossFightLibrary.getBossFightRecord(id);
            //update starInfo from last fight
            if (win) {
                fightStars.winStar = win;
                if (playerAmt < fightStars.smallest) {
                    fightStars.smallest = playerAmt;
                    if(playerAmt < fightRecord.smallAmtForStars[0]){
                        fightStars.smallStars[0] = true;
                        fightStars.smallStars[1] = true;
                        fightStars.smallStars[2] = true;
                    } else if (playerAmt < fightRecord.smallAmtForStars[1]) {
                        fightStars.smallStars[1] = true;
                        fightStars.smallStars[2] = true;
                    } else if (fightRecord.smallAmtForStars.Length > 2 && playerAmt < fightRecord.smallAmtForStars[2]) {
                        fightStars.smallStars[2] = true;
                    }
                }
                if (timeSecond < fightStars.seconds) {
                    fightStars.seconds = timeSecond;
                    if (this.timeSecond < fightRecord.timeForStars[0]) {
                        fightStars.timeStars[0] = true;
                        fightStars.timeStars[1] = true;
                        fightStars.timeStars[2] = true;
                    } else if (timeSecond < fightRecord.timeForStars[1]) {
                        fightStars.timeStars[1] = true;
                        fightStars.timeStars[2] = true;
                    } else if (timeSecond < fightRecord.timeForStars[2]) {
                        fightStars.timeStars[2] = true;
                    }
                }

            }
            //make gfx stuff
            postScreenSprite = new Sprite(postScreen);
            postScreenSprite.Position = new Vector2f(0, 0);
            winSprite = new Sprite();
            winSprite.Position = new Vector2f(303, 43);
            smallStarSprite1 = new Sprite();
            smallStarSprite1.Position = new Vector2f(103, 178);
            smallStarSprite2 = new Sprite();
            smallStarSprite2.Position = new Vector2f(103, 200);
            smallStarSprite3 = new Sprite();
            smallStarSprite3.Position = new Vector2f(103, 222);
            timeStarSprite1 = new Sprite();
            timeStarSprite1.Position = new Vector2f(623, 178);
            timeStarSprite2 = new Sprite();
            timeStarSprite2.Position = new Vector2f(623, 200);
            timeStarSprite3 = new Sprite();
            timeStarSprite3.Position = new Vector2f(623, 222);

            winStatusText = new Text(id + " " + (win ? "Win" : "Lose"),GameBox.corbalFont,15U);
            winStatusText.Position = new Vector2f(338, 43);
            winStatusText.Color = Color.Black;
            playerAmtText = new Text(playerAmt + "", GameBox.corbalFont, 15U);
            playerAmtText.Position = new Vector2f(92, 120);
            playerAmtText.Color = Color.Black;
            smallestAmtText1 = new Text(fightRecord.smallAmtForStars[0] + "", GameBox.corbalFont, 15U);
            smallestAmtText1.Position = new Vector2f(122, 178);
            smallestAmtText1.Color = Color.Black;
            smallestAmtText2 = new Text(fightRecord.smallAmtForStars[1] + "", GameBox.corbalFont, 15U);
            smallestAmtText2.Position = new Vector2f(122, 200);
            smallestAmtText2.Color = Color.Black;
            enrageText = new Text(enrageTimer + "", GameBox.corbalFont, 15U);
            enrageText.Position = new Vector2f(621, 271);
            enrageText.Color = Color.Red;
            timeSecondsText = new Text(timeSecond + "", GameBox.corbalFont, 15U);
            timeSecondsText.Position = new Vector2f(621, 114);
            timeSecondsText.Color = Color.Black;
            timeForStarsText1 = new Text(fightRecord.timeForStars[0] + "", GameBox.corbalFont, 15U);
            timeForStarsText1.Position = new Vector2f(642, 178);
            timeForStarsText1.Color = Color.Black;
            timeForStarsText2 = new Text(fightRecord.timeForStars[1] + "", GameBox.corbalFont, 15U);
            timeForStarsText2.Position = new Vector2f(642, 200);
            timeForStarsText2.Color = Color.Black;
            timeForStarsText3 = new Text(fightRecord.timeForStars[2] + "", GameBox.corbalFont, 15U);
            timeForStarsText3.Position = new Vector2f(642, 222);
            timeForStarsText3.Color = Color.Black;
            dmgMeterText = new Text("dmgmeter", GameBox.corbalFont, 15U);
            //winStatusText, playerAmtText, smallestAmtText1, smallestAmtText2, enrageText,
            //    timeSecondsText, timeForStarsText1, timeForStarsText2, timeForStarsText3, dmgMeterText;
        }
示例#9
0
 internal void LoadBackdrop(BossFightID boss)
 {
     if (mBackdrop != null) mBackdrop.UnloadContent();
     BossFightInfo info = BossFightLibrary.getBossInfo(boss);
     mBackdrop = info.backdrop;
     mBackdrop.LoadContent();
 }
示例#10
0
 internal BossListButton(IntRect size, BossFightID b)
     : base(size) {
     boss = b;
 }
示例#11
0
 internal static BossFightInfo getBossInfo(BossFightID fight)
 {
     switch(fight){
     case BossFightID.urisdor:
         return UrsidorBossFight.getBossInfoS();
     default:
         throw new Exception("unsupported fight?: "+fight);
     }
 }
示例#12
0
 internal void initPostFight(BossFightID id, double timeSecond, int playerAmt, DamageMeter damageMeter, bool win, int enrageTimer, Hashtable lastRaid) {
     inGame = null;
     //this.lastRaid = lastRaid;
     gameState = GameState.postFight;
     postFight = new PostFight(id, timeSecond, playerAmt, damageMeter, win, enrageTimer, lastRaid);
     BossSelect.updateTotalStars();
 }
示例#13
0
 //new version!
 internal void startBossFight(BossFight bossFight, List<List<ChampItemPair>> 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;
     lastRaidCompN = raidComp;
 }
示例#14
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;
 }
示例#15
0
 internal void initRaidSelect(BossFightID id) {
     gameState = GameState.raidSelect;
     raidSelect = new RaidSelect2(id, currentBarracks);
 }