You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've merged and fixed your latest into my private fork that I'm slowly preparing for release. The fork has diverged pretty significantly from the demilich1 master, but has substantially more rules bugs fixed.
For example, here is a test for Sir Finley Mrrgglton:
@Test(description =
"Tests Sir Finley Mrrgglton and also confirms that players can do stuff to discovered cards besides receive them.")
publicvoidtestSirFinleyMrrgglton() {
GameContextcontext = createContext(HeroClass.PRIEST, HeroClass.PRIEST);
Playerplayer = context.getActivePlayer();
intoldId = player.getHero().getHeroPower().getId();
finalDiscoverAction[] action = {null};
finalHeroPowerCard[] discoveryCard = newHeroPowerCard[1];
finalint[] handSize = newint[1];
// Set up a trick to catch the discover action.player.setBehaviour(newTestBehaviour() {
booleanshouldIntercept = true;
@OverridepublicGameActionrequestAction(GameContextcontext, Playerplayer, List<GameAction> validActions) {
if (shouldIntercept) {
Assert.assertTrue(validActions.stream()
.allMatch(ga -> ga.getActionType() == ActionType.DISCOVER));
action[0] = (DiscoverAction) validActions.get(0);
HeroPowerCardoriginal = (HeroPowerCard) action[0].getCard();
discoveryCard[0] = original;
handSize[0] = player.getHand().size();
}
// We should only intercept onceshouldIntercept = false;
returnsuper.requestAction(context, player, validActions);
}
});
MinionCardsirFinley = (MinionCard) CardCatalogue.getCardById("minion_sir_finley_mrrgglton");
playCard(context, player, sirFinley);
// Control flow will first go to request action above, then proceed.Assert.assertEquals(player.getHand().size(), handSize[0],
"Nothing should be added to the hand.");
Assert.assertEquals(player.getDiscoverZone().size(), 0,
"The discover zone should be empty");
Assert.assertEquals(player.getGraveyard().size(), 1,
"The graveyard should only Sir Finley's source card.");
Assert.assertEquals(discoveryCard[0].getZone(), Zones.REMOVED_FROM_PLAY,
"The discovered card should be removed from play");
HeroPowerCardcurrentHeroPower = player.getHeroPowerZone().get(0);
Assert.assertEquals(discoveryCard[0].getCardId(), currentHeroPower.getCardId(),
"But the hero power card should be the discovered hero power.");
Assert.assertNotEquals(currentHeroPower.getId(), oldId,
"The old hero power should not be the current one");
}
You can get a sense for some of the major feature reworks that have happened.
Please reach out to me on my profile e-mail if you're interested in learning more.
The text was updated successfully, but these errors were encountered:
I've merged and fixed your latest into my private fork that I'm slowly preparing for release. The fork has diverged pretty significantly from the
demilich1
master, but has substantially more rules bugs fixed.For example, here is a test for Sir Finley Mrrgglton:
You can get a sense for some of the major feature reworks that have happened.
Please reach out to me on my profile e-mail if you're interested in learning more.
The text was updated successfully, but these errors were encountered: