Refactoring methods which add counters to track which player adds the counters (ready for review) (#7448)

* added parameter for player adding counters to players

* added parameter for player adding counters to cards/permanents

* updated methods to use new parameter

* fixed a few initial errors

* refactored instances of cards that add counters by a player other than the controller

* fixed some instances of incorrect arguments

* refactored abilities that trigger off of a particular player adding counters

* a few more cards that were missed

* [KHM] Implemented Vorinclex, Monstrous Raider

* added test for Vorinclex, Monstrous Raider

* fixed a test failure
This commit is contained in:
Evan Kranzler 2021-01-26 19:06:13 -05:00 committed by GitHub
parent 4db79ae3c1
commit a535cb5adc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
320 changed files with 701 additions and 481 deletions

View file

@ -518,7 +518,7 @@ public final class SystemUtil {
} else if ("loyalty".equalsIgnoreCase(command.zone)) {
for (Permanent perm : game.getBattlefield().getAllActivePermanents(player.getId())) {
if (perm.getName().equals(command.cardName) && perm.getCardType().contains(CardType.PLANESWALKER)) {
perm.addCounters(CounterType.LOYALTY.createInstance(command.Amount), fakeSourceAbility, game);
perm.addCounters(CounterType.LOYALTY.createInstance(command.Amount), fakeSourceAbility.getControllerId(), fakeSourceAbility, game);
}
}
continue;