mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[VOC] Implemented Rhoda, Geist Avenger
This commit is contained in:
parent
7a8db0c878
commit
9c5f63403a
4 changed files with 103 additions and 46 deletions
|
|
@ -0,0 +1,48 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class TappedNotAttackingTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public TappedNotAttackingTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
private TappedNotAttackingTriggeredAbility(final TappedNotAttackingTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TappedNotAttackingTriggeredAbility copy() {
|
||||
return new TappedNotAttackingTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.TAPPED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getFlag()) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
return permanent != null && permanent.isCreature(game)
|
||||
&& game.getOpponents(permanent.getControllerId()).contains(getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTriggerPhrase() {
|
||||
return "Whenever a creature an opponent controls becomes tapped, " +
|
||||
"if it isn't being declared as an attacker, ";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue