mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Merge branch 'y22_angel' into 'master'
Y22: Angel of Eternal Dawn and support See merge request core-developers/forge!5939
This commit is contained in:
@@ -27,6 +27,7 @@ public enum GlobalRuleChange {
|
||||
manaBurn ("A player losing unspent mana causes that player to lose that much life."),
|
||||
noCreatureETBTriggers ("Creatures entering the battlefield don't cause abilities to trigger."),
|
||||
noCreatureDyingTriggers ("Creatures dying don't cause abilities to trigger."),
|
||||
noNight ("It can't become night."),
|
||||
noLegendRule ("The legend rule doesn't apply."),
|
||||
/* onlyOneAttackerATurn ("No more than one creature can attack each turn."), */
|
||||
onlyOneAttackerACombat ("No more than one creature can attack each combat."),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package forge.game.ability.effects;
|
||||
|
||||
import forge.game.Game;
|
||||
import forge.game.GlobalRuleChange;
|
||||
import forge.game.ability.SpellAbilityEffect;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
@@ -18,16 +19,17 @@ public class DayTimeEffect extends SpellAbilityEffect {
|
||||
public void resolve(SpellAbility sa) {
|
||||
Card host = sa.getHostCard();
|
||||
Game game = host.getGame();
|
||||
boolean cantBeNight = game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noNight);
|
||||
|
||||
String newValue = sa.getParam("Value");
|
||||
if (newValue.equals("Day")) {
|
||||
game.setDayTime(false);
|
||||
} else if (newValue.equals("Night")) {
|
||||
} else if (newValue.equals("Night") && !cantBeNight) {
|
||||
game.setDayTime(true);
|
||||
} else if (newValue.equals("Switch")) {
|
||||
// logic for the Celestus
|
||||
Boolean oldValue = game.getDayTime();
|
||||
if (oldValue == null) {
|
||||
if (oldValue == null && !cantBeNight) {
|
||||
game.setDayTime(true); // if it was neither it becomes night
|
||||
} else {
|
||||
game.setDayTime(!oldValue);
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.google.common.collect.Maps;
|
||||
|
||||
import forge.card.CardType;
|
||||
import forge.game.Game;
|
||||
import forge.game.GlobalRuleChange;
|
||||
import forge.game.ability.ApiType;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardCollection;
|
||||
@@ -291,8 +292,9 @@ public class Untap extends Phase {
|
||||
}
|
||||
final Game game = previous.getGame();
|
||||
List<Card> casted = game.getStack().getSpellsCastLastTurn();
|
||||
boolean cantBeNight = game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noNight);
|
||||
|
||||
if (game.isDay() && !Iterables.any(casted, CardPredicates.isController(previous))) {
|
||||
if (game.isDay() && !cantBeNight && !Iterables.any(casted, CardPredicates.isController(previous))) {
|
||||
game.setDayTime(true);
|
||||
} else if (game.isNight() && Iterables.size(Iterables.filter(casted, CardPredicates.isController(previous))) > 1) {
|
||||
game.setDayTime(false);
|
||||
|
||||
@@ -125,10 +125,15 @@ public class StaticAbilityCantBeCast {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stAb.hasParam("cmcGT") && (activator != null)
|
||||
&& (card.getCMC() <= CardLists.getType(activator.getCardsIn(ZoneType.Battlefield),
|
||||
stAb.getParam("cmcGT")).size())) {
|
||||
return false;
|
||||
if (stAb.hasParam("cmcGT") && (activator != null)) {
|
||||
if (stAb.getParam("cmcGT").equals("Turns")) {
|
||||
if (card.getCMC() <= activator.getTurn()) {
|
||||
return false;
|
||||
}
|
||||
} else if (card.getCMC() <= CardLists.getType(activator.getCardsIn(ZoneType.Battlefield),
|
||||
stAb.getParam("cmcGT")).size()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (stAb.hasParam("NumLimitEachTurn") && activator != null) {
|
||||
|
||||
10
forge-gui/res/cardsfolder/upcoming/angel_of_eternal_dawn.txt
Normal file
10
forge-gui/res/cardsfolder/upcoming/angel_of_eternal_dawn.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Angel of Eternal Dawn
|
||||
ManaCost:2 W
|
||||
Types:Creature Angel
|
||||
PT:2/4
|
||||
K:Flying
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigDay | TriggerDescription$ When CARDNAME enters the battlefield, it becomes day.
|
||||
SVar:TrigDay:DB$ DayTime | Value$ Day
|
||||
S:Mode$ Continuous | GlobalRule$ It can't become night. | Description$ It can't become night.
|
||||
S:Mode$ CantBeCast | ValidCard$ Card | cmcGT$ Turns | Caster$ Opponent | Description$ Your opponents can't cast spells with mana value greater than the number of turns they have begun.
|
||||
Oracle:Flying\nWhen Angel of Eternal Dawn enters the battlefield, it becomes day.\nIt can't become night.\nYour opponents can't cast spells with mana value greater than the number of turns they have begun.
|
||||
Reference in New Issue
Block a user