mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
- Added Razia Boros Archangel, Duergar HedgeMage, Battlegate Mimic.
This commit is contained in:
parent
655dcea56d
commit
c7f899962b
10 changed files with 575 additions and 4 deletions
|
|
@ -44,6 +44,7 @@ public class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTri
|
|||
|
||||
private static final FilterSpell spellCard = new FilterSpell("a spell");
|
||||
protected FilterSpell filter;
|
||||
protected String rule;
|
||||
|
||||
/**
|
||||
* If true, the source that triggered the ability will be set as target to effect.
|
||||
|
|
@ -57,6 +58,11 @@ public class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTri
|
|||
public SpellCastTriggeredAbility(Effect effect, FilterSpell filter, boolean optional) {
|
||||
this(effect, filter, optional, false);
|
||||
}
|
||||
|
||||
public SpellCastTriggeredAbility(Effect effect, FilterSpell filter, boolean optional, String rule) {
|
||||
this(effect, filter, optional, false);
|
||||
this.rule = rule;
|
||||
}
|
||||
|
||||
public SpellCastTriggeredAbility(Effect effect, FilterSpell filter, boolean optional, boolean rememberSource) {
|
||||
this(Zone.BATTLEFIELD, effect, filter, optional, rememberSource);
|
||||
|
|
@ -72,6 +78,7 @@ public class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTri
|
|||
super(ability);
|
||||
filter = ability.filter;
|
||||
this.rememberSource = ability.rememberSource;
|
||||
this.rule = ability.rule;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -90,6 +97,9 @@ public class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTri
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
if (rule != null && !rule.isEmpty()) {
|
||||
return rule;
|
||||
}
|
||||
return "Whenever you cast " + filter.getMessage() + ", " + super.getRule();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common.continious;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -50,6 +49,7 @@ public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySou
|
|||
|
||||
/**
|
||||
* Add ability with Duration.WhileOnBattlefield
|
||||
*
|
||||
* @param ability
|
||||
*/
|
||||
public GainAbilitySourceEffect(Ability ability) {
|
||||
|
|
@ -57,7 +57,7 @@ public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySou
|
|||
}
|
||||
|
||||
public GainAbilitySourceEffect(Ability ability, Duration duration) {
|
||||
this(ability, duration, false);
|
||||
this(ability, duration, false);
|
||||
}
|
||||
|
||||
public GainAbilitySourceEffect(Ability ability, Duration duration, boolean onCard) {
|
||||
|
|
@ -67,6 +67,15 @@ public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySou
|
|||
this.onCard = onCard;
|
||||
}
|
||||
|
||||
public GainAbilitySourceEffect(Ability ability, Duration duration, boolean onCard, boolean noStaticText) {
|
||||
super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
this.ability = ability;
|
||||
this.onCard = onCard;
|
||||
if (noStaticText) {
|
||||
staticText = null;
|
||||
}
|
||||
}
|
||||
|
||||
public GainAbilitySourceEffect(final GainAbilitySourceEffect effect) {
|
||||
super(effect);
|
||||
this.ability = effect.ability.copy();
|
||||
|
|
@ -97,5 +106,4 @@ public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySou
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class SetPowerToughnessSourceEffect extends ContinuousEffectImpl<SetPower
|
|||
super(duration, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature);
|
||||
this.power = power;
|
||||
this.toughness = toughness;
|
||||
staticText = "{this}'s power and toughness is " + power + "/" + toughness;
|
||||
staticText = "{this}'s power and toughness is " + power + "/" + toughness + " " + duration.toString();
|
||||
}
|
||||
|
||||
public SetPowerToughnessSourceEffect(final SetPowerToughnessSourceEffect effect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue