Merge remote-tracking branch 'remotes/core/master'

This commit is contained in:
Anthony Calosa
2021-09-05 03:54:01 +08:00
24 changed files with 74 additions and 25 deletions

View File

@@ -67,7 +67,7 @@ public final class CardRules implements ICardCharacteristics {
}
void reinitializeFromRules(CardRules newRules) {
if(!newRules.getName().equals(this.getName()))
if (!newRules.getName().equals(this.getName()))
throw new UnsupportedOperationException("You cannot rename the card using the same CardRules object");
splitType = newRules.splitType;
@@ -91,7 +91,7 @@ public final class CardRules implements ICardCharacteristics {
}
}
int len = oracleText.length();
for(int i = 0; i < len; i++) {
for (int i = 0; i < len; i++) {
char c = oracleText.charAt(i); // This is to avoid needless allocations performed by toCharArray()
switch(c) {
case('('): isReminder = i > 0; break; // if oracle has only reminder, consider it valid rules (basic and true lands need this)
@@ -99,7 +99,7 @@ public final class CardRules implements ICardCharacteristics {
case('{'): isSymbol = true; break;
case('}'): isSymbol = false; break;
default:
if(isSymbol && !isReminder) {
if (isSymbol && !isReminder) {
switch(c) {
case('W'): res |= MagicColor.WHITE; break;
case('U'): res |= MagicColor.BLUE; break;
@@ -317,7 +317,7 @@ public final class CardRules implements ICardCharacteristics {
/** Instantiates class, reads a card. For batch operations better create you own reader instance. */
public static CardRules fromScript(Iterable<String> script) {
Reader crr = new Reader();
for(String line : script) {
for (String line : script) {
crr.parseLine(line);
}
return crr.getCard();

View File

@@ -270,7 +270,6 @@ public final class CardRulesPredicates {
return new PredicateSuperType(type, isEqual);
}
/**
* Checks for color.
*

View File

@@ -122,7 +122,7 @@ public class PaperToken implements InventoryItemFromSet, IPaperCard {
String formatEdition = null == edition || CardEdition.UNKNOWN == edition ? "" : "_" + edition.getCode().toLowerCase();
this.imageFileName.add(String.format("%s%s", imageFileName, formatEdition));
for(int idx = 2; idx <= this.artIndex; idx++) {
for (int idx = 2; idx <= this.artIndex; idx++) {
this.imageFileName.add(String.format("%s%d%s", imageFileName, idx, formatEdition));
}
}

View File

@@ -40,7 +40,7 @@ public class TokenDb implements ITokenDatabase {
}
public void preloadTokens() {
for(CardEdition edition : this.editions) {
for (CardEdition edition : this.editions) {
for (String name : edition.getTokens().keySet()) {
try {
getToken(name, edition.getCode());

View File

@@ -166,7 +166,6 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect {
Map<AbilityKey, Object> moveParams = Maps.newEnumMap(AbilityKey.class);
if (destination == ZoneType.Battlefield) {
if (sa.hasAdditionalAbility("AnimateSubAbility")) {
// need LKI before Animate does apply
moveParams.put(AbilityKey.CardLKI, CardUtil.getLKICopy(c));

View File

@@ -1,6 +1,5 @@
package forge.game.ability.effects;
import java.util.List;
import forge.game.ability.AbilityUtils;
@@ -40,7 +39,7 @@ public class LifeGainEffect extends SpellAbilityEffect {
final int lifeAmount = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("LifeAmount"), sa);
List<Player> tgtPlayers = getDefinedPlayersOrTargeted(sa);
if( tgtPlayers.isEmpty() ) {
if (tgtPlayers.isEmpty()) {
tgtPlayers.add(sa.getActivatingPlayer());
}

View File

@@ -89,7 +89,6 @@ public class TokenCreateTable extends ForwardingTable<Player, Card, Integer> {
result += c.getValue();
}
return result;
}
}

View File

@@ -152,7 +152,7 @@ public class TokenInfo {
}
static protected void protoTypeApplyTextChange(final Card result, final SpellAbility sa) {
// update Token with CardTextChanges
// update Token with CardTextChanges
Map<String, String> colorMap = sa.getChangedTextColors();
Map<String, String> typeMap = sa.getChangedTextTypes();
if (!colorMap.isEmpty()) {

View File

@@ -4,6 +4,6 @@ Types:Land
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
A:AB$ Mana | Cost$ T | Produced$ W | SubAbility$ DBPain | SpellDescription$ Add {W}. CARDNAME deals 1 damage to you.
A:AB$ Mana | Cost$ T | Produced$ G | SubAbility$ DBPain | SpellDescription$ Add {G}. CARDNAME deals 1 damage to you.
SVar:DBPain:DB$DealDamage | NumDmg$ 1 | Defined$ You
SVar:DBPain:DB$ DealDamage | NumDmg$ 1 | Defined$ You
SVar:Picture:http://www.wizards.com/global/images/magic/general/brushland.jpg
Oracle:{T}: Add {C}.\n{T}: Add {G} or {W}. Brushland deals 1 damage to you.

View File

@@ -2,7 +2,7 @@ Name:Chrome Mox
ManaCost:0
Types:Artifact
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint — When CARDNAME enters the battlefield, you may exile a nonartifact, nonland card from your hand.
SVar:TrigExile:DB$ChangeZone | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Card.nonArtifact+nonLand | ChangeNum$ 1
SVar:TrigExile:DB$ ChangeZone | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Card.nonArtifact+nonLand | ChangeNum$ 1
A:AB$ ManaReflected | Cost$ T | Valid$ Defined.Imprinted | ColorOrType$ Color | ReflectProperty$ Is | SpellDescription$ Add one mana of any of the exiled card's colors.
T:Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self | Destination$ Any | Execute$ DBCleanup | Static$ True
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsImprinted+ExiledWithSource | Execute$ DBForget

View File

@@ -3,6 +3,6 @@ ManaCost:no cost
Types:Land
A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 1 | SpellDescription$ Add one mana of any color.
T:Mode$ Taps | ValidCard$ Card.Self | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME becomes tapped, it deals 1 damage to you.
SVar:TrigDamage:DB$DealDamage | Defined$ You | NumDmg$ 1
SVar:TrigDamage:DB$ DealDamage | Defined$ You | NumDmg$ 1
SVar:Picture:http://www.wizards.com/global/images/magic/general/city_of_brass.jpg
Oracle:Whenever City of Brass becomes tapped, it deals 1 damage to you.\n{T}: Add one mana of any color.

View File

@@ -6,7 +6,7 @@ A:AB$ ChangeZoneAll | Cost$ Sac<1/CARDNAME> | ChangeType$ Card.Creature+IsRememb
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:NonStackingEffect:True
AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/cold_storage.jpg

View File

@@ -5,6 +5,6 @@ A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
A:AB$ Mana | Cost$ T | Produced$ U | SubAbility$ DBPain | SpellDescription$ Add {U}. CARDNAME deals 1 damage to you.
A:AB$ Mana | Cost$ T | Produced$ G | SubAbility$ DBPain | SpellDescription$ Add {G}. CARDNAME deals 1 damage to you.
K:CARDNAME enters the battlefield tapped.
SVar:DBPain:DB$DealDamage | NumDmg$ 1 | Defined$ You
SVar:DBPain:DB$ DealDamage | NumDmg$ 1 | Defined$ You
SVar:Picture:http://www.wizards.com/global/images/magic/general/skyshroud_forest.jpg
Oracle:Skyshroud Forest enters the battlefield tapped.\n{T}: Add {C}.\n{T}: Add {G} or {U}. Skyshroud Forest deals 1 damage to you.

View File

@@ -0,0 +1,7 @@
Name:Avacyn's Memorial
ManaCost:5 W W W
Types:Legendary Artifact
K:Indestructible
S:Mode$ Continuous | Affected$ Permanent.Other+YouCtrl+Legendary | AddKeyword$ Indestructible | Description$ Other legendary permanents you control have indestructible.
DeckNeeds:Type$Legendary
Oracle:Indestructible\nOther legendary permanents you control have indestructible.

View File

@@ -0,0 +1,8 @@
Name:Candlelit Cavalry
ManaCost:4 G
Types:Creature Human Knight
PT:5/5
T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ GE3 | Execute$ TrigPump | TriggerDescription$ Coven At the beginning of combat on your turn, if you control three or more creatures with different powers, CARDNAME gains trample until end of turn.
SVar:TrigPump:DB$ Pump | Defined$ Self | KW$ Trample
SVar:X:Count$DifferentPower_Creature.YouCtrl
Oracle:Coven — At the beginning of combat on your turn, if you control three or more creatures with different powers, Candlelit Cavalry gains trample until end of turn.

View File

@@ -0,0 +1,8 @@
Name:Festival Crasher
ManaCost:1 R
Types:Creature Devil
PT:1/3
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you cast an instant or sorcery spell, CARDNAME gets +2/+0 until end of turn.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ 2
DeckHints:Type$Instant|Sorcery
Oracle:Whenever you cast an instant or sorcery spell, Festival Crasher gets +2/+0 until end of turn.

View File

@@ -0,0 +1,11 @@
Name:Howl of the Hunt
ManaCost:2 G
Types:Enchantment Aura
K:Flash
K:Enchant creature
A:SP$ Attach | ValidTgts$ Creature | AILogic$ Pump
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | IsPresent$ Creature.EnchantedBy+Wolf,Creature.EnchantedBy+Werewolf | PresentCompare$ EQ1 | Execute$ TrigUntap | TriggerDescription$ When CARDNAME enters the battlefield, if enchanted creature is a Wolf or Werewolf, untap that creature.
SVar:TrigUntap:DB$ Untap | Defined$ Enchanted
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 2 | AddToughness$ 2 | AddKeyword$ Vigilance | Description$ Enchanted creature gets +2/+2 and has vigilance.
DeckHints:Type$Wolf|Werewolf
Oracle:Flash\nEnchant creature\nWhen Howl of the Hunt enters the battlefield, if enchanted creature is a Wolf or Werewolf, untap that creature.\nEnchanted creature gets +2/+2 and has vigilance.

View File

@@ -0,0 +1,7 @@
Name:Might of the Old Ways
ManaCost:1 G
Types:Instant
A:SP$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ 2 | NumDef$ 2 | SubAbility$ DBDraw | SpellDescription$ Target creature gets +2/+2 until end of turn.
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 1 | ConditionCheckSVar$ X | ConditionSVarCompare$ GE3 | StackDescription$ SpellDescription | SpellDescription$ Coven — Then if you control three or more creatures with different powers, draw a card.
SVar:X:Count$DifferentPower_Creature.YouCtrl
Oracle:Target creature gets +2/+2 until end of turn.\nCoven — Then if you control three or more creatures with different powers, draw a card.

View File

@@ -0,0 +1,6 @@
Name:Pestilent Wolf
ManaCost:1 G
Types:Creature Wolf
PT:2/2
A:AB$ Pump | Cost$ 2 G | Defined$ Self | KW$ Deathtouch | SpellDescription$ CARDNAME gains deathtouch until end of turn.
Oracle:{2}{G}: Pestilent Wolf gains deathtouch until end of turn.

View File

@@ -0,0 +1,6 @@
Name:Snarling Wolf
ManaCost:G
Types:Creature Wolf
PT:1/1
A:AB$ Pump | Cost$ 1 G | Defined$ Self | NumAtt$ 2 | NumDef$ 2 | ActivationLimit$ 1 | SpellDescription$ CARDNAME gets +2/+2 until end of turn. Activate only once each turn.
Oracle:{1}{G}: Snarling Wolf gets +2/+2 until end of turn. Activate only once each turn.

View File

@@ -32,7 +32,7 @@ Name=Built from Scratch (2018)
1 Great Furnace|CM2
1 Hoard-Smelter Dragon|CM2
1 Ichor Wellspring|CM2
#1 Impact Resonance|CM2
1 Impact Resonance|CM2
1 Incite Rebellion|CM2
1 Ingot Chewer|CM2
1 Jalum Tome|CM2

View File

@@ -32,7 +32,7 @@ Name=Built from Scratch
1 Great Furnace|C14
1 Hoard-Smelter Dragon|C14
1 Ichor Wellspring|C14
#1 Impact Resonance|C14
1 Impact Resonance|C14
1 Incite Rebellion|C14
1 Ingot Chewer|C14
1 Jalum Tome|C14

View File

@@ -83,6 +83,6 @@ Name=Entropic Uprising
1 Curtains' Call|C16
1 Parting Thoughts|C16
1 Grave Upheaval|C16
#1 Cruel Entertainment|C16
1 Cruel Entertainment|C16
1 Treacherous Terrain|C16
1 Ash Barrens|C16

View File

@@ -77,7 +77,7 @@ Name=Feline Ferocity
1 Soul's Majesty|C17
1 Spirit of the Hearth|C17
1 Staff of Nin|C17
#1 Stalking Leonin|C17
1 Stalking Leonin|C17
1 Stirring Wildwood|C17
1 Sunspear Shikari|C17
1 Swiftfoot Boots|C17