mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Fixed some missing sourceIds.
This commit is contained in:
parent
5bf1741656
commit
f80129a0ed
3 changed files with 13 additions and 15 deletions
|
@ -49,10 +49,9 @@ import mage.players.Player;
|
|||
public class SuddenDemise extends CardImpl {
|
||||
|
||||
public SuddenDemise(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}");
|
||||
|
||||
|
||||
// Choose a color. Sudden Demise deals X damage to each creature of the chosen color.
|
||||
// Choose a color. Sudden Demise deals X damage to each creature of the chosen color.
|
||||
this.getSpellAbility().addEffect(new SuddenDemiseDamageEffect());
|
||||
|
||||
}
|
||||
|
@ -71,7 +70,7 @@ class SuddenDemiseDamageEffect extends OneShotEffect {
|
|||
|
||||
public SuddenDemiseDamageEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "Choose a color. Sudden Demise deals X damage to each creature of the chosen color";
|
||||
this.staticText = "Choose a color. {this} deals X damage to each creature of the chosen color";
|
||||
}
|
||||
|
||||
public SuddenDemiseDamageEffect(final SuddenDemiseDamageEffect effect) {
|
||||
|
@ -93,7 +92,7 @@ class SuddenDemiseDamageEffect extends OneShotEffect {
|
|||
final int damage = source.getManaCostsToPay().getX();
|
||||
FilterPermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new ColorPredicate(choice.getColor()));
|
||||
for (Permanent permanent:game.getBattlefield().getActivePermanents(filter, source.getControllerId(), id, game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
permanent.damage(damage, source.getSourceId(), game, false, true);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -160,19 +160,19 @@ class TerraformerContinuousEffect extends ContinuousEffectImpl {
|
|||
if (sublayer == SubLayer.NA) {
|
||||
land.getAbilities().clear();
|
||||
if (choice.equals("Forest")) {
|
||||
land.addAbility(new GreenManaAbility(), id, game);
|
||||
land.addAbility(new GreenManaAbility(), source.getSourceId(), game);
|
||||
}
|
||||
if (choice.equals("Plains")) {
|
||||
land.addAbility(new WhiteManaAbility(), id, game);
|
||||
land.addAbility(new WhiteManaAbility(), source.getSourceId(), game);
|
||||
}
|
||||
if (choice.equals("Mountain")) {
|
||||
land.addAbility(new RedManaAbility(), id, game);
|
||||
land.addAbility(new RedManaAbility(), source.getSourceId(), game);
|
||||
}
|
||||
if (choice.equals("Island")) {
|
||||
land.addAbility(new BlueManaAbility(), id, game);
|
||||
land.addAbility(new BlueManaAbility(), source.getSourceId(), game);
|
||||
}
|
||||
if (choice.equals("Swamp")) {
|
||||
land.addAbility(new BlackManaAbility(), id, game);
|
||||
land.addAbility(new BlackManaAbility(), source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -47,8 +47,7 @@ import mage.players.Player;
|
|||
public class Worldfire extends CardImpl {
|
||||
|
||||
public Worldfire(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{6}{R}{R}{R}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{R}{R}{R}");
|
||||
|
||||
// Exile all permanents. Exile all cards from all hands and graveyards. Each player's life total becomes 1.
|
||||
this.getSpellAbility().addEffect(new WorldfireEffect());
|
||||
|
@ -65,9 +64,9 @@ public class Worldfire extends CardImpl {
|
|||
}
|
||||
|
||||
class WorldfireEffect extends OneShotEffect {
|
||||
|
||||
|
||||
private static FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
|
||||
public WorldfireEffect() {
|
||||
super(Outcome.Detriment);
|
||||
staticText = "Exile all permanents. Exile all cards from all hands and graveyards. Each player's life total becomes 1";
|
||||
|
@ -85,7 +84,7 @@ class WorldfireEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
permanent.moveToExile(id, "all permanents", id, game);
|
||||
permanent.moveToExile(null, "", source.getSourceId(), game);
|
||||
}
|
||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
|
|
Loading…
Reference in a new issue