mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
[JOU] Added 1 card, some fixes, some formatting.
This commit is contained in:
parent
e389645927
commit
967cb8c1b5
5 changed files with 104 additions and 35 deletions
|
|
@ -52,10 +52,10 @@ public class TableView implements Serializable {
|
|||
private String gameType;
|
||||
private int wins;
|
||||
private int freeMulligans;
|
||||
private String deckType;
|
||||
private final String deckType;
|
||||
private String tableName;
|
||||
private String controllerName;
|
||||
private String additionalInfo;
|
||||
private final String additionalInfo;
|
||||
private Date createTime;
|
||||
private TableState tableState;
|
||||
private boolean isTournament;
|
||||
|
|
|
|||
|
|
@ -73,12 +73,6 @@ public class AjaniMentorOfHeroes extends CardImpl<AjaniMentorOfHeroes> {
|
|||
new CardTypePredicate(CardType.PLANESWALKER)));
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
|
||||
}
|
||||
|
||||
public AjaniMentorOfHeroes(UUID ownerId) {
|
||||
super(ownerId, 145, "Ajani, Mentor of Heroes", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{3}{G}{W}");
|
||||
this.expansionSetCode = "JOU";
|
||||
|
|
|
|||
|
|
@ -116,37 +116,40 @@ class GodsendTriggeredAbility extends TriggeredAbilityImpl<GodsendTriggeredAbili
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType().equals(GameEvent.EventType.DECLARED_BLOCKERS)) {
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield((this.getSourceId()));
|
||||
if (sourcePermanent != null) {
|
||||
possibleTargets.clear();
|
||||
if (sourcePermanent.isAttacking()) {
|
||||
for (CombatGroup group: game.getCombat().getBlockingGroups()) {
|
||||
if (group.getAttackers().contains(this.getSourceId())) {
|
||||
possibleTargets.addAll(group.getBlockers());
|
||||
Permanent equipment = game.getPermanentOrLKIBattlefield((this.getSourceId()));
|
||||
if (equipment != null && equipment.getAttachedTo()!= null) {
|
||||
Permanent equippedPermanent = game.getPermanentOrLKIBattlefield((this.getSourceId()));
|
||||
if (equippedPermanent != null) {
|
||||
possibleTargets.clear();
|
||||
if (equippedPermanent.isAttacking()) {
|
||||
for (CombatGroup group: game.getCombat().getBlockingGroups()) {
|
||||
if (group.getAttackers().contains(this.getSourceId())) {
|
||||
possibleTargets.addAll(group.getBlockers());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (sourcePermanent.getBlocking() > 0) {
|
||||
for (CombatGroup group: game.getCombat().getBlockingGroups()) {
|
||||
if (group.getBlockers().contains(this.getSourceId())) {
|
||||
possibleTargets.addAll(group.getAttackers());
|
||||
if (equippedPermanent.getBlocking() > 0) {
|
||||
for (CombatGroup group: game.getCombat().getBlockingGroups()) {
|
||||
if (group.getBlockers().contains(this.getSourceId())) {
|
||||
possibleTargets.addAll(group.getAttackers());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (possibleTargets.size() > 0) {
|
||||
if (possibleTargets.size() == 1) {
|
||||
this.getTargets().clear();
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(possibleTargets.iterator().next()));
|
||||
} else {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("one blocking or blocked creature");
|
||||
List<PermanentIdPredicate> uuidPredicates = new ArrayList<>();
|
||||
for (UUID creatureId : possibleTargets) {
|
||||
uuidPredicates.add(new PermanentIdPredicate(creatureId));
|
||||
if (possibleTargets.size() > 0) {
|
||||
if (possibleTargets.size() == 1) {
|
||||
this.getTargets().clear();
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(possibleTargets.iterator().next()));
|
||||
} else {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("one blocking or blocked creature");
|
||||
List<PermanentIdPredicate> uuidPredicates = new ArrayList<>();
|
||||
for (UUID creatureId : possibleTargets) {
|
||||
uuidPredicates.add(new PermanentIdPredicate(creatureId));
|
||||
}
|
||||
filter.add(Predicates.or(uuidPredicates));
|
||||
this.getTargets().add(new TargetCreaturePermanent(filter, true));
|
||||
}
|
||||
filter.add(Predicates.or(uuidPredicates));
|
||||
this.getTargets().add(new TargetCreaturePermanent(filter, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.journeyintonyx;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.abilityword.ConstellationAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class StrengthOfTheFallen extends CardImpl<StrengthOfTheFallen> {
|
||||
|
||||
public StrengthOfTheFallen(UUID ownerId) {
|
||||
super(ownerId, 143, "Strength of the Fallen", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
this.expansionSetCode = "JOU";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Constellation - Whenever Strength of the Fallen or another entchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard.
|
||||
DynamicValue xValue = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards"));
|
||||
Ability ability = new ConstellationAbility(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true));
|
||||
ability.addTarget(new TargetCreaturePermanent(true));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public StrengthOfTheFallen(final StrengthOfTheFallen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrengthOfTheFallen copy() {
|
||||
return new StrengthOfTheFallen(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -23225,4 +23225,5 @@ Font of Ire|Journey into Nyx|97|C|{1}{R}|Enchantment|||{3}{R}, Sacrifice Font of
|
|||
Font of Fortunes|Journey into Nyx|38|C|{1}{U}|Enchantment|||{1}{U}, Sacrifice Font of Fortunes: Draw two cards.|
|
||||
Font of Return|Journey into Nyx|71|C|{1}{B}|Enchantment|||{3}{B}, Sacrifice Font of Return: Return up to three target creature cards from your graveyard to your hand.|
|
||||
Golden Hind|Journey into Nyx|124|C|{1}{G}|Creature - Elk|2|1|T: Add {G} to your mana pool.|
|
||||
Harness by Force|Journey into Nyx|100|R|{1}{R}{R}|Sorcery|||Strive - Harness by Force costs 2R more to cast for each target beyond the first.$Gain control of any number of target creatures until end of turn. Untap those creatures. They gain haste until end of turn.|
|
||||
Harness by Force|Journey into Nyx|100|R|{1}{R}{R}|Sorcery|||Strive - Harness by Force costs 2R more to cast for each target beyond the first.$Gain control of any number of target creatures until end of turn. Untap those creatures. They gain haste until end of turn.|
|
||||
Strength of the Fallen|Journey into Nyx|143|U|{1}{G}|Enchantment|||Constellation - Whenever Strength of the Fallen or another entchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard.|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue