mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
* Commune with Lava - Fixed that it did not last until your next turn if it was cast during your turn.
This commit is contained in:
parent
f835c0baa3
commit
fef57af896
1 changed files with 10 additions and 1 deletions
|
@ -112,6 +112,8 @@ class CommuneWithLavaEffect extends OneShotEffect {
|
||||||
|
|
||||||
class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl {
|
class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
|
int castOnTurn = 0;
|
||||||
|
|
||||||
public CommuneWithLavaMayPlayEffect() {
|
public CommuneWithLavaMayPlayEffect() {
|
||||||
super(AsThoughEffectType.PLAY_FROM_NON_HAND_ZONE, Duration.Custom, Outcome.Benefit);
|
super(AsThoughEffectType.PLAY_FROM_NON_HAND_ZONE, Duration.Custom, Outcome.Benefit);
|
||||||
this.staticText = "Until the end of your next turn, you may play that card.";
|
this.staticText = "Until the end of your next turn, you may play that card.";
|
||||||
|
@ -119,6 +121,7 @@ class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
public CommuneWithLavaMayPlayEffect(final CommuneWithLavaMayPlayEffect effect) {
|
public CommuneWithLavaMayPlayEffect(final CommuneWithLavaMayPlayEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
|
castOnTurn = effect.castOnTurn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -126,9 +129,15 @@ class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl {
|
||||||
return new CommuneWithLavaMayPlayEffect(this);
|
return new CommuneWithLavaMayPlayEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(Ability source, Game game) {
|
||||||
|
super.init(source, game);
|
||||||
|
castOnTurn = game.getTurnNum();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInactive(Ability source, Game game) {
|
public boolean isInactive(Ability source, Game game) {
|
||||||
if (game.getPhase().getStep().getType() == PhaseStep.END_TURN) {
|
if (castOnTurn != game.getTurnNum() && game.getPhase().getStep().getType() == PhaseStep.END_TURN) {
|
||||||
if (game.getActivePlayerId().equals(source.getControllerId())) {
|
if (game.getActivePlayerId().equals(source.getControllerId())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue