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

[GH-426] Add Dungeon Mode #614

Merged
merged 14 commits into from
May 20, 2024
Merged

[GH-426] Add Dungeon Mode #614

merged 14 commits into from
May 20, 2024

Conversation

lotuuu
Copy link
Contributor

@lotuuu lotuuu commented May 14, 2024

Motivation

Creates Dungeon Mode for Champions. This PR adds the new campaign as well as the
Closes https://github.com/lambdaclass/champions_of_mirra/issues/426

Summary of changes

  • Create dungeon mode fight handling (empty apply_buffs function to be filled later)
  • Create unit limit in levels
  • Add seeds for new super campaign "Dungeon"
  • Sends the name of the super campaign instead of its id on SuperCampaignProgress message

How to test it?

You can't test this with the client since it doesn't have the screen for Dungeon campaign. You can create a user and then check his progress in Dungeon:

{:ok, user} = Champions.Users.register "User"
dungeon = GameBackend.Campaigns.get_super_campaign_by_name_and_game("Dungeon", 2)
GameBackend.Campaigns.get_super_campaign_progress(user.id, dungeon.id)

Grab the level_id of the super_campaign_progress and play the level with

Champions.Battle.fight_level(user.id, [THE ID])

This will advance the super_campaign_progress of the user. Run this and check that the super campaign progress of the "Dungeon" campaign (the one with the id you put in step 2) has changed level id

GameBackend.Campaigns.get_super_campaign_progress(user.id, dungeon.id)

You can test that locks work by winning the first 10 levels of dungeon mode with a user. You won't be able to win level 11 until you level up your dungeon settlement.

@lotuuu lotuuu added the autobattler AFK Gacha Autobattler game label May 14, 2024
@lotuuu lotuuu added the waiting on PR Waiting on another PR in this repo or in the client repo label May 14, 2024
@lotuuu lotuuu marked this pull request as ready for review May 14, 2024 20:42
Copy link
Contributor

@ncontinanza ncontinanza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@tkz00 tkz00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@tkz00 tkz00 merged commit 7190d51 into main May 20, 2024
1 check passed
@tkz00 tkz00 deleted the gh-426-implement-dungeon-mode branch May 20, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autobattler AFK Gacha Autobattler game waiting on PR Waiting on another PR in this repo or in the client repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DUNGEON] Implement Dungeon mode
3 participants