mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[ONE] Implement Noxious assault (#9908)
* Added Noxious Assault to cards and to Phyrexia All Will Be One set * Added code for testing of Noxious Assault * Added code for testing of Noxious Assault * Added code for testing of Noxious Assault * Added code for testing of Noxious Assault * Added code for testing of Noxious Assault * Added code for testing of Noxious Assault * Added code for testing of Noxious Assault * Added code for testing of Noxious Assault * Card has been tested and working but triggered ability doesn't seem to go to the stack. * Poison counter no longer added while trigger is checked.Grammar fixed. * Unused Imports removed --------- Co-authored-by: AhmadYProjects <yousufa@kean.edu> Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
parent
5c37af9521
commit
1d91abbb33
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/n/NoxiousAssault.java
Normal file
80
Mage.Sets/src/mage/cards/n/NoxiousAssault.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author AhmadYProjects
|
||||
*/
|
||||
public final class NoxiousAssault extends CardImpl {
|
||||
|
||||
public NoxiousAssault(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
|
||||
|
||||
|
||||
// Creatures you control get +2/+2 until end of turn. Whenever a creature blocks this turn, its controller gets a poison counter.
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(2,2, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(
|
||||
new NoxiousAssaultDelayedTriggerAbility()));
|
||||
}
|
||||
|
||||
private NoxiousAssault(final NoxiousAssault card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NoxiousAssault copy() {
|
||||
return new NoxiousAssault(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NoxiousAssaultDelayedTriggerAbility extends DelayedTriggeredAbility {
|
||||
NoxiousAssaultDelayedTriggerAbility() {
|
||||
super(new AddPoisonCounterTargetEffect(1),Duration.EndOfTurn,false,false);
|
||||
|
||||
}
|
||||
|
||||
private NoxiousAssaultDelayedTriggerAbility(final NoxiousAssaultDelayedTriggerAbility ability){
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CREATURE_BLOCKS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent == null){
|
||||
return false;
|
||||
}
|
||||
getEffects().setTargetPointer(new FixedTarget(permanent.getControllerId()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NoxiousAssaultDelayedTriggerAbility copy(){
|
||||
return new NoxiousAssaultDelayedTriggerAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule(){
|
||||
return "Whenever a creature blocks this turn, its controller gets a poison counter.";
|
||||
}
|
||||
|
||||
}
|
|
@ -161,6 +161,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Nimraiser Paladin", 101, Rarity.UNCOMMON, mage.cards.n.NimraiserPaladin.class));
|
||||
cards.add(new SetCardInfo("Nissa, Ascended Animist", 175, Rarity.MYTHIC, mage.cards.n.NissaAscendedAnimist.class));
|
||||
cards.add(new SetCardInfo("Norn's Wellspring", 24, Rarity.RARE, mage.cards.n.NornsWellspring.class));
|
||||
cards.add(new SetCardInfo("Noxious Assault", 176, Rarity.UNCOMMON, mage.cards.n.NoxiousAssault.class));
|
||||
cards.add(new SetCardInfo("Offer Immortality", 102, Rarity.COMMON, mage.cards.o.OfferImmortality.class));
|
||||
cards.add(new SetCardInfo("Oil-Gorger Troll", 177, Rarity.COMMON, mage.cards.o.OilGorgerTroll.class));
|
||||
cards.add(new SetCardInfo("Orthodoxy Enforcer", 25, Rarity.COMMON, mage.cards.o.OrthodoxyEnforcer.class));
|
||||
|
|
Loading…
Reference in a new issue