mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
refactored flashback to remove unnecessary timing rule argument
This commit is contained in:
parent
05e80e3a02
commit
d93475a5bb
145 changed files with 192 additions and 234 deletions
|
|
@ -38,12 +38,12 @@ public class FlashbackAbility extends SpellAbility {
|
|||
private String abilityName;
|
||||
private SpellAbility spellAbilityToResolve;
|
||||
|
||||
public FlashbackAbility(Cost cost, TimingRule timingRule) {
|
||||
public FlashbackAbility(Card card, Cost cost) {
|
||||
super(null, "", Zone.GRAVEYARD, SpellAbilityType.BASE_ALTERNATE, SpellAbilityCastMode.FLASHBACK);
|
||||
this.setAdditionalCostsRuleVisible(false);
|
||||
this.name = "Flashback " + cost.getText();
|
||||
this.addCost(cost);
|
||||
this.timing = timingRule;
|
||||
this.timing = card.isSorcery() ? TimingRule.SORCERY : TimingRule.INSTANT;
|
||||
}
|
||||
|
||||
public FlashbackAbility(final FlashbackAbility ability) {
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
&& mainCardState != null
|
||||
&& !mainCardState.hasLostAllAbilities()
|
||||
&& mainCardState.getAbilities().containsClass(FlashbackAbility.class)) {
|
||||
FlashbackAbility flash = new FlashbackAbility(this.getManaCost(), this.isInstant(game) ? TimingRule.INSTANT : TimingRule.SORCERY);
|
||||
FlashbackAbility flash = new FlashbackAbility(this, this.getManaCost());
|
||||
flash.setSourceId(this.getId());
|
||||
flash.setControllerId(this.getOwnerId());
|
||||
flash.setSpellAbilityType(this.getSpellAbility().getSpellAbilityType());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue