Merge pull request #5094 from NoahGleason/rakdos-augermage

Implement Rakdos Augermage
This commit is contained in:
LevelX2 2018-07-14 10:26:39 +02:00 committed by GitHub
commit 6912a8c5b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 137 additions and 0 deletions

View file

@ -0,0 +1,42 @@
package mage.abilities.effects.common;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author noahg
*/
public class RevealHandSourceControllerEffect extends OneShotEffect {
public RevealHandSourceControllerEffect() {
super(Outcome.Discard);
this.staticText = "reveal your hand";
}
public RevealHandSourceControllerEffect(final RevealHandSourceControllerEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (player != null && sourceObject != null) {
player.revealCards(sourceObject.getIdName(), player.getHand(), game);
return true;
}
return false;
}
@Override
public RevealHandSourceControllerEffect copy() {
return new RevealHandSourceControllerEffect(this);
}
}