mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +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."),
|
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."),
|
noCreatureETBTriggers ("Creatures entering the battlefield don't cause abilities to trigger."),
|
||||||
noCreatureDyingTriggers ("Creatures dying 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."),
|
noLegendRule ("The legend rule doesn't apply."),
|
||||||
/* onlyOneAttackerATurn ("No more than one creature can attack each turn."), */
|
/* onlyOneAttackerATurn ("No more than one creature can attack each turn."), */
|
||||||
onlyOneAttackerACombat ("No more than one creature can attack each combat."),
|
onlyOneAttackerACombat ("No more than one creature can attack each combat."),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package forge.game.ability.effects;
|
package forge.game.ability.effects;
|
||||||
|
|
||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
|
import forge.game.GlobalRuleChange;
|
||||||
import forge.game.ability.SpellAbilityEffect;
|
import forge.game.ability.SpellAbilityEffect;
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
@@ -18,16 +19,17 @@ public class DayTimeEffect extends SpellAbilityEffect {
|
|||||||
public void resolve(SpellAbility sa) {
|
public void resolve(SpellAbility sa) {
|
||||||
Card host = sa.getHostCard();
|
Card host = sa.getHostCard();
|
||||||
Game game = host.getGame();
|
Game game = host.getGame();
|
||||||
|
boolean cantBeNight = game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noNight);
|
||||||
|
|
||||||
String newValue = sa.getParam("Value");
|
String newValue = sa.getParam("Value");
|
||||||
if (newValue.equals("Day")) {
|
if (newValue.equals("Day")) {
|
||||||
game.setDayTime(false);
|
game.setDayTime(false);
|
||||||
} else if (newValue.equals("Night")) {
|
} else if (newValue.equals("Night") && !cantBeNight) {
|
||||||
game.setDayTime(true);
|
game.setDayTime(true);
|
||||||
} else if (newValue.equals("Switch")) {
|
} else if (newValue.equals("Switch")) {
|
||||||
// logic for the Celestus
|
// logic for the Celestus
|
||||||
Boolean oldValue = game.getDayTime();
|
Boolean oldValue = game.getDayTime();
|
||||||
if (oldValue == null) {
|
if (oldValue == null && !cantBeNight) {
|
||||||
game.setDayTime(true); // if it was neither it becomes night
|
game.setDayTime(true); // if it was neither it becomes night
|
||||||
} else {
|
} else {
|
||||||
game.setDayTime(!oldValue);
|
game.setDayTime(!oldValue);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import com.google.common.collect.Maps;
|
|||||||
|
|
||||||
import forge.card.CardType;
|
import forge.card.CardType;
|
||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
|
import forge.game.GlobalRuleChange;
|
||||||
import forge.game.ability.ApiType;
|
import forge.game.ability.ApiType;
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.card.CardCollection;
|
import forge.game.card.CardCollection;
|
||||||
@@ -291,8 +292,9 @@ public class Untap extends Phase {
|
|||||||
}
|
}
|
||||||
final Game game = previous.getGame();
|
final Game game = previous.getGame();
|
||||||
List<Card> casted = game.getStack().getSpellsCastLastTurn();
|
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);
|
game.setDayTime(true);
|
||||||
} else if (game.isNight() && Iterables.size(Iterables.filter(casted, CardPredicates.isController(previous))) > 1) {
|
} else if (game.isNight() && Iterables.size(Iterables.filter(casted, CardPredicates.isController(previous))) > 1) {
|
||||||
game.setDayTime(false);
|
game.setDayTime(false);
|
||||||
|
|||||||
@@ -125,11 +125,16 @@ public class StaticAbilityCantBeCast {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stAb.hasParam("cmcGT") && (activator != null)
|
if (stAb.hasParam("cmcGT") && (activator != null)) {
|
||||||
&& (card.getCMC() <= CardLists.getType(activator.getCardsIn(ZoneType.Battlefield),
|
if (stAb.getParam("cmcGT").equals("Turns")) {
|
||||||
stAb.getParam("cmcGT")).size())) {
|
if (card.getCMC() <= activator.getTurn()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else if (card.getCMC() <= CardLists.getType(activator.getCardsIn(ZoneType.Battlefield),
|
||||||
|
stAb.getParam("cmcGT")).size()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (stAb.hasParam("NumLimitEachTurn") && activator != null) {
|
if (stAb.hasParam("NumLimitEachTurn") && activator != null) {
|
||||||
int limit = Integer.parseInt(stAb.getParam("NumLimitEachTurn"));
|
int limit = Integer.parseInt(stAb.getParam("NumLimitEachTurn"));
|
||||||
|
|||||||
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