* CantBeCounteredControlledEffect - Fixed a bug that the counter source was not cheched correctly (e.g. it was possible to counter spells with blue counters after Autumn's Veil).

This commit is contained in:
LevelX2 2015-03-24 22:46:52 +01:00
parent b2e27f17f1
commit 23d431a65a
5 changed files with 84 additions and 5 deletions

View file

@ -89,11 +89,11 @@ public class CantBeCounteredControlledEffect extends ContinuousRuleModifyingEffe
public boolean applies(GameEvent event, Ability source, Game game) {
Spell spell = game.getStack().getSpell(event.getTargetId());
if (spell != null && spell.getControllerId().equals(source.getControllerId())
&& filterTarget.match(spell, game)) {
&& filterTarget.match(spell, source.getControllerId(), game)) {
if (filterSource == null) {
return true;
} else {
MageObject sourceObject = game.getObject(source.getSourceId());
MageObject sourceObject = game.getObject(event.getSourceId());
if (sourceObject != null && filterSource.match(sourceObject, game)) {
return true;
}

View file

@ -104,6 +104,7 @@ public class GameEvent {
flag indicates a special condition (e.g. TRUE if it's a colored mana from Cavern of Souls)
*/
MANA_PAYED,
LOSES, LOST, WINS,
TARGET, TARGETED,
COUNTER, COUNTERED,