mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +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.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
this.addWatcher(new BloodcrazedGoblinWatcher());
|
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BloodcrazedGoblinEffect()));
|
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> {
|
class BloodcrazedGoblinEffect extends ReplacementEffectImpl<BloodcrazedGoblinEffect> {
|
||||||
|
|
||||||
public BloodcrazedGoblinEffect() {
|
public BloodcrazedGoblinEffect() {
|
||||||
|
@ -127,7 +103,7 @@ class BloodcrazedGoblinEffect extends ReplacementEffectImpl<BloodcrazedGoblinEff
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
if (event.getType() == EventType.DECLARE_ATTACKER && source.getSourceId().equals(event.getSourceId())) {
|
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)
|
if (watcher != null)
|
||||||
return !watcher.conditionMet();
|
return !watcher.conditionMet();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue