mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
minor fixes; F-14B
This commit is contained in:
21
game/db.py
21
game/db.py
@@ -39,11 +39,11 @@ and prioritization for the enemy (i.e. less important bases will receive units w
|
||||
"""
|
||||
PRICES = {
|
||||
# fighter
|
||||
MiG_23MLD: 18,
|
||||
Su_27: 20,
|
||||
MiG_23MLD: 13,
|
||||
Su_27: 18,
|
||||
Su_33: 22,
|
||||
MiG_29A: 23,
|
||||
MiG_29S: 25,
|
||||
MiG_29A: 18,
|
||||
MiG_29S: 20,
|
||||
|
||||
F_5E_3: 6,
|
||||
MiG_15bis: 5,
|
||||
@@ -54,6 +54,7 @@ PRICES = {
|
||||
M_2000C: 13,
|
||||
FA_18C_hornet: 18,
|
||||
F_15C: 20,
|
||||
F_14B: 14,
|
||||
|
||||
# bomber
|
||||
Su_25: 15,
|
||||
@@ -145,6 +146,7 @@ UNIT_BY_TASK = {
|
||||
MiG_29S,
|
||||
FA_18C_hornet,
|
||||
F_15C,
|
||||
F_14B,
|
||||
M_2000C,
|
||||
],
|
||||
CAS: [
|
||||
@@ -304,6 +306,7 @@ UNIT_BY_COUNTRY = {
|
||||
"USA": [
|
||||
F_5E_3,
|
||||
F_15C,
|
||||
F_14B,
|
||||
FA_18C_hornet,
|
||||
AJS37,
|
||||
M_2000C,
|
||||
@@ -367,16 +370,25 @@ Payload will be used for operation of following type, "*" category will be used
|
||||
PLANE_PAYLOAD_OVERRIDES = {
|
||||
FA_18C_hornet: {
|
||||
CAP: "AIM-120*4,AIM-9*2,AIM-7*2,Fuel",
|
||||
Escort: "AIM-120*4,AIM-9*2,AIM-7*2,Fuel",
|
||||
PinpointStrike: "MK-82*8,AIM-9*2,AIM-7,FLIR Pod,Fuel",
|
||||
AntishipStrike: "MK-82*8,AIM-9*2,AIM-7,FLIR Pod,Fuel",
|
||||
},
|
||||
|
||||
F_14B: {
|
||||
CAP: "AIM-54A-MK47*4, AIM-7M*2, AIM-9M*2, XT*2",
|
||||
Escort: "AIM-54A-MK47*4, AIM-7M*2, AIM-9M*2, XT*2",
|
||||
CAS: "AIM-54A-MK60*1, AIM-7M*1, AIM-9M*2, XT*2, Mk-82*2, LANTIRN",
|
||||
GroundAttack: "AIM-54A-MK60*1, AIM-7M*1, AIM-9M*2, XT*2, Mk-82*2, LANTIRN",
|
||||
},
|
||||
|
||||
Su_25T: {
|
||||
CAS: "APU-8 Vikhr-M*2,Kh-25ML,R-73*2,SPPU-22*2,Mercury LLTV Pod,MPS-410",
|
||||
},
|
||||
|
||||
Su_33: {
|
||||
CAP: "R-73*4,R-27R*2,R-27ER*6",
|
||||
Escort: "R-73*4,R-27R*2,R-27ER*6",
|
||||
},
|
||||
|
||||
AJS37: {
|
||||
@@ -399,6 +411,7 @@ PLANE_PAYLOAD_OVERRIDES = {
|
||||
|
||||
M_2000C: {
|
||||
CAP: "Combat Air Patrol",
|
||||
Escort: "Combat Air Patrol",
|
||||
GroundAttack: "MK-82S Heavy Strike",
|
||||
},
|
||||
|
||||
|
||||
14
game/game.py
14
game/game.py
@@ -111,7 +111,7 @@ class Game:
|
||||
# skip naval events for non-coastal CPs
|
||||
return
|
||||
|
||||
if event_class == BaseAttackEvent and enemy_cp.base.strength > PLAYER_BASEATTACK_THRESHOLD:
|
||||
if event_class == BaseAttackEvent and enemy_cp.base.strength > PLAYER_BASEATTACK_THRESHOLD and self.settings.version != "dev":
|
||||
# skip base attack events for CPs yet too strong
|
||||
return
|
||||
|
||||
@@ -163,6 +163,7 @@ class Game:
|
||||
|
||||
def _generate_events(self):
|
||||
strikes_generated_for = set()
|
||||
base_attack_generated_for = set()
|
||||
|
||||
for player_cp, enemy_cp in self.theater.conflicts(True):
|
||||
for event_class, (player_probability, enemy_probability) in EVENT_PROBABILITIES.items():
|
||||
@@ -171,15 +172,20 @@ class Game:
|
||||
if not Conflict.has_frontline_between(player_cp, enemy_cp):
|
||||
continue
|
||||
|
||||
if event_class in [StrikeEvent]:
|
||||
# don't generate multiple 100% strike events from each attack direction
|
||||
# don't generate multiple 100% events from each attack direction
|
||||
if event_class is StrikeEvent:
|
||||
if enemy_cp in strikes_generated_for:
|
||||
continue
|
||||
if event_class is BaseAttackEvent:
|
||||
if enemy_cp in base_attack_generated_for:
|
||||
continue
|
||||
|
||||
if player_probability == 100 or player_probability > 0 and self._roll(player_probability, player_cp.base.strength):
|
||||
self._generate_player_event(event_class, player_cp, enemy_cp)
|
||||
if event_class in [StrikeEvent]:
|
||||
if event_class is StrikeEvent:
|
||||
strikes_generated_for.add(enemy_cp)
|
||||
if event_class is BaseAttackEvent:
|
||||
base_attack_generated_for.add(enemy_cp)
|
||||
|
||||
if enemy_probability == 100 or enemy_probability > 0 and self._roll(enemy_probability, enemy_cp.base.strength):
|
||||
self._generate_enemy_event(event_class, player_cp, enemy_cp)
|
||||
|
||||
Reference in New Issue
Block a user