forked from External/mage
-don't static import static filters
-use existing choose color and gain protection from color attached effects -update naming and add null check for AttachedToCreatureSourceTriggeredAbility
This commit is contained in:
parent
c567fc2ee1
commit
874ff7179f
5 changed files with 25 additions and 86 deletions
|
|
@ -13,19 +13,21 @@ import static mage.constants.CardType.CREATURE;
|
|||
*
|
||||
* @author htrajan
|
||||
*/
|
||||
public class AttachedToCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
||||
public class AttachedToCreatureSourceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public AttachedToCreatureTriggeredAbility(Effect effect, boolean optional) {
|
||||
public AttachedToCreatureSourceTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
public AttachedToCreatureTriggeredAbility(final AttachedToCreatureTriggeredAbility ability) {
|
||||
public AttachedToCreatureSourceTriggeredAbility(final AttachedToCreatureSourceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ATTACHED && event.getSourceId().equals(this.getSourceId());
|
||||
return event.getType() == GameEvent.EventType.ATTACHED
|
||||
&& event.getSourceId() != null
|
||||
&& event.getSourceId().equals(this.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -40,7 +42,7 @@ public class AttachedToCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public AttachedToCreatureTriggeredAbility copy() {
|
||||
return new AttachedToCreatureTriggeredAbility(this);
|
||||
public AttachedToCreatureSourceTriggeredAbility copy() {
|
||||
return new AttachedToCreatureSourceTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue