private void TaskOnClick()
    {
        PartyActions.Sleep();
        if (Tent.Status == TentStatus.Fireplace)
        {
            PartyActions.DamageAllPlayers(1);
        }

        if (InventionStorage.IsAvailable(Invention.Cellar))
        {
            var food = FoodStorage.Food;
            FoodStorage.DecreaseFoodBy(food);
            FoodStorage.IncreasePermantFoodBy(food);
        }

        if (CampMoved)
        {
            Wall.HalfValue_Ceiling();
            Roof.HalfValue_Ceiling();
        }

        FoodStorage.DiscardFood();

        Destroy(popUp);
        var phaseView = FindObjectOfType <PhaseView>();

        phaseView.NextPhase();
        RoundSystem.instance.increaseRound();
    }
Exemple #2
0
    private void ShowInfoText()
    {
        var    character = PartyActions.GetActiveCharacter();
        string info      = "Der " + character.CharacterName + " erhält diese Runde " + Moral.GetMoraleString();

        informationText.text = info;
    }
 // Start is called before the first frame update
 void Start()
 {
     SetMainCharacter(PartyActions.GetActiveCharacter());
     lastHealth        = 0;
     lastDetermination = 0;
     lastActive        = false;
 }
Exemple #4
0
    private void TaskOnClick()
    {
        if (Moral.GetCurrentMoralState() == MoralState.Best && !wantsHeal && !wantsDetermination)
        {
            return;
        }

        var character = PartyActions.GetActiveCharacter();

        if (wantsHeal)
        {
            CharacterActions.HealCharacterBy(1, character);
        }
        else
        {
            int moralevalue = Moral.GetMoraleInt();
            if (moralevalue < 0)
            {
                CharacterActions.LowerCharacterDeterminationBy(moralevalue, character);
            }
            else
            {
                CharacterActions.RaiseCharacterDeterminationBy(moralevalue, character);
            }
        }
        Destroy(popUp);
        var phaseView = FindObjectOfType <PhaseView>();

        phaseView.NextPhase();
    }
Exemple #5
0
        public static void DowngradeWallBy(int value)
        {
            WallState -= value;
            if (WallState < 0)
            {
                int dmg = Math.Abs(WallState);
                PartyActions.DamageAllPlayers(dmg);

                WallState = 0;
            }
            WallStateChanged?.Invoke(WallState, new EventArgs());
        }
Exemple #6
0
        public static void DowngradeRoofBy(int value)
        {
            RoofState -= value;
            if (RoofState < 0)
            {
                int dmg = Math.Abs(RoofState);
                PartyActions.DamageAllPlayers(dmg);

                RoofState = 0;
            }
            RoofChanged?.Invoke(RoofState, new EventArgs());
        }
Exemple #7
0
        public static void DecreaseWoodBy(int value)
        {
            currentAmountOfWood -= value;
            if (currentAmountOfWood < minValue)
            {
                int dmg = Math.Abs(currentAmountOfWood);
                PartyActions.DamageAllPlayers(dmg);

                currentAmountOfWood = minValue;
            }

            AmountOfWoodChanged?.Invoke(currentAmountOfWood, new EventArgs());
        }
Exemple #8
0
        public static void DecreaseBy(int amount)
        {
            currentAmountOfFur -= amount;
            if (currentAmountOfFur < 0)
            {
                int dmg = Math.Abs(currentAmountOfFur);
                PartyActions.DamageAllPlayers(dmg);

                currentAmountOfFur = 0;
            }

            AmountOFFurChanged?.Invoke(currentAmountOfFur, new EventArgs());
        }
Exemple #9
0
        public static void LowerWeaponPowerBy(int value)
        {
            currentWeaponPower -= value;
            if (currentWeaponPower < 0)
            {
                int dmg = Math.Abs(currentWeaponPower);
                PartyActions.DamageAllPlayers(dmg);

                currentWeaponPower = 0;
            }

            WeaponPowerChanged?.Invoke(currentWeaponPower, new EventArgs());
        }
Exemple #10
0
        public void increaseRound()
        {
            currentRound += 1;
            PartyActions.SetNextActiveCharacter();

            if (myLevel.CheckForVictory(currentRound))
            {
                EndGame_Object.TriggerVictory("Herzlichen Glückwunsch!\r\nDu hast die Mission erfolgreich erfüllt und bist von der Insel entkommen!\r\n\r\nBis zum nächsten mal.");
            }

            if (currentRound > myLevel.GetNumberOfRounds())
            {
                EndGame_Object.TriggerDefeat("Deiner Gruppe ist leider die Zeit ausgegangen. Aus diesem Grund wird diese Insel von nun an eure neue Heimat.");
            }

            CharacterView_UpdateOnRoundChange.SetToCurrentActive_Global();
            InvokeRoundChange();
        }
Exemple #11
0
    private void SetToCurrentActive()
    {
        var active = PartyActions.GetActiveCharacter();

        foreach (var view in views)
        {
            if (!view.GetComponent <SmallCharacterView>().isActive)
            {
                continue;
            }

            if (view.GetComponent <SmallCharacterView>().myCharacter.CharacterName == active.CharacterName)
            {
                view.GetComponent <SmallCharacterView>().SetAsActive();
                return;
            }
        }
    }
Exemple #12
0
 private void GetRidOfEnvironment()
 {
     if (weatherDice.environmentalDice)
     {
         if (result_Environment == EnvironmentalDice.Animal)
         {
             if (WeaponPower.currentWeaponPower < 3)
             {
                 var activeChar = PartyActions.GetActiveCharacter();
                 int difference = 3 - WeaponPower.currentWeaponPower;
                 CharacterActions.DamageCharacterBy(difference, activeChar);
             }
         }
         if (result_Environment == EnvironmentalDice.PalisadeDamage)
         {
             Wall.DowngradeWallBy(1);
         }
     }
 }
Exemple #13
0
    private void HandleRessourceCosts()
    {
        Debug.Log("Wood " + amountWoodGone);
        Debug.Log("Food " + amountFoodGone);

        if (amountWoodGone > 0)
        {
            Wood.DecreaseWoodBy(amountWoodGone);
        }
        if (amountFoodGone > 0)
        {
            if (FoodStorage.GetTotal() < amountFoodGone)
            {
                int difference = amountFoodGone - FoodStorage.GetTotal();
                FoodStorage.Consume(FoodStorage.GetTotal());
                PartyActions.DamageAllPlayers(difference);
            }
            else
            {
                FoodStorage.Consume(amountFoodGone);
            }
        }
    }
    private void OnMouseDown()
    {
        var component = GetComponent <Actionphase_CanClick>();

        if (component != null && component.IsClickable)
        {
            if (Charges == 0)
            {
                return;
            }

            PartyActions.HealAllPlayers(1);

            Charges--;
            if (Charges == 1)
            {
                token_1.SetActive(true);
            }
            if (Charges == 0)
            {
                token_2.SetActive(true);
            }
        }
    }
Exemple #15
0
    private void OnMouseDown()
    {
        var component = GetComponent <Actionphase_CanClick>();

        if (component != null && component.IsClickable)
        {
            if (Charges == 0)
            {
                return;
            }

            PartyActions.RaiseDeterminationOfPartyBy(2);

            Charges--;
            if (Charges == 1)
            {
                token_1.SetActive(true);
            }
            if (Charges == 0)
            {
                token_2.SetActive(true);
            }
        }
    }
 private void ExecuteFutureThreat()
 {
     PartyActions.LowerDeterminationOfPartyBy(1);
 }
 private void ResetCharacterActionTokens()
 {
     PartyActions.TokenReset();
 }