Beispiel #1
0
    void Open()
    {
        string text      = "";
        string narration = "";

        if (!mimic)
        {
            text      = _result[0]._treasure._items[0]._name + " 획득\n" + _result[0]._treasure.gold + " 골드 획득";
            narration = DataPool._current._ScriptionDic["FindTresure"]
                        [Random.Range(0, DataPool._current._ScriptionDic["FindTresure"].Count)];
            _gm.StartNarration(narration);
            _gm.SetEnd();
            _cardScript.CardEnd(text);
        }
        else
        {
            narration = DataPool._current._ScriptionDic["Mimic"]
                        [Random.Range(0, DataPool._current._ScriptionDic["Mimic"].Count)];
            _gm.StartNarration(narration);
            text = "응 미믹";
            ObjectInfo enemy = (ObjectInfo)DataPool._current._eventObjDic["Mimic"][0].Clone();
            _player.ObjShake();
            _player.Damaged(CaculateScript.MonsterAttack(enemy));
            _gm.SetPlayerHPOnUI();
            _cardScript.ChangeMonster(enemy);
        }
        _cardScript.SetFrontDesc(text);
        _cardScript.ReFlip();
    }
Beispiel #2
0
 void Run()
 {
     if (Random.Range(0.1f, 100f) <= _result[1]._frequency)
     {
         //성공
         _cardScript.SetFrontDesc("도망에 성공했다.");
         _gm.StartNarration(DataPool._current._ScriptionDic["RunSuccess"]
                            [Random.Range(0, DataPool._current._ScriptionDic["RunSuccess"].Count)]);
         _cardScript.CardEnd(ResultMessage());
         _enemyObjCtrl.CloseObject();
         _gm.ShowResult("");
         _gm.SetEnd();
     }
     else
     {
         //실패
         _cardScript.SetFrontDesc(_enemyInfo._name + "(는/이) 그대에게 3의 데미지를 입혔다.");
         _gm.StartNarration(DataPool._current._ScriptionDic["RunFail"]
                            [Random.Range(0, DataPool._current._ScriptionDic["RunFail"].Count)]);
         _player.Damaged(CaculateScript.MonsterAttack(_enemyInfo));
         _player.ObjShake();
         _gm.SetPlayerHPOnUI();
     }
     _cardScript.ReFlip();
     //_card.SendMessage("ReFlip");
     _eventCount++;
 }
Beispiel #3
0
    void Surprise()
    {
        if (Random.Range(0.1f, 100f) <= _result[2]._frequency)
        {
            //성공
            string text = "그대는 " + _enemyInfo._name + "에게 " + _result[2]._success + "의 데미지를 입혔다.";
            _enemyInfo._health -= _result[2]._success;

            string narration;

            if (_enemyInfo._health < 0)
            {
                //적 처치
                EnemyDown();
                text     += "\n" + "적이 쓰러졌다.";
                narration = DataPool._current._ScriptionDic["MonsterDown"]
                            [Random.Range(0, DataPool._current._ScriptionDic["MonsterDown"].Count)];

                _cardScript.CardEnd(ResultMessage());

                _enemyObjCtrl.CloseObject();
                _gm.SetEnd();
            }
            else
            {
                narration = DataPool._current._ScriptionDic["PlayerSurprise"]
                            [Random.Range(0, DataPool._current._ScriptionDic["PlayerSurprise"].Count)];
                //적 생존
            }
            _cardScript.SetFrontDesc(text);
            _enemyObjCtrl.ObjShake();
            _gm.StartNarration(narration);
        }
        else
        {
            //실패
            if (Random.Range(0.1f, 100f) <= 70)
            {
                //적의 공격 성공
                _cardScript.SetFrontDesc(_enemyInfo._name + "(는/이) 그대에게 6의 데미지를 입혔다.");
                _gm.StartNarration(DataPool._current._ScriptionDic["MonsterSurprise"]
                                   [Random.Range(0, DataPool._current._ScriptionDic["MonsterSurprise"].Count)]);
                _player.Damaged(CaculateScript.MonsterAttack(_enemyInfo) * 2);
                _player.ObjShake();
                _gm.SetPlayerHPOnUI();
            }
            else
            {
                //적의 공격 실패
                _cardScript.SetFrontDesc("서로 회피하였다.");
                _gm.StartNarration(DataPool._current._ScriptionDic["Miss"]
                                   [Random.Range(0, DataPool._current._ScriptionDic["Miss"].Count)]);
            }
        }
        _eventCount++;
        _cardScript.ReFlip();
    }
Beispiel #4
0
 public void EventCaculate()
 {
     mimic = true;
     _cardScript.SetFrontDesc(DataPool._current._ScriptionDic["FindBox"]
                              [Random.Range(0, DataPool._current._ScriptionDic["FindBox"].Count)]);
     _resultAndDesc = CaculateScript.TreasureEncounter(mimic);
     _result        = (TreasureResult[])_resultAndDesc.result;
     _cardScript.CardSetting(_resultAndDesc.desc);
     _cardScript.SetFrontDesc(DataPool._current._ScriptionDic["FindBox"]
                              [Random.Range(0, DataPool._current._ScriptionDic["FindBox"].Count)]);
 }
Beispiel #5
0
    public void EventCaculate()
    {
        result = CaculateScript.PlayerTraped();
        string text = "그대는 " + result.trapDam + "의 데미지를 입었다.";

        _player.Damaged(result.trapDam);
        _gm.SetPlayerHPOnUI();
        _cardScript.SetFrontDesc(text);
        _gm.SetEnd();
        _cardScript.CardEnd("");
    }
Beispiel #6
0
    public void EventCaculateAfter(ObjectInfo enemy)
    {
        //적 생성
        _enemyInfo  = (EnemyObjInfo)enemy;
        _eventCount = 1;

        _enemyObjCtrl.OnObject();

        _resultAndDesc = CaculateScript.MonsterEncounter(_enemyInfo);
        _result        = (MonsterResult[])_resultAndDesc.result;
        _cardScript.CardSetting(_resultAndDesc.desc);
    }
Beispiel #7
0
    public void EventCaculate()
    {
        //적 생성
        _enemyInfo = (EnemyObjInfo)DataPool._current._eventObjDic["Monster"]
                     [Random.Range(0, DataPool._current._eventObjDic["Monster"].Count)].Clone();
        _eventCount = 0;

        _enemyObjCtrl.OnObject();

        _resultAndDesc = CaculateScript.MonsterEncounter(_enemyInfo);
        _result        = (MonsterResult[])_resultAndDesc.result;
        _cardScript.CardSetting(_resultAndDesc.desc);
        _cardScript.SetFrontDesc(DataPool._current._ScriptionDic["EncounterMessage"]
                                 [Random.Range(0, DataPool._current._ScriptionDic["EncounterMessage"].Count)]);
    }
Beispiel #8
0
    public void EventCaculate()
    {
        //오브젝트 그림 생성
        //_ShrineInfo

        _ObejctCtrl.OnObject();

        _resultAndDesc = CaculateScript.ShrineEncounter();
        _result        = (ShrineResult[])_resultAndDesc.result;


        _cardScript.CardSetting(_resultAndDesc.desc);
        _cardScript.SetFrontDesc("신단을 발견했다.");
        CommandArrange();
    }
Beispiel #9
0
 public void MonsterFirstAttck()
 {
     _player.Damaged(CaculateScript.MonsterAttack(_enemyInfo));
     _player.ObjShake();
 }