forked from External/mage
Added early eventType check for ContinuousRuleModifying effects.
This commit is contained in:
parent
8ea8e77b88
commit
dbffbad3cb
44 changed files with 343 additions and 188 deletions
|
|
@ -646,6 +646,9 @@ public class ContinuousEffects implements Serializable {
|
|||
*/
|
||||
public boolean preventedByRuleModification(GameEvent event, Ability targetAbility, Game game, boolean checkPlayableMode) {
|
||||
for (ContinuousRuleModifiyingEffect effect: continuousRuleModifyingEffects) {
|
||||
if (!effect.checksEventType(event, game)) {
|
||||
continue;
|
||||
}
|
||||
for (Ability sourceAbility : continuousRuleModifyingEffects.getAbility(effect.getId())) {
|
||||
if (!(sourceAbility instanceof StaticAbility) || sourceAbility.isInUseableZone(game, null, false)) {
|
||||
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue