Example #1
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++;
 }
Example #2
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();
    }
Example #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();
    }
Example #4
0
 public void MonsterFirstAttck()
 {
     _player.Damaged(CaculateScript.MonsterAttack(_enemyInfo));
     _player.ObjShake();
 }