Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Error Locating Target Coordinate (Problems targeting creature) #102

Open
SethHartman13 opened this issue Feb 21, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@SethHartman13
Copy link

What alias/snippet is this for?
map/targeting (I believe)

Describe the bug
Problems targeting Bandit Captain (BC1) in combat. Based upon what the error message said, my guess is that it couldn't find the attacker's x-coordinate within the string that contains coordinate information.

To Reproduce
Player character was attacking target creature (BC1) from the right within 5ft (so tokens are touching) with a dagger. Target creature has the paralyzed effect applied upon them.

Expected behavior
Player Character attacks and hits target creature (BC1) dealing damage, resolving effects, etc.

Screenshots
download

(Attacker is Blai and target is BC1)

Additional context

  Line 18, col 17
    return f''' {targeting.target_output(targeting_dict = targeting.target_parsing(args = args), attacker = targeting.attacker(args = args))} '''
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Line 202, col 39, in target_output
    distance = distance_calculator.distance(attacker = attacker, target = combat().get_combatant(target)) 
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Line 89, col 26, in distance
    delta_x = grid_alphabet.index(attacker_x_coordinate) - grid_alphabet.index(target_x_coordinate)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: substring not found```
@SethHartman13 SethHartman13 added the bug Something isn't working label Feb 21, 2024
@Croebh
Copy link
Owner

Croebh commented Feb 22, 2024

That doesn't look like my alias, but rather another one that handles attacks and targetting

@SethHartman13
Copy link
Author

Understood, I appreciate the work that you do regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants