mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
[VOW] Implemented Biolume Egg / Biolume Serpent
This commit is contained in:
parent
91300cebed
commit
f5141843ff
4 changed files with 158 additions and 5 deletions
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
|
|
@ -7,20 +5,28 @@ import mage.abilities.effects.Effect;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class SacrificeSourceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private final boolean setTargetPointer;
|
||||
|
||||
public SacrificeSourceTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, optional, false);
|
||||
}
|
||||
|
||||
public SacrificeSourceTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) {
|
||||
super(Zone.ALL, effect, optional);
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
}
|
||||
|
||||
public SacrificeSourceTriggeredAbility(final SacrificeSourceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.setTargetPointer = ability.setTargetPointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -35,11 +41,17 @@ public class SacrificeSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getTargetId().equals(this.getSourceId());
|
||||
if (!event.getTargetId().equals(this.getSourceId())) {
|
||||
return false;
|
||||
}
|
||||
if (this.setTargetPointer) {
|
||||
this.getEffects().setTargetPointer(new FixedTarget(event.getTargetId(), game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTriggerPhrase() {
|
||||
return "When you sacrifice {this}, " ;
|
||||
return "When you sacrifice {this}, ";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue