-
Notifications
You must be signed in to change notification settings - Fork 80
Implement new card type 'Locations' #1051
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
Merged
Merged
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
64a75f9
feat: add location entity model
utilForever c2e900e
refactor: distinguish field minions from occupants
utilForever 6fb20cd
test: update field minion accessors
utilForever 63adf57
feat: support location play and activation
utilForever 8bdae4c
feat(impl-card): implement card 'Great Hall' (REV_983)
utilForever 5fcdbb0
feat(impl-card): implement card 'Demolition Renovator' (REV_023)
utilForever 4b50ffe
chore: format touched sources
utilForever 4a27557
refactor: model locations as field characters
utilForever a6275f2
fix: report location activation availability
utilForever 764138a
feat(impl-card): update card 'Murozond the Infinite' (CORE_DRG_090)
utilForever 513c738
feat(impl-card): update card 'Murozond the Infinite' (DRG_090)
utilForever a09800b
refactor: move operator[] definition to source file
utilForever bac2326
feat(impl-card): update card 'Tess Greymane' (GIL_598)
utilForever 2f07df4
fix: harden Location aura and targeting interactions
utilForever 1cda4f9
fix: exclude Locations from minion presence checks
utilForever 537ff64
docs: update card implementation progress
utilForever 9226537
fix: harden location interactions
utilForever 046b390
refactor: centralize played-card replay
utilForever 7d242e4
refactor: simplify location-aware field access
utilForever c1db036
refactor: streamline location play and targeting
utilForever 0fdd498
test: strengthen location integration coverage
utilForever c0f81d9
test: enable command-line arguments for doctest
utilForever 329c63c
chore: exclude Rider user settings from version control
utilForever 4dcf49b
fix: enforce location play requirements
utilForever 6133f9c
fix: avoid empty replay target ranges
utilForever e45b4cd
fix: resolve replay choices by entity ID
utilForever f555b09
test: play locations through the game flow
utilForever 7f1b23b
perf: count field minions without allocation
utilForever 372f8bc
test: distinguish rolling fireball location cases
utilForever 15908cc
refactor: scope played card type check
utilForever 4253d93
refactor: simplify replay card cases
utilForever 632b191
refactor: update card 'Bloodboil Brute' (BT_138)
utilForever 055f45c
refactor: scope graveyard requirement data
utilForever 600db61
refactor: mark adjacent aura updates const
utilForever e795ebd
refactor: mark field zone reference const
utilForever 8ad97cb
refactor: improve code readability and location test clarity
utilForever 0619df8
refactor: replace static_cast with std::to_underlying
utilForever File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon | ||
|
|
||
| // We are making my contributions/submissions to this project solely in our | ||
| // personal capacity and are not conveying any rights to any intellectual | ||
| // property of any third parties. | ||
|
|
||
| #ifndef ROSETTASTONE_PLAYMODE_LOCATION_HPP | ||
| #define ROSETTASTONE_PLAYMODE_LOCATION_HPP | ||
|
|
||
| #include <Rosetta/PlayMode/Models/Character.hpp> | ||
|
|
||
| namespace RosettaStone::PlayMode | ||
| { | ||
| //! | ||
| //! \brief Location class. | ||
| //! | ||
| //! Locations are a type of card first introduced in the Murder at Castle | ||
| //! Nathria expansion. Locations are played onto the battlefield for an initial | ||
| //! cost, and then have an ability that can be activated for free on the | ||
| //! player's turns. Each activation costs 1 Health and has a cooldown of 1 | ||
| //! turn where it cannot be used. | ||
| //! | ||
| class Location : public Character | ||
| { | ||
| public: | ||
| //! Constructs location with given \p _player, \p _card, \p tags and \p id. | ||
| Location(Player* _player, Card* _card, std::map<GameTag, int> tags, | ||
| int id = -1); | ||
|
|
||
| //! Default destructor. | ||
| ~Location() override = default; | ||
|
|
||
| //! Returns whether this location is on cooldown. | ||
| bool IsOnCooldown() const; | ||
|
|
||
| //! Sets whether this location is on cooldown. | ||
| void SetOnCooldown(bool onCooldown); | ||
|
|
||
| //! Returns false because locations cannot attack. | ||
| bool CanAttack() const override; | ||
|
|
||
| //! Returns whether this location can be activated by its owner. | ||
| bool IsPlayableByPlayer() override; | ||
|
|
||
| //! Consumes one Health and starts the cooldown. | ||
| void Use(); | ||
|
|
||
| //! Removes the location from the battlefield. | ||
| void Destroy() override; | ||
| }; | ||
| } // namespace RosettaStone::PlayMode | ||
|
|
||
| #endif // ROSETTASTONE_PLAYMODE_LOCATION_HPP | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Includes/Rosetta/PlayMode/Tasks/PlayerTasks/PlayLocationTask.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // Copyright (c) 2026 Chris Ohk | ||
|
|
||
| // We are making my contributions/submissions to this project solely in our | ||
| // personal capacity and are not conveying any rights to any intellectual | ||
| // property of any third parties. | ||
|
|
||
| #ifndef ROSETTASTONE_PLAYMODE_PLAY_LOCATION_TASK_HPP | ||
| #define ROSETTASTONE_PLAYMODE_PLAY_LOCATION_TASK_HPP | ||
|
|
||
| #include <Rosetta/PlayMode/Tasks/ITask.hpp> | ||
|
|
||
| namespace RosettaStone::PlayMode::PlayerTasks | ||
| { | ||
| //! | ||
| //! \brief PlayLocationTask class. | ||
| //! | ||
| //! This class activates a location already on the battlefield. | ||
| //! | ||
| class PlayLocationTask : public ITask | ||
| { | ||
| public: | ||
| //! Constructs task with given \p source and \p target. | ||
| explicit PlayLocationTask(Entity* source, Playable* target = nullptr); | ||
|
|
||
| private: | ||
| //! Processes task logic internally and returns meta data. | ||
| TaskStatus Impl(Player* player) override; | ||
|
|
||
| //! Internal method of Clone(). | ||
| std::unique_ptr<ITask> CloneImpl() override; | ||
| }; | ||
| } // namespace RosettaStone::PlayMode::PlayerTasks | ||
|
|
||
| #endif // ROSETTASTONE_PLAYMODE_PLAY_LOCATION_TASK_HPP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.