forked from External/mage
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:
parent
4db79ae3c1
commit
a535cb5adc
320 changed files with 701 additions and 481 deletions
|
|
@ -960,7 +960,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
} else if (mdi.sourceObject instanceof Permanent) {
|
||||
source = ((Permanent) mdi.sourceObject).getSpellAbility();
|
||||
}
|
||||
addCounters(mdi.counter, source, game);
|
||||
addCounters(mdi.counter, game.getControllerId(mdi.sourceObject.getId()), source, game);
|
||||
}
|
||||
markedDamage.clear();
|
||||
return 0;
|
||||
|
|
@ -1023,7 +1023,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
damageSourceAbility = ((Permanent) attacker).getSpellAbility();
|
||||
}
|
||||
// deal damage immediately
|
||||
addCounters(CounterType.M1M1.createInstance(actualDamage), damageSourceAbility, game);
|
||||
addCounters(CounterType.M1M1.createInstance(actualDamage), game.getControllerId(attackerId), damageSourceAbility, game);
|
||||
}
|
||||
} else {
|
||||
this.damage = CardUtil.addWithOverflowCheck(this.damage, actualDamage);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue