25 #include "eng3d/log.hpp"
35 receiver_id = _receiver;
52 return amount * days_duration;
57 world.nations[sender_id].prestige += 0.0001f;
58 world.nations[receiver_id].prestige -= 0.0001f;
59 world.nations[sender_id].budget -= amount;
60 world.nations[receiver_id].budget += amount;
65 return days_duration != 0;
73 return (world.nations[receiver_id].prestige * (amount * days_duration)) / 100;
78 world.nations[sender_id].prestige += amount;
79 world.nations[receiver_id].prestige -= amount;
84 return days_duration != 0;
96 world.nations[sender_id].prestige += cost() * 0.025f;
97 world.nations[receiver_id].prestige -= cost() * 0.05f;
98 for(
const auto province_id : province_ids)
99 world.nations[liberated_id].give_province(world.provinces[province_id]);
112 return imposed.difference(world.nations[receiver_id].current_policy);
117 world.nations[receiver_id].set_policy(imposed);
134 world.nations[sender_id].prestige += cost() * 0.025f;
135 world.nations[receiver_id].prestige -= cost() * 0.05f;
136 for(
const auto province_id : province_ids)
137 world.nations[sender_id].give_province(world.provinces[province_id]);
154 world.nations[receiver_id].make_puppet(world.nations[sender_id]);
164 for(
auto& [other_nation, _] : this->approval_status)
165 if(other_nation == nation)
172 bool on_effect = std::find_if(this->approval_status.begin(), this->approval_status.end(), [](
const auto& status) { return status.second != TreatyApproval::ACCEPTED; }) == this->approval_status.end();
176 for(
const auto& clause : this->clauses) {
Nation::Relation & get_relation(NationId a, NationId b)
static World & get_instance()
bool is_foe(Nation &us, Nation &them)
bool is_friend(Nation &us, Nation &them)
bool does_participate(const Nation &nation) const