forked from External/mage
commit
2d577287d1
82 changed files with 1979 additions and 181 deletions
|
|
@ -43,17 +43,30 @@ import mage.players.Player;
|
|||
*/
|
||||
public class CopyTargetSpellEffect extends OneShotEffect {
|
||||
|
||||
private boolean useLKI = false;
|
||||
|
||||
public CopyTargetSpellEffect() {
|
||||
super(Outcome.Copy);
|
||||
}
|
||||
|
||||
public CopyTargetSpellEffect(boolean useLKI) {
|
||||
super(Outcome.Copy);
|
||||
this.useLKI = useLKI;
|
||||
}
|
||||
|
||||
public CopyTargetSpellEffect(final CopyTargetSpellEffect effect) {
|
||||
super(effect);
|
||||
this.useLKI = effect.useLKI;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
||||
Spell spell;
|
||||
if (useLKI) {
|
||||
spell = game.getSpellOrLKIStack(targetPointer.getFirst(game, source));
|
||||
} else {
|
||||
spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
||||
}
|
||||
if (spell == null) {
|
||||
spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@
|
|||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.EvasionAbility;
|
||||
import mage.abilities.MageSingleton;
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
|
@ -18,31 +17,26 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SkulkAbility extends EvasionAbility implements MageSingleton {
|
||||
public class SkulkAbility extends StaticAbility {
|
||||
|
||||
private static final SkulkAbility instance = new SkulkAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
public SkulkAbility() {
|
||||
super(Zone.BATTLEFIELD, new SkulkEffect(Duration.WhileOnBattlefield));
|
||||
}
|
||||
|
||||
public static SkulkAbility getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private SkulkAbility() {
|
||||
this.addEffect(new SkulkEffect(Duration.WhileOnBattlefield));
|
||||
public SkulkAbility(final SkulkAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability copy() {
|
||||
return instance;
|
||||
return new SkulkAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Skulk <i>(This creature can't be blocked by creatures with greater power.)</i>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SkulkEffect extends RestrictionEffect {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue