* Mage Slayer - Fixed that the correct damage source was assigned for the additional damage.

This commit is contained in:
ludwig.hirth 2016-12-29 16:18:52 +01:00
parent 7979d4ed41
commit b26a5730fa
2 changed files with 16 additions and 12 deletions

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
@ -41,11 +40,10 @@ import mage.game.permanent.Permanent;
*
* @author LevelX2
*/
public class AttacksAttachedTriggeredAbility extends TriggeredAbilityImpl {
private AttachmentType attachmentType;
public AttacksAttachedTriggeredAbility(Effect effect) {
this(effect, false);
}
@ -58,7 +56,7 @@ public class AttacksAttachedTriggeredAbility extends TriggeredAbilityImpl {
super(Zone.BATTLEFIELD, effect, optional);
this.attachmentType = attachmentType;
}
public AttacksAttachedTriggeredAbility(final AttacksAttachedTriggeredAbility abiltity) {
super(abiltity);
this.attachmentType = abiltity.attachmentType;
@ -79,6 +77,9 @@ public class AttacksAttachedTriggeredAbility extends TriggeredAbilityImpl {
Permanent equipment = game.getPermanent(this.sourceId);
if (equipment != null && equipment.getAttachedTo() != null
&& event.getSourceId().equals(equipment.getAttachedTo())) {
for (Effect effect : this.getEffects()) {
effect.setValue("sourceId", event.getSourceId());
}
return true;
}
return false;