Пример #1
0
 public void WaitTurns() //Если игрок спит/оглушён/напуган, то запускается этот метод
 {
     //int npcId = BattleMechanics.SelectedNpc;
     //NpcMonster npc = BattleMechanics.NpcList[npcId];
     BattleMechanics.TurnPhase();
     if (PlayerStats.SleepinessEffectOnHero || !PlayerStats.StunEffectOnHero || !PlayerStats.TerrorEffectOnHero)
     {
         WaitButton.SetActive(false);
         GameObject.Find("Defence Button").GetComponent <Button>().enabled = true;
     }
 }
Пример #2
0
    public void PhysDef() //
    {
        int        npcId = BattleMechanics.SelectedNpc;
        NpcMonster npc   = BattleMechanics.NpcList[npcId];

        PlayerStats.PlayerBattlePhase(2, npc);
        if (npc.CurrentHp == 0 || PlayerStats.CurrentHp == 0)
        {
            BattleMechanics.WhoIsLoosing(npc);
            if (PlayerStats.CurrentHp == 0 || BattleMechanics.GameOver)
            {
                return;
            }
        }
        BattleMechanics.TurnPhase();
        //BattleMechanics.PlayerMadeHisTurn = false;
    }
Пример #3
0
 public void ChangeWeaponTypeToCloseCombat()
 {
     if (PlayerStats.Initiative == 6 && BattleMechanics.GameStarted)
     {
         BattleMechanics.LogText.text += "\n\rУ Героя и так Ближний Бой.\n\r";
         return;
     }
     PlayerStats.Initiative     = 6;
     PlayerStats.DistanceAttack = false;
     if (BattleMechanics.GameStarted)
     {
         BattleMechanics.LogText.text += "\n\rГерой меняет своё оружие на Ближний Бой.\n\r";
         PlayerStats.MadeTurn          = true;
         PlayerStats.WeaponSwitch      = true;
         BattleMechanics.TurnPhase();
         BattleMechanics.InitiativeCount();
     }
 }
Пример #4
0
    public void PhysAttack() //
    {
        Text       logText = GameObject.Find("Log Field Text").GetComponent <Text>();
        int        npcId   = BattleMechanics.SelectedNpc;
        NpcMonster npc     = BattleMechanics.NpcList[npcId];

        if (npc.CurrentHp == 0)
        {
            logText.text += npc.Name + " уже недееспособен. Выберите другого противника.\n\r";
            return;
        }
        PlayerStats.PlayerBattlePhase(1, npc);
        if (npc.CurrentHp == 0 || PlayerStats.CurrentHp == 0)
        {
            BattleMechanics.WhoIsLoosing(npc);
            if (BattleMechanics.GameOver)
            {
                return;
            }
        }
        BattleMechanics.TurnPhase();
        //BattleMechanics.PlayerMadeHisTurn = false;
    }