mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Merge pull request #5094 from NoahGleason/rakdos-augermage
Implement Rakdos Augermage
This commit is contained in:
commit
6912a8c5b0
3 changed files with 137 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue