mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
cleaning
This commit is contained in:
parent
e2fd0299c7
commit
325384e73c
4 changed files with 54 additions and 54 deletions
|
|
@ -38,6 +38,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
||||
|
|
@ -88,10 +89,10 @@ class ClockworkCondorEffect extends OneShotEffect<ClockworkCondorEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent p = game.getPermanent(source.getSourceId());
|
||||
if (p != null) {
|
||||
ClockworkDragonDelayedTriggeredAbility delayedAbility = new ClockworkDragonDelayedTriggeredAbility();
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
delayedAbility.setControllerId(source.getControllerId());
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
AtTheEndOfCombatDelayedTriggeredAbility ability = new AtTheEndOfCombatDelayedTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance()));
|
||||
ability.setSourceId(source.getSourceId());
|
||||
ability.setControllerId(source.getControllerId());
|
||||
game.addDelayedTriggeredAbility(ability);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -106,26 +107,3 @@ class ClockworkCondorEffect extends OneShotEffect<ClockworkCondorEffect> {
|
|||
return "remove a +1/+1 counter from Clockwork Condor at end of combat";
|
||||
}
|
||||
}
|
||||
|
||||
class ClockworkCondorDelayedTriggeredAbility extends DelayedTriggeredAbility<ClockworkCondorDelayedTriggeredAbility> {
|
||||
ClockworkCondorDelayedTriggeredAbility() {
|
||||
super(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance()));
|
||||
}
|
||||
|
||||
ClockworkCondorDelayedTriggeredAbility(final ClockworkCondorDelayedTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClockworkCondorDelayedTriggeredAbility copy() {
|
||||
return new ClockworkCondorDelayedTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.COMBAT_PHASE_POST) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -40,6 +40,7 @@ import mage.abilities.DelayedTriggeredAbility;
|
|||
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -92,10 +93,10 @@ class ClockworkDragonEffect extends OneShotEffect<ClockworkDragonEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent p = game.getPermanent(source.getSourceId());
|
||||
if (p != null) {
|
||||
ClockworkDragonDelayedTriggeredAbility delayedAbility = new ClockworkDragonDelayedTriggeredAbility();
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
delayedAbility.setControllerId(source.getControllerId());
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
AtTheEndOfCombatDelayedTriggeredAbility ability = new AtTheEndOfCombatDelayedTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance()));
|
||||
ability.setSourceId(source.getSourceId());
|
||||
ability.setControllerId(source.getControllerId());
|
||||
game.addDelayedTriggeredAbility(ability);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -110,26 +111,3 @@ class ClockworkDragonEffect extends OneShotEffect<ClockworkDragonEffect> {
|
|||
return "remove a +1/+1 counter from Clockwork Dragon at end of combat";
|
||||
}
|
||||
}
|
||||
|
||||
class ClockworkDragonDelayedTriggeredAbility extends DelayedTriggeredAbility<ClockworkDragonDelayedTriggeredAbility> {
|
||||
ClockworkDragonDelayedTriggeredAbility() {
|
||||
super(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance()));
|
||||
}
|
||||
|
||||
ClockworkDragonDelayedTriggeredAbility(final ClockworkDragonDelayedTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClockworkDragonDelayedTriggeredAbility copy() {
|
||||
return new ClockworkDragonDelayedTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.COMBAT_PHASE_POST) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue