mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Implemented Hatchery Spider
This commit is contained in:
parent
024b7ccb59
commit
b19a799b83
3 changed files with 130 additions and 2 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.MageObject;
|
||||
|
|
@ -16,18 +15,25 @@ import mage.game.stack.Spell;
|
|||
public class CastSourceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public static final String SOURCE_CAST_SPELL_ABILITY = "sourceCastSpellAbility";
|
||||
private final String rulePrefix;
|
||||
|
||||
public CastSourceTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
}
|
||||
|
||||
public CastSourceTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, optional, "");
|
||||
}
|
||||
|
||||
public CastSourceTriggeredAbility(Effect effect, boolean optional, String rulePrefix) {
|
||||
super(Zone.STACK, effect, optional);
|
||||
this.ruleAtTheTop = true;
|
||||
this.rulePrefix = rulePrefix;
|
||||
}
|
||||
|
||||
public CastSourceTriggeredAbility(final CastSourceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.rulePrefix = ability.rulePrefix;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -59,6 +65,6 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When you cast {source}, " + super.getRule();
|
||||
return rulePrefix + "When you cast this spell, " + super.getRule();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue