public void WhenNoneCombo()
        {
            Tinker_sSharpswordOil tinker_sSharpswordOil = SetTestedCardInHand <Tinker_sSharpswordOil>();
            PilotedShredder       pilotedShredder       = gameContext.GetActivationUserContext().AllCards.First(c => c.GetType() == typeof(PilotedShredder)) as PilotedShredder;

            SetCardInDesk(pilotedShredder);
            BaseHero baseHero = gameContext.GetHeroByActivation();

            GameResult <GameContextOutput> res = proxy.CastHeroPower(gameContext.GameCode, gameContext.GetActivationUserContext().UserCode, -1) as GameResult <GameContextOutput>;

            Xunit.Assert.True(res.code == (int)OperateResCodeEnum.成功);
            res = proxy.CastSpell(gameContext.GameCode, gameContext.GetActivationUserContext().UserCode, tinker_sSharpswordOil.CardInGameCode, -1) as GameResult <GameContextOutput>;
            Xunit.Assert.True(res.code == (int)OperateResCodeEnum.成功);
            Xunit.Assert.True(baseHero.Equip.Damage == 4);
            Xunit.Assert.True(pilotedShredder.Damage == 4);
            Xunit.Assert.True(gameContext.GetActivationUserContext().ComboSwitch);
        }
Ejemplo n.º 2
0
        public void WhenDie()
        {
            PilotedShredder pilotedShredder1 = SetTestedCardInHand <PilotedShredder>();
            Card            eviscerate       = gameContext.GetActivationUserContext().AllCards.First(c => c.GetType() == typeof(Eviscerate));

            SetSomeCardInHand(eviscerate);

            GameResult <GameContextOutput> res = proxy.CastServant(gameContext.GameCode, gameContext.GetActivationUserContext().UserCode, pilotedShredder1.CardInGameCode, 1, -1) as GameResult <GameContextOutput>;

            Xunit.Assert.True(res.code == (int)OperateResCodeEnum.成功);

            res = proxy.CastSpell(gameContext.GameCode, gameContext.GetActivationUserContext().UserCode, eviscerate.CardInGameCode, pilotedShredder1.DeskIndex) as GameResult <GameContextOutput>;
            Xunit.Assert.True(res.code == (int)OperateResCodeEnum.成功);

            Xunit.Assert.True(gameContext.GetActivationUserContext().GraveyardCards.Any(c => c.CardInGameCode == pilotedShredder1.CardInGameCode));
            Xunit.Assert.True(gameContext.DeskCards.Where(c => c != null).Count() == 3);
            Xunit.Assert.True(gameContext.DeskCards[3].Cost == 2);
        }
        public void WhenCombo()
        {
            Tinker_sSharpswordOil tinker_sSharpswordOil = SetTestedCardInHand <Tinker_sSharpswordOil>();
            PilotedShredder       pilotedShredder       = SetTestedCardInHand <PilotedShredder>();
            BaseHero baseHero = gameContext.GetHeroByActivation();

            GameResult <GameContextOutput> res = proxy.CastHeroPower(gameContext.GameCode, gameContext.GetActivationUserContext().UserCode, -1) as GameResult <GameContextOutput>;

            Xunit.Assert.True(res.code == (int)OperateResCodeEnum.成功);

            res = proxy.CastServant(gameContext.GameCode, gameContext.GetActivationUserContext().UserCode, pilotedShredder.CardInGameCode, 4, -1) as GameResult <GameContextOutput>;
            Xunit.Assert.True(res.code == (int)OperateResCodeEnum.成功);

            res = proxy.CastSpell(gameContext.GameCode, gameContext.GetActivationUserContext().UserCode, tinker_sSharpswordOil.CardInGameCode, -1) as GameResult <GameContextOutput>;
            Xunit.Assert.True(res.code == (int)OperateResCodeEnum.成功);

            Xunit.Assert.True(baseHero.Equip.Damage == 4);
            Xunit.Assert.True(pilotedShredder.Damage == 7);
        }