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

Adventure Mode / Encounters #237

Open
patrickwieth opened this issue Sep 2, 2024 · 0 comments
Open

Adventure Mode / Encounters #237

patrickwieth opened this issue Sep 2, 2024 · 0 comments
Assignees

Comments

@patrickwieth
Copy link
Member

For our planned new feature "Adventures", we want to first build the MVP "Encounters".

An encounter is a single fight that a player does against a pre-constructed deck with a deterministic draw list. This means the designer of an encounter takes cards and puts them into a draw list (instead of a deck list), the difference between draw list and deck list is that from a deck list random cards are drawn and the draw list defines an exact order.
Furthermore the draw list may consist of cards that have not passed the council and can be unfair. So draft cards are eligible in contrast to normal decks. But after the encounter is created the cards should no longer be changed. So we need a new card status "adventure card". After an encounter is created the cards in the draw list change their status to "adventure card" if they are draft cards. For cards that are already permanent everything stays as is. Adventure cards can no longer be changed via edit card. Once an encounter is created players can play it, for which different match system is used. The gameclient reports via tx if a player tries an encounter and reports a finished match also via tx, where a win changes the flag "proven" of an encounter to true.

encounter object:
{
id: integer
drawlist: array
proven: boolean
owner: sdk.Address
parameters: key-value (string: string) dictionary
}

user object:

  • add entry "won_encounters"
  • add entry "open_encounters"

card object:

  • add "adventure_item" to existing statuses

create encounter tx:
arguments: drawlist, parameters
checks:

  • all cards from drawlist must be owned by tx creator, can be either draft or permanent or bought cards (number must also be enough)
  • drawlist must have 40 cards, starting with HQ, then 39 non-HQ cards
    mutations:
  • new encounter object -> gets rolling id
  • owner = creator
  • proven = false
  • parameters = parameters
  • drawlist = drawlist
  • remove bought cards used for encounter from owned cards from that user (not drafts or permanents)

do encounter tx:
arguments: encounter_id, user
checks:

  • encounter_id must exist
  • creator must be valid gameserver
    mutations:
  • move fee into treasure of encounter (placeholder we will not implement this right now, just put a comment or something, we can discuss this)
  • add open encounters

close encounter tx
arguments: encounter_id, user
checks:

  • creator must be valid gameserver
    mutations:
  • if won, move encounter id from open_encounters to won_encounters, if lost just remove encounter_id from open_encounters
  • add treasure reward if won (placeholder we will not implement this right now, just put a comment or something, we can discuss this)
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

No branches or pull requests

2 participants