static public Dialogue_Prompt DefaultAmount(Resources_Player player, Resources_Shopkeeper shopkeeper, int askingPrice) { Resources_Building shop = shopkeeper.home; float profit = shop.income - shop.expenses; if (profit == 0) { profit = 0.0001f; } float affordValue = 2 * ((1 - askingPrice / profit * shopkeeper.greed) * (shopkeeper.fear / shopkeeper.greed) - 50); float strengthValue = (Utilities.difficultyHandicap / 5 + player.strength) * player.presence - (shopkeeper.strength * 100 / shopkeeper.fear); float moralValue = Utilities.difficultyHandicap * shopkeeper.fear / 10 - shopkeeper.integrity / shopkeeper.respect; Debug.Log("Afford Value: " + affordValue + ". Strength Value: " + strengthValue + ". Moral Value: " + moralValue + ". Total: " + (affordValue + strengthValue + moralValue) + "."); if ((affordValue + strengthValue + moralValue) >= 0) { Dialogue_Prompt_Logic.OfferAccepted(); return(Dialogue_Prompt.GetPromptByName("dialogue_prompt_offerAccepted")); } else { Dialogue_Prompt_Logic.OfferRefused(); return(Dialogue_Prompt.GetPromptByName("dialogue_prompt_offerRefused")); } }