mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
[AFR] Implemented Thieves' Tools
This commit is contained in:
parent
651f63e9f2
commit
ec11e1102b
2 changed files with 68 additions and 0 deletions
67
Mage.Sets/src/mage/cards/t/ThievesTools.java
Normal file
67
Mage.Sets/src/mage/cards/t/ThievesTools.java
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalRestrictionEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ThievesTools extends CardImpl {
|
||||
|
||||
public ThievesTools(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Thieves' Tools enters the battlefield, create a Treasure token.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TreasureToken())));
|
||||
|
||||
// Equipped creature can't be blocked as long as its power is 3 or less.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalRestrictionEffect(
|
||||
new CantBeBlockedAttachedEffect(AttachmentType.EQUIPMENT), ThievesToolsCondition.instance,
|
||||
"equipped creature can't be blocked as long as its power is 3 or less"
|
||||
)));
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(2));
|
||||
}
|
||||
|
||||
private ThievesTools(final ThievesTools card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThievesTools copy() {
|
||||
return new ThievesTools(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum ThievesToolsCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
Permanent equipped = game.getPermanent(permanent.getAttachedTo());
|
||||
return equipped != null && equipped.getPower().getValue() <= 3;
|
||||
}
|
||||
}
|
||||
|
|
@ -203,6 +203,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tasha's Hideous Laughter", 78, Rarity.RARE, mage.cards.t.TashasHideousLaughter.class));
|
||||
cards.add(new SetCardInfo("The Book of Exalted Deeds", 4, Rarity.MYTHIC, mage.cards.t.TheBookOfExaltedDeeds.class));
|
||||
cards.add(new SetCardInfo("The Deck of Many Things", 241, Rarity.MYTHIC, mage.cards.t.TheDeckOfManyThings.class));
|
||||
cards.add(new SetCardInfo("Thieves' Tools", 122, Rarity.COMMON, mage.cards.t.ThievesTools.class));
|
||||
cards.add(new SetCardInfo("Tiamat", 235, Rarity.MYTHIC, mage.cards.t.Tiamat.class));
|
||||
cards.add(new SetCardInfo("Tiger-Tribe Hunter", 163, Rarity.UNCOMMON, mage.cards.t.TigerTribeHunter.class));
|
||||
cards.add(new SetCardInfo("Treasure Chest", 252, Rarity.RARE, mage.cards.t.TreasureChest.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue