public override void ChangeRelationsAfterBattle(Country attackerCountry) { if (!attackerCountry.isDefaultCountry) { Debug.Log("Changing relations because WorldAgent has been conquered"); CountryRelation countryRelation = CountryManager.instance.GetRelationBetweenCountries(MyCountry, attackerCountry); countryRelation.ChangeAmount(-5); } }
public void PayForBetterRelations() { const int payAmount = 100; const int changeRelationAmount = 10; Country playerCountry = CountryManager.instance.PlayerCountry; Item item = new Item(ItemType.Gold, payAmount); if (playerCountry.CanTradeItem(item)) { CountryRelation countryRelation = CountryManager.instance.GetRelationBetweenCountries(playerCountry, currentCountry); countryRelation.ChangeAmount(changeRelationAmount); playerCountry.Inventory.MoveItemToInventory(item, currentCountry.Inventory); RefreshAll(); AudioManager.instance.ClickButton(); } }