Skip to content

Allow click-to-carry pokemon and sell with hotkey while held - #4056

Open
jorgejuniordev wants to merge 2 commits into
keldaanCommunity:masterfrom
jorgejuniordev:feature/click-carry-sell-hotkey
Open

Allow click-to-carry pokemon and sell with hotkey while held#4056
jorgejuniordev wants to merge 2 commits into
keldaanCommunity:masterfrom
jorgejuniordev:feature/click-carry-sell-hotkey

Conversation

@jorgejuniordev

Copy link
Copy Markdown
Contributor

Summary

  • Clicking a board pokemon now picks it up onto the cursor (no need to hold the mouse button while moving).
  • Pressing the sell hotkey (default E) sells the currently dragged or click-carried pokemon, not only the hovered one.
  • Right-click cancels click-carry and returns the pokemon to its original cell; traditional click-and-drag still works.

Test plan

  • Click a bench/board pokemon: it should stick to the cursor and show the sell zone
  • Move the cursor and left-click a board cell to place it
  • Click a pokemon, then press E: it should sell without dropping on the sell zone
  • Click-and-drag a pokemon (hold button), press E mid-drag: it should sell
  • Hover a pokemon and press E (existing behavior): it should still sell
  • Right-click while click-carrying: pokemon returns to original spot
  • Confirm traditional drag-drop onto sell zone still sells

Clicking a board pokemon now attaches it to the cursor without holding the mouse button, and pressing the sell key (default E) sells the currently dragged or carried unit.
Replace nested if/else branches with guard clauses and small try/can helpers for clearer sell and pickup handling.
@sylvainpolletvillard

Copy link
Copy Markdown
Collaborator

I just tested your code and I still need to hold the mouse button to drag a Pokémon. Have you tested this code or did you just prompt an AI ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants