Ejemplo n.º 1
0
    public override int GetChaosTokenEffect(ChaosBag.ChaosTokenType t)
    {
        if (GameLogic.Get().m_difficulty == GameDifficulty.Easy ||
            GameLogic.Get().m_difficulty == GameDifficulty.Normal)
        {
            switch (t)
            {
            case ChaosBag.ChaosTokenType.Skully:
                return(0 - Card.HowManyEnemyCardContainTheKeyword(Player.Get().m_currentLocation.m_lstCardsAtHere, Card.Keyword.Ghoul));

            case ChaosBag.ChaosTokenType.Cultist:
                return(-1);

            case ChaosBag.ChaosTokenType.Tablet:
                if (Card.HowManyEnemyCardContainTheKeyword(Player.Get().m_currentLocation.m_lstCardsAtHere, Card.Keyword.Ghoul) > 0)
                {
                    Player.Get().AssigningDamage(null, 1);
                    GameLogic.Get().OutputGameLog(Player.Get().m_investigatorCard.m_cardName + "结算混沌标记:受到1点伤害\n");
                }
                return(-2);

            default:
                break;
            }
        }
        else
        {
            Debug.Log("Hard/Expert difficulty not impl in GetChaosTokenEffect()!!");
        }

        Assert.IsTrue(false, "Assert failed in GetChaosTokenEffect()!!");
        return(-1);
    }
Ejemplo n.º 2
0
    public int SkillTest(SkillType skill, int AgainstValue, Card target)
    {
        int chaosResult      = 0;
        int skillIconValue   = GetSkillIconNumInSelectCards(skill);
        int playerSkillValue = Player.Get().GetSkillValueByType(skill);

        ChaosBag.ChaosTokenType chaosToken = m_chaosBag.GetResult();

        switch (chaosToken)
        {
        case ChaosBag.ChaosTokenType.Tentacle:
            // Auto failed...
            chaosResult = -skillIconValue - playerSkillValue;
            break;

        case ChaosBag.ChaosTokenType.ElderSign:
            chaosResult = Player.Get().m_investigatorCard.GetComponent <InvestigatorLogic>().OnApplyElderSignEffect();
            break;

        case ChaosBag.ChaosTokenType.Zero:
        case ChaosBag.ChaosTokenType.Add_1:
        case ChaosBag.ChaosTokenType.Substract_1:
        case ChaosBag.ChaosTokenType.Substract_2:
        case ChaosBag.ChaosTokenType.Substract_3:
        case ChaosBag.ChaosTokenType.Substract_4:
        case ChaosBag.ChaosTokenType.Substract_5:
        case ChaosBag.ChaosTokenType.Substract_6:
        case ChaosBag.ChaosTokenType.Substract_7:
        case ChaosBag.ChaosTokenType.Substract_8:
            chaosResult = (int)chaosToken;
            break;

        default:
            chaosResult = m_currentScenario.GetChaosTokenEffect(chaosToken);
            break;
        }


        int finalValue = skillIconValue + chaosResult + playerSkillValue - AgainstValue;

        Card.m_lstSelectCards.ForEach(card =>
        {
            if (card.IsKeywordContain(Card.Keyword.Skill) && card.GetComponent <PlayerCardLogic>())
            {
                card.GetComponent <PlayerCardLogic>().OnSkillTest(finalValue);
            }
        });

        OutputGameLog(string.Format("技能检定如下:\n对应技能:<color=green>{0}</color>\n打出技能图标:<color=green>{1}</color>\n混沌标记<{2}>:<color=orange>{3}</color>\n检定值:<color=red>{4}</color>\n最终结果:{5}\n",
                                    playerSkillValue,
                                    skillIconValue,
                                    ChaosBag.GetChaosTokenName(chaosToken),
                                    chaosResult,
                                    -AgainstValue,
                                    finalValue));

        m_currentScenario.m_skillTest.AfterSkillTest(finalValue, chaosToken, target);

        return(finalValue);
    }
Ejemplo n.º 3
0
    private IEnumerator _AfterSkillTest(int result, ChaosBag.ChaosTokenType chaosToken, Card target)
    {
        GameLogic.Get().AfterSkillTest(result >= 0, chaosToken);
        // TODO: 协程越来越逻辑耦合了。。。。。。。。应该找个方法去掉协程了。。。。。。。。。
        yield return(new WaitUntil(() => Player.Get().GetCurrentAction() != PlayerAction.AssignDamage && Player.Get().GetCurrentAction() != PlayerAction.AssignHorror));

        GameLogic.Get().m_afterSkillTest.Invoke(result, target);
    }
Ejemplo n.º 4
0
    public void AfterSkillTest(bool bSucceed, ChaosBag.ChaosTokenType chaosToken)
    {
        if (!bSucceed)
        {
            m_currentScenario.AfterSkillTestFailed(chaosToken);
        }

        if (chaosToken == ChaosBag.ChaosTokenType.ElderSign)
        {
            Player.Get().m_investigatorCard.GetComponent <InvestigatorLogic>().OnElderSignSkillTestResult(bSucceed);
        }
    }
Ejemplo n.º 5
0
    public override void AfterSkillTestFailed(ChaosBag.ChaosTokenType t)
    {
        if (GameLogic.Get().m_difficulty == GameDifficulty.Easy ||
            GameLogic.Get().m_difficulty == GameDifficulty.Normal)
        {
            switch (t)
            {
            case ChaosBag.ChaosTokenType.Cultist:
                Player.Get().AssigningHorror(1);
                GameLogic.Get().OutputGameLog(Player.Get().m_investigatorCard.m_cardName + "结算混沌标记:受到1点恐怖\n");
                break;

            default:
                break;
            }
        }
        else
        {
            throw new System.NotImplementedException("Hard/Expert difficulty not impl in AfterSkillTest()!!");
        }
    }
 public override void AfterSkillTestFailed(ChaosBag.ChaosTokenType t)
 {
 }
 public override int GetChaosTokenEffect(ChaosBag.ChaosTokenType t)
 {
     Assert.IsTrue(false, "Assert failed in GetChaosTokenEffect()!!");
     return(-1);
 }
Ejemplo n.º 8
0
 public abstract void AfterSkillTestFailed(ChaosBag.ChaosTokenType t);
Ejemplo n.º 9
0
 public abstract int GetChaosTokenEffect(ChaosBag.ChaosTokenType t);
Ejemplo n.º 10
0
 public void AfterSkillTest(int result, ChaosBag.ChaosTokenType chaosToken, Card target)
 {
     StartCoroutine(_AfterSkillTest(result, chaosToken, target));
 }