mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Moved MockAbility to stand alone class
This commit is contained in:
parent
f57f6e6d91
commit
d819053930
2 changed files with 25 additions and 23 deletions
25
Mage/src/mage/cards/MockAbility.java
Normal file
25
Mage/src/mage/cards/MockAbility.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
package mage.cards;
|
||||
|
||||
import mage.abilities.AbilityImpl;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
class MockAbility extends AbilityImpl<MockAbility> {
|
||||
|
||||
private final String text;
|
||||
|
||||
public MockAbility(String text) {
|
||||
super(AbilityType.STATIC, Zone.ALL);
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MockAbility copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule(boolean all) {
|
||||
return text;
|
||||
}
|
||||
}
|
|
@ -3,12 +3,9 @@ package mage.cards;
|
|||
import java.util.List;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.AbilityImpl;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.cards.repository.CardInfo;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
* @author North
|
||||
|
@ -73,24 +70,4 @@ public class MockCard extends CardImpl<MockCard> {
|
|||
private Ability textAbilityFromString(final String text) {
|
||||
return new MockAbility(text);
|
||||
}
|
||||
|
||||
private class MockAbility extends AbilityImpl<MockAbility> {
|
||||
|
||||
private final String text;
|
||||
|
||||
public MockAbility(String text) {
|
||||
super(AbilityType.STATIC, Zone.ALL);
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MockAbility copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule(boolean all) {
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue