mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Merge pull request #1748 from Styxo/master
Added Sylvan Echoes, edited Woodland Guidance and Entangling Trap
This commit is contained in:
commit
ca7a083364
4 changed files with 136 additions and 56 deletions
|
|
@ -181,7 +181,18 @@ public class ClashEffect extends OneShotEffect implements MageSingleton {
|
|||
if (cardOpponent != null) {
|
||||
opponent.moveCardToLibraryWithInfo(cardOpponent, source.getSourceId(), game, Zone.LIBRARY, topOpponent, true);
|
||||
}
|
||||
game.fireEvent(new GameEvent(EventType.CLASHED, opponent.getId(), source.getSourceId(), controller.getId(), 0, cmcController > cmcOpponent));
|
||||
// fire CLASHED event with info about who won
|
||||
String winner = "draw";
|
||||
if (cmcController > cmcOpponent) {
|
||||
winner = "controller";
|
||||
}
|
||||
if (cmcOpponent > cmcController) {
|
||||
winner = "opponent";
|
||||
}
|
||||
GameEvent gameEvent = new GameEvent(EventType.CLASHED, opponent.getId(), source.getSourceId(), controller.getId());
|
||||
gameEvent.setData(winner);
|
||||
game.fireEvent(gameEvent);
|
||||
|
||||
// set opponent to DoIfClashWonEffect
|
||||
for (Effect effect : source.getEffects()) {
|
||||
if (effect instanceof DoIfClashWonEffect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue