mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Implement Thick-Skinned Goblin
This commit is contained in:
parent
30246732b8
commit
bad82d62ba
5 changed files with 176 additions and 77 deletions
76
Mage.Sets/src/mage/cards/t/ThickSkinnedGoblin.java
Normal file
76
Mage.Sets/src/mage/cards/t/ThickSkinnedGoblin.java
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.*;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author noahg
|
||||
*/
|
||||
public final class ThickSkinnedGoblin extends CardImpl {
|
||||
|
||||
public ThickSkinnedGoblin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.GOBLIN);
|
||||
this.subtype.add(SubType.SHAMAN);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// You may pay {0} rather than pay the echo cost for permanents you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ThickSkinnedGoblinCostModificationEffect()));
|
||||
|
||||
// {R}: Thick-Skinned Goblin gains protection from red until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect(ProtectionAbility.from(ObjectColor.RED), Duration.EndOfTurn), new ManaCostsImpl("{R}")));
|
||||
}
|
||||
|
||||
public ThickSkinnedGoblin(final ThickSkinnedGoblin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThickSkinnedGoblin copy() {
|
||||
return new ThickSkinnedGoblin(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ThickSkinnedGoblinCostModificationEffect extends AsThoughEffectImpl {
|
||||
|
||||
public ThickSkinnedGoblinCostModificationEffect(){
|
||||
super(AsThoughEffectType.PAY_0_ECHO, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
this.staticText = "You may pay {0} rather than pay the echo cost for permanents you control.";
|
||||
}
|
||||
|
||||
public ThickSkinnedGoblinCostModificationEffect(ThickSkinnedGoblinCostModificationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
|
||||
Permanent sourcePermanent = game.getPermanent(sourceId);
|
||||
return sourcePermanent != null && sourcePermanent.isControlledBy(source.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThickSkinnedGoblinCostModificationEffect copy() {
|
||||
return new ThickSkinnedGoblinCostModificationEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -283,6 +283,7 @@ public final class TimeSpiral extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Thallid Shell-Dweller", 226, Rarity.COMMON, mage.cards.t.ThallidShellDweller.class));
|
||||
cards.add(new SetCardInfo("Thelonite Hermit", 228, Rarity.RARE, mage.cards.t.TheloniteHermit.class));
|
||||
cards.add(new SetCardInfo("Thelon of Havenwood", 227, Rarity.RARE, mage.cards.t.ThelonOfHavenwood.class));
|
||||
cards.add(new SetCardInfo("Thick-Skinned Goblin", 182, Rarity.UNCOMMON, mage.cards.t.ThickSkinnedGoblin.class));
|
||||
cards.add(new SetCardInfo("Think Twice", 86, Rarity.COMMON, mage.cards.t.ThinkTwice.class));
|
||||
cards.add(new SetCardInfo("Thrill of the Hunt", 229, Rarity.COMMON, mage.cards.t.ThrillOfTheHunt.class));
|
||||
cards.add(new SetCardInfo("Thunder Totem", 265, Rarity.UNCOMMON, mage.cards.t.ThunderTotem.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue