mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 14:02:05 -08:00
Added 4 cards from AHK
* Added Cartouche of Strength * Added Nest of Scarabs (More correct implementation than existing one) * Added Soul-Scar Mage * Added Battlefield Scavenger
This commit is contained in:
parent
04f1b6306a
commit
db74576397
9 changed files with 459 additions and 53 deletions
|
|
@ -0,0 +1,45 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author stravant
|
||||
*/
|
||||
public class EffectKeyValue implements DynamicValue {
|
||||
private String key;
|
||||
private String description;
|
||||
|
||||
public EffectKeyValue(String key) {
|
||||
this.key = key;
|
||||
this.description = key;
|
||||
}
|
||||
|
||||
public EffectKeyValue(String key, String description) {
|
||||
this(key);
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability source, Effect effect) {
|
||||
return (Integer)effect.getValue(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectKeyValue copy(){
|
||||
return new EffectKeyValue(this.key, this.description);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "equal to";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
|
||||
/**
|
||||
* @author stravant
|
||||
*/
|
||||
public class RummageEffect extends DoIfCostPaid {
|
||||
public RummageEffect() {
|
||||
super(new DrawCardSourceControllerEffect(1), new DiscardCardCost());
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ import mage.watchers.Watcher;
|
|||
*/
|
||||
public class ExertAbility extends SimpleStaticAbility {
|
||||
|
||||
final private String ruleText;
|
||||
private String ruleText;
|
||||
|
||||
public ExertAbility(BecomesExertSourceTriggeredAbility ability) {
|
||||
this(ability, false);
|
||||
|
|
@ -63,14 +63,17 @@ public class ExertAbility extends SimpleStaticAbility {
|
|||
|
||||
public ExertAbility(BecomesExertSourceTriggeredAbility ability, boolean exertOnlyOncePerTurn) {
|
||||
super(Zone.BATTLEFIELD, new ExertReplacementEffect(exertOnlyOncePerTurn));
|
||||
this.addSubAbility(ability);
|
||||
ruleText = (exertOnlyOncePerTurn
|
||||
? "If {this} hasn't been exerted this turn, you may exert it"
|
||||
: "You may exert {this}")
|
||||
+ " as it attacks. When you do, "
|
||||
+ ability.getEffects().get(0).getText(ability.getModes().getMode())
|
||||
+ ". <i>(An exterted creature can't untap during your next untap step)</i>";
|
||||
ability.setRuleVisible(false);
|
||||
: "You may exert {this}") + " as it attacks. ";
|
||||
if (ability != null) {
|
||||
this.addSubAbility(ability);
|
||||
ruleText += ("When you do, " +
|
||||
ability.getEffects().get(0).getText(ability.getModes().getMode())
|
||||
+ ". ");
|
||||
ability.setRuleVisible(false);
|
||||
}
|
||||
ruleText += "<i>(An exterted creature can't untap during your next untap step)</i>";
|
||||
if (exertOnlyOncePerTurn) {
|
||||
getWatchers().add(new ExertedThisTurnWatcher());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue