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

@ -1,7 +1,5 @@
package mage.game.turn;
import java.util.UUID;
import mage.constants.PhaseStep;
import mage.constants.SubType;
import mage.counters.CounterType;
@ -10,8 +8,9 @@ import mage.game.Game;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class PreCombatMainStep extends Step {
@ -29,7 +28,7 @@ public class PreCombatMainStep extends Step {
this.postStepEvent = EventType.PRECOMBAT_MAIN_STEP_POST;
}
public PreCombatMainStep(final PreCombatMainStep step) {
private PreCombatMainStep(final PreCombatMainStep step) {
super(step);
}
@ -38,7 +37,7 @@ public class PreCombatMainStep extends Step {
super.beginStep(game, activePlayerId);
for (Permanent saga : game.getBattlefield().getAllActivePermanents(filter, activePlayerId, game)) {
if (saga != null) {
saga.addCounters(CounterType.LORE.createInstance(), null, game);
saga.addCounters(CounterType.LORE.createInstance(), activePlayerId, null, game);
}
}
}