mirror of
https://github.com/correl/mage.git
synced 2025-01-07 11:08:44 +00:00
[LTR] Implement Rush the Room
This commit is contained in:
parent
a6c452ff08
commit
02514e80c2
2 changed files with 75 additions and 0 deletions
74
Mage.Sets/src/mage/cards/r/RushTheRoom.java
Normal file
74
Mage.Sets/src/mage/cards/r/RushTheRoom.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RushTheRoom extends CardImpl {
|
||||
|
||||
public RushTheRoom(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
|
||||
// Target creature gets +1/+0 and gains first strike until end of turn. If it's a Goblin or Orc, it also gains haste until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0)
|
||||
.setText("target creature gets +1/+0"));
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance())
|
||||
.setText("and gains first strike until end of turn"));
|
||||
this.getSpellAbility().addEffect(new RushTheRoomEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private RushTheRoom(final RushTheRoom card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RushTheRoom copy() {
|
||||
return new RushTheRoom(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RushTheRoomEffect extends OneShotEffect {
|
||||
|
||||
RushTheRoomEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "If it's a Goblin or Orc, it also gains haste until end of turn";
|
||||
}
|
||||
|
||||
private RushTheRoomEffect(final RushTheRoomEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RushTheRoomEffect copy() {
|
||||
return new RushTheRoomEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null && (permanent.hasSubtype(SubType.GOBLIN, game) || permanent.hasSubtype(SubType.ORC, game))) {
|
||||
game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance())
|
||||
.setTargetPointer(new FixedTarget(permanent, game)), source);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -198,6 +198,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rivendell", 259, Rarity.RARE, mage.cards.r.Rivendell.class));
|
||||
cards.add(new SetCardInfo("Rohirrim Lancer", 146, Rarity.COMMON, mage.cards.r.RohirrimLancer.class));
|
||||
cards.add(new SetCardInfo("Rosie Cotton of South Lane", 27, Rarity.UNCOMMON, mage.cards.r.RosieCottonOfSouthLane.class));
|
||||
cards.add(new SetCardInfo("Rush the Room", 147, Rarity.COMMON, mage.cards.r.RushTheRoom.class));
|
||||
cards.add(new SetCardInfo("Sam's Desperate Rescue", 105, Rarity.COMMON, mage.cards.s.SamsDesperateRescue.class));
|
||||
cards.add(new SetCardInfo("Samwise Gamgee", 222, Rarity.RARE, mage.cards.s.SamwiseGamgee.class));
|
||||
cards.add(new SetCardInfo("Samwise the Stouthearted", 28, Rarity.UNCOMMON, mage.cards.s.SamwiseTheStouthearted.class));
|
||||
|
|
Loading…
Reference in a new issue