Module libr35.gloomhaven.AttackHelper
Gloomhaven Attack Helper
Functions
change_counter_by (which_group, which_counter, value) | Core function that handles updating the counters and also handles updating the saved state |
create_all_buttons () | Shortcut that creates that top and bottom buttons |
create_bottom_buttons () | Shortcut function that creates all of the bottom buttons |
create_button_set (y_offset, click_function_suffix) | Create a button set!
This will dynamically create the six buttons for top or bottom
the top vs bottom is determined by the |
create_top_buttons () | Shortcut function that creates all of the top buttons |
do_nothing (obj, player, right_clicked) | As named, this function does nothing This is mostly used for buttons that don't have any real interactive purpose. |
handle_attack_base_click (obj, player, right_clicked) | Handle clicking the attack button on the bottom |
handle_attack_bonus_click (obj, player, right_clicked) | Handle clicking the attack button on the top |
handle_move_base_click (obj, player, right_clicked) | Handle clicking the move button on the bottom |
handle_move_bonus_click (obj, player, right_clicked) | Handle clicking the move button on the top |
handle_name_click (obj, player, right_clicked) | Handle clicking the "name" button |
handle_name_input (obj, player_color, input_value, selected) | Handle editing the input box on the back Note, this will only update once you stop typing and click away |
handle_range_base_click (obj, player, right_clicked) | Handle clicking the range button on the bottom |
handle_range_bonus_click (obj, player, right_clicked) | Handle clicking the range button on the top |
handle_retaliate_base_click (obj, player, right_clicked) | Handle clicking the retaliate button on the bottom |
handle_retaliate_bonus_click (obj, player, right_clicked) | Handle clicking the retaliate button on the top |
handle_retaliaterange_base_click (obj, player, right_clicked) | Handle clicking the retaliaterange button on the bottom |
handle_shield_base_click (obj, player, right_clicked) | Handle clicking the shield button on the bottom |
handle_shield_bonus_click (obj, player, right_clicked) | Handle clicking the shield button on the top |
onLoad (saved_data) | Called when the object is being loaded by TTS |
refresh_labels () | Refresh all the labels with current values This will also compute the "final total" values |
save_current_state () | Save the object's current state |
set_object_name (new_name) | Set the object's name, or a sane default |
Fields
ATTACK_HELPER_CUSTOM_TOKEN_IMAGE | The Attack helper is a simple little object to help compute the final values for a monster's abilities >>> Custom Token Image: https://cdn.r35.net/tts-modding/objects/rounded-squares/Gloomhaven-Attack-Helper-v2.png |
Functions
- change_counter_by (which_group, which_counter, value)
-
Core function that handles updating the counters
and also handles updating the saved state
Parameters:
- which_group string
- which_counter string
- value integer
- create_all_buttons ()
-
Shortcut that creates that top and bottom buttons
See also:
- create_bottom_buttons ()
-
Shortcut function that creates all of the bottom buttons
See also:
- create_button_set (y_offset, click_function_suffix)
-
Create a button set!
This will dynamically create the six buttons for top or bottom the top vs bottom is determined by the
click_function_suffix
. "bonus" or "base" are the two valid valuesParameters:
- y_offset float Used to put the buttons on the top or bottom of the token
- click_function_suffix fills in the suffix for handle_{thing}_{suffix}_click
- create_top_buttons ()
-
Shortcut function that creates all of the top buttons
See also:
- do_nothing (obj, player, right_clicked)
-
As named, this function does nothing
This is mostly used for buttons that don't have any real
interactive purpose.
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
- handle_attack_base_click (obj, player, right_clicked)
-
Handle clicking the attack button on the bottom
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_attack_bonus_click (obj, player, right_clicked)
-
Handle clicking the attack button on the top
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_move_base_click (obj, player, right_clicked)
-
Handle clicking the move button on the bottom
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_move_bonus_click (obj, player, right_clicked)
-
Handle clicking the move button on the top
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_name_click (obj, player, right_clicked)
-
Handle clicking the "name" button
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_name_input (obj, player_color, input_value, selected)
-
Handle editing the input box on the back
Note, this will only update once you stop typing and click away
Parameters:
- obj object The object the input is attached to
- player_color string The player color that is interacting with this input
- input_value string The value of the input box
- selected boolean If the input box is still being edite or not
- handle_range_base_click (obj, player, right_clicked)
-
Handle clicking the range button on the bottom
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_range_bonus_click (obj, player, right_clicked)
-
Handle clicking the range button on the top
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_retaliate_base_click (obj, player, right_clicked)
-
Handle clicking the retaliate button on the bottom
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_retaliate_bonus_click (obj, player, right_clicked)
-
Handle clicking the retaliate button on the top
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_retaliaterange_base_click (obj, player, right_clicked)
-
Handle clicking the retaliaterange button on the bottom
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_shield_base_click (obj, player, right_clicked)
-
Handle clicking the shield button on the bottom
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- handle_shield_bonus_click (obj, player, right_clicked)
-
Handle clicking the shield button on the top
Parameters:
- obj Object The object the button belongs to
- player string Player Color that clicked the button
- right_clicked boolean True if the button was right-clicked
See also:
- onLoad (saved_data)
-
Called when the object is being loaded by TTS
Parameters:
- saved_data string
- refresh_labels ()
- Refresh all the labels with current values This will also compute the "final total" values
- save_current_state ()
- Save the object's current state
- set_object_name (new_name)
-
Set the object's name, or a sane default
Parameters:
- new_name