Skip to content

Commit

Permalink
[OTJ] Implement Overzealous Muscle
Browse files Browse the repository at this point in the history
  • Loading branch information
Susucre committed Apr 2, 2024
1 parent 8bf25a9 commit fddaf59
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
66 changes: 66 additions & 0 deletions Mage.Sets/src/mage/cards/o/OverzealousMuscle.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package mage.cards.o;

import mage.MageInt;
import mage.abilities.common.CommittedCrimeTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.events.GameEvent;

import java.util.UUID;

/**
* @author Susucr
*/
public final class OverzealousMuscle extends CardImpl {

public OverzealousMuscle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");

this.subtype.add(SubType.OGRE);
this.subtype.add(SubType.MERCENARY);
this.power = new MageInt(5);
this.toughness = new MageInt(4);

// Whenever you commit a crime during your turn, Overzealous Muscle gains indestructible until end of turn.
this.addAbility(new OverzealousMuscleTriggeredAbility());
}

private OverzealousMuscle(final OverzealousMuscle card) {
super(card);
}

@Override
public OverzealousMuscle copy() {
return new OverzealousMuscle(this);
}
}

class OverzealousMuscleTriggeredAbility extends CommittedCrimeTriggeredAbility {

OverzealousMuscleTriggeredAbility() {
super(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn));
this.setTriggerPhrase("Whenever you commit a crime during your turn, ");
}

private OverzealousMuscleTriggeredAbility(final OverzealousMuscleTriggeredAbility ability) {
super(ability);
}

@Override
public OverzealousMuscleTriggeredAbility copy() {
return new OverzealousMuscleTriggeredAbility(this);
}

@Override
public boolean checkTrigger(GameEvent event, Game game) {
return super.checkTrigger(event, game)
&& game.isActivePlayer(getControllerId());
}

}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ private OutlawsOfThunderJunction() {
cards.add(new SetCardInfo("Outlaw Medic", 23, Rarity.COMMON, mage.cards.o.OutlawMedic.class));
cards.add(new SetCardInfo("Outlaw Stitcher", 59, Rarity.UNCOMMON, mage.cards.o.OutlawStitcher.class));
cards.add(new SetCardInfo("Outlaws' Fury", 136, Rarity.COMMON, mage.cards.o.OutlawsFury.class));
cards.add(new SetCardInfo("Overzealous Muscle", 97, Rarity.COMMON, mage.cards.o.OverzealousMuscle.class));
cards.add(new SetCardInfo("Peerless Ropemaster", 60, Rarity.COMMON, mage.cards.p.PeerlessRopemaster.class));
cards.add(new SetCardInfo("Phantom Interference", 61, Rarity.COMMON, mage.cards.p.PhantomInterference.class));
cards.add(new SetCardInfo("Pillage the Bog", 224, Rarity.RARE, mage.cards.p.PillageTheBog.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public CommittedCrimeTriggeredAbility(Zone zone, Effect effect, boolean optional
setTriggerPhrase("Whenever you commit a crime, ");
}

private CommittedCrimeTriggeredAbility(final CommittedCrimeTriggeredAbility ability) {
protected CommittedCrimeTriggeredAbility(final CommittedCrimeTriggeredAbility ability) {
super(ability);
}

Expand Down

0 comments on commit fddaf59

Please sign in to comment.