mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
tests: added verify tests for emblems (class naming and package, constructor, image data, related to #13853)
This commit is contained in:
parent
925ef86c22
commit
dcaa0b9834
4 changed files with 87 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
|
@ -34,6 +35,13 @@ public class RadiationEmblem extends Emblem {
|
|||
Zone.ALL, TargetController.YOU, new RadiationEffect(), false
|
||||
).withInterveningIf(RadiationCondition.instance).setTriggerPhrase("At the beginning of each player's precombat main phase, "));
|
||||
|
||||
// radiation don't have source, so image can be initialized immediately
|
||||
setSourceObjectAndInitImage(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceObjectAndInitImage(MageObject sourceObject) {
|
||||
this.sourceObject = sourceObject;
|
||||
TokenInfo foundInfo = TokenRepository.instance.findPreferredTokenInfoForXmage(TokenRepository.XMAGE_IMAGE_NAME_RADIATION, null);
|
||||
if (foundInfo != null) {
|
||||
this.setExpansionSetCode(foundInfo.getSetCode());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility;
|
||||
|
|
@ -40,11 +41,21 @@ public final class TheRingEmblem extends Emblem {
|
|||
filter.add(TheRingEmblemPredicate.instance);
|
||||
}
|
||||
|
||||
public TheRingEmblem() {
|
||||
this((UUID) null); // require for verify test
|
||||
}
|
||||
|
||||
public TheRingEmblem(UUID controllerId) {
|
||||
super("The Ring");
|
||||
this.setControllerId(controllerId);
|
||||
|
||||
// ring don't have source, so image can be initialized immediately
|
||||
setSourceObjectAndInitImage(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceObjectAndInitImage(MageObject sourceObject) {
|
||||
this.sourceObject = sourceObject;
|
||||
TokenInfo foundInfo = TokenRepository.instance.findPreferredTokenInfoForXmage(TokenRepository.XMAGE_IMAGE_NAME_THE_RING, null);
|
||||
if (foundInfo != null) {
|
||||
this.setExpansionSetCode(foundInfo.getSetCode());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
|
|
@ -20,6 +21,13 @@ public class XmageHelperEmblem extends Emblem {
|
|||
super("Helper Emblem");
|
||||
this.frameStyle = FrameStyle.M15_NORMAL;
|
||||
|
||||
// helper don't have source, so image can be initialized immediately
|
||||
setSourceObjectAndInitImage(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceObjectAndInitImage(MageObject sourceObject) {
|
||||
this.sourceObject = sourceObject;
|
||||
TokenInfo foundInfo = TokenRepository.instance.findPreferredTokenInfoForXmage(TokenRepository.XMAGE_IMAGE_NAME_HELPER_EMBLEM, null);
|
||||
if (foundInfo != null) {
|
||||
this.setExpansionSetCode(foundInfo.getSetCode());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue