mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
planes db updates: fixed loadouts & tasks
This commit is contained in:
17
game/db.py
17
game/db.py
@@ -24,7 +24,6 @@ PRICES = {
|
||||
|
||||
M_2000C: 18,
|
||||
FA_18C_hornet: 22,
|
||||
AV8BNA: 18,
|
||||
F_15C: 28,
|
||||
|
||||
# bomber
|
||||
@@ -75,7 +74,7 @@ PRICES = {
|
||||
}
|
||||
|
||||
UNIT_BY_TASK = {
|
||||
FighterSweep: [
|
||||
CAP: [
|
||||
C_101CC,
|
||||
AJS37,
|
||||
F_5E,
|
||||
@@ -84,21 +83,20 @@ UNIT_BY_TASK = {
|
||||
MiG_31,
|
||||
Su_27,
|
||||
Su_33,
|
||||
MiG_15bis,
|
||||
MiG_21Bis,
|
||||
MiG_29A,
|
||||
FA_18C_hornet,
|
||||
AV8BNA,
|
||||
F_15C,
|
||||
M_2000C,
|
||||
],
|
||||
CAS: [
|
||||
MiG_15bis,
|
||||
L_39ZA,
|
||||
A_10A,
|
||||
A_10C,
|
||||
Su_25T,
|
||||
Su_24M,
|
||||
Su_17M4,
|
||||
L_39ZA,
|
||||
MiG_29G,
|
||||
Su_34,
|
||||
],
|
||||
@@ -114,7 +112,7 @@ UNIT_BY_TASK = {
|
||||
],
|
||||
AWACS: [E_3A, A_50, ],
|
||||
|
||||
CAP: [Armor.MBT_T_90, Armor.MBT_T_80U, Armor.MBT_T_55, Armor.MBT_M1A2_Abrams, Armor.MBT_M60A3_Patton, Armor.ATGM_M1134_Stryker, Armor.APC_BTR_80, ],
|
||||
PinpointStrike: [Armor.MBT_T_90, Armor.MBT_T_80U, Armor.MBT_T_55, Armor.MBT_M1A2_Abrams, Armor.MBT_M60A3_Patton, Armor.ATGM_M1134_Stryker, Armor.APC_BTR_80, ],
|
||||
AirDefence: [
|
||||
AirDefence.AAA_Vulcan_M163,
|
||||
AirDefence.AAA_Vulcan_M163,
|
||||
@@ -192,7 +190,6 @@ UNIT_BY_COUNTRY = {
|
||||
"USA": [
|
||||
F_15C,
|
||||
FA_18C_hornet,
|
||||
AV8BNA,
|
||||
AJS37,
|
||||
F_5E,
|
||||
M_2000C,
|
||||
@@ -223,6 +220,12 @@ PLANE_PAYLOAD_OVERRIDES = {
|
||||
"*": "AIM-9M*6, AIM-7M*2, FUEL*3",
|
||||
},
|
||||
|
||||
Su_33: FighterSweep,
|
||||
|
||||
M_2000C: {
|
||||
"*": "Combat Air Patrol",
|
||||
},
|
||||
|
||||
MiG_21Bis: {
|
||||
"*": "Patrol, medium range",
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class GroundInterceptEvent(Event):
|
||||
pass
|
||||
|
||||
def player_attacking(self, strikegroup: db.PlaneDict, clients: db.PlaneDict):
|
||||
suitable_unittypes = db.find_unittype(CAP, self.defender_name)
|
||||
suitable_unittypes = db.find_unittype(PinpointStrike, self.defender_name)
|
||||
random.shuffle(suitable_unittypes)
|
||||
unittypes = suitable_unittypes[:self.TARGET_VARIETY]
|
||||
typecount = max(math.floor(self.difficulty * self.TARGET_AMOUNT_FACTOR), 1)
|
||||
|
||||
14
game/game.py
14
game/game.py
@@ -2,18 +2,18 @@ from game.event import *
|
||||
|
||||
COMMISION_LIMITS_SCALE = 2
|
||||
COMMISION_LIMITS_FACTORS = {
|
||||
CAP: 2,
|
||||
PinpointStrike: 2,
|
||||
CAS: 1,
|
||||
FighterSweep: 3,
|
||||
CAP: 3,
|
||||
AirDefence: 1,
|
||||
}
|
||||
|
||||
COMMISION_AMOUNTS_SCALE = 2
|
||||
COMMISION_UNIT_VARIETY = 4
|
||||
COMMISION_AMOUNTS_FACTORS = {
|
||||
CAP: 0.6,
|
||||
PinpointStrike: 0.6,
|
||||
CAS: 0.3,
|
||||
FighterSweep: 0.5,
|
||||
CAP: 0.5,
|
||||
AirDefence: 0.3,
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class Game:
|
||||
def _generate_interceptions(self):
|
||||
enemy_interception = False
|
||||
for from_cp, to_cp in self.theater.conflicts(False):
|
||||
if from_cp.base.total_units(FighterSweep) == 0:
|
||||
if from_cp.base.total_units(CAP) == 0:
|
||||
continue
|
||||
|
||||
if self._roll(ENEMY_INTERCEPT_PROBABILITY_BASE, from_cp.base.strength):
|
||||
@@ -93,7 +93,7 @@ class Game:
|
||||
|
||||
if self._roll(ENEMY_INTERCEPT_GLOBAL_PROBABILITY_BASE, 1):
|
||||
for from_cp, _ in self.theater.conflicts(False):
|
||||
if from_cp.base.total_units(FighterSweep) > 0:
|
||||
if from_cp.base.total_units(CAP) > 0:
|
||||
self.events.append(InterceptEvent(attacker_name=self.enemy,
|
||||
defender_name=self.player,
|
||||
from_cp=from_cp,
|
||||
@@ -136,7 +136,7 @@ class Game:
|
||||
break
|
||||
|
||||
def _commision_units(self, cp: ControlPoint):
|
||||
for for_task in [CAP, CAS, FighterSweep, AirDefence]:
|
||||
for for_task in [PinpointStrike, CAS, CAP, AirDefence]:
|
||||
limit = COMMISION_LIMITS_FACTORS[for_task] * math.pow(cp.importance, COMMISION_LIMITS_SCALE)
|
||||
missing_units = limit - cp.base.total_units(for_task)
|
||||
if missing_units > 0:
|
||||
|
||||
Reference in New Issue
Block a user