mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
* 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:
parent
b2e27f17f1
commit
23d431a65a
5 changed files with 84 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue