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();
    }
Esempio n. 2
0
 private void ExecuteFutureThreat()
 {
     if (!InventionStorage.IsAvailable(Invention.Cure))
     {
         Player.PartyActions.DamageAllPlayers(1);
     }
 }
 public bool IsBuildable()
 {
     if (InventionStorage.IsAvailable(Invention.Brick))
     {
         return(true);
     }
     return(false);
 }
 public bool CanCompleteQuest()
 {
     if (InventionStorage.IsAvailable(Invention.Knife))
     {
         return(true);
     }
     return(false);
 }
Esempio n. 5
0
 public bool IsBuildable()
 {
     if (InventionStorage.IsAvailable(Invention.Knife) &&
         InventionStorage.IsAvailable(Invention.Rope))
     {
         return(true);
     }
     return(false);
 }
 public bool IsBuildable()
 {
     if (InventionStorage.IsAvailable(Invention.Fire) &&
         TerrainStorage.GetValue(TerrainType.Hill))
     {
         return(true);
     }
     return(false);
 }
Esempio n. 7
0
 public override bool CheckForVictory(int currentRound)
 {
     if (currentRound >= 10 &&
         InventionStorage.IsAvailable(Invention.Fire) &&
         isStackCompleted)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 8
0
 private void GetRidOfSnow(int amount)
 {
     if (InventionStorage.IsAvailable(Invention.Furnance) &&
         !furnaceEffectUsed)
     {
         amount--;
         furnaceEffectUsed = true;
     }
     amountWoodGone += amount;
     GetRidOfRain(amount);
 }
Esempio n. 9
0
    public void Research()
    {
        if (!isResearched)
        {
            isResearched = true;
            UpdateMaterial();

            InventionStorage.UnlockInvention(cardClass.GetInventionType());
            cardClass.Research();

            //TODO: Apply card effects, do they even have effects?
        }
    }
Esempio n. 10
0
 // Start is called before the first frame update
 void Start()
 {
     //TODO: Initialize all the other stuff
     Roof.SetStartValue(0);
     Wall.SetStartState(0);
     WeaponPower.SetStartValue(0);
     Fur.SetStartValue(0);
     Wood.SetStartValue(0);
     FoodStorage.SetStartValue(0, 0);
     Moral.SetStartValue();
     TerrainStorage.CreateStorageSpace();
     InventionStorage.CreateStorageSpace();
 }
    private void UpdateTextures()
    {
        if (InventionStorage.IsAvailable(Invention.Fire))
        {
            torch.SetActive(true);
        }

        int index = GetTotalValue();

        for (int i = 0; i < index; i++)
        {
            var obj = blockOfWood[i];
            obj.GetComponent <RawImage>().texture = okWood;
        }
    }
Esempio n. 12
0
    public void ProcessRestAction(ActionContainer action)
    {
        var character = action.GetExecutingCharacter();

        if (InventionStorage.IsAvailable(Invention.Bed))
        {
            var active = PartyActions.ExecutingCharacter;
            CharacterActions.RaiseCharacterDeterminationBy(1, active);
            CharacterActions.HealCharacterBy(2, active);
        }
        else
        {
            var active = PartyActions.ExecutingCharacter;
            CharacterActions.HealCharacterBy(1, active);
        }
    }
Esempio n. 13
0
    public void UpdateText()
    {
        round.text = RoundSystem.instance.currentRound.ToString();
        if (RoundSystem.instance.currentRound >= 10)
        {
            roundGoal.SetActive(true);
        }

        int value = PopUp_Mission_StackOfWood.GetTotalValue();

        wood.text = value.ToString();
        Debug.Log(value);
        if (value >= 15)
        {
            woodGoal.SetActive(true);
        }

        if (InventionStorage.IsAvailable(Invention.Fire))
        {
            fire.text = "1";
            fireGoal.SetActive(true);
        }
    }