Rework drawing cards and associated replacement effects; implement [WHO] River Song (#12700)

* remove unused scoring system code

* add test for Alms Collector replacement effect

* flatten draw cards into single method in PlayerImpl

* remove outdated MageAction framework

* clarify game event for drawing two or more cards

* clarify methods for getting cards from library

* implement [WHO] River Song

* fix error

* adjust library methods

* add lots of test cases for draw replacement effects

* fix #12616

* track cards drawn this way through multi draw replacement as well

* add test for River Song

* remove redundant comment
This commit is contained in:
xenohedron 2024-08-24 01:02:55 -04:00 committed by GitHub
parent 34ae226130
commit 9fcbfdeac6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 645 additions and 345 deletions

View file

@ -407,25 +407,21 @@ public interface Player extends MageItem, Copyable<Player> {
void shuffleLibrary(Ability source, Game game);
/**
* Draw cards. If you call it in replace events then use method with event.appliedEffects param instead.
* Returns 0 if replacement effect triggers on card draw.
* Draw cards. If you call it in replace events then use method with event param instead (for appliedEffects)
*
* @param num
* @param num cards to draw
* @param source can be null for game default draws (non effects, example: start of the turn)
* @param game
* @return
* @return number of cards drawn, including as a result of replacement effects
*/
int drawCards(int num, Ability source, Game game);
/**
* Draw cards with applied effects, for replaceEvent
* Returns 0 if replacement effect triggers on card draw.
*
* @param num
* @param num cards to draw
* @param source can be null for game default draws (non effects, example: start of the turn)
* @param game
* @param event original draw event in replacement code
* @return
* @return number of cards drawn, including as a result of replacement effects
*/
int drawCards(int num, Ability source, Game game, GameEvent event);