forked from External/mage
Remove KickerAbility.getSpellKickedCount (#12553)
* Remove KickerAbility.getSpellKickedCount * Check spell LKI instead of only current spell object * Remove bad LKI storage under wrong ID
This commit is contained in:
parent
2118570a0d
commit
78649c1a62
12 changed files with 91 additions and 127 deletions
|
|
@ -9,11 +9,13 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
|
|
@ -269,21 +271,4 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find spell's kicked stats. Must be used on stack only, e.g. for SPELL_CAST events
|
||||
*/
|
||||
public static int getSpellKickedCount(Game game, UUID spellId) {
|
||||
return getSpellKickedCountStrict(game, spellId, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Find spell's kicked stats. Must be used on stack only, e.g. for SPELL_CAST events
|
||||
*/
|
||||
public static int getSpellKickedCountStrict(Game game, UUID spellId, String needKickerCost) {
|
||||
Spell spell = game.getSpellOrLKIStack(spellId);
|
||||
if (spell != null) {
|
||||
return KickerAbility.getKickedCounterStrict(game, spell.getSpellAbility(), needKickerCost);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue