# engine.LingYi.entitys.operatorbase

View Source

      1# -*- coding:utf-8 -*-
      2
      3from .global_util import *
      4from .element import Element
      5
      6
      7class DoctrineOperator(Element):
      8    """
      9    条令类
     10    1、条令中，电磁管控设置，设置雷达开关机
     11    2、条令中，电磁管控设置，设置电子干扰传感器开关机
     12    3、条令中，电磁管控设置，设置声呐开关机
     13    4、设置条令中电磁管控与上级一致
     14    5、条令设置，是否使用核武器
     15    6、武器控制状态，对空
     16    7、武器控制状态，对水面
     17    8、武器控制状态，对潜
     18    9、武器控制状态，对地
     19    10、攻击时忽略计划航线设置
     20    11、接战模糊位置目标
     21    12、接战临机出现目标
     22    13、受到攻击忽略电磁管控
     23    14、鱼雷射程
     24    15、自动规避
     25    16、加油/途中补给
     26    17、加油/途中补给加油机选择设置
     27    18、给盟军加油/途中补给
     28    19、空战节奏
     29    20、快速周转
     30    21、燃油状态，预先规划
     31    22、燃油状态，返航
     32    23、武器状态，预先规划
     33    24、武器状态-返航
     34    25、空对地扫射
     35    26、丢弃武器
     36    27、超视距交战
     37    28、反水面战模式下使用防空导弹
     38    29、反水面作战行动 与目标保持距离
     39    30、反水面作战行动 导航
     40    31、反潜作战行动，规避搜索
     41    32、反潜作战行动，探测到威胁进行下潜
     42    33、反潜作战行动，充电电池 运输/站点
     43    34、反潜作战行动，充电电池 进攻/防守
     44    35、反潜作战行动，使用AIP技术
     45    36、反潜作战行动，吊放声呐
     46    37、反潜作战行动，导航
     47    38、陆战导航
     48    39、设置条令的武器使用规则
     49    40、武器使用规则--齐射武器数
     50    41、武器使用规则--齐射发射架数
     51    42、武器使用规则--自动开火距离
     52    43、武器使用规则--自动防御距离
     53    44、满足如下条件时撤退--毁伤程度大于
     54    45、满足如下条件时撤退--燃油少于
     55    46、满足如下条件时撤退--主要攻击攻击武器至少处于
     56    47、满足如下条件时撤退--主要防御武器至少
     57    48、满足如下条件时重新部署--毁伤程度小于
     58    49、满足如下条件时重新部署--燃油至少处于
     59    50、满足如下条件时重新部署--主要攻击武器处于
     60    51、满足如下条件时重新部署--主要防御武器处于
     61    52、获取武器使用规则
     62
     63    设置条令示例：
     64    self.doctrine_weapon_control_status_air(WeaponControlStatus.Free)  # 设置推演方条令，自由开火
     65    air1_id = "sflsf0-gjlsf-sf"  # 飞机guid
     66    air1 = self.get_unit(air1_id)  # 获取飞机对象
     67    if air1 is not None:
     68        air1.doctrine_weapon_control_status_air(WeaponControlStatus.Hold)  # 设置此飞机条令，限制开火
     69        air1.wra_qty_salvo('51', WRA_WeaponTargetType.Aircraft_4th_Generation, '2')  # 设置此飞机武器51对4代机齐射武器数为2
     70    patrol_mission = self.get_mission_by_name('patrol_mission1')   # 通过巡航任务的名字，获取巡航任务对象
     71    patrol_mission.doctrine_fuel_state_rtb(FuelStateRTB.YesLeaveGroup)  # 设置任务条令，燃油状态：单元离开编队返航
     72    attack_mission = self.create_strike_mission('打A机场', MissionStrikeType.LAND)  # 创建对陆打击任务
     73    attack_mission.doctrine_weapon_control_status_land(WeaponControlStatus.Free)  # 对陆打击任务设置条令
     74    attack_mission.escort.doctrine_weapon_control_status_air(WeaponControlStatus.Free)  # 对陆打击任务的护航任务设置条令
     75    """
     76    def __init__(self, guid, name, side_name, category, element_type, unit_id=''):
     77        Element.__init__(self, guid, name, side_name, element_type)
     78        self.Doctrine = {}
     79        self.category = category
     80        self.category_str = selector2str[self.category]
     81
     82        if self.category == SelectorCategory.Side:
     83            self.selector = '{side="%s"}' % self.Side
     84        elif self.category == SelectorCategory.Mission:
     85            self.selector = '{side="%s",mission="%s"}' % (self.Side, self.Name)
     86        elif self.category == SelectorCategory.WayPoint:
     87            self.selector = '{guid="%s",pointid="%s"}' % (unit_id, self.ID)
     88        elif self.category == SelectorCategory.EscortMission:
     89            self.selector = '{side="%s",mission="%s",escort=true}' % (self.Side, self.Name)
     90        else:
     91            self.selector = '{guid="%s"}' % self.ID
     92
     93    def _set_doctrine(self, doctrine):
     94        """
     95        设置条令各项目
     96        :param doctrine: str, 设置参数，例: '{ignore_plotted_course=true}'
     97        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     98        """
     99        return self._game_server.api_set_doctrine(self, doctrine)
    100
    101    def doctrine_switch_radar(self, switch_on):
    102        """
    103        1、条令中，电磁管控设置，设置雷达开关机
    104        :param switch_on: bool, 传感器打开或者静默，True:打开
    105        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    106        """
    107        return self._game_server.api_doctrine_switch_radar(self, switch_on)
    108
    109    def doctrine_switch_oecm(self, switch_on):
    110        """
    111        2、条令中，电磁管控设置，设置电子干扰传感器开关机
    112        :param switch_on: bool, 传感器打开或者静默，True:打开
    113        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    114        """
    115        return self._game_server.api_doctrine_switch_oecm(self, switch_on)
    116
    117    def doctrine_switch_sonar(self, switch_on):
    118        """
    119        3、条令中，电磁管控设置，设置声呐开关机
    120        :param switch_on: bool, 传感器打开或者静默，True:打开
    121        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    122        """
    123        return self._game_server.api_doctrine_switch_sonar(self, switch_on)
    124
    125    def doctrine_SetEMCON_Inherit(self):
    126        """
    127        4、设置条令中电磁管控与上级一致，推演方条令无法设置为Inherit
    128        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    129        """
    130        return self._game_server.api_doctrine_SetEMCON_Inherit(self)
    131
    132    def use_nuclear_weapons(self, use_nuclear):
    133        """
    134        5、条令设置，是否使用核武器； 推演方条令无法设置为Inherit
    135        本次比赛（2025年兵棋比赛）不允许使用核武器
    136        :param use_nuclear: EUseNuclear, 是否使用核武器
    137        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    138        """
    139        if use_nuclear.value == 999:
    140            if self.category == SelectorCategory.Side:
    141                return
    142            doctrine = '{use_nuclear_weapons=\"inherit\"}'
    143        else:
    144            if use_nuclear.value == 1:
    145                return
    146            doctrine = f"{{use_nuclear_weapons='{use_nuclear.value}'}}"
    147        return self._set_doctrine(doctrine)
    148
    149    def doctrine_weapon_control_status_air(self, weapon_control_status_airEnum):
    150        """
    151        6、武器控制状态，对空；推演方条令无法设置为Inherit
    152        :param weapon_control_status_airEnum: WeaponControlStatus, 状态枚举类型
    153        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    154        """
    155        if weapon_control_status_airEnum.value == 999:
    156            if self.category == SelectorCategory.Side:
    157                return
    158            doctrine = '{weapon_control_status_air=\"inherit\"}'
    159        else:
    160            doctrine = f"{{weapon_control_status_air='{weapon_control_status_airEnum.value}'}}"
    161        return self._set_doctrine(doctrine)
    162
    163    def doctrine_weapon_control_status_surface(self, control_status):
    164        """
    165        7、武器控制状态，对水面；推演方条令无法设置为Inherit
    166        :param control_status: WeaponControlStatus, 状态枚举类型
    167        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    168        """
    169        if control_status.value == 999:
    170            if self.category == SelectorCategory.Side:
    171                return
    172            doctrine = '{weapon_control_status_surface=\"inherit\"}'
    173        else:
    174            doctrine = f"{{weapon_control_status_surface='{control_status.value}'}}"
    175        return self._set_doctrine(doctrine)
    176
    177    def doctrine_weapon_control_status_subsurface(self, control_status):
    178        """
    179        8、武器控制状态，对潜；推演方条令无法设置为Inherit
    180        :param control_status: WeaponControlStatus, 状态枚举类型
    181        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    182        """
    183        if control_status.value == 999:
    184            if self.category == SelectorCategory.Side:
    185                return
    186            doctrine = '{weapon_control_status_subsurface=\"inherit\"}'
    187        else:
    188            doctrine = f"{{weapon_control_status_subsurface='{control_status.value}'}}"
    189        return self._set_doctrine(doctrine)
    190
    191    def doctrine_weapon_control_status_land(self, weapon_control_status_landEnum):
    192        """
    193        9、武器控制状态，对地；推演方条令无法设置为Inherit
    194        :param weapon_control_status_landEnum:  WeaponControlStatus, 状态枚举类型
    195        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    196        """
    197        if weapon_control_status_landEnum.value == 999:
    198            if self.category == SelectorCategory.Side:
    199                return
    200            doctrine = '{weapon_control_status_land=\"inherit\"}'
    201        else:
    202            doctrine = f"{{weapon_control_status_land='{weapon_control_status_landEnum.value}'}}"
    203        return self._set_doctrine(doctrine)
    204
    205    def doctrine_ignore_plotted_course(self, ignore_plotted_courseEnum):
    206        """
    207        10、攻击时忽略计划航线设置；推演方条令无法设置为Inherit
    208        :param ignore_plotted_courseEnum:IgnorePlottedCourseWhenAttacking，选择枚举
    209        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    210        """
    211        if ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.No:
    212            doctrine = '{ignore_plotted_course="0"}'
    213        elif ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.Yes:
    214            doctrine = '{ignore_plotted_course="1"}'
    215        elif ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.Inherit:
    216            if self.category == SelectorCategory.Side:
    217                return
    218            doctrine = '{ignore_plotted_course=\"inherit\"}'
    219        else:
    220            raise ValueError("parameter error")
    221        return self._set_doctrine(doctrine)
    222
    223    def doctrine_engaging_ambiguous_targets(self, towards_ambigous_target):
    224        """
    225        11、接战模糊位置目标；推演方条令无法设置为Inherit
    226        :param towards_ambigous_target: BehaviorTowardsAmbigousTarget
    227        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    228        """
    229        if towards_ambigous_target.value == 999:
    230            if self.category == SelectorCategory.Side:
    231                return
    232            doctrine = '{engaging_ambiguous_targets=\"inherit\"}'
    233        else:
    234            doctrine = f"{{engaging_ambiguous_targets='{towards_ambigous_target.value}'}}"
    235        return self._set_doctrine(doctrine)
    236
    237    def doctrine_engage_opportunity_targets(self, engage_opportunity_targetsEnum):
    238        """
    239        12、接战临机出现目标；推演方条令无法设置为Inherit
    240        :param engage_opportunity_targetsEnum: EngageWithContactTarget, 枚举
    241        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    242        """
    243        if engage_opportunity_targetsEnum == EngageWithContactTarget.No_Only:
    244            doctrine = '{engage_opportunity_targets="0"}'
    245        elif engage_opportunity_targetsEnum == EngageWithContactTarget.Yes_AnyTarget:
    246            doctrine = '{engage_opportunity_targets="1"}'
    247        elif engage_opportunity_targetsEnum.value == 999:
    248            doctrine = '{engage_opportunity_targets=\"inherit\"}'
    249        else:
    250            raise ValueError("parameter error")
    251        return self._set_doctrine(doctrine)
    252
    253    def doctrine_ignore_emcon_under_attack(self, ignore_emcon_while_under_attackEnum):
    254        """
    255        13、受到攻击忽略电磁管控；推演方条令无法设置为Inherit
    256        :param ignore_emcon_while_under_attackEnum: IgnoreEMCONUnderAttack, 枚举
    257        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    258        """
    259        if ignore_emcon_while_under_attackEnum == IgnoreEMCONUnderAttack.No:
    260            doctrine = '{ignore_emcon_while_under_attack="0"}'
    261        elif ignore_emcon_while_under_attackEnum == IgnoreEMCONUnderAttack.Ignore_EMCON_While_Under_Attack:
    262            doctrine = '{ignore_emcon_while_under_attack="1"}'
    263        elif ignore_emcon_while_under_attackEnum.value == 999:
    264            doctrine = '{ignore_emcon_while_under_attack=\"inherit\"}'
    265        else:
    266            raise ValueError("parameter error")
    267        return self._set_doctrine(doctrine)
    268
    269    def torpedoes_kinematic_range(self, kinematic_range):
    270        """
    271        14、鱼雷射程；推演方条令无法设置为Inherit
    272        :param kinematic_range:  UseTorpedoesKinematicRange, 枚举
    273        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    274        """
    275        if kinematic_range.value == 999:
    276            doctrine = '{kinematic_range_for_torpedoes=\"inherit\"}'
    277        else:
    278            doctrine = f"{{kinematic_range_for_torpedoes='{kinematic_range.value}'}}"
    279        return self._set_doctrine(doctrine)
    280
    281    def doctrine_automatic_evasion(self, automatic_evasionEnum):
    282        """
    283        15、自动规避；推演方条令无法设置为Inherit
    284        :param automatic_evasionEnum: AutomaticEvasion, 枚举
    285        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    286        """
    287        if automatic_evasionEnum == AutomaticEvasion.No:
    288            doctrine = '{automatic_evasion="0"}'
    289        elif automatic_evasionEnum == AutomaticEvasion.Yes:
    290            doctrine = '{automatic_evasion="1"}'
    291        elif automatic_evasionEnum.value == 999:
    292            doctrine = '{automatic_evasion=\"inherit\"}'
    293        else:
    294            raise ValueError("parameter error")
    295        return self._set_doctrine(doctrine)
    296
    297    def doctrine_refuel(self, refuel):
    298        """
    299        16、加油/途中补给；推演方条令无法设置为Inherit
    300        :param refuel: ERefuel, 枚举
    301        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    302        """
    303        if refuel.value == 999:
    304            doctrine = '{use_refuel_unrep=\"inherit\"}'
    305        else:
    306            doctrine = f"{{use_refuel_unrep='{refuel.value}'}}"
    307        return self._set_doctrine(doctrine)
    308
    309    def doctrine_refuel_select(self, refuel_select):
    310        """
    311        17、加油/途中补给加油机选择设置；推演方条令无法设置为Inherit
    312        :param refuel_select: ERefuelSelect, 枚举
    313        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    314        """
    315        if refuel_select.value == 999:
    316            doctrine = '{refuel_unrep_selection=\"inherit\"}'
    317        else:
    318            doctrine = f"{{refuel_unrep_selection='{refuel_select.value}'}}"
    319        return self._set_doctrine(doctrine)
    320
    321    def doctrine_refuel_allied(self, refuel):
    322        """
    323        18、给盟军加油/途中补给；推演方条令无法设置为Inherit
    324        :param refuel: ERefuelAllied, 枚举
    325        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    326        """
    327        if refuel.value == 999:
    328            doctrine = '{refuel_unrep_allied=\"inherit\"}'
    329        else:
    330            doctrine = f"{{refuel_unrep_allied='{refuel.value}'}}"
    331        return self._set_doctrine(doctrine)
    332
    333    def doctrine_air_operations_tempo(self, air_operations_tempoEnum):
    334        """
    335        19、空战节奏；推演方条令无法设置为Inherit
    336        :param air_operations_tempoEnum: AirOpsTempo, 枚举
    337        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    338        """
    339        if air_operations_tempoEnum.value == 999:
    340            doctrine = '{air_operations_tempo=\"inherit\"}'
    341        else:
    342            doctrine = f"{{air_operations_tempo='{air_operations_tempoEnum.value}'}}"
    343        return self._set_doctrine(doctrine)
    344
    345    def doctrine_quick_turnaround(self, quick_turnaroundEnum):
    346        """
    347        20、快速周转；推演方条令无法设置为Inherit
    348        :param quick_turnaroundEnum: QuickTurnAround, 枚举
    349        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    350        """
    351        if quick_turnaroundEnum.value == 999:
    352            doctrine = '{quick_turnaround_for_aircraft=\"inherit\"}'
    353        else:
    354            doctrine = f"{{quick_turnaround_for_aircraft='{quick_turnaroundEnum.value}'}}"
    355        return self._set_doctrine(doctrine)
    356
    357    def doctrine_fuel_state_planned(self, fuel_state_plannedEnum):
    358        """
    359        21、燃油状态，预先规划；推演方条令无法设置为Inherit
    360        :param fuel_state_plannedEnum: FuelState, 枚举
    361        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    362        """
    363        if fuel_state_plannedEnum.value == 999:
    364            doctrine = '{fuel_state_planned=\"inherit\"}'
    365        else:
    366            doctrine = f"{{fuel_state_planned='{fuel_state_plannedEnum.value}'}}"
    367        return self._set_doctrine(doctrine)
    368
    369    def doctrine_fuel_state_rtb(self, fuel_state_rtbEnum):
    370        """
    371        22、燃油状态，返航；推演方条令无法设置为Inherit
    372        :param fuel_state_rtbEnum: FuelStateRTB, 枚举
    373        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    374        """
    375        if fuel_state_rtbEnum.value == 999:
    376            doctrine = '{fuel_state_rtb=\"inherit\"}'
    377        else:
    378            doctrine = f"{{fuel_state_rtb='{fuel_state_rtbEnum.value}'}}"
    379        return self._set_doctrine(doctrine)
    380
    381    def doctrine_weapon_state_planned(self, weapon_state_plannedEnum):
    382        """
    383        23、武器状态，预先规划；推演方条令无法设置为Inherit
    384        :param weapon_state_plannedEnum:WeaponStatePlanned, 枚举
    385        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    386        """
    387        if weapon_state_plannedEnum.value == 999:
    388            doctrine = '{weapon_state_planned=\"inherit\"}'
    389        else:
    390            doctrine = f"{{weapon_state_planned='{weapon_state_plannedEnum.value}'}}"
    391        return self._set_doctrine(doctrine)
    392
    393    def doctrine_weapon_state_rtb(self, weapon_state_rtbEnum):
    394        """
    395        24、武器状态-返航；推演方条令无法设置为Inherit
    396        :param weapon_state_rtbEnum: WeaponStateRTB, 枚举
    397        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    398        """
    399        if weapon_state_rtbEnum.value == 999:
    400            doctrine = '{weapon_state_rtb=\"inherit\"}'
    401        else:
    402            doctrine = f"{{weapon_state_rtb='{weapon_state_rtbEnum.value}'}}"
    403        return self._set_doctrine(doctrine)
    404
    405    def doctrine_gun_strafing(self, gun_strafingEnum):
    406        """
    407        25、空对地扫射；推演方条令无法设置为Inherit
    408        :param gun_strafingEnum: GunStrafeGroundTargets, 枚举
    409        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    410        """
    411        if gun_strafingEnum.value == 999:
    412            doctrine = '{gun_strafing=\"inherit\"}'
    413        else:
    414            doctrine = f"{{gun_strafing='{gun_strafingEnum.value}'}}"
    415        return self._set_doctrine(doctrine)
    416
    417    def doctrine_jettison_ordnance(self, jettison_ordnanceEnum):
    418        """
    419        26、丢弃武器；推演方条令无法设置为Inherit
    420        :param jettison_ordnanceEnum: JettisonOrdnance, 枚举
    421        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    422        """
    423        if jettison_ordnanceEnum.value == 999:
    424            doctrine = '{jettison_ordnance=\"inherit\"}'
    425        else:
    426            doctrine = f"{{jettison_ordnance='{jettison_ordnanceEnum.value}'}}"
    427        return self._set_doctrine(doctrine)
    428
    429    def doctrine_bvr_logic(self, bvr_logicEnum):
    430        """
    431        27、超视距交战；推演方条令无法设置为Inherit
    432        :param bvr_logicEnum: BvrLogic, 枚举
    433        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    434        """
    435        if bvr_logicEnum.value == 999:
    436            doctrine = '{bvr_logic=\"inherit\"}'
    437        else:
    438            doctrine = f"{{bvr_logic='{bvr_logicEnum.value}'}}"
    439        return self._set_doctrine(doctrine)
    440
    441    def use_sams_in_anti_surface_mode(self, use_sams):
    442        """
    443        28、反水面战模式下使用防空导弹；推演方条令无法设置为Inherit
    444        :param use_sams: UseSAMsInASuWMode, 枚举
    445        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    446        """
    447        if use_sams.value == 999:
    448            doctrine = '{use_sams_in_anti_surface_mode=\"inherit\"}'
    449        else:
    450            doctrine = f"{{use_sams_in_anti_surface_mode='{use_sams.value}'}}"
    451        return self._set_doctrine(doctrine)
    452
    453    def doctrine_maintain_standoff(self, maintain_standoff):
    454        """
    455        29、反水面作战行动 与目标保持距离；推演方条令无法设置为Inherit
    456        :param maintain_standoff: MaintainStandoff, 枚举
    457        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    458        """
    459        if maintain_standoff.value == 999:
    460            doctrine = '{maintain_standoff=\"inherit\"}'
    461        else:
    462            doctrine = f"{{maintain_standoff='{maintain_standoff.value}'}}"
    463        return self._set_doctrine(doctrine)
    464
    465    def doctrine_navigation_surface_mode(self, navigation_surface_mode):
    466        """
    467        30、反水面作战行动 导航；推演方条令无法设置为Inherit
    468        :param navigation_surface_mode: NavigationAS, 枚举
    469        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    470        """
    471        if navigation_surface_mode.value == 999:
    472            doctrine = '{navigation_surface_mode=\"inherit\"}'
    473        else:
    474            doctrine = f"{{navigation_surface_mode='{navigation_surface_mode.value}'}}"
    475        return self._set_doctrine(doctrine)
    476
    477    def avoid_contact(self, avoid_item):
    478        """
    479        31、反潜作战行动，规避搜索；推演方条令无法设置为Inherit
    480        :param avoid_item: AvoidContact, 枚举
    481        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    482        """
    483        if avoid_item.value == 999:
    484            doctrine = '{avoid_contact=\"inherit\"}'
    485        else:
    486            doctrine = f"{{avoid_contact='{avoid_item.value}'}}"
    487        return self._set_doctrine(doctrine)
    488
    489    def dive_on_threat(self, select_item):
    490        """
    491        32、反潜作战行动，探测到威胁进行下潜；推演方条令无法设置为Inherit
    492        :param select_item: DiveOnThreat
    493        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    494        """
    495        if select_item.value == 999:
    496            doctrine = '{dive_on_threat=\"inherit\"}'
    497        else:
    498            doctrine = f"{{dive_on_threat='{select_item.value}'}}"
    499        return self._set_doctrine(doctrine)
    500
    501    def recharge_on_patrol(self, select_item):
    502        """
    503        33、反潜作战行动，充电电池 运输/站点；推演方条令无法设置为Inherit
    504        :param select_item: RechargePercent
    505        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    506        """
    507        if select_item.value == 999:
    508            doctrine = '{recharge_on_patrol=\"inherit\"}'
    509        else:
    510            doctrine = f"{{recharge_on_patrol='{select_item.value}'}}"
    511        return self._set_doctrine(doctrine)
    512
    513    def recharge_on_attack(self, select_item):
    514        """
    515        34、反潜作战行动，充电电池 进攻/防守；推演方条令无法设置为Inherit
    516        :param select_item: RechargePercent
    517        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    518        """
    519        if select_item.value == 999:
    520            doctrine = '{recharge_on_attack=\"inherit\"}'
    521        else:
    522            doctrine = f"{{recharge_on_attack='{select_item.value}'}}"
    523        return self._set_doctrine(doctrine)
    524
    525    def use_aip(self, select_item):
    526        """
    527        35、反潜作战行动，使用AIP技术；推演方条令无法设置为Inherit
    528        :param select_item: UseAIP
    529        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    530        """
    531        if select_item.value == 999:
    532            doctrine = '{use_aip=\"inherit\"}'
    533        else:
    534            doctrine = f"{{use_aip='{select_item.value}'}}"
    535        return self._set_doctrine(doctrine)
    536
    537    def dipping_sonar(self, select_item):
    538        """
    539        36、反潜作战行动， 吊放声呐；推演方条令无法设置为Inherit
    540        :param select_item: DippingSonar
    541        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    542        """
    543        if select_item.value == 999:
    544            doctrine = '{dipping_sonar=\"inherit\"}'
    545        else:
    546            doctrine = f"{{dipping_sonar='{select_item.value}'}}"
    547        return self._set_doctrine(doctrine)
    548
    549    def navigation_sub(self, select_item):
    550        """
    551        37、反潜作战行动， 导航；推演方条令无法设置为Inherit
    552        :param select_item: NavigationSub
    553        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    554        """
    555        if select_item.value == 999:
    556            doctrine = '{navigation_subsurface_mode=\"inherit\"}'
    557        else:
    558            doctrine = f"{{navigation_subsurface_mode='{select_item.value}'}}"
    559        return self._set_doctrine(doctrine)
    560
    561    def navigation_land(self, select_item):
    562        """
    563        38、陆战导航；推演方条令无法设置为Inherit
    564        :param select_item: NavigationLand
    565        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    566        """
    567        if select_item.value == 999:
    568            doctrine = '{navigation_land_mode=\"inherit\"}'
    569        else:
    570            doctrine = f"{{navigation_land_mode='{select_item.value}'}}"
    571        return self._set_doctrine(doctrine)
    572
    573    def set_weapon_release_authority(self, weapon_dbid, target_type, quantity_salvo=2, shooter_salvo=1,
    574                                     firing_range='none', self_defense='max'):
    575        """
    576        39、设置条令的武器使用规则
    577        :param weapon_dbid: {str: 武器的数据库ID}
    578        :param target_type: 枚举WRA_WeaponTargetType的值, global_util.py中定义，例如 WRA_WeaponTargetType.Aircraft_Unspecified 飞机未指明
    579        :param quantity_salvo: {str: 'n'-齐射武器数, 'inherit'-继承设置, 'max'-全量齐射, 'none'-禁用}
    580        :param shooter_salvo: {str: 'n'-齐射发射架数，'inherit'-继承设置, 'max'-全量齐射}
    581        :param firing_range: {str: 'n'-自动开火距离，'inherit'-继承设置, 'none'-禁用自动开火}
    582        :param self_defense: {str: 'n'-自动防御距离, 'inherit'-继承设置, 'max'-最大射程射击, 'none'-禁用自卫}
    583        注：其中n为数字。
    584        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    585        """
    586        return self._game_server.api_set_weapon_release_authority(self, weapon_dbid, target_type, quantity_salvo,
    587                                                                  shooter_salvo, firing_range, self_defense)
    588
    589    def wra_qty_salvo(self, weaponID, target_type, select_item):
    590        """
    591        40、武器使用规则--齐射武器数
    592        :param weaponID: str, 武器DBID
    593        :param target_type: WRA_WeaponTargetType
    594        :param select_item: 'inherit'、'system'、'Max'或数字字符串,
    595        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    596        """
    597        return self._game_server.api_wra_qty_salvo(self, weaponID, target_type, select_item)
    598
    599    def wra_shooter_salvo(self, weaponID, target_type, select_item):
    600        """
    601        41、武器使用规则--齐射发射架数
    602        :param weaponID: str,武器DBID
    603        :param target_type: WRA_WeaponTargetType
    604        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    605        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    606        """
    607        return self._game_server.api_wra_shooter_salvo(self, weaponID, target_type, select_item)
    608
    609    def wra_firing_range(self, weaponID, target_type, select_item):
    610        """
    611        42、武器使用规则 - -自动开火距离
    612        :param weaponID: str, 武器DBID
    613        :param target_type:WRA_WeaponTargetType
    614        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    615        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    616        """
    617        return self._game_server.api_wra_firing_range(self, weaponID, target_type, select_item)
    618
    619    def wra_self_defence_distance(self, weaponID, target_type, select_item):
    620        """
    621        43、武器使用规则--自动防御距离
    622        :param weaponID: str, 武器DBID
    623        :param target_type: WRA_WeaponTargetType
    624        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    625        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    626        """
    627        return self._game_server.api_wra_self_defence_distance(self, weaponID, target_type, select_item)
    628
    629    def withdraw_on_damage(self, damage_status):
    630        """
    631        44、满足如下条件时撤退 - -毁伤程度大于；推演方条令无法设置为Inherit
    632        :param damage_status: DamageThreshold
    633        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    634        """
    635        if damage_status.value == 999:
    636            doctrine = '{withdraw_on_damage=\"inherit\"}'
    637        else:
    638            doctrine = f"{{withdraw_on_damage='{damage_status.value}'}}"
    639        return self._set_doctrine(doctrine)
    640
    641    def withdraw_on_fuel(self, fuel_status):
    642        """
    643        45、满足如下条件时撤退--燃油少于；推演方条令无法设置为Inherit
    644        :param fuel_status: FuelQuantityThreshold
    645        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    646        """
    647        if fuel_status.value == 999:
    648            doctrine = '{withdraw_on_fuel=\"inherit\"}'
    649        else:
    650            doctrine = f"{{withdraw_on_fuel='{fuel_status.value}'}}"
    651        return self._set_doctrine(doctrine)
    652
    653    def withdraw_on_attack(self, weapon_status):
    654        """
    655        46、满足如下条件时撤退--主要攻击攻击武器至少处于；推演方条令无法设置为Inherit
    656        :param weapon_status: WeaponQuantityThreshold
    657        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    658        """
    659        if weapon_status.value == 999:
    660            doctrine = '{withdraw_on_attack=\"inherit\"}'
    661        else:
    662            doctrine = f"{{withdraw_on_attack='{weapon_status.value}'}}"
    663        return self._set_doctrine(doctrine)
    664
    665    def withdraw_on_defence(self, weapon_status):
    666        """
    667        47、满足如下条件时撤退--主要防御武器至少；推演方条令无法设置为Inherit
    668        :param weapon_status: WeaponQuantityThreshold
    669        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    670        """
    671        if weapon_status.value == 999:
    672            doctrine = '{withdraw_on_defence=\"inherit\"}'
    673        else:
    674            doctrine = f"{{withdraw_on_defence='{weapon_status.value}'}}"
    675        return self._set_doctrine(doctrine)
    676
    677    def deploy_on_damage(self, damage_status):
    678        """
    679        48、满足如下条件时重新部署--毁伤程度小于；推演方条令无法设置为Inherit
    680        :param damage_status: DamageThreshold
    681        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    682        """
    683        if damage_status.value == 999:
    684            doctrine = '{deploy_on_damage=\"inherit\"}'
    685        else:
    686            doctrine = f"{{deploy_on_damage='{damage_status.value}'}}"
    687        return self._set_doctrine(doctrine)
    688
    689    def deploy_on_fuel(self, fuel_status):
    690        """
    691        49、满足如下条件时重新部署--燃油至少处于；推演方条令无法设置为Inherit
    692        :param fuel_status: FuelQuantityThreshold
    693        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    694        """
    695        if fuel_status.value == 999:
    696            doctrine = '{deploy_on_fuel=\"inherit\"}'
    697        else:
    698            doctrine = '{deploy_on_fuel=%d}' % fuel_status.value
    699            doctrine = f"{{deploy_on_fuel='{fuel_status.value}'}}"
    700        return self._set_doctrine(doctrine)
    701
    702    def deploy_on_attack(self, weapon_status):
    703        """
    704        50、满足如下条件时重新部署--主要攻击武器处于；推演方条令无法设置为Inherit
    705        :param weapon_status: WeaponQuantityThreshold
    706        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    707        """
    708        if weapon_status.value == 999:
    709            doctrine = '{deploy_on_attack=\"inherit\"}'
    710        else:
    711            doctrine = '{deploy_on_attack=%d}' % weapon_status.value
    712            doctrine = f"{{deploy_on_attack='{weapon_status.value}'}}"
    713        return self._set_doctrine(doctrine)
    714
    715    def deploy_on_defence(self, weapon_status):
    716        """
    717        51、满足如下条件时重新部署--主要防御武器处于；推演方条令无法设置为Inherit
    718        :param weapon_status: WeaponQuantityThreshold
    719        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    720        """
    721        if weapon_status.value == 999:
    722            doctrine = '{deploy_on_defence=\"inherit\"}'
    723        else:
    724            doctrine = f"{{deploy_on_defence='{weapon_status.value}'}}"
    725        return self._set_doctrine(doctrine)
    726
    727    def get_doctrineWRA(self):
    728        """
    729        52、获取武器使用规则
    730        :return: 条令结果
    731        """
    732        return self._game_server.api_get_doctrineWRA(self)

class DoctrineOperator(engine.LingYi.entitys.element.Element): View Source

      8class DoctrineOperator(Element):
      9    """
     10    条令类
     11    1、条令中，电磁管控设置，设置雷达开关机
     12    2、条令中，电磁管控设置，设置电子干扰传感器开关机
     13    3、条令中，电磁管控设置，设置声呐开关机
     14    4、设置条令中电磁管控与上级一致
     15    5、条令设置，是否使用核武器
     16    6、武器控制状态，对空
     17    7、武器控制状态，对水面
     18    8、武器控制状态，对潜
     19    9、武器控制状态，对地
     20    10、攻击时忽略计划航线设置
     21    11、接战模糊位置目标
     22    12、接战临机出现目标
     23    13、受到攻击忽略电磁管控
     24    14、鱼雷射程
     25    15、自动规避
     26    16、加油/途中补给
     27    17、加油/途中补给加油机选择设置
     28    18、给盟军加油/途中补给
     29    19、空战节奏
     30    20、快速周转
     31    21、燃油状态，预先规划
     32    22、燃油状态，返航
     33    23、武器状态，预先规划
     34    24、武器状态-返航
     35    25、空对地扫射
     36    26、丢弃武器
     37    27、超视距交战
     38    28、反水面战模式下使用防空导弹
     39    29、反水面作战行动 与目标保持距离
     40    30、反水面作战行动 导航
     41    31、反潜作战行动，规避搜索
     42    32、反潜作战行动，探测到威胁进行下潜
     43    33、反潜作战行动，充电电池 运输/站点
     44    34、反潜作战行动，充电电池 进攻/防守
     45    35、反潜作战行动，使用AIP技术
     46    36、反潜作战行动，吊放声呐
     47    37、反潜作战行动，导航
     48    38、陆战导航
     49    39、设置条令的武器使用规则
     50    40、武器使用规则--齐射武器数
     51    41、武器使用规则--齐射发射架数
     52    42、武器使用规则--自动开火距离
     53    43、武器使用规则--自动防御距离
     54    44、满足如下条件时撤退--毁伤程度大于
     55    45、满足如下条件时撤退--燃油少于
     56    46、满足如下条件时撤退--主要攻击攻击武器至少处于
     57    47、满足如下条件时撤退--主要防御武器至少
     58    48、满足如下条件时重新部署--毁伤程度小于
     59    49、满足如下条件时重新部署--燃油至少处于
     60    50、满足如下条件时重新部署--主要攻击武器处于
     61    51、满足如下条件时重新部署--主要防御武器处于
     62    52、获取武器使用规则
     63
     64    设置条令示例：
     65    self.doctrine_weapon_control_status_air(WeaponControlStatus.Free)  # 设置推演方条令，自由开火
     66    air1_id = "sflsf0-gjlsf-sf"  # 飞机guid
     67    air1 = self.get_unit(air1_id)  # 获取飞机对象
     68    if air1 is not None:
     69        air1.doctrine_weapon_control_status_air(WeaponControlStatus.Hold)  # 设置此飞机条令，限制开火
     70        air1.wra_qty_salvo('51', WRA_WeaponTargetType.Aircraft_4th_Generation, '2')  # 设置此飞机武器51对4代机齐射武器数为2
     71    patrol_mission = self.get_mission_by_name('patrol_mission1')   # 通过巡航任务的名字，获取巡航任务对象
     72    patrol_mission.doctrine_fuel_state_rtb(FuelStateRTB.YesLeaveGroup)  # 设置任务条令，燃油状态：单元离开编队返航
     73    attack_mission = self.create_strike_mission('打A机场', MissionStrikeType.LAND)  # 创建对陆打击任务
     74    attack_mission.doctrine_weapon_control_status_land(WeaponControlStatus.Free)  # 对陆打击任务设置条令
     75    attack_mission.escort.doctrine_weapon_control_status_air(WeaponControlStatus.Free)  # 对陆打击任务的护航任务设置条令
     76    """
     77    def __init__(self, guid, name, side_name, category, element_type, unit_id=''):
     78        Element.__init__(self, guid, name, side_name, element_type)
     79        self.Doctrine = {}
     80        self.category = category
     81        self.category_str = selector2str[self.category]
     82
     83        if self.category == SelectorCategory.Side:
     84            self.selector = '{side="%s"}' % self.Side
     85        elif self.category == SelectorCategory.Mission:
     86            self.selector = '{side="%s",mission="%s"}' % (self.Side, self.Name)
     87        elif self.category == SelectorCategory.WayPoint:
     88            self.selector = '{guid="%s",pointid="%s"}' % (unit_id, self.ID)
     89        elif self.category == SelectorCategory.EscortMission:
     90            self.selector = '{side="%s",mission="%s",escort=true}' % (self.Side, self.Name)
     91        else:
     92            self.selector = '{guid="%s"}' % self.ID
     93
     94    def _set_doctrine(self, doctrine):
     95        """
     96        设置条令各项目
     97        :param doctrine: str, 设置参数，例: '{ignore_plotted_course=true}'
     98        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
     99        """
    100        return self._game_server.api_set_doctrine(self, doctrine)
    101
    102    def doctrine_switch_radar(self, switch_on):
    103        """
    104        1、条令中，电磁管控设置，设置雷达开关机
    105        :param switch_on: bool, 传感器打开或者静默，True:打开
    106        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    107        """
    108        return self._game_server.api_doctrine_switch_radar(self, switch_on)
    109
    110    def doctrine_switch_oecm(self, switch_on):
    111        """
    112        2、条令中，电磁管控设置，设置电子干扰传感器开关机
    113        :param switch_on: bool, 传感器打开或者静默，True:打开
    114        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    115        """
    116        return self._game_server.api_doctrine_switch_oecm(self, switch_on)
    117
    118    def doctrine_switch_sonar(self, switch_on):
    119        """
    120        3、条令中，电磁管控设置，设置声呐开关机
    121        :param switch_on: bool, 传感器打开或者静默，True:打开
    122        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    123        """
    124        return self._game_server.api_doctrine_switch_sonar(self, switch_on)
    125
    126    def doctrine_SetEMCON_Inherit(self):
    127        """
    128        4、设置条令中电磁管控与上级一致，推演方条令无法设置为Inherit
    129        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    130        """
    131        return self._game_server.api_doctrine_SetEMCON_Inherit(self)
    132
    133    def use_nuclear_weapons(self, use_nuclear):
    134        """
    135        5、条令设置，是否使用核武器； 推演方条令无法设置为Inherit
    136        本次比赛（2025年兵棋比赛）不允许使用核武器
    137        :param use_nuclear: EUseNuclear, 是否使用核武器
    138        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    139        """
    140        if use_nuclear.value == 999:
    141            if self.category == SelectorCategory.Side:
    142                return
    143            doctrine = '{use_nuclear_weapons=\"inherit\"}'
    144        else:
    145            if use_nuclear.value == 1:
    146                return
    147            doctrine = f"{{use_nuclear_weapons='{use_nuclear.value}'}}"
    148        return self._set_doctrine(doctrine)
    149
    150    def doctrine_weapon_control_status_air(self, weapon_control_status_airEnum):
    151        """
    152        6、武器控制状态，对空；推演方条令无法设置为Inherit
    153        :param weapon_control_status_airEnum: WeaponControlStatus, 状态枚举类型
    154        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    155        """
    156        if weapon_control_status_airEnum.value == 999:
    157            if self.category == SelectorCategory.Side:
    158                return
    159            doctrine = '{weapon_control_status_air=\"inherit\"}'
    160        else:
    161            doctrine = f"{{weapon_control_status_air='{weapon_control_status_airEnum.value}'}}"
    162        return self._set_doctrine(doctrine)
    163
    164    def doctrine_weapon_control_status_surface(self, control_status):
    165        """
    166        7、武器控制状态，对水面；推演方条令无法设置为Inherit
    167        :param control_status: WeaponControlStatus, 状态枚举类型
    168        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    169        """
    170        if control_status.value == 999:
    171            if self.category == SelectorCategory.Side:
    172                return
    173            doctrine = '{weapon_control_status_surface=\"inherit\"}'
    174        else:
    175            doctrine = f"{{weapon_control_status_surface='{control_status.value}'}}"
    176        return self._set_doctrine(doctrine)
    177
    178    def doctrine_weapon_control_status_subsurface(self, control_status):
    179        """
    180        8、武器控制状态，对潜；推演方条令无法设置为Inherit
    181        :param control_status: WeaponControlStatus, 状态枚举类型
    182        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    183        """
    184        if control_status.value == 999:
    185            if self.category == SelectorCategory.Side:
    186                return
    187            doctrine = '{weapon_control_status_subsurface=\"inherit\"}'
    188        else:
    189            doctrine = f"{{weapon_control_status_subsurface='{control_status.value}'}}"
    190        return self._set_doctrine(doctrine)
    191
    192    def doctrine_weapon_control_status_land(self, weapon_control_status_landEnum):
    193        """
    194        9、武器控制状态，对地；推演方条令无法设置为Inherit
    195        :param weapon_control_status_landEnum:  WeaponControlStatus, 状态枚举类型
    196        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    197        """
    198        if weapon_control_status_landEnum.value == 999:
    199            if self.category == SelectorCategory.Side:
    200                return
    201            doctrine = '{weapon_control_status_land=\"inherit\"}'
    202        else:
    203            doctrine = f"{{weapon_control_status_land='{weapon_control_status_landEnum.value}'}}"
    204        return self._set_doctrine(doctrine)
    205
    206    def doctrine_ignore_plotted_course(self, ignore_plotted_courseEnum):
    207        """
    208        10、攻击时忽略计划航线设置；推演方条令无法设置为Inherit
    209        :param ignore_plotted_courseEnum:IgnorePlottedCourseWhenAttacking，选择枚举
    210        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    211        """
    212        if ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.No:
    213            doctrine = '{ignore_plotted_course="0"}'
    214        elif ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.Yes:
    215            doctrine = '{ignore_plotted_course="1"}'
    216        elif ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.Inherit:
    217            if self.category == SelectorCategory.Side:
    218                return
    219            doctrine = '{ignore_plotted_course=\"inherit\"}'
    220        else:
    221            raise ValueError("parameter error")
    222        return self._set_doctrine(doctrine)
    223
    224    def doctrine_engaging_ambiguous_targets(self, towards_ambigous_target):
    225        """
    226        11、接战模糊位置目标；推演方条令无法设置为Inherit
    227        :param towards_ambigous_target: BehaviorTowardsAmbigousTarget
    228        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    229        """
    230        if towards_ambigous_target.value == 999:
    231            if self.category == SelectorCategory.Side:
    232                return
    233            doctrine = '{engaging_ambiguous_targets=\"inherit\"}'
    234        else:
    235            doctrine = f"{{engaging_ambiguous_targets='{towards_ambigous_target.value}'}}"
    236        return self._set_doctrine(doctrine)
    237
    238    def doctrine_engage_opportunity_targets(self, engage_opportunity_targetsEnum):
    239        """
    240        12、接战临机出现目标；推演方条令无法设置为Inherit
    241        :param engage_opportunity_targetsEnum: EngageWithContactTarget, 枚举
    242        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    243        """
    244        if engage_opportunity_targetsEnum == EngageWithContactTarget.No_Only:
    245            doctrine = '{engage_opportunity_targets="0"}'
    246        elif engage_opportunity_targetsEnum == EngageWithContactTarget.Yes_AnyTarget:
    247            doctrine = '{engage_opportunity_targets="1"}'
    248        elif engage_opportunity_targetsEnum.value == 999:
    249            doctrine = '{engage_opportunity_targets=\"inherit\"}'
    250        else:
    251            raise ValueError("parameter error")
    252        return self._set_doctrine(doctrine)
    253
    254    def doctrine_ignore_emcon_under_attack(self, ignore_emcon_while_under_attackEnum):
    255        """
    256        13、受到攻击忽略电磁管控；推演方条令无法设置为Inherit
    257        :param ignore_emcon_while_under_attackEnum: IgnoreEMCONUnderAttack, 枚举
    258        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    259        """
    260        if ignore_emcon_while_under_attackEnum == IgnoreEMCONUnderAttack.No:
    261            doctrine = '{ignore_emcon_while_under_attack="0"}'
    262        elif ignore_emcon_while_under_attackEnum == IgnoreEMCONUnderAttack.Ignore_EMCON_While_Under_Attack:
    263            doctrine = '{ignore_emcon_while_under_attack="1"}'
    264        elif ignore_emcon_while_under_attackEnum.value == 999:
    265            doctrine = '{ignore_emcon_while_under_attack=\"inherit\"}'
    266        else:
    267            raise ValueError("parameter error")
    268        return self._set_doctrine(doctrine)
    269
    270    def torpedoes_kinematic_range(self, kinematic_range):
    271        """
    272        14、鱼雷射程；推演方条令无法设置为Inherit
    273        :param kinematic_range:  UseTorpedoesKinematicRange, 枚举
    274        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    275        """
    276        if kinematic_range.value == 999:
    277            doctrine = '{kinematic_range_for_torpedoes=\"inherit\"}'
    278        else:
    279            doctrine = f"{{kinematic_range_for_torpedoes='{kinematic_range.value}'}}"
    280        return self._set_doctrine(doctrine)
    281
    282    def doctrine_automatic_evasion(self, automatic_evasionEnum):
    283        """
    284        15、自动规避；推演方条令无法设置为Inherit
    285        :param automatic_evasionEnum: AutomaticEvasion, 枚举
    286        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    287        """
    288        if automatic_evasionEnum == AutomaticEvasion.No:
    289            doctrine = '{automatic_evasion="0"}'
    290        elif automatic_evasionEnum == AutomaticEvasion.Yes:
    291            doctrine = '{automatic_evasion="1"}'
    292        elif automatic_evasionEnum.value == 999:
    293            doctrine = '{automatic_evasion=\"inherit\"}'
    294        else:
    295            raise ValueError("parameter error")
    296        return self._set_doctrine(doctrine)
    297
    298    def doctrine_refuel(self, refuel):
    299        """
    300        16、加油/途中补给；推演方条令无法设置为Inherit
    301        :param refuel: ERefuel, 枚举
    302        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    303        """
    304        if refuel.value == 999:
    305            doctrine = '{use_refuel_unrep=\"inherit\"}'
    306        else:
    307            doctrine = f"{{use_refuel_unrep='{refuel.value}'}}"
    308        return self._set_doctrine(doctrine)
    309
    310    def doctrine_refuel_select(self, refuel_select):
    311        """
    312        17、加油/途中补给加油机选择设置；推演方条令无法设置为Inherit
    313        :param refuel_select: ERefuelSelect, 枚举
    314        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    315        """
    316        if refuel_select.value == 999:
    317            doctrine = '{refuel_unrep_selection=\"inherit\"}'
    318        else:
    319            doctrine = f"{{refuel_unrep_selection='{refuel_select.value}'}}"
    320        return self._set_doctrine(doctrine)
    321
    322    def doctrine_refuel_allied(self, refuel):
    323        """
    324        18、给盟军加油/途中补给；推演方条令无法设置为Inherit
    325        :param refuel: ERefuelAllied, 枚举
    326        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    327        """
    328        if refuel.value == 999:
    329            doctrine = '{refuel_unrep_allied=\"inherit\"}'
    330        else:
    331            doctrine = f"{{refuel_unrep_allied='{refuel.value}'}}"
    332        return self._set_doctrine(doctrine)
    333
    334    def doctrine_air_operations_tempo(self, air_operations_tempoEnum):
    335        """
    336        19、空战节奏；推演方条令无法设置为Inherit
    337        :param air_operations_tempoEnum: AirOpsTempo, 枚举
    338        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    339        """
    340        if air_operations_tempoEnum.value == 999:
    341            doctrine = '{air_operations_tempo=\"inherit\"}'
    342        else:
    343            doctrine = f"{{air_operations_tempo='{air_operations_tempoEnum.value}'}}"
    344        return self._set_doctrine(doctrine)
    345
    346    def doctrine_quick_turnaround(self, quick_turnaroundEnum):
    347        """
    348        20、快速周转；推演方条令无法设置为Inherit
    349        :param quick_turnaroundEnum: QuickTurnAround, 枚举
    350        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    351        """
    352        if quick_turnaroundEnum.value == 999:
    353            doctrine = '{quick_turnaround_for_aircraft=\"inherit\"}'
    354        else:
    355            doctrine = f"{{quick_turnaround_for_aircraft='{quick_turnaroundEnum.value}'}}"
    356        return self._set_doctrine(doctrine)
    357
    358    def doctrine_fuel_state_planned(self, fuel_state_plannedEnum):
    359        """
    360        21、燃油状态，预先规划；推演方条令无法设置为Inherit
    361        :param fuel_state_plannedEnum: FuelState, 枚举
    362        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    363        """
    364        if fuel_state_plannedEnum.value == 999:
    365            doctrine = '{fuel_state_planned=\"inherit\"}'
    366        else:
    367            doctrine = f"{{fuel_state_planned='{fuel_state_plannedEnum.value}'}}"
    368        return self._set_doctrine(doctrine)
    369
    370    def doctrine_fuel_state_rtb(self, fuel_state_rtbEnum):
    371        """
    372        22、燃油状态，返航；推演方条令无法设置为Inherit
    373        :param fuel_state_rtbEnum: FuelStateRTB, 枚举
    374        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    375        """
    376        if fuel_state_rtbEnum.value == 999:
    377            doctrine = '{fuel_state_rtb=\"inherit\"}'
    378        else:
    379            doctrine = f"{{fuel_state_rtb='{fuel_state_rtbEnum.value}'}}"
    380        return self._set_doctrine(doctrine)
    381
    382    def doctrine_weapon_state_planned(self, weapon_state_plannedEnum):
    383        """
    384        23、武器状态，预先规划；推演方条令无法设置为Inherit
    385        :param weapon_state_plannedEnum:WeaponStatePlanned, 枚举
    386        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    387        """
    388        if weapon_state_plannedEnum.value == 999:
    389            doctrine = '{weapon_state_planned=\"inherit\"}'
    390        else:
    391            doctrine = f"{{weapon_state_planned='{weapon_state_plannedEnum.value}'}}"
    392        return self._set_doctrine(doctrine)
    393
    394    def doctrine_weapon_state_rtb(self, weapon_state_rtbEnum):
    395        """
    396        24、武器状态-返航；推演方条令无法设置为Inherit
    397        :param weapon_state_rtbEnum: WeaponStateRTB, 枚举
    398        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    399        """
    400        if weapon_state_rtbEnum.value == 999:
    401            doctrine = '{weapon_state_rtb=\"inherit\"}'
    402        else:
    403            doctrine = f"{{weapon_state_rtb='{weapon_state_rtbEnum.value}'}}"
    404        return self._set_doctrine(doctrine)
    405
    406    def doctrine_gun_strafing(self, gun_strafingEnum):
    407        """
    408        25、空对地扫射；推演方条令无法设置为Inherit
    409        :param gun_strafingEnum: GunStrafeGroundTargets, 枚举
    410        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    411        """
    412        if gun_strafingEnum.value == 999:
    413            doctrine = '{gun_strafing=\"inherit\"}'
    414        else:
    415            doctrine = f"{{gun_strafing='{gun_strafingEnum.value}'}}"
    416        return self._set_doctrine(doctrine)
    417
    418    def doctrine_jettison_ordnance(self, jettison_ordnanceEnum):
    419        """
    420        26、丢弃武器；推演方条令无法设置为Inherit
    421        :param jettison_ordnanceEnum: JettisonOrdnance, 枚举
    422        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    423        """
    424        if jettison_ordnanceEnum.value == 999:
    425            doctrine = '{jettison_ordnance=\"inherit\"}'
    426        else:
    427            doctrine = f"{{jettison_ordnance='{jettison_ordnanceEnum.value}'}}"
    428        return self._set_doctrine(doctrine)
    429
    430    def doctrine_bvr_logic(self, bvr_logicEnum):
    431        """
    432        27、超视距交战；推演方条令无法设置为Inherit
    433        :param bvr_logicEnum: BvrLogic, 枚举
    434        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    435        """
    436        if bvr_logicEnum.value == 999:
    437            doctrine = '{bvr_logic=\"inherit\"}'
    438        else:
    439            doctrine = f"{{bvr_logic='{bvr_logicEnum.value}'}}"
    440        return self._set_doctrine(doctrine)
    441
    442    def use_sams_in_anti_surface_mode(self, use_sams):
    443        """
    444        28、反水面战模式下使用防空导弹；推演方条令无法设置为Inherit
    445        :param use_sams: UseSAMsInASuWMode, 枚举
    446        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    447        """
    448        if use_sams.value == 999:
    449            doctrine = '{use_sams_in_anti_surface_mode=\"inherit\"}'
    450        else:
    451            doctrine = f"{{use_sams_in_anti_surface_mode='{use_sams.value}'}}"
    452        return self._set_doctrine(doctrine)
    453
    454    def doctrine_maintain_standoff(self, maintain_standoff):
    455        """
    456        29、反水面作战行动 与目标保持距离；推演方条令无法设置为Inherit
    457        :param maintain_standoff: MaintainStandoff, 枚举
    458        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    459        """
    460        if maintain_standoff.value == 999:
    461            doctrine = '{maintain_standoff=\"inherit\"}'
    462        else:
    463            doctrine = f"{{maintain_standoff='{maintain_standoff.value}'}}"
    464        return self._set_doctrine(doctrine)
    465
    466    def doctrine_navigation_surface_mode(self, navigation_surface_mode):
    467        """
    468        30、反水面作战行动 导航；推演方条令无法设置为Inherit
    469        :param navigation_surface_mode: NavigationAS, 枚举
    470        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    471        """
    472        if navigation_surface_mode.value == 999:
    473            doctrine = '{navigation_surface_mode=\"inherit\"}'
    474        else:
    475            doctrine = f"{{navigation_surface_mode='{navigation_surface_mode.value}'}}"
    476        return self._set_doctrine(doctrine)
    477
    478    def avoid_contact(self, avoid_item):
    479        """
    480        31、反潜作战行动，规避搜索；推演方条令无法设置为Inherit
    481        :param avoid_item: AvoidContact, 枚举
    482        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    483        """
    484        if avoid_item.value == 999:
    485            doctrine = '{avoid_contact=\"inherit\"}'
    486        else:
    487            doctrine = f"{{avoid_contact='{avoid_item.value}'}}"
    488        return self._set_doctrine(doctrine)
    489
    490    def dive_on_threat(self, select_item):
    491        """
    492        32、反潜作战行动，探测到威胁进行下潜；推演方条令无法设置为Inherit
    493        :param select_item: DiveOnThreat
    494        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    495        """
    496        if select_item.value == 999:
    497            doctrine = '{dive_on_threat=\"inherit\"}'
    498        else:
    499            doctrine = f"{{dive_on_threat='{select_item.value}'}}"
    500        return self._set_doctrine(doctrine)
    501
    502    def recharge_on_patrol(self, select_item):
    503        """
    504        33、反潜作战行动，充电电池 运输/站点；推演方条令无法设置为Inherit
    505        :param select_item: RechargePercent
    506        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    507        """
    508        if select_item.value == 999:
    509            doctrine = '{recharge_on_patrol=\"inherit\"}'
    510        else:
    511            doctrine = f"{{recharge_on_patrol='{select_item.value}'}}"
    512        return self._set_doctrine(doctrine)
    513
    514    def recharge_on_attack(self, select_item):
    515        """
    516        34、反潜作战行动，充电电池 进攻/防守；推演方条令无法设置为Inherit
    517        :param select_item: RechargePercent
    518        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    519        """
    520        if select_item.value == 999:
    521            doctrine = '{recharge_on_attack=\"inherit\"}'
    522        else:
    523            doctrine = f"{{recharge_on_attack='{select_item.value}'}}"
    524        return self._set_doctrine(doctrine)
    525
    526    def use_aip(self, select_item):
    527        """
    528        35、反潜作战行动，使用AIP技术；推演方条令无法设置为Inherit
    529        :param select_item: UseAIP
    530        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    531        """
    532        if select_item.value == 999:
    533            doctrine = '{use_aip=\"inherit\"}'
    534        else:
    535            doctrine = f"{{use_aip='{select_item.value}'}}"
    536        return self._set_doctrine(doctrine)
    537
    538    def dipping_sonar(self, select_item):
    539        """
    540        36、反潜作战行动， 吊放声呐；推演方条令无法设置为Inherit
    541        :param select_item: DippingSonar
    542        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    543        """
    544        if select_item.value == 999:
    545            doctrine = '{dipping_sonar=\"inherit\"}'
    546        else:
    547            doctrine = f"{{dipping_sonar='{select_item.value}'}}"
    548        return self._set_doctrine(doctrine)
    549
    550    def navigation_sub(self, select_item):
    551        """
    552        37、反潜作战行动， 导航；推演方条令无法设置为Inherit
    553        :param select_item: NavigationSub
    554        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    555        """
    556        if select_item.value == 999:
    557            doctrine = '{navigation_subsurface_mode=\"inherit\"}'
    558        else:
    559            doctrine = f"{{navigation_subsurface_mode='{select_item.value}'}}"
    560        return self._set_doctrine(doctrine)
    561
    562    def navigation_land(self, select_item):
    563        """
    564        38、陆战导航；推演方条令无法设置为Inherit
    565        :param select_item: NavigationLand
    566        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    567        """
    568        if select_item.value == 999:
    569            doctrine = '{navigation_land_mode=\"inherit\"}'
    570        else:
    571            doctrine = f"{{navigation_land_mode='{select_item.value}'}}"
    572        return self._set_doctrine(doctrine)
    573
    574    def set_weapon_release_authority(self, weapon_dbid, target_type, quantity_salvo=2, shooter_salvo=1,
    575                                     firing_range='none', self_defense='max'):
    576        """
    577        39、设置条令的武器使用规则
    578        :param weapon_dbid: {str: 武器的数据库ID}
    579        :param target_type: 枚举WRA_WeaponTargetType的值, global_util.py中定义，例如 WRA_WeaponTargetType.Aircraft_Unspecified 飞机未指明
    580        :param quantity_salvo: {str: 'n'-齐射武器数, 'inherit'-继承设置, 'max'-全量齐射, 'none'-禁用}
    581        :param shooter_salvo: {str: 'n'-齐射发射架数，'inherit'-继承设置, 'max'-全量齐射}
    582        :param firing_range: {str: 'n'-自动开火距离，'inherit'-继承设置, 'none'-禁用自动开火}
    583        :param self_defense: {str: 'n'-自动防御距离, 'inherit'-继承设置, 'max'-最大射程射击, 'none'-禁用自卫}
    584        注：其中n为数字。
    585        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    586        """
    587        return self._game_server.api_set_weapon_release_authority(self, weapon_dbid, target_type, quantity_salvo,
    588                                                                  shooter_salvo, firing_range, self_defense)
    589
    590    def wra_qty_salvo(self, weaponID, target_type, select_item):
    591        """
    592        40、武器使用规则--齐射武器数
    593        :param weaponID: str, 武器DBID
    594        :param target_type: WRA_WeaponTargetType
    595        :param select_item: 'inherit'、'system'、'Max'或数字字符串,
    596        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    597        """
    598        return self._game_server.api_wra_qty_salvo(self, weaponID, target_type, select_item)
    599
    600    def wra_shooter_salvo(self, weaponID, target_type, select_item):
    601        """
    602        41、武器使用规则--齐射发射架数
    603        :param weaponID: str,武器DBID
    604        :param target_type: WRA_WeaponTargetType
    605        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    606        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    607        """
    608        return self._game_server.api_wra_shooter_salvo(self, weaponID, target_type, select_item)
    609
    610    def wra_firing_range(self, weaponID, target_type, select_item):
    611        """
    612        42、武器使用规则 - -自动开火距离
    613        :param weaponID: str, 武器DBID
    614        :param target_type:WRA_WeaponTargetType
    615        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    616        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    617        """
    618        return self._game_server.api_wra_firing_range(self, weaponID, target_type, select_item)
    619
    620    def wra_self_defence_distance(self, weaponID, target_type, select_item):
    621        """
    622        43、武器使用规则--自动防御距离
    623        :param weaponID: str, 武器DBID
    624        :param target_type: WRA_WeaponTargetType
    625        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    626        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    627        """
    628        return self._game_server.api_wra_self_defence_distance(self, weaponID, target_type, select_item)
    629
    630    def withdraw_on_damage(self, damage_status):
    631        """
    632        44、满足如下条件时撤退 - -毁伤程度大于；推演方条令无法设置为Inherit
    633        :param damage_status: DamageThreshold
    634        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    635        """
    636        if damage_status.value == 999:
    637            doctrine = '{withdraw_on_damage=\"inherit\"}'
    638        else:
    639            doctrine = f"{{withdraw_on_damage='{damage_status.value}'}}"
    640        return self._set_doctrine(doctrine)
    641
    642    def withdraw_on_fuel(self, fuel_status):
    643        """
    644        45、满足如下条件时撤退--燃油少于；推演方条令无法设置为Inherit
    645        :param fuel_status: FuelQuantityThreshold
    646        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    647        """
    648        if fuel_status.value == 999:
    649            doctrine = '{withdraw_on_fuel=\"inherit\"}'
    650        else:
    651            doctrine = f"{{withdraw_on_fuel='{fuel_status.value}'}}"
    652        return self._set_doctrine(doctrine)
    653
    654    def withdraw_on_attack(self, weapon_status):
    655        """
    656        46、满足如下条件时撤退--主要攻击攻击武器至少处于；推演方条令无法设置为Inherit
    657        :param weapon_status: WeaponQuantityThreshold
    658        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    659        """
    660        if weapon_status.value == 999:
    661            doctrine = '{withdraw_on_attack=\"inherit\"}'
    662        else:
    663            doctrine = f"{{withdraw_on_attack='{weapon_status.value}'}}"
    664        return self._set_doctrine(doctrine)
    665
    666    def withdraw_on_defence(self, weapon_status):
    667        """
    668        47、满足如下条件时撤退--主要防御武器至少；推演方条令无法设置为Inherit
    669        :param weapon_status: WeaponQuantityThreshold
    670        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    671        """
    672        if weapon_status.value == 999:
    673            doctrine = '{withdraw_on_defence=\"inherit\"}'
    674        else:
    675            doctrine = f"{{withdraw_on_defence='{weapon_status.value}'}}"
    676        return self._set_doctrine(doctrine)
    677
    678    def deploy_on_damage(self, damage_status):
    679        """
    680        48、满足如下条件时重新部署--毁伤程度小于；推演方条令无法设置为Inherit
    681        :param damage_status: DamageThreshold
    682        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    683        """
    684        if damage_status.value == 999:
    685            doctrine = '{deploy_on_damage=\"inherit\"}'
    686        else:
    687            doctrine = f"{{deploy_on_damage='{damage_status.value}'}}"
    688        return self._set_doctrine(doctrine)
    689
    690    def deploy_on_fuel(self, fuel_status):
    691        """
    692        49、满足如下条件时重新部署--燃油至少处于；推演方条令无法设置为Inherit
    693        :param fuel_status: FuelQuantityThreshold
    694        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    695        """
    696        if fuel_status.value == 999:
    697            doctrine = '{deploy_on_fuel=\"inherit\"}'
    698        else:
    699            doctrine = '{deploy_on_fuel=%d}' % fuel_status.value
    700            doctrine = f"{{deploy_on_fuel='{fuel_status.value}'}}"
    701        return self._set_doctrine(doctrine)
    702
    703    def deploy_on_attack(self, weapon_status):
    704        """
    705        50、满足如下条件时重新部署--主要攻击武器处于；推演方条令无法设置为Inherit
    706        :param weapon_status: WeaponQuantityThreshold
    707        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    708        """
    709        if weapon_status.value == 999:
    710            doctrine = '{deploy_on_attack=\"inherit\"}'
    711        else:
    712            doctrine = '{deploy_on_attack=%d}' % weapon_status.value
    713            doctrine = f"{{deploy_on_attack='{weapon_status.value}'}}"
    714        return self._set_doctrine(doctrine)
    715
    716    def deploy_on_defence(self, weapon_status):
    717        """
    718        51、满足如下条件时重新部署--主要防御武器处于；推演方条令无法设置为Inherit
    719        :param weapon_status: WeaponQuantityThreshold
    720        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    721        """
    722        if weapon_status.value == 999:
    723            doctrine = '{deploy_on_defence=\"inherit\"}'
    724        else:
    725            doctrine = f"{{deploy_on_defence='{weapon_status.value}'}}"
    726        return self._set_doctrine(doctrine)
    727
    728    def get_doctrineWRA(self):
    729        """
    730        52、获取武器使用规则
    731        :return: 条令结果
    732        """
    733        return self._game_server.api_get_doctrineWRA(self)

条令类
1、条令中，电磁管控设置，设置雷达开关机
2、条令中，电磁管控设置，设置电子干扰传感器开关机
3、条令中，电磁管控设置，设置声呐开关机
4、设置条令中电磁管控与上级一致
5、条令设置，是否使用核武器
6、武器控制状态，对空
7、武器控制状态，对水面
8、武器控制状态，对潜
9、武器控制状态，对地
10、攻击时忽略计划航线设置
11、接战模糊位置目标
12、接战临机出现目标
13、受到攻击忽略电磁管控
14、鱼雷射程
15、自动规避
16、加油/途中补给
17、加油/途中补给加油机选择设置
18、给盟军加油/途中补给
19、空战节奏
20、快速周转
21、燃油状态，预先规划
22、燃油状态，返航
23、武器状态，预先规划
24、武器状态-返航
25、空对地扫射
26、丢弃武器
27、超视距交战
28、反水面战模式下使用防空导弹
29、反水面作战行动 与目标保持距离
30、反水面作战行动 导航
31、反潜作战行动，规避搜索
32、反潜作战行动，探测到威胁进行下潜
33、反潜作战行动，充电电池 运输/站点
34、反潜作战行动，充电电池 进攻/防守
35、反潜作战行动，使用AIP技术
36、反潜作战行动，吊放声呐
37、反潜作战行动，导航
38、陆战导航
39、设置条令的武器使用规则
40、武器使用规则--齐射武器数
41、武器使用规则--齐射发射架数
42、武器使用规则--自动开火距离
43、武器使用规则--自动防御距离
44、满足如下条件时撤退--毁伤程度大于
45、满足如下条件时撤退--燃油少于
46、满足如下条件时撤退--主要攻击攻击武器至少处于
47、满足如下条件时撤退--主要防御武器至少
48、满足如下条件时重新部署--毁伤程度小于
49、满足如下条件时重新部署--燃油至少处于
50、满足如下条件时重新部署--主要攻击武器处于
51、满足如下条件时重新部署--主要防御武器处于
52、获取武器使用规则

设置条令示例：
self.doctrine_weapon_control_status_air(WeaponControlStatus.Free) # 设置推演方条令，自由开火
air1_id = "sflsf0-gjlsf-sf" # 飞机guid
air1 = self.get_unit(air1_id) # 获取飞机对象
if air1 is not None:
air1.doctrine_weapon_control_status_air(WeaponControlStatus.Hold) # 设置此飞机条令，限制开火
air1.wra_qty_salvo('51', WRA_WeaponTargetType.Aircraft_4th_Generation, '2') # 设置此飞机武器51对4代机齐射武器数为2
patrol_mission = self.get_mission_by_name('patrol_mission1') # 通过巡航任务的名字，获取巡航任务对象
patrol_mission.doctrine_fuel_state_rtb(FuelStateRTB.YesLeaveGroup) # 设置任务条令，燃油状态：单元离开编队返航
attack_mission = self.create_strike_mission('打A机场', MissionStrikeType.LAND) # 创建对陆打击任务
attack_mission.doctrine_weapon_control_status_land(WeaponControlStatus.Free) # 对陆打击任务设置条令
attack_mission.escort.doctrine_weapon_control_status_air(WeaponControlStatus.Free) # 对陆打击任务的护航任务设置条令

DoctrineOperator(guid, name, side_name, category, element_type, unit_id='') View Source

    77    def __init__(self, guid, name, side_name, category, element_type, unit_id=''):
    78        Element.__init__(self, guid, name, side_name, element_type)
    79        self.Doctrine = {}
    80        self.category = category
    81        self.category_str = selector2str[self.category]
    82
    83        if self.category == SelectorCategory.Side:
    84            self.selector = '{side="%s"}' % self.Side
    85        elif self.category == SelectorCategory.Mission:
    86            self.selector = '{side="%s",mission="%s"}' % (self.Side, self.Name)
    87        elif self.category == SelectorCategory.WayPoint:
    88            self.selector = '{guid="%s",pointid="%s"}' % (unit_id, self.ID)
    89        elif self.category == SelectorCategory.EscortMission:
    90            self.selector = '{side="%s",mission="%s",escort=true}' % (self.Side, self.Name)
    91        else:
    92            self.selector = '{guid="%s"}' % self.ID

Doctrine
category
category_str
def doctrine_switch_radar(self, switch_on): View Source

    102    def doctrine_switch_radar(self, switch_on):
    103        """
    104        1、条令中，电磁管控设置，设置雷达开关机
    105        :param switch_on: bool, 传感器打开或者静默，True:打开
    106        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    107        """
    108        return self._game_server.api_doctrine_switch_radar(self, switch_on)

1、条令中，电磁管控设置，设置雷达开关机 :param switch_on: bool, 传感器打开或者静默，True:打开 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_switch_oecm(self, switch_on): View Source

    110    def doctrine_switch_oecm(self, switch_on):
    111        """
    112        2、条令中，电磁管控设置，设置电子干扰传感器开关机
    113        :param switch_on: bool, 传感器打开或者静默，True:打开
    114        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    115        """
    116        return self._game_server.api_doctrine_switch_oecm(self, switch_on)

2、条令中，电磁管控设置，设置电子干扰传感器开关机 :param switch_on: bool, 传感器打开或者静默，True:打开 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_switch_sonar(self, switch_on): View Source

    118    def doctrine_switch_sonar(self, switch_on):
    119        """
    120        3、条令中，电磁管控设置，设置声呐开关机
    121        :param switch_on: bool, 传感器打开或者静默，True:打开
    122        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    123        """
    124        return self._game_server.api_doctrine_switch_sonar(self, switch_on)

3、条令中，电磁管控设置，设置声呐开关机 :param switch_on: bool, 传感器打开或者静默，True:打开 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_SetEMCON_Inherit(self): View Source

    126    def doctrine_SetEMCON_Inherit(self):
    127        """
    128        4、设置条令中电磁管控与上级一致，推演方条令无法设置为Inherit
    129        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    130        """
    131        return self._game_server.api_doctrine_SetEMCON_Inherit(self)

4、设置条令中电磁管控与上级一致，推演方条令无法设置为Inherit :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def use_nuclear_weapons(self, use_nuclear): View Source

    133    def use_nuclear_weapons(self, use_nuclear):
    134        """
    135        5、条令设置，是否使用核武器； 推演方条令无法设置为Inherit
    136        本次比赛（2025年兵棋比赛）不允许使用核武器
    137        :param use_nuclear: EUseNuclear, 是否使用核武器
    138        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    139        """
    140        if use_nuclear.value == 999:
    141            if self.category == SelectorCategory.Side:
    142                return
    143            doctrine = '{use_nuclear_weapons=\"inherit\"}'
    144        else:
    145            if use_nuclear.value == 1:
    146                return
    147            doctrine = f"{{use_nuclear_weapons='{use_nuclear.value}'}}"
    148        return self._set_doctrine(doctrine)

5、条令设置，是否使用核武器； 推演方条令无法设置为Inherit 本次比赛（2025年兵棋比赛）不允许使用核武器 :param use_nuclear: EUseNuclear, 是否使用核武器 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_weapon_control_status_air(self, weapon_control_status_airEnum): View Source

    150    def doctrine_weapon_control_status_air(self, weapon_control_status_airEnum):
    151        """
    152        6、武器控制状态，对空；推演方条令无法设置为Inherit
    153        :param weapon_control_status_airEnum: WeaponControlStatus, 状态枚举类型
    154        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    155        """
    156        if weapon_control_status_airEnum.value == 999:
    157            if self.category == SelectorCategory.Side:
    158                return
    159            doctrine = '{weapon_control_status_air=\"inherit\"}'
    160        else:
    161            doctrine = f"{{weapon_control_status_air='{weapon_control_status_airEnum.value}'}}"
    162        return self._set_doctrine(doctrine)

6、武器控制状态，对空；推演方条令无法设置为Inherit :param weapon_control_status_airEnum: WeaponControlStatus, 状态枚举类型 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_weapon_control_status_surface(self, control_status): View Source

    164    def doctrine_weapon_control_status_surface(self, control_status):
    165        """
    166        7、武器控制状态，对水面；推演方条令无法设置为Inherit
    167        :param control_status: WeaponControlStatus, 状态枚举类型
    168        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    169        """
    170        if control_status.value == 999:
    171            if self.category == SelectorCategory.Side:
    172                return
    173            doctrine = '{weapon_control_status_surface=\"inherit\"}'
    174        else:
    175            doctrine = f"{{weapon_control_status_surface='{control_status.value}'}}"
    176        return self._set_doctrine(doctrine)

7、武器控制状态，对水面；推演方条令无法设置为Inherit :param control_status: WeaponControlStatus, 状态枚举类型 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_weapon_control_status_subsurface(self, control_status): View Source

    178    def doctrine_weapon_control_status_subsurface(self, control_status):
    179        """
    180        8、武器控制状态，对潜；推演方条令无法设置为Inherit
    181        :param control_status: WeaponControlStatus, 状态枚举类型
    182        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    183        """
    184        if control_status.value == 999:
    185            if self.category == SelectorCategory.Side:
    186                return
    187            doctrine = '{weapon_control_status_subsurface=\"inherit\"}'
    188        else:
    189            doctrine = f"{{weapon_control_status_subsurface='{control_status.value}'}}"
    190        return self._set_doctrine(doctrine)

8、武器控制状态，对潜；推演方条令无法设置为Inherit :param control_status: WeaponControlStatus, 状态枚举类型 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_weapon_control_status_land(self, weapon_control_status_landEnum): View Source

    192    def doctrine_weapon_control_status_land(self, weapon_control_status_landEnum):
    193        """
    194        9、武器控制状态，对地；推演方条令无法设置为Inherit
    195        :param weapon_control_status_landEnum:  WeaponControlStatus, 状态枚举类型
    196        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    197        """
    198        if weapon_control_status_landEnum.value == 999:
    199            if self.category == SelectorCategory.Side:
    200                return
    201            doctrine = '{weapon_control_status_land=\"inherit\"}'
    202        else:
    203            doctrine = f"{{weapon_control_status_land='{weapon_control_status_landEnum.value}'}}"
    204        return self._set_doctrine(doctrine)

9、武器控制状态，对地；推演方条令无法设置为Inherit :param weapon_control_status_landEnum: WeaponControlStatus, 状态枚举类型 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_ignore_plotted_course(self, ignore_plotted_courseEnum): View Source

    206    def doctrine_ignore_plotted_course(self, ignore_plotted_courseEnum):
    207        """
    208        10、攻击时忽略计划航线设置；推演方条令无法设置为Inherit
    209        :param ignore_plotted_courseEnum:IgnorePlottedCourseWhenAttacking，选择枚举
    210        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    211        """
    212        if ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.No:
    213            doctrine = '{ignore_plotted_course="0"}'
    214        elif ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.Yes:
    215            doctrine = '{ignore_plotted_course="1"}'
    216        elif ignore_plotted_courseEnum == IgnorePlottedCourseWhenAttacking.Inherit:
    217            if self.category == SelectorCategory.Side:
    218                return
    219            doctrine = '{ignore_plotted_course=\"inherit\"}'
    220        else:
    221            raise ValueError("parameter error")
    222        return self._set_doctrine(doctrine)

10、攻击时忽略计划航线设置；推演方条令无法设置为Inherit :param ignore_plotted_courseEnum:IgnorePlottedCourseWhenAttacking，选择枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_engaging_ambiguous_targets(self, towards_ambigous_target): View Source

    224    def doctrine_engaging_ambiguous_targets(self, towards_ambigous_target):
    225        """
    226        11、接战模糊位置目标；推演方条令无法设置为Inherit
    227        :param towards_ambigous_target: BehaviorTowardsAmbigousTarget
    228        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    229        """
    230        if towards_ambigous_target.value == 999:
    231            if self.category == SelectorCategory.Side:
    232                return
    233            doctrine = '{engaging_ambiguous_targets=\"inherit\"}'
    234        else:
    235            doctrine = f"{{engaging_ambiguous_targets='{towards_ambigous_target.value}'}}"
    236        return self._set_doctrine(doctrine)

11、接战模糊位置目标；推演方条令无法设置为Inherit :param towards_ambigous_target: BehaviorTowardsAmbigousTarget :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_engage_opportunity_targets(self, engage_opportunity_targetsEnum): View Source

    238    def doctrine_engage_opportunity_targets(self, engage_opportunity_targetsEnum):
    239        """
    240        12、接战临机出现目标；推演方条令无法设置为Inherit
    241        :param engage_opportunity_targetsEnum: EngageWithContactTarget, 枚举
    242        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    243        """
    244        if engage_opportunity_targetsEnum == EngageWithContactTarget.No_Only:
    245            doctrine = '{engage_opportunity_targets="0"}'
    246        elif engage_opportunity_targetsEnum == EngageWithContactTarget.Yes_AnyTarget:
    247            doctrine = '{engage_opportunity_targets="1"}'
    248        elif engage_opportunity_targetsEnum.value == 999:
    249            doctrine = '{engage_opportunity_targets=\"inherit\"}'
    250        else:
    251            raise ValueError("parameter error")
    252        return self._set_doctrine(doctrine)

12、接战临机出现目标；推演方条令无法设置为Inherit :param engage_opportunity_targetsEnum: EngageWithContactTarget, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_ignore_emcon_under_attack(self, ignore_emcon_while_under_attackEnum): View Source

    254    def doctrine_ignore_emcon_under_attack(self, ignore_emcon_while_under_attackEnum):
    255        """
    256        13、受到攻击忽略电磁管控；推演方条令无法设置为Inherit
    257        :param ignore_emcon_while_under_attackEnum: IgnoreEMCONUnderAttack, 枚举
    258        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    259        """
    260        if ignore_emcon_while_under_attackEnum == IgnoreEMCONUnderAttack.No:
    261            doctrine = '{ignore_emcon_while_under_attack="0"}'
    262        elif ignore_emcon_while_under_attackEnum == IgnoreEMCONUnderAttack.Ignore_EMCON_While_Under_Attack:
    263            doctrine = '{ignore_emcon_while_under_attack="1"}'
    264        elif ignore_emcon_while_under_attackEnum.value == 999:
    265            doctrine = '{ignore_emcon_while_under_attack=\"inherit\"}'
    266        else:
    267            raise ValueError("parameter error")
    268        return self._set_doctrine(doctrine)

13、受到攻击忽略电磁管控；推演方条令无法设置为Inherit :param ignore_emcon_while_under_attackEnum: IgnoreEMCONUnderAttack, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def torpedoes_kinematic_range(self, kinematic_range): View Source

    270    def torpedoes_kinematic_range(self, kinematic_range):
    271        """
    272        14、鱼雷射程；推演方条令无法设置为Inherit
    273        :param kinematic_range:  UseTorpedoesKinematicRange, 枚举
    274        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    275        """
    276        if kinematic_range.value == 999:
    277            doctrine = '{kinematic_range_for_torpedoes=\"inherit\"}'
    278        else:
    279            doctrine = f"{{kinematic_range_for_torpedoes='{kinematic_range.value}'}}"
    280        return self._set_doctrine(doctrine)

14、鱼雷射程；推演方条令无法设置为Inherit :param kinematic_range: UseTorpedoesKinematicRange, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_automatic_evasion(self, automatic_evasionEnum): View Source

    282    def doctrine_automatic_evasion(self, automatic_evasionEnum):
    283        """
    284        15、自动规避；推演方条令无法设置为Inherit
    285        :param automatic_evasionEnum: AutomaticEvasion, 枚举
    286        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    287        """
    288        if automatic_evasionEnum == AutomaticEvasion.No:
    289            doctrine = '{automatic_evasion="0"}'
    290        elif automatic_evasionEnum == AutomaticEvasion.Yes:
    291            doctrine = '{automatic_evasion="1"}'
    292        elif automatic_evasionEnum.value == 999:
    293            doctrine = '{automatic_evasion=\"inherit\"}'
    294        else:
    295            raise ValueError("parameter error")
    296        return self._set_doctrine(doctrine)

15、自动规避；推演方条令无法设置为Inherit :param automatic_evasionEnum: AutomaticEvasion, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_refuel(self, refuel): View Source

    298    def doctrine_refuel(self, refuel):
    299        """
    300        16、加油/途中补给；推演方条令无法设置为Inherit
    301        :param refuel: ERefuel, 枚举
    302        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    303        """
    304        if refuel.value == 999:
    305            doctrine = '{use_refuel_unrep=\"inherit\"}'
    306        else:
    307            doctrine = f"{{use_refuel_unrep='{refuel.value}'}}"
    308        return self._set_doctrine(doctrine)

16、加油/途中补给；推演方条令无法设置为Inherit :param refuel: ERefuel, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_refuel_select(self, refuel_select): View Source

    310    def doctrine_refuel_select(self, refuel_select):
    311        """
    312        17、加油/途中补给加油机选择设置；推演方条令无法设置为Inherit
    313        :param refuel_select: ERefuelSelect, 枚举
    314        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    315        """
    316        if refuel_select.value == 999:
    317            doctrine = '{refuel_unrep_selection=\"inherit\"}'
    318        else:
    319            doctrine = f"{{refuel_unrep_selection='{refuel_select.value}'}}"
    320        return self._set_doctrine(doctrine)

17、加油/途中补给加油机选择设置；推演方条令无法设置为Inherit :param refuel_select: ERefuelSelect, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_refuel_allied(self, refuel): View Source

    322    def doctrine_refuel_allied(self, refuel):
    323        """
    324        18、给盟军加油/途中补给；推演方条令无法设置为Inherit
    325        :param refuel: ERefuelAllied, 枚举
    326        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    327        """
    328        if refuel.value == 999:
    329            doctrine = '{refuel_unrep_allied=\"inherit\"}'
    330        else:
    331            doctrine = f"{{refuel_unrep_allied='{refuel.value}'}}"
    332        return self._set_doctrine(doctrine)

18、给盟军加油/途中补给；推演方条令无法设置为Inherit :param refuel: ERefuelAllied, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_air_operations_tempo(self, air_operations_tempoEnum): View Source

    334    def doctrine_air_operations_tempo(self, air_operations_tempoEnum):
    335        """
    336        19、空战节奏；推演方条令无法设置为Inherit
    337        :param air_operations_tempoEnum: AirOpsTempo, 枚举
    338        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    339        """
    340        if air_operations_tempoEnum.value == 999:
    341            doctrine = '{air_operations_tempo=\"inherit\"}'
    342        else:
    343            doctrine = f"{{air_operations_tempo='{air_operations_tempoEnum.value}'}}"
    344        return self._set_doctrine(doctrine)

19、空战节奏；推演方条令无法设置为Inherit :param air_operations_tempoEnum: AirOpsTempo, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_quick_turnaround(self, quick_turnaroundEnum): View Source

    346    def doctrine_quick_turnaround(self, quick_turnaroundEnum):
    347        """
    348        20、快速周转；推演方条令无法设置为Inherit
    349        :param quick_turnaroundEnum: QuickTurnAround, 枚举
    350        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    351        """
    352        if quick_turnaroundEnum.value == 999:
    353            doctrine = '{quick_turnaround_for_aircraft=\"inherit\"}'
    354        else:
    355            doctrine = f"{{quick_turnaround_for_aircraft='{quick_turnaroundEnum.value}'}}"
    356        return self._set_doctrine(doctrine)

20、快速周转；推演方条令无法设置为Inherit :param quick_turnaroundEnum: QuickTurnAround, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_fuel_state_planned(self, fuel_state_plannedEnum): View Source

    358    def doctrine_fuel_state_planned(self, fuel_state_plannedEnum):
    359        """
    360        21、燃油状态，预先规划；推演方条令无法设置为Inherit
    361        :param fuel_state_plannedEnum: FuelState, 枚举
    362        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    363        """
    364        if fuel_state_plannedEnum.value == 999:
    365            doctrine = '{fuel_state_planned=\"inherit\"}'
    366        else:
    367            doctrine = f"{{fuel_state_planned='{fuel_state_plannedEnum.value}'}}"
    368        return self._set_doctrine(doctrine)

21、燃油状态，预先规划；推演方条令无法设置为Inherit :param fuel_state_plannedEnum: FuelState, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_fuel_state_rtb(self, fuel_state_rtbEnum): View Source

    370    def doctrine_fuel_state_rtb(self, fuel_state_rtbEnum):
    371        """
    372        22、燃油状态，返航；推演方条令无法设置为Inherit
    373        :param fuel_state_rtbEnum: FuelStateRTB, 枚举
    374        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    375        """
    376        if fuel_state_rtbEnum.value == 999:
    377            doctrine = '{fuel_state_rtb=\"inherit\"}'
    378        else:
    379            doctrine = f"{{fuel_state_rtb='{fuel_state_rtbEnum.value}'}}"
    380        return self._set_doctrine(doctrine)

22、燃油状态，返航；推演方条令无法设置为Inherit :param fuel_state_rtbEnum: FuelStateRTB, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_weapon_state_planned(self, weapon_state_plannedEnum): View Source

    382    def doctrine_weapon_state_planned(self, weapon_state_plannedEnum):
    383        """
    384        23、武器状态，预先规划；推演方条令无法设置为Inherit
    385        :param weapon_state_plannedEnum:WeaponStatePlanned, 枚举
    386        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    387        """
    388        if weapon_state_plannedEnum.value == 999:
    389            doctrine = '{weapon_state_planned=\"inherit\"}'
    390        else:
    391            doctrine = f"{{weapon_state_planned='{weapon_state_plannedEnum.value}'}}"
    392        return self._set_doctrine(doctrine)

23、武器状态，预先规划；推演方条令无法设置为Inherit :param weapon_state_plannedEnum:WeaponStatePlanned, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_weapon_state_rtb(self, weapon_state_rtbEnum): View Source

    394    def doctrine_weapon_state_rtb(self, weapon_state_rtbEnum):
    395        """
    396        24、武器状态-返航；推演方条令无法设置为Inherit
    397        :param weapon_state_rtbEnum: WeaponStateRTB, 枚举
    398        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    399        """
    400        if weapon_state_rtbEnum.value == 999:
    401            doctrine = '{weapon_state_rtb=\"inherit\"}'
    402        else:
    403            doctrine = f"{{weapon_state_rtb='{weapon_state_rtbEnum.value}'}}"
    404        return self._set_doctrine(doctrine)

24、武器状态-返航；推演方条令无法设置为Inherit :param weapon_state_rtbEnum: WeaponStateRTB, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_gun_strafing(self, gun_strafingEnum): View Source

    406    def doctrine_gun_strafing(self, gun_strafingEnum):
    407        """
    408        25、空对地扫射；推演方条令无法设置为Inherit
    409        :param gun_strafingEnum: GunStrafeGroundTargets, 枚举
    410        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    411        """
    412        if gun_strafingEnum.value == 999:
    413            doctrine = '{gun_strafing=\"inherit\"}'
    414        else:
    415            doctrine = f"{{gun_strafing='{gun_strafingEnum.value}'}}"
    416        return self._set_doctrine(doctrine)

25、空对地扫射；推演方条令无法设置为Inherit :param gun_strafingEnum: GunStrafeGroundTargets, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_jettison_ordnance(self, jettison_ordnanceEnum): View Source

    418    def doctrine_jettison_ordnance(self, jettison_ordnanceEnum):
    419        """
    420        26、丢弃武器；推演方条令无法设置为Inherit
    421        :param jettison_ordnanceEnum: JettisonOrdnance, 枚举
    422        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    423        """
    424        if jettison_ordnanceEnum.value == 999:
    425            doctrine = '{jettison_ordnance=\"inherit\"}'
    426        else:
    427            doctrine = f"{{jettison_ordnance='{jettison_ordnanceEnum.value}'}}"
    428        return self._set_doctrine(doctrine)

26、丢弃武器；推演方条令无法设置为Inherit :param jettison_ordnanceEnum: JettisonOrdnance, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_bvr_logic(self, bvr_logicEnum): View Source

    430    def doctrine_bvr_logic(self, bvr_logicEnum):
    431        """
    432        27、超视距交战；推演方条令无法设置为Inherit
    433        :param bvr_logicEnum: BvrLogic, 枚举
    434        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    435        """
    436        if bvr_logicEnum.value == 999:
    437            doctrine = '{bvr_logic=\"inherit\"}'
    438        else:
    439            doctrine = f"{{bvr_logic='{bvr_logicEnum.value}'}}"
    440        return self._set_doctrine(doctrine)

27、超视距交战；推演方条令无法设置为Inherit :param bvr_logicEnum: BvrLogic, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def use_sams_in_anti_surface_mode(self, use_sams): View Source

    442    def use_sams_in_anti_surface_mode(self, use_sams):
    443        """
    444        28、反水面战模式下使用防空导弹；推演方条令无法设置为Inherit
    445        :param use_sams: UseSAMsInASuWMode, 枚举
    446        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    447        """
    448        if use_sams.value == 999:
    449            doctrine = '{use_sams_in_anti_surface_mode=\"inherit\"}'
    450        else:
    451            doctrine = f"{{use_sams_in_anti_surface_mode='{use_sams.value}'}}"
    452        return self._set_doctrine(doctrine)

28、反水面战模式下使用防空导弹；推演方条令无法设置为Inherit :param use_sams: UseSAMsInASuWMode, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def doctrine_maintain_standoff(self, maintain_standoff): View Source

    454    def doctrine_maintain_standoff(self, maintain_standoff):
    455        """
    456        29、反水面作战行动 与目标保持距离；推演方条令无法设置为Inherit
    457        :param maintain_standoff: MaintainStandoff, 枚举
    458        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    459        """
    460        if maintain_standoff.value == 999:
    461            doctrine = '{maintain_standoff=\"inherit\"}'
    462        else:
    463            doctrine = f"{{maintain_standoff='{maintain_standoff.value}'}}"
    464        return self._set_doctrine(doctrine)

29、反水面作战行动 与目标保持距离；推演方条令无法设置为Inherit :param maintain_standoff: MaintainStandoff, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def avoid_contact(self, avoid_item): View Source

    478    def avoid_contact(self, avoid_item):
    479        """
    480        31、反潜作战行动，规避搜索；推演方条令无法设置为Inherit
    481        :param avoid_item: AvoidContact, 枚举
    482        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    483        """
    484        if avoid_item.value == 999:
    485            doctrine = '{avoid_contact=\"inherit\"}'
    486        else:
    487            doctrine = f"{{avoid_contact='{avoid_item.value}'}}"
    488        return self._set_doctrine(doctrine)

31、反潜作战行动，规避搜索；推演方条令无法设置为Inherit :param avoid_item: AvoidContact, 枚举 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def dive_on_threat(self, select_item): View Source

    490    def dive_on_threat(self, select_item):
    491        """
    492        32、反潜作战行动，探测到威胁进行下潜；推演方条令无法设置为Inherit
    493        :param select_item: DiveOnThreat
    494        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    495        """
    496        if select_item.value == 999:
    497            doctrine = '{dive_on_threat=\"inherit\"}'
    498        else:
    499            doctrine = f"{{dive_on_threat='{select_item.value}'}}"
    500        return self._set_doctrine(doctrine)

32、反潜作战行动，探测到威胁进行下潜；推演方条令无法设置为Inherit :param select_item: DiveOnThreat :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def recharge_on_patrol(self, select_item): View Source

    502    def recharge_on_patrol(self, select_item):
    503        """
    504        33、反潜作战行动，充电电池 运输/站点；推演方条令无法设置为Inherit
    505        :param select_item: RechargePercent
    506        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    507        """
    508        if select_item.value == 999:
    509            doctrine = '{recharge_on_patrol=\"inherit\"}'
    510        else:
    511            doctrine = f"{{recharge_on_patrol='{select_item.value}'}}"
    512        return self._set_doctrine(doctrine)

33、反潜作战行动，充电电池 运输/站点；推演方条令无法设置为Inherit :param select_item: RechargePercent :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def recharge_on_attack(self, select_item): View Source

    514    def recharge_on_attack(self, select_item):
    515        """
    516        34、反潜作战行动，充电电池 进攻/防守；推演方条令无法设置为Inherit
    517        :param select_item: RechargePercent
    518        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    519        """
    520        if select_item.value == 999:
    521            doctrine = '{recharge_on_attack=\"inherit\"}'
    522        else:
    523            doctrine = f"{{recharge_on_attack='{select_item.value}'}}"
    524        return self._set_doctrine(doctrine)

34、反潜作战行动，充电电池 进攻/防守；推演方条令无法设置为Inherit :param select_item: RechargePercent :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def use_aip(self, select_item): View Source

    526    def use_aip(self, select_item):
    527        """
    528        35、反潜作战行动，使用AIP技术；推演方条令无法设置为Inherit
    529        :param select_item: UseAIP
    530        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    531        """
    532        if select_item.value == 999:
    533            doctrine = '{use_aip=\"inherit\"}'
    534        else:
    535            doctrine = f"{{use_aip='{select_item.value}'}}"
    536        return self._set_doctrine(doctrine)

35、反潜作战行动，使用AIP技术；推演方条令无法设置为Inherit :param select_item: UseAIP :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def dipping_sonar(self, select_item): View Source

    538    def dipping_sonar(self, select_item):
    539        """
    540        36、反潜作战行动， 吊放声呐；推演方条令无法设置为Inherit
    541        :param select_item: DippingSonar
    542        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    543        """
    544        if select_item.value == 999:
    545            doctrine = '{dipping_sonar=\"inherit\"}'
    546        else:
    547            doctrine = f"{{dipping_sonar='{select_item.value}'}}"
    548        return self._set_doctrine(doctrine)

36、反潜作战行动， 吊放声呐；推演方条令无法设置为Inherit :param select_item: DippingSonar :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def navigation_sub(self, select_item): View Source

    550    def navigation_sub(self, select_item):
    551        """
    552        37、反潜作战行动， 导航；推演方条令无法设置为Inherit
    553        :param select_item: NavigationSub
    554        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    555        """
    556        if select_item.value == 999:
    557            doctrine = '{navigation_subsurface_mode=\"inherit\"}'
    558        else:
    559            doctrine = f"{{navigation_subsurface_mode='{select_item.value}'}}"
    560        return self._set_doctrine(doctrine)

37、反潜作战行动， 导航；推演方条令无法设置为Inherit :param select_item: NavigationSub :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def navigation_land(self, select_item): View Source

    562    def navigation_land(self, select_item):
    563        """
    564        38、陆战导航；推演方条令无法设置为Inherit
    565        :param select_item: NavigationLand
    566        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    567        """
    568        if select_item.value == 999:
    569            doctrine = '{navigation_land_mode=\"inherit\"}'
    570        else:
    571            doctrine = f"{{navigation_land_mode='{select_item.value}'}}"
    572        return self._set_doctrine(doctrine)

38、陆战导航；推演方条令无法设置为Inherit :param select_item: NavigationLand :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def set_weapon_release_authority( self, weapon_dbid, target_type, quantity_salvo=2, shooter_salvo=1, firing_range='none', self_defense='max'): View Source

    574    def set_weapon_release_authority(self, weapon_dbid, target_type, quantity_salvo=2, shooter_salvo=1,
    575                                     firing_range='none', self_defense='max'):
    576        """
    577        39、设置条令的武器使用规则
    578        :param weapon_dbid: {str: 武器的数据库ID}
    579        :param target_type: 枚举WRA_WeaponTargetType的值, global_util.py中定义，例如 WRA_WeaponTargetType.Aircraft_Unspecified 飞机未指明
    580        :param quantity_salvo: {str: 'n'-齐射武器数, 'inherit'-继承设置, 'max'-全量齐射, 'none'-禁用}
    581        :param shooter_salvo: {str: 'n'-齐射发射架数，'inherit'-继承设置, 'max'-全量齐射}
    582        :param firing_range: {str: 'n'-自动开火距离，'inherit'-继承设置, 'none'-禁用自动开火}
    583        :param self_defense: {str: 'n'-自动防御距离, 'inherit'-继承设置, 'max'-最大射程射击, 'none'-禁用自卫}
    584        注：其中n为数字。
    585        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    586        """
    587        return self._game_server.api_set_weapon_release_authority(self, weapon_dbid, target_type, quantity_salvo,
    588                                                                  shooter_salvo, firing_range, self_defense)

39、设置条令的武器使用规则 :param weapon_dbid: {str: 武器的数据库ID} :param target_type: 枚举WRA_WeaponTargetType的值, global_util.py中定义，例如 WRA_WeaponTargetType.Aircraft_Unspecified 飞机未指明 :param quantity_salvo: {str: 'n'-齐射武器数, 'inherit'-继承设置, 'max'-全量齐射, 'none'-禁用} :param shooter_salvo: {str: 'n'-齐射发射架数，'inherit'-继承设置, 'max'-全量齐射} :param firing_range: {str: 'n'-自动开火距离，'inherit'-继承设置, 'none'-禁用自动开火} :param self_defense: {str: 'n'-自动防御距离, 'inherit'-继承设置, 'max'-最大射程射击, 'none'-禁用自卫} 注：其中n为数字。 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def wra_qty_salvo(self, weaponID, target_type, select_item): View Source

    590    def wra_qty_salvo(self, weaponID, target_type, select_item):
    591        """
    592        40、武器使用规则--齐射武器数
    593        :param weaponID: str, 武器DBID
    594        :param target_type: WRA_WeaponTargetType
    595        :param select_item: 'inherit'、'system'、'Max'或数字字符串,
    596        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    597        """
    598        return self._game_server.api_wra_qty_salvo(self, weaponID, target_type, select_item)

40、武器使用规则--齐射武器数 :param weaponID: str, 武器DBID :param target_type: WRA_WeaponTargetType :param select_item: 'inherit'、'system'、'Max'或数字字符串, :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def wra_shooter_salvo(self, weaponID, target_type, select_item): View Source

    600    def wra_shooter_salvo(self, weaponID, target_type, select_item):
    601        """
    602        41、武器使用规则--齐射发射架数
    603        :param weaponID: str,武器DBID
    604        :param target_type: WRA_WeaponTargetType
    605        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    606        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    607        """
    608        return self._game_server.api_wra_shooter_salvo(self, weaponID, target_type, select_item)

41、武器使用规则--齐射发射架数 :param weaponID: str,武器DBID :param target_type: WRA_WeaponTargetType :param select_item: 'inherit'、'system'、'Max'或数字字符串 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def wra_firing_range(self, weaponID, target_type, select_item): View Source

    610    def wra_firing_range(self, weaponID, target_type, select_item):
    611        """
    612        42、武器使用规则 - -自动开火距离
    613        :param weaponID: str, 武器DBID
    614        :param target_type:WRA_WeaponTargetType
    615        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    616        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    617        """
    618        return self._game_server.api_wra_firing_range(self, weaponID, target_type, select_item)

42、武器使用规则 - -自动开火距离 :param weaponID: str, 武器DBID :param target_type:WRA_WeaponTargetType :param select_item: 'inherit'、'system'、'Max'或数字字符串 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def wra_self_defence_distance(self, weaponID, target_type, select_item): View Source

    620    def wra_self_defence_distance(self, weaponID, target_type, select_item):
    621        """
    622        43、武器使用规则--自动防御距离
    623        :param weaponID: str, 武器DBID
    624        :param target_type: WRA_WeaponTargetType
    625        :param select_item: 'inherit'、'system'、'Max'或数字字符串
    626        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    627        """
    628        return self._game_server.api_wra_self_defence_distance(self, weaponID, target_type, select_item)

43、武器使用规则--自动防御距离 :param weaponID: str, 武器DBID :param target_type: WRA_WeaponTargetType :param select_item: 'inherit'、'system'、'Max'或数字字符串 :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def withdraw_on_damage(self, damage_status): View Source

    630    def withdraw_on_damage(self, damage_status):
    631        """
    632        44、满足如下条件时撤退 - -毁伤程度大于；推演方条令无法设置为Inherit
    633        :param damage_status: DamageThreshold
    634        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    635        """
    636        if damage_status.value == 999:
    637            doctrine = '{withdraw_on_damage=\"inherit\"}'
    638        else:
    639            doctrine = f"{{withdraw_on_damage='{damage_status.value}'}}"
    640        return self._set_doctrine(doctrine)

44、满足如下条件时撤退 - -毁伤程度大于；推演方条令无法设置为Inherit :param damage_status: DamageThreshold :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def withdraw_on_fuel(self, fuel_status): View Source

    642    def withdraw_on_fuel(self, fuel_status):
    643        """
    644        45、满足如下条件时撤退--燃油少于；推演方条令无法设置为Inherit
    645        :param fuel_status: FuelQuantityThreshold
    646        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    647        """
    648        if fuel_status.value == 999:
    649            doctrine = '{withdraw_on_fuel=\"inherit\"}'
    650        else:
    651            doctrine = f"{{withdraw_on_fuel='{fuel_status.value}'}}"
    652        return self._set_doctrine(doctrine)

45、满足如下条件时撤退--燃油少于；推演方条令无法设置为Inherit :param fuel_status: FuelQuantityThreshold :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def withdraw_on_attack(self, weapon_status): View Source

    654    def withdraw_on_attack(self, weapon_status):
    655        """
    656        46、满足如下条件时撤退--主要攻击攻击武器至少处于；推演方条令无法设置为Inherit
    657        :param weapon_status: WeaponQuantityThreshold
    658        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    659        """
    660        if weapon_status.value == 999:
    661            doctrine = '{withdraw_on_attack=\"inherit\"}'
    662        else:
    663            doctrine = f"{{withdraw_on_attack='{weapon_status.value}'}}"
    664        return self._set_doctrine(doctrine)

46、满足如下条件时撤退--主要攻击攻击武器至少处于；推演方条令无法设置为Inherit :param weapon_status: WeaponQuantityThreshold :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def withdraw_on_defence(self, weapon_status): View Source

    666    def withdraw_on_defence(self, weapon_status):
    667        """
    668        47、满足如下条件时撤退--主要防御武器至少；推演方条令无法设置为Inherit
    669        :param weapon_status: WeaponQuantityThreshold
    670        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    671        """
    672        if weapon_status.value == 999:
    673            doctrine = '{withdraw_on_defence=\"inherit\"}'
    674        else:
    675            doctrine = f"{{withdraw_on_defence='{weapon_status.value}'}}"
    676        return self._set_doctrine(doctrine)

47、满足如下条件时撤退--主要防御武器至少；推演方条令无法设置为Inherit :param weapon_status: WeaponQuantityThreshold :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def deploy_on_damage(self, damage_status): View Source

    678    def deploy_on_damage(self, damage_status):
    679        """
    680        48、满足如下条件时重新部署--毁伤程度小于；推演方条令无法设置为Inherit
    681        :param damage_status: DamageThreshold
    682        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    683        """
    684        if damage_status.value == 999:
    685            doctrine = '{deploy_on_damage=\"inherit\"}'
    686        else:
    687            doctrine = f"{{deploy_on_damage='{damage_status.value}'}}"
    688        return self._set_doctrine(doctrine)

48、满足如下条件时重新部署--毁伤程度小于；推演方条令无法设置为Inherit :param damage_status: DamageThreshold :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def deploy_on_fuel(self, fuel_status): View Source

    690    def deploy_on_fuel(self, fuel_status):
    691        """
    692        49、满足如下条件时重新部署--燃油至少处于；推演方条令无法设置为Inherit
    693        :param fuel_status: FuelQuantityThreshold
    694        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    695        """
    696        if fuel_status.value == 999:
    697            doctrine = '{deploy_on_fuel=\"inherit\"}'
    698        else:
    699            doctrine = '{deploy_on_fuel=%d}' % fuel_status.value
    700            doctrine = f"{{deploy_on_fuel='{fuel_status.value}'}}"
    701        return self._set_doctrine(doctrine)

49、满足如下条件时重新部署--燃油至少处于；推演方条令无法设置为Inherit :param fuel_status: FuelQuantityThreshold :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def deploy_on_attack(self, weapon_status): View Source

    703    def deploy_on_attack(self, weapon_status):
    704        """
    705        50、满足如下条件时重新部署--主要攻击武器处于；推演方条令无法设置为Inherit
    706        :param weapon_status: WeaponQuantityThreshold
    707        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    708        """
    709        if weapon_status.value == 999:
    710            doctrine = '{deploy_on_attack=\"inherit\"}'
    711        else:
    712            doctrine = '{deploy_on_attack=%d}' % weapon_status.value
    713            doctrine = f"{{deploy_on_attack='{weapon_status.value}'}}"
    714        return self._set_doctrine(doctrine)

50、满足如下条件时重新部署--主要攻击武器处于；推演方条令无法设置为Inherit :param weapon_status: WeaponQuantityThreshold :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def deploy_on_defence(self, weapon_status): View Source

    716    def deploy_on_defence(self, weapon_status):
    717        """
    718        51、满足如下条件时重新部署--主要防御武器处于；推演方条令无法设置为Inherit
    719        :param weapon_status: WeaponQuantityThreshold
    720        :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似
    721        """
    722        if weapon_status.value == 999:
    723            doctrine = '{deploy_on_defence=\"inherit\"}'
    724        else:
    725            doctrine = f"{{deploy_on_defence='{weapon_status.value}'}}"
    726        return self._set_doctrine(doctrine)

51、满足如下条件时重新部署--主要防御武器处于；推演方条令无法设置为Inherit :param weapon_status: WeaponQuantityThreshold :return: 指令执行结果, Reply对象, 和global_util.py中Reply类定义类似

def get_doctrineWRA(self): View Source

    728    def get_doctrineWRA(self):
    729        """
    730        52、获取武器使用规则
    731        :return: 条令结果
    732        """
    733        return self._game_server.api_get_doctrineWRA(self)

52、获取武器使用规则 :return: 条令结果

##### Inherited Members

engine.LingYi.entitys.element.Element
  ID
  Name
  Side
  ElementType
  delete_sub_object