mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
moved BloodthirstWatcher to player - does not need be added to card anymore
This commit is contained in:
parent
108cd68361
commit
9f64c00dc5
11 changed files with 7 additions and 29 deletions
|
@ -34,7 +34,6 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +51,6 @@ public class BloodOgre extends CardImpl<BloodOgre> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(new BloodthirstAbility(1));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
}
|
||||
|
||||
|
|
|
@ -31,13 +31,9 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Abilities;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
|
@ -45,9 +41,6 @@ import mage.filter.FilterCard;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -77,7 +70,6 @@ public class BloodlordOfVaasgoth extends CardImpl<BloodlordOfVaasgoth> {
|
|||
|
||||
// Bloodthirst 3
|
||||
this.addAbility(new BloodthirstAbility(3));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
|
||||
// Whenever you cast a Vampire creature spell, it gains bloodthirst 3.
|
||||
this.addAbility(new SpellCastTriggeredAbility(new BloodlordOfVaasgothEffect(), filterCard, false, true));
|
||||
|
@ -117,10 +109,7 @@ class BloodlordOfVaasgothEffect extends ContinuousEffectImpl {
|
|||
if (object != null) {
|
||||
Permanent permanent = game.getPermanent(object.getSourceId());
|
||||
if (permanent != null) {
|
||||
Ability bloodthirst = ability.copy();
|
||||
bloodthirst.newId();
|
||||
bloodthirst.setSourceId(source.getSourceId());
|
||||
permanent.addAbility(bloodthirst);
|
||||
permanent.addAbility(ability);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -33,7 +33,6 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,7 +50,6 @@ public class BloodrageVampire extends CardImpl<BloodrageVampire> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new BloodthirstAbility(1));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
}
|
||||
|
||||
public BloodrageVampire(final BloodrageVampire card) {
|
||||
|
|
|
@ -34,7 +34,6 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +51,6 @@ public class CarnageWurm extends CardImpl<CarnageWurm> {
|
|||
this.toughness = new MageInt(6);
|
||||
|
||||
this.addAbility(new BloodthirstAbility(3));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +51,6 @@ public class DuskhunterBat extends CardImpl<DuskhunterBat> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new BloodthirstAbility(1));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +51,6 @@ public class FurybornHellkite extends CardImpl<FurybornHellkite> {
|
|||
this.toughness = new MageInt(6);
|
||||
|
||||
this.addAbility(new BloodthirstAbility(6));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +51,6 @@ public class GorehornMinotaurs extends CardImpl<GorehornMinotaurs> {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
this.addAbility(new BloodthirstAbility(2));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
}
|
||||
|
||||
public GorehornMinotaurs(final GorehornMinotaurs card) {
|
||||
|
|
|
@ -34,7 +34,6 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.abilities.keyword.IslandwalkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +51,6 @@ public class LurkingCrocodile extends CardImpl<LurkingCrocodile> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(new BloodthirstAbility(1));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
this.addAbility(new IslandwalkAbility());
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.BloodthirstAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +51,6 @@ public class VampireOutcasts extends CardImpl<VampireOutcasts> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(new BloodthirstAbility(2));
|
||||
this.addWatcher(new BloodthirstWatcher());
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.stack.StackAbility;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetDiscard;
|
||||
import mage.watchers.Watcher;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
|
||||
public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Serializable {
|
||||
|
||||
|
@ -171,6 +173,9 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
this.left = false;
|
||||
this.passed = false;
|
||||
this.passedTurn = false;
|
||||
Watcher bloodthirst = new BloodthirstWatcher();
|
||||
bloodthirst.setControllerId(playerId);
|
||||
game.getState().getWatchers().add(bloodthirst);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,7 +6,7 @@ import mage.game.events.GameEvent;
|
|||
import mage.watchers.WatcherImpl;
|
||||
|
||||
/**
|
||||
* Must be installed to card for proper Bloodthirst work
|
||||
* Must be installed to player for proper Bloodthirst work
|
||||
* @author Loki
|
||||
*/
|
||||
public class BloodthirstWatcher extends WatcherImpl<BloodthirstWatcher> {
|
||||
|
|
Loading…
Reference in a new issue