mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* Zaffai, Thunder Conductor - fixed that it allows to choose opponent instead random (#8094)
* Fix Zaffai: Target opponent should be at random. Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
parent
42a86bd196
commit
a9cc7cefd0
1 changed files with 9 additions and 3 deletions
|
@ -70,19 +70,25 @@ class ZaffaiThunderConductorEffect extends OneShotEffect {
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
player.scry(1, source, game);
|
player.scry(1, source, game);
|
||||||
Spell spell = (Spell) getValue(MagecraftAbility.SPELL_KEY);
|
Spell spell = (Spell) getValue(MagecraftAbility.SPELL_KEY);
|
||||||
if (spell == null || spell.getManaValue() < 5) {
|
if (spell == null || spell.getManaValue() < 5) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
new Elemental44Token().putOntoBattlefield(1, game, source, source.getControllerId());
|
new Elemental44Token().putOntoBattlefield(1, game, source, source.getControllerId());
|
||||||
if (spell.getManaValue() < 10) {
|
if (spell.getManaValue() < 10) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetOpponent target = new TargetOpponent(true);
|
TargetOpponent target = new TargetOpponent(true);
|
||||||
player.chooseTarget(outcome, target, source, game);
|
target.setRandom(true);
|
||||||
|
target.chooseTarget(Outcome.Damage, player.getId(), source, game);
|
||||||
Player opponent = game.getPlayer(target.getFirstTarget());
|
Player opponent = game.getPlayer(target.getFirstTarget());
|
||||||
|
if (opponent != null) {
|
||||||
opponent.damage(10, source.getSourceId(), source, game);
|
opponent.damage(10, source.getSourceId(), source, game);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue