mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
parent
cf602a19c4
commit
32ea13b1a8
2 changed files with 19 additions and 10 deletions
|
@ -28,10 +28,13 @@
|
|||
package mage.sets.morningtide;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Layer;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.SubLayer;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -65,9 +68,15 @@ public class ChameleonColossus extends CardImpl<ChameleonColossus> {
|
|||
this.color.setGreen(true);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Changeling (This card is every creature type at all times.)
|
||||
this.addAbility(ChangelingAbility.getInstance());
|
||||
|
||||
// Protection from black
|
||||
this.addAbility(new ProtectionAbility(filter));
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ChameleonColossusEffect(), new ManaCostsImpl("{2}{G}{G}")));
|
||||
|
||||
// {2}{G}{G}: Chameleon Colossus gets +X/+X until end of turn, where X is its power.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChameleonColossusEffect(), new ManaCostsImpl("{2}{G}{G}")));
|
||||
}
|
||||
|
||||
public ChameleonColossus(final ChameleonColossus card) {
|
||||
|
@ -82,7 +91,7 @@ public class ChameleonColossus extends CardImpl<ChameleonColossus> {
|
|||
|
||||
class ChameleonColossusEffect extends ContinuousEffectImpl<ChameleonColossusEffect> {
|
||||
public ChameleonColossusEffect() {
|
||||
super(Constants.Duration.EndOfTurn, Constants.Layer.PTChangingEffects_7, Constants.SubLayer.ModifyPT_7c, Constants.Outcome.BoostCreature);
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
staticText = "{this} gets +X/+X until end of turn, where X is its power";
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -52,10 +52,10 @@ import mage.players.Player;
|
|||
*/
|
||||
public class GreatbowDoyen extends CardImpl<GreatbowDoyen> {
|
||||
|
||||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("other Archer creatures");
|
||||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Archer creatures you controll");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
filter.add(new SubtypePredicate("Archer"));
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,6 @@ public class GreatbowDoyen extends CardImpl<GreatbowDoyen> {
|
|||
|
||||
// Whenever an Archer you control deals damage to a creature, that Archer deals that much damage to that creature's controller.
|
||||
this.addAbility(new GreatbowDoyenTriggeredAbility());
|
||||
|
||||
}
|
||||
|
||||
public GreatbowDoyen(final GreatbowDoyen card) {
|
||||
|
@ -109,7 +108,7 @@ class GreatbowDoyenTriggeredAbility extends TriggeredAbilityImpl<GreatbowDoyenTr
|
|||
Permanent damagedCreature = game.getPermanent(event.getTargetId());
|
||||
if (creature != null && damagedCreature != null
|
||||
&& creature.getCardType().contains(CardType.CREATURE)
|
||||
&& creature.getSubtype().contains("Archer")
|
||||
&& creature.hasSubtype("Archer")
|
||||
&& creature.getControllerId().equals(controllerId)) {
|
||||
this.getEffects().get(0).setValue("damageAmount", event.getAmount());
|
||||
this.getEffects().get(0).setValue("controller", damagedCreature.getControllerId());
|
||||
|
@ -130,7 +129,7 @@ class GreatbowDoyenEffect extends OneShotEffect<GreatbowDoyenEffect> {
|
|||
|
||||
public GreatbowDoyenEffect() {
|
||||
super(Constants.Outcome.Damage);
|
||||
this.staticText = "it deals that much damage to its controller";
|
||||
this.staticText = "that Archer deals that much damage to that creature's controller";
|
||||
}
|
||||
|
||||
public GreatbowDoyenEffect(final GreatbowDoyenEffect effect) {
|
||||
|
@ -156,6 +155,7 @@ class GreatbowDoyenEffect extends OneShotEffect<GreatbowDoyenEffect> {
|
|||
Player player = game.getPlayer(controllerId);
|
||||
if (player != null) {
|
||||
player.damage(damageAmount, sourceOfDamage, game, false, true);
|
||||
game.informPlayers(new StringBuilder(permanent.getName()).append(" deals ").append(damageAmount).append(" damage to ").append(player.getName()).toString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue