forked from External/mage
* Some more changes concerning sourceObject handling in ability. Added early event type check for triggered abilities.
This commit is contained in:
parent
b9da9cb6cb
commit
7b95da55a7
242 changed files with 1602 additions and 904 deletions
|
|
@ -81,9 +81,14 @@ public class SpellCastControllerTriggeredAbility extends TriggeredAbilityImpl {
|
|||
this.rule = ability.rule;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.SPELL_CAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getPlayerId().equals(this.getControllerId())) {
|
||||
if (event.getPlayerId().equals(this.getControllerId())) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null && filter.match(spell, game)) {
|
||||
if (rememberSource) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue