mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 20:59:14 -08:00
Fixes and refactoring.
This commit is contained in:
parent
a38e441e08
commit
005c1a1954
9 changed files with 125 additions and 142 deletions
|
|
@ -32,6 +32,7 @@ import mage.Constants.Zone;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
|
@ -64,7 +65,8 @@ public class DealsCombatDamageToAPlayerTriggeredAbility extends TriggeredAbility
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)) {
|
||||
if (event.getType() == EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)
|
||||
&& ((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
if (setTargetPointer) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import mage.game.permanent.Permanent;
|
|||
public class MustBlockSourceTargetEffect extends RequirementEffect<MustBlockSourceTargetEffect> {
|
||||
|
||||
public MustBlockSourceTargetEffect() {
|
||||
this(Duration.WhileOnBattlefield);
|
||||
this(Duration.EndOfTurn);
|
||||
}
|
||||
|
||||
public MustBlockSourceTargetEffect(Duration duration) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.abilities.Ability;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue