mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
* Reaper of Sheoldred - Fixed that damage was sometimes dealt to Reaper of Sheoldred controller.
This commit is contained in:
parent
b6f6866452
commit
f22fb380b7
3 changed files with 87 additions and 6 deletions
|
|
@ -29,7 +29,6 @@ package mage.sets.magic2015;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.DrawCardControllerTriggeredAbility;
|
||||
|
|
@ -65,7 +64,7 @@ public class ChasmSkulker extends CardImpl {
|
|||
|
||||
// Whenever you draw a card, put a +1/+1 counter on Chasm Skulker.
|
||||
this.addAbility(new DrawCardControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false));
|
||||
|
||||
|
||||
// When Chasm Skulker dies, put X 1/1 blue Squid creature tokens with islandwalk onto the battlefield, where X is the number of +1/+1 counters on Chasm Skulker.
|
||||
this.addAbility(new DiesTriggeredAbility(new ChasmSkulkerEffect(), false));
|
||||
}
|
||||
|
|
@ -127,4 +126,4 @@ class ChasmSkulkerSquidToken extends Token {
|
|||
this.addAbility(new IslandwalkAbility());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ import mage.counters.CounterType;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
|
|
@ -57,7 +58,10 @@ public class ReaperOfSheoldred extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Infect (This creature deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)
|
||||
this.addAbility(InfectAbility.getInstance());
|
||||
|
||||
// Whenever a source deals damage to Reaper of Sheoldred, that source's controller gets a poison counter.
|
||||
this.addAbility(new ReaperOfSheoldredTriggeredAbility());
|
||||
}
|
||||
|
||||
|
|
@ -72,6 +76,7 @@ public class ReaperOfSheoldred extends CardImpl {
|
|||
}
|
||||
|
||||
class ReaperOfSheoldredTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
ReaperOfSheoldredTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.POISON.createInstance()));
|
||||
}
|
||||
|
|
@ -93,10 +98,16 @@ class ReaperOfSheoldredTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getTargetId().equals(this.getSourceId())) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
UUID controller = game.getControllerId(event.getSourceId());
|
||||
if (controller != null) {
|
||||
Player player = game.getPlayer(controller);
|
||||
if (player != null) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(player.getId()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue