Skip to content

Add Pillow-based visual variant for Pirate Treasure (PirateTreasure2) with UI integration - #13

Open
Appurupai3 wants to merge 1 commit into
mainfrom
codex/add-pirate-treasure-2-to-game-szx20d
Open

Add Pillow-based visual variant for Pirate Treasure (PirateTreasure2) with UI integration#13
Appurupai3 wants to merge 1 commit into
mainfrom
codex/add-pirate-treasure-2-to-game-szx20d

Conversation

@Appurupai3

Copy link
Copy Markdown
Owner

Motivation

  • Provide a visual, Pillow-rendered variant of the existing pirate word-guessing game to improve player immersion by showing the player avatar, hanging rope, shark art and fragment effects on failure.
  • Integrate the visual variant into the existing game menu and help text so users can choose between the original ASCII display and a graphical display.

Description

  • Added a visual_mode option to PirateTreasureModal and introduced a new PirateTreasure2Modal that enables graphical rendering and fetches the player avatar via fetch_avatar_image.
  • Implemented full Pillow-based rendering in dcrbot.pirate_game.py including image assembly helpers (_paste_circular_avatar, _draw_pirate_character, _draw_player_fragments, _build_shark_cutout, etc.), an embedded base64 SHARK_IMAGE_BASE64 asset, and render_pirate_board that returns a discord.File PNG.
  • Added build_pirate_display and edit_pirate_message helpers to return/embed image attachments and updated interaction flows to attach the generated image when visual_mode is enabled.
  • Updated UI: added a new 海盜寶藏2 button in GameMenu, updated build_game_help_embed descriptions, and adjusted build_pirate_embed to reflect visual mode and to suppress ASCII stage art when the graphical board is used.

Testing

  • No automated tests were run for this change.

Codex Task

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant