def air_strike(self, coords, rotation=0): result = {} for coords in Settings.shape("air_strike"): result[coords] = self.battlefield[coords].air_strike() if result[coords] == "aircraft destroyed": break # aircraft isn't lost if it wasnt destroyed unlike other resources if "aircraft destroyed" not in result.values(): self.resourses['aircrafts'] += 1 return result
def battery(self, coords, rotation=0): return [self.battlefield[i].hit() for i in Settings.shape("battery", coords, rotation)]
def torpedo_net(self, coords, rotation=0): for i in Settings.shape("torpedo_net", coords, rotation): self.battlefield[i].set_torpedo_net()
def anti_air(self, coords, rotation=0): for i in Settings.shape("anti_air", coords, rotation): self.battlefield[i].deploy_anti("air")
def radar_jam(self, coords, rotation=0): for i in Settings.shape("radar_jam", coords, rotation): self.battlefield[i].deploy_anti("radar")
def radar_scan(self, coords, rotation=0): return [self.battlefield[i].radar_scan() for i in Settings.shape("radar_scan", coords, rotation)]