forked from External/mage
Token's zone change counter (ZCC) improves:
* Now token's zcc uses same logic as card's zcc: enters to battlefield with +1 zcc instead +0 zcc * It can improve support of copied spells that store zcc related data (bug example: lost kicked status for copied spell/token); * Kicker abilities - improved support with copied creature spells (example: Verazol, the Split Current, #7431, #7433); * Refactor: simplified kicker code;
This commit is contained in:
parent
3eb57eade9
commit
f38639e1db
24 changed files with 262 additions and 177 deletions
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* Find permanent/spell kicked stats, can be used in ETB effects.
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public enum MultikickerCount implements DynamicValue {
|
||||
|
|
@ -16,16 +16,7 @@ public enum MultikickerCount implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
int count = 0;
|
||||
Card card = game.getCard(sourceAbility.getSourceId());
|
||||
if (card != null) {
|
||||
for (Ability ability : card.getAbilities(game)) {
|
||||
if (ability instanceof KickerAbility) {
|
||||
count += ((KickerAbility) ability).getKickedCounter(game, sourceAbility);
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
return KickerAbility.getSourceObjectKickedCount(game, sourceAbility);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue