implement battle rules and character replacement

This commit is contained in:
Martin Michelsen
2023-10-18 11:55:31 -07:00
parent 13dacc013a
commit 8c2ce5210d
24 changed files with 699 additions and 305 deletions
+11 -11
View File
@@ -513,19 +513,19 @@ static const QuestScriptOpcodeDefinition opcode_defs[] = {
{0xF80F, "enable_weapon_drop", {CLIENT_ID}, F_V2_V4 | F_ARGS},
{0xF810, "ba_initial_floor", {AREA}, F_V2_V4 | F_ARGS},
{0xF811, "set_ba_rules", {}, F_V2_V4},
{0xF812, "ba_set_tech", {INT32}, F_V2_V4 | F_ARGS},
{0xF813, "ba_set_equip", {INT32}, F_V2_V4 | F_ARGS},
{0xF814, "ba_set_mag", {INT32}, F_V2_V4 | F_ARGS},
{0xF815, "ba_set_item", {INT32}, F_V2_V4 | F_ARGS},
{0xF816, "ba_set_trapmenu", {INT32}, F_V2_V4 | F_ARGS},
{0xF812, "ba_set_tech_disk_mode", {INT32}, F_V2_V4 | F_ARGS},
{0xF813, "ba_set_weapon_and_armor_mode", {INT32}, F_V2_V4 | F_ARGS},
{0xF814, "ba_set_forbid_mags", {INT32}, F_V2_V4 | F_ARGS},
{0xF815, "ba_set_tool_mode", {INT32}, F_V2_V4 | F_ARGS},
{0xF816, "ba_set_trap_mode", {INT32}, F_V2_V4 | F_ARGS},
{0xF817, "ba_set_unused_F817", {INT32}, F_V2_V4 | F_ARGS}, // This appears to be unused - the value is copied into the main battle rules struct, but then the field appears never to be read
{0xF818, "ba_set_respawn", {INT32}, F_V2_V4 | F_ARGS},
{0xF819, "ba_set_char", {INT32}, F_V2_V4 | F_ARGS},
{0xF819, "ba_set_replace_char", {INT32}, F_V2_V4 | F_ARGS},
{0xF81A, "ba_dropwep", {INT32}, F_V2_V4 | F_ARGS},
{0xF81B, "ba_teams", {INT32}, F_V2_V4 | F_ARGS},
{0xF81C, "ba_disp_msg", {CSTRING}, F_V2_V4 | F_ARGS},
{0xF81C, "ba_start", {CSTRING}, F_V2_V4 | F_ARGS},
{0xF81D, "death_lvl_up", {INT32}, F_V2_V4 | F_ARGS},
{0xF81E, "ba_set_meseta", {INT32}, F_V2_V4 | F_ARGS},
{0xF81E, "ba_set_meseta_drop_mode", {INT32}, F_V2_V4 | F_ARGS},
{0xF820, "cmode_stage", {INT32}, F_V2_V4 | F_ARGS},
{0xF821, "nop_F821", {{REG_SET_FIXED, 9}}, F_V2_V4}, // regsA[3-8] specify first 6 bytes of an ItemData. This opcode consumes an item ID, but does nothing else.
{0xF822, "nop_F822", {REG}, F_V2_V4},
@@ -590,13 +590,13 @@ static const QuestScriptOpcodeDefinition opcode_defs[] = {
{0xF868, "set_cmode_rank", {REG, REG}, F_V2_V4},
{0xF869, "check_rank_time", {REG, REG}, F_V2_V4},
{0xF86A, "item_create_cmode", {{REG_SET_FIXED, 6}, REG}, F_V2_V4}, // regsA specifies item.data1[0-5]
{0xF86B, "ba_box_drops", {REG}, F_V2_V4}, // TODO: This sets override_area in TItemDropSub; use this in ItemCreator
{0xF86B, "ba_set_box_drop_area", {REG}, F_V2_V4}, // TODO: This sets override_area in TItemDropSub; use this in ItemCreator
{0xF86C, "award_item_ok", {REG}, F_V2_V4},
{0xF86D, "ba_set_trapself", {}, F_V2_V4},
{0xF86E, "ba_clear_trapself", {}, F_V2_V4},
{0xF86F, "ba_set_lives", {INT32}, F_V2_V4 | F_ARGS},
{0xF870, "ba_set_tech_lvl", {INT32}, F_V2_V4 | F_ARGS},
{0xF871, "ba_set_lvl", {INT32}, F_V2_V4 | F_ARGS},
{0xF870, "ba_set_max_tech_level", {INT32}, F_V2_V4 | F_ARGS},
{0xF871, "ba_set_char_level", {INT32}, F_V2_V4 | F_ARGS},
{0xF872, "ba_set_time_limit", {INT32}, F_V2_V4 | F_ARGS},
{0xF873, "dark_falz_is_dead", {REG}, F_V2_V4},
{0xF874, "set_cmode_rank_override", {INT32, CSTRING}, F_V2_V4 | F_ARGS}, // argA is an XRGB8888 color, argB is two strings separated by \t or \n: the rank text to check for, and the rank text that should replace it if found