def get_engine_cost_points(self): # Up to 40 points for power. 1 point per 50hp # Power is therefore capped at 2000hp by design, this isn't a hard limit, but raise a warning if self.power > 2000: utils.echo_message("Consist " + self.id + " has power > 2000hp, which is too much") power_cost_points = self.power / 50 # Up to 30 points for speed above up to 90mph. 1 point per 3mph if self.speed > 90: utils.echo_message("Consist " + self.id + " has speed > 90, which is too much") speed_cost_points = min(self.speed, 90) / 3 # Up to 20 points for intro date after 1870. 1 point per 8 years. # Intro dates capped at 2030, this isn't a hard limit, but raise a warning if self.intro_date > 2030: utils.echo_message("Consist " + self.id + " has intro_date > 2030, which is too much") date_cost_points = max((self.intro_date - 1870), 0) / 8 return power_cost_points + speed_cost_points + date_cost_points @property def buy_cost(self): # type_base_buy_cost_points is an arbitrary adjustment that can be applied on a type-by-type basis, return self.get_engine_cost_points() + self.type_base_buy_cost_points @property def running_cost(self): consist_capacity_points = min(self.total_capacities[1], 160) # type_base_running_cost_points is an arbitrary adjustment that can be applied on a type-by-type basis, return self.get_engine_cost_points() + consist_capacity_points + self.type_base_running_cost_points