From 187909e05ca09c3dd95a47a6fa04487db4629324 Mon Sep 17 00:00:00 2001 From: Mike Silverman Date: Sun, 28 Jan 2024 15:28:51 -0500 Subject: [PATCH 01/19] abstracted combat_action_properties away from abilities to be shared with consumables --- client/dist/index.html | 6 +- .../handle_cycle_targeting_schemes.rs | 30 +++---- .../handle_cycle_targets.rs | 30 ++++--- .../handle_select_ability.rs | 29 +++--- .../action_menu_page_manager/mod.rs | 3 - .../action_menu/determine_menu_actions.rs | 10 ++- client/src/components/game/action_menu/mod.rs | 10 +-- .../game/combatant/combatant_is_targeted.rs | 10 +-- .../mod.rs | 6 +- .../queue_attack_animations.rs | 4 +- .../queue_melee_ability_animations.rs | 8 +- .../src/components/game/dungeon_room/mod.rs | 4 +- .../src/components/game/top_info_bar/mod.rs | 3 +- client/src/components/lobby/welcome_info.rs | 29 ++++-- .../dungeon_floor_number_changed_handler.rs | 1 - client/src/lib.rs | 1 - common/src/app_consts/mod.rs | 2 +- common/src/character/outfit_new_warrior.rs | 2 - .../calculate_weapon_swing_result.rs | 4 +- .../physical_attack_evaded.rs | 6 +- .../physical_damage_after_defense.rs | 5 ++ common/src/combat/ability_handlers/attack.rs | 6 +- common/src/combat/ability_handlers/mod.rs | 14 +-- .../ability_handlers/validate_ability_use.rs | 22 ++--- .../select_ability_and_targets/mod.rs | 6 +- ...rget_ids_by_prohibited_combatant_states.rs | 4 +- .../combat_actions}/get_default_targets.rs | 49 +++++----- .../get_next_or_previous_targets.rs | 38 ++++---- common/src/combat/combat_actions/mod.rs | 89 +++++++++++++++++++ .../combat_actions}/targets_are_valid.rs | 28 +++--- .../targets_by_saved_preference_or_default.rs | 69 +++++++------- common/src/combat/mod.rs | 26 +----- .../get_combatant_ability_attributes.rs | 63 +++---------- common/src/combatants/abilities/mod.rs | 18 ---- common/src/combatants/mod.rs | 18 ++-- .../set_new_ability_target_preferences.rs | 29 +++--- common/src/game/getters.rs | 12 +-- common/src/game/mod.rs | 1 - common/src/game/player_actions.rs | 57 ------------ .../open_treasure_chest.rs | 8 +- common/src/items/consumables.rs | 28 ------ .../consumables/get_consumable_properties.rs | 37 ++++++++ common/src/items/consumables/mod.rs | 33 +++++++ .../print_random_equipments.rs | 12 +-- .../items/generate_consumable_properties.rs | 26 ------ common/src/items/mod.rs | 45 ++++++---- common/src/monsters/random_monster_names.rs | 2 - common/src/packets/client_to_server.rs | 4 +- common/src/packets/server_to_client.rs | 4 +- server/src/main.rs | 2 - ...aracter_changes_ability_targets_handler.rs | 25 +++--- .../character_selects_ability_handler.rs | 16 ++-- .../mod.rs | 10 ++- .../take_next_ai_turn.rs | 6 +- .../toggle_ready_handler.rs | 2 - 55 files changed, 499 insertions(+), 513 deletions(-) rename common/src/{combatants/abilities => combat/combat_actions}/filter_possible_target_ids_by_prohibited_combatant_states.rs (93%) rename common/src/{combatants/abilities => combat/combat_actions}/get_default_targets.rs (56%) rename common/src/{combatants/abilities => combat/combat_actions}/get_next_or_previous_targets.rs (71%) create mode 100644 common/src/combat/combat_actions/mod.rs rename common/src/{combatants/abilities => combat/combat_actions}/targets_are_valid.rs (65%) rename common/src/{combatants/abilities => combat/combat_actions}/targets_by_saved_preference_or_default.rs (68%) delete mode 100644 common/src/game/player_actions.rs delete mode 100644 common/src/items/consumables.rs create mode 100644 common/src/items/consumables/get_consumable_properties.rs create mode 100644 common/src/items/consumables/mod.rs delete mode 100644 common/src/items/generate_consumable_properties.rs diff --git a/client/dist/index.html b/client/dist/index.html index 2fdace13..479afcf2 100644 --- a/client/dist/index.html +++ b/client/dist/index.html @@ -5,11 +5,11 @@ - - + + -