mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Clean up
This commit is contained in:
parent
09ad252092
commit
5231aa2dd3
1 changed files with 1 additions and 25 deletions
|
@ -60,7 +60,6 @@ public class BloodcrazedGoblin extends CardImpl<BloodcrazedGoblin> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addWatcher(new BloodcrazedGoblinWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BloodcrazedGoblinEffect()));
|
||||
}
|
||||
|
||||
|
@ -75,29 +74,6 @@ public class BloodcrazedGoblin extends CardImpl<BloodcrazedGoblin> {
|
|||
|
||||
}
|
||||
|
||||
class BloodcrazedGoblinWatcher extends WatcherImpl<BloodcrazedGoblinWatcher> {
|
||||
|
||||
public BloodcrazedGoblinWatcher() {
|
||||
super("OpponentDamaged");
|
||||
}
|
||||
|
||||
public BloodcrazedGoblinWatcher(final BloodcrazedGoblinWatcher watcher) {
|
||||
super(watcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BloodcrazedGoblinWatcher copy() {
|
||||
return new BloodcrazedGoblinWatcher(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.DAMAGED_PLAYER && game.getOpponents(controllerId).contains(event.getPlayerId()))
|
||||
condition = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class BloodcrazedGoblinEffect extends ReplacementEffectImpl<BloodcrazedGoblinEffect> {
|
||||
|
||||
public BloodcrazedGoblinEffect() {
|
||||
|
@ -127,7 +103,7 @@ class BloodcrazedGoblinEffect extends ReplacementEffectImpl<BloodcrazedGoblinEff
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == EventType.DECLARE_ATTACKER && source.getSourceId().equals(event.getSourceId())) {
|
||||
Watcher watcher = game.getState().getWatchers().get(source.getControllerId(), "OpponentDamaged");
|
||||
Watcher watcher = game.getState().getWatchers().get(source.getControllerId(), "DamagedOpponents");
|
||||
if (watcher != null)
|
||||
return !watcher.conditionMet();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue