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 · 8 comments · Fixed by #240
Open

Adventure Mode / Encounters #237

patrickwieth opened this issue Sep 2, 2024 · 8 comments · Fixed by #240
Assignees

Comments

@patrickwieth
Copy link
Member

patrickwieth commented Sep 2, 2024

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.

Edit: Illustration added. This should just be like image upload for cards but instead applies as a loading screen for the encounter. It cannot be changed after the encounter is finalized.

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

user object:

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

card object:

  • add "adventure_item" to existing statuses

create encounter tx:
arguments: drawlist, parameters, illustration-image
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)
@patrickwieth
Copy link
Member Author

we also want an image that can be uploaded for the loading/start screen of the encounter

@patrickwieth
Copy link
Member Author

we want 2 query routes, one that gives the result without the image and one that gives all the info

@lxgr-linux
Copy link
Member

remove bought cards used for encounter from owned cards from that user (not drafts or permanents)

Does that mean that in order to create an encounter the creator has to "spend" the needed cards for it?

@patrickwieth

@patrickwieth
Copy link
Member Author

The idea as:
you can either put your card prototypes in there, then you can put 3 copies of it in the encounter or you can "spend" your cards from the booster packs into the encounter, then you don't need the prototype ("Master Card"), but you need to have as many copies as you place in there

So I think it should go the following way:

cardID -> encounter
is the cardID owned as a card prototype?
Yes => add
No? => is the card owned as an owned card?
Yes => spend it
No => Invalid encounter creation

@lxgr-linux
Copy link
Member

ok, entiendo

lxgr-linux added a commit that referenced this issue Dec 13, 2024
lxgr-linux added a commit that referenced this issue Dec 13, 2024
lxgr-linux added a commit that referenced this issue Dec 13, 2024
@lxgr-linux lxgr-linux linked a pull request Dec 13, 2024 that will close this issue
@lxgr-linux
Copy link
Member

Dont we want to given the encounters titles or names also?

lxgr-linux added a commit that referenced this issue Dec 13, 2024
lxgr-linux added a commit that referenced this issue Dec 13, 2024
@patrickwieth
Copy link
Member Author

yeah makes sense

@lxgr-linux
Copy link
Member

Ok, I'll implement that and then we should merge.

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 a pull request may close this issue.

2 participants