diff --git a/gen/missiles/missiles_group_generator.py b/gen/missiles/missiles_group_generator.py index 9a89669b..3b84037d 100644 --- a/gen/missiles/missiles_group_generator.py +++ b/gen/missiles/missiles_group_generator.py @@ -1,10 +1,12 @@ import logging import random from game import db +from gen.missiles.scud_site import ScudGenerator from gen.missiles.v1_group import V1GroupGenerator MISSILES_MAP = { "V1GroupGenerator": V1GroupGenerator, + "ScudGenerator": ScudGenerator } diff --git a/gen/missiles/scud_site.py b/gen/missiles/scud_site.py new file mode 100644 index 00000000..6b050c84 --- /dev/null +++ b/gen/missiles/scud_site.py @@ -0,0 +1,30 @@ +import random + +from dcs.vehicles import Unarmed, MissilesSS, AirDefence + +from gen.sam.group_generator import GroupGenerator + + +class ScudGenerator(GroupGenerator): + + def __init__(self, game, ground_object, faction): + super(ScudGenerator, self).__init__(game, ground_object) + self.faction = faction + + def generate(self): + + # Scuds + self.add_unit(MissilesSS.SRBM_SS_1C_Scud_B_9K72_LN_9P117M, "V1#0", self.position.x, self.position.y + random.randint(1, 8), self.heading) + self.add_unit(MissilesSS.SRBM_SS_1C_Scud_B_9K72_LN_9P117M, "V1#1", self.position.x + 50, self.position.y + random.randint(1, 8), self.heading) + self.add_unit(MissilesSS.SRBM_SS_1C_Scud_B_9K72_LN_9P117M, "V1#2", self.position.x + 100, self.position.y + random.randint(1, 8), self.heading) + + # Commander + self.add_unit(Unarmed.Transport_UAZ_469, "Kubel#0", self.position.x - 35, self.position.y - 20, + self.heading) + + # Shorad + self.add_unit(AirDefence.SPAAA_ZSU_23_4_Shilka, "SHILKA#0", self.position.x - 55, self.position.y - 38, + self.heading) + + self.add_unit(AirDefence.SAM_SA_9_Strela_1_9P31, "STRELA#0", + self.position.x + 200, self.position.y + 15, 90) \ No newline at end of file diff --git a/resources/campaigns/pg_map_full.json b/resources/campaigns/pg_map_full.json new file mode 100644 index 00000000..1d0a2618 --- /dev/null +++ b/resources/campaigns/pg_map_full.json @@ -0,0 +1,143 @@ +{ + "name": "Persian Gulf - Full", + "theater": "Persian Gulf", + "authors": "Khopa", + "description": "Full persian gulf map. For performance reason, please enable 'culling' in settings when playing this map. Known issues : Islands can only be captured through cheating.", + "player_points": [ + { + "type": "carrier", + "id": 1001, + "x": 59514.324335475, + "y": 28165.517980635 + }, + { + "type": "lha", + "id": 1002, + "x": -27500.813952358, + "y": -147000.65947136 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Ras Al Khaimah", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Khasab", + "size": 600, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Qeshm Island", + "radials": [ + 270, + 315, + 0, + 45, + 90, + 135, + 180 + ], + "size": 600, + "importance": 1.1 + }, + { + "type": "airbase", + "id": "Havadarya", + "radials": [ + 225, + 270, + 315, + 0, + 45 + ], + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Bandar Abbas Intl", + "size": 2000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Bandar Lengeh", + "radials": [ + 270, + 315, + 0, + 45 + ], + "size": 600, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Shiraz International Airport", + "size": 2000, + "importance": 1.4, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Jiroft Airport", + "size": 2000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Kerman Airport", + "size": 2000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Lar Airbase", + "size": 1000, + "importance": 1.4 + } + ], + "links": [ + [ + "Khasab", + "Ras Al Khaimah" + ], + [ + "Bandar Lengeh", + "Lar Airbase" + ], + [ + "Havadarya", + "Lar Airbase" + ], + [ + "Bandar Abbas Intl", + "Havadarya" + ], + [ + "Bandar Abbas Intl", + "Jiroft Airport" + ], + [ + "Lar Airbase", + "Shiraz International Airport" + ], + [ + "Kerman Airport", + "Shiraz International Airport" + ], + [ + "Jiroft Airport", + "Kerman Airport" + ], + [ + "Kerman Airport", + "Lar Airbase" + ] + ] +} \ No newline at end of file diff --git a/resources/factions/iran_2015.json b/resources/factions/iran_2015.json index 5b6d8757..512bd40e 100644 --- a/resources/factions/iran_2015.json +++ b/resources/factions/iran_2015.json @@ -68,6 +68,10 @@ "requirements": {}, "carrier_names": [ ], + "missiles": [ + "ScudGenerator" + ], + "missiles_group_count": 1, "navy_generators": [ "GrishaGroupGenerator", "MolniyaGroupGenerator", diff --git a/resources/factions/libya_2011.json b/resources/factions/libya_2011.json index 6758167d..0eb74587 100644 --- a/resources/factions/libya_2011.json +++ b/resources/factions/libya_2011.json @@ -49,6 +49,10 @@ ], "helicopter_carrier_names": [ ], + "missiles": [ + "ScudGenerator" + ], + "missiles_group_count": 1, "destroyers": [ "FF_1135M_Rezky" ], diff --git a/resources/factions/north_korea_2000.json b/resources/factions/north_korea_2000.json index db8881f3..3588d3d8 100644 --- a/resources/factions/north_korea_2000.json +++ b/resources/factions/north_korea_2000.json @@ -64,6 +64,10 @@ "requirements": {}, "carrier_names": [ ], + "missiles": [ + "ScudGenerator" + ], + "missiles_group_count": 1, "navy_generators": [ "GrishaGroupGenerator", "MolniyaGroupGenerator" diff --git a/resources/factions/russia_1975.json b/resources/factions/russia_1975.json index 27232275..7ffb430b 100644 --- a/resources/factions/russia_1975.json +++ b/resources/factions/russia_1975.json @@ -59,6 +59,10 @@ ], "cruisers": [ ], + "missiles": [ + "ScudGenerator" + ], + "missiles_group_count": 1, "requirements": {}, "carrier_names": [ ], diff --git a/resources/factions/syria_1973.json b/resources/factions/syria_1973.json index cc74b6ac..993e171d 100644 --- a/resources/factions/syria_1973.json +++ b/resources/factions/syria_1973.json @@ -42,6 +42,10 @@ "SA3Generator", "SA6Generator" ], + "missiles": [ + "ScudGenerator" + ], + "missiles_group_count": 1, "aircraft_carrier": [ ], "helicopter_carrier": [ diff --git a/resources/factions/syria_1982.json b/resources/factions/syria_1982.json index 03a7666b..750e3324 100644 --- a/resources/factions/syria_1982.json +++ b/resources/factions/syria_1982.json @@ -45,6 +45,10 @@ "SA3Generator", "SA6Generator" ], + "missiles": [ + "ScudGenerator" + ], + "missiles_group_count": 1, "aircraft_carrier": [ ], "helicopter_carrier": [ diff --git a/resources/factions/syria_2011.json b/resources/factions/syria_2011.json index e39c72dd..31f2e2e8 100644 --- a/resources/factions/syria_2011.json +++ b/resources/factions/syria_2011.json @@ -63,6 +63,10 @@ "SA10Generator", "SA11Generator" ], + "missiles": [ + "ScudGenerator" + ], + "missiles_group_count": 1, "aircraft_carrier": [ ], "helicopter_carrier": [