mirror of
https://github.com/correl/mage.git
synced 2024-12-28 03:00:10 +00:00
[SNC] Implemented Raffine's Silencer
This commit is contained in:
parent
cc0c70ea7c
commit
93ab73ccac
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/r/RaffinesSilencer.java
Normal file
83
Mage.Sets/src/mage/cards/r/RaffinesSilencer.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.keyword.ConniveSourceEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class RaffinesSilencer extends CardImpl {
|
||||
|
||||
public RaffinesSilencer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ASSASSIN);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// When Raffine's Silencer enters the battlefield, it connives.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConniveSourceEffect()));
|
||||
|
||||
// When Raffine's Silencer dies, target creature an opponent controls gets -X/-X until end of turn, where X is Raffine's Silencer's power.
|
||||
Ability ability = new DiesSourceTriggeredAbility(
|
||||
new BoostTargetEffect(RaffinesSilencerValue.instance, RaffinesSilencerValue.instance, Duration.EndOfTurn, true),
|
||||
false
|
||||
);
|
||||
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private RaffinesSilencer(final RaffinesSilencer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaffinesSilencer copy() {
|
||||
return new RaffinesSilencer(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum RaffinesSilencerValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Object died = effect.getValue("permanentLeftBattlefield");
|
||||
if (died instanceof Permanent) {
|
||||
return -((Permanent) died).getPower().getValue();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaffinesSilencerValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "-X";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "{this}'s power";
|
||||
}
|
||||
}
|
|
@ -132,6 +132,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Racers' Ring", 253, Rarity.COMMON, mage.cards.r.RacersRing.class));
|
||||
cards.add(new SetCardInfo("Raffine's Guidance", 25, Rarity.COMMON, mage.cards.r.RaffinesGuidance.class));
|
||||
cards.add(new SetCardInfo("Raffine's Informant", 26, Rarity.COMMON, mage.cards.r.RaffinesInformant.class));
|
||||
cards.add(new SetCardInfo("Raffine's Silencer", 90, Rarity.UNCOMMON, mage.cards.r.RaffinesSilencer.class));
|
||||
cards.add(new SetCardInfo("Raffine's Tower", 254, Rarity.RARE, mage.cards.r.RaffinesTower.class));
|
||||
cards.add(new SetCardInfo("Raffine, Scheming Seer", 213, Rarity.MYTHIC, mage.cards.r.RaffineSchemingSeer.class));
|
||||
cards.add(new SetCardInfo("Refuse to Yield", 27, Rarity.UNCOMMON, mage.cards.r.RefuseToYield.class));
|
||||
|
|
Loading…
Reference in a new issue