本帖最后由 815208129 于 2023-3-13 23:43 编辑
AI开源考虑到为了维护联机的公平,近几年内不会开源
- # initial json
- ("esai_initial_json", [
- (troop_set_slot, "trp_esai_json", 0, 1),
- (try_for_range, ":slot_no", 1, 1000),
- (troop_set_slot, "trp_esai_json", ":slot_no", 0),
- (try_end),
- ]),
- # to calculate
- ("append_json_data", [
- (store_script_param_1, ":data_type"),
- (store_script_param_2, ":data"),
- (assign, ":troop_no", "trp_esai_json"),
- (troop_get_slot, ":slot_no", ":data_type", 0),
- (try_begin),
- (eq, ":data_type", 1), # reg
- (troop_set_slot, , ":slot_no", ":data"),
- (val_add, ":slot_no", 1),
- (troop_set_slot, "trp_esai_json", 0, ":slot_no"),
- (else_try),
- (eq, ":data_type", 2), # pos
- (position_get_x, ":pos_x", ":data"),
- (troop_set_slot, "trp_esai_json", ":slot_no", ":data"),
- (val_add, ":slot_no", 1),
- (position_get_y, ":pos_y", ":data"),
- (troop_set_slot, "trp_esai_json", ":slot_no", ":data"),
- (val_add, ":slot_no", 1),
- (position_get_z, ":pos_z", ":data"),
- (troop_set_slot, "trp_esai_json", ":slot_no", ":data"),
- (val_add, ":slot_no", 1),
- (troop_set_slot, "trp_esai_json", 0, ":slot_no"),
- (else_try),
- (eq, ":data_type", 3), # list: troop_
- ()
- (try_end),
- ]),
复制代码 |