Ejemplo n.º 1
0
 public void debug3_5()
 {
     //对方不出反击
     if (roundManager.waitCounter == WaitPhase.WaitEnemy)
     {
         cardEffect.ActionEffect(showingCard.enemyAttack, noCounterCard, true);
         roundManager.EnemyWaitOK();
     }
 }
Ejemplo n.º 2
0
    //生成牌,播放出牌动画,消耗行动点,先行效果
    public void InstantiateInit()
    {
        Destroy(GoShowCard);
        GoShowCard                  = Instantiate(showCard) as GameObject;
        showCardManager             = GoShowCard.GetComponent <CardManager>();
        showCardManager.attackCard  = attackCard;
        showCardManager.counterCard = counterCard;
        showCardManager.cardButton  = HandCardButton.Cannot;
        showCardManager.init();

        //出牌动画
        CardShowAnimation(GoShowCard.transform);

        //消耗行动点
        if (roundManager.isMyturn)
        {
            user.ApChange(-showCardManager.attackCard.ActionPoint);
        }
        else
        {
            user.ApChange(-showCardManager.counterCard.ActionPoint);
        }

        if (roundManager.isMyturn &&
            roundManager.waitCounter == WaitPhase.WaitEnemy)
        {
            //打出反击卡

            //共鸣法师技能
            if (user.hero.No == 3)
            {
                if (enemyAttack.damageAttribute == Attribute.Magic)
                {
                    SkillManager.printSkill("对方共鸣法师使用技能");
                    user.HP++;
                }
            }

            //等待结束
            roundManager.EnemyWaitOK();
            roundManager.WaitPrefabOff();

            //判定
            cardEffect.ActionEffect(enemyAttack, showCardManager.counterCard, true);
        }
        else
        {
            //打出进攻卡

            //水晶剑士技能
            if (user.hero.No == 2)
            {
                if (showCardManager.attackCard.damageAttribute == Attribute.Magic)
                {
                    SkillManager.printSkill("对方水晶剑士增加计数器");
                    user.HeroTimer++;
                }
                else if (showCardManager.attackCard.damageAttribute == Attribute.Physical)
                {
                    if (user.HeroTimer >= 1)
                    {
                        SkillManager.printSkill("对方水晶剑士使用技能");
                        user.HeroTimer = 0;
                        showCardManager.attackCard.Damage++;
                        showCardManager.init();
                    }
                }
            }

            //进攻牌先行效果
            switch (showCardManager.attackCard.attackCardNo)
            {
            case 2:
                //上挑
                cardCurved.RandomDestroyCard();
                break;

            case 10:
                //流星雨
                delayAttack             = true;
                showingCard.enemyAttack = showCardManager.attackCard;
                //额外伤害归零
                addDamage = 0;
                break;
            }
            if (!delayAttack)
            {
                AttackAction();
            }
        }
    }