mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[LTC] Implement Erestor of the Council
This commit is contained in:
parent
456021df94
commit
87fc0ec9e9
4 changed files with 136 additions and 49 deletions
|
|
@ -0,0 +1,39 @@
|
|||
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.events.VotedEvent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class FinishVotingTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public FinishVotingTriggeredAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect);
|
||||
this.setTriggerPhrase("Whenever players finish voting, ");
|
||||
}
|
||||
|
||||
private FinishVotingTriggeredAbility(final FinishVotingTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FinishVotingTriggeredAbility copy() {
|
||||
return new FinishVotingTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.VOTED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
this.getEffects().setValue("votedAgainst", ((VotedEvent) event).getDidntVote(getControllerId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue