0xFableOrg / 0xFable

A fully on-chain trading card game. There will be elves, wizards & shit. Drama and broken friendships also.
https://twitter.com/0xFableGame
BSD 3-Clause Clear License
105 stars 38 forks source link

Implement blocker assignment #28

Open norswap opened 1 year ago

norswap commented 1 year ago

Blocker selection resembles attacker selection but with the added difficulty that each blocker must be matched to an attacker.

To assign a defender, drag from the defender to the attacker to block (these should be highlighted with a glow). The dragging should create an arrow whose head follows the mouse cursor. Upon making a valid assignment (dragging from non-previously attacking creatures on your side to an attacking creature on the other side, then releasing), the arrow settles in place between the center of the defender and the center of the attacker and becomes permanent. If you start re-dragging from the same creature, the old arrow vanishes and you can make another assignment instead.

This kind of thing is implement in another card game called alketh (github, frontend), which can be used as inspiration (with the blessing of the creator).

Once satisfied with the blocker assignment, a "start fight" button can be pressed.

norswap commented 1 year ago

Some research on this: