private void ExecuteFutureThreat() { if (FoodStorage.GetTotal() < 1) { var active = Player.PartyActions.ExecutingCharacter; Characters.CharacterActions.DamageCharacterBy(1, active); } else { FoodStorage.Consume(1); } WeaponPower.RaiseWeaponPowerBy(1); }
private bool CheckBuildCosts() { var costs = BuildingCosts.GetBuildingCosts(); bool retVal = true; if (Wood.currentAmountOfWood < costs.AmountOfWood) { retVal = false; } if (Fur.currentAmountOfFur < costs.AmountOfLeather) { retVal = false; } if (FoodStorage.GetTotal() < costs.AmountOfFood) { retVal = false; } return(retVal); }
public static void Sleep() { foreach (Character c in PartyHandler.PartySession) { if (c is ISideCharacter) { continue; } if (FoodStorage.GetTotal() >= 1) { FoodStorage.Consume(1); } else { CharacterActions.DamageCharacterBy(2, c); } } }
private bool CheckBuildCosts() { var costs = GetComponent <ItemCard>().cardClass.GetRessourceCosts(); bool retVal = true; if (Wood.currentAmountOfWood < costs.AmountOfWood) { retVal = false; } if (Fur.currentAmountOfFur < costs.AmountOfLeather) { retVal = false; } if (FoodStorage.GetTotal() < costs.AmountOfFood) { retVal = false; } return(retVal); }
private bool CheckBuildCosts(IEventCard card) { var costs = card.GetRessourceCosts(); bool retVal = true; if (Wood.currentAmountOfWood < costs.AmountOfWood) { retVal = false; } if (Fur.currentAmountOfFur < costs.AmountOfLeather) { retVal = false; } if (FoodStorage.GetTotal() < costs.AmountOfFood) { retVal = false; } return(retVal); }
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); } } }