mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Applying some code review comments
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package forge.card;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import forge.card.mana.ManaCost;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -47,7 +46,7 @@ final class CardFace implements ICardFace, Cloneable {
|
||||
private List<String> abilities = null;
|
||||
private List<String> staticAbilities = null;
|
||||
private List<String> triggers = null;
|
||||
private List<String> draftActions = Lists.newArrayList();
|
||||
private List<String> draftActions = null;
|
||||
private List<String> replacements = null;
|
||||
private Map<String, String> variables = null;
|
||||
|
||||
|
||||
@@ -370,7 +370,9 @@ public class CardFactory {
|
||||
|
||||
// keywords not before variables
|
||||
c.addIntrinsicKeywords(face.getKeywords(), false);
|
||||
face.getDraftActions().forEach(c::addDraftAction);
|
||||
if (face.getDraftActions() != null) {
|
||||
face.getDraftActions().forEach(c::addDraftAction);
|
||||
}
|
||||
|
||||
c.setManaCost(face.getManaCost());
|
||||
c.setText(face.getNonAbilityText());
|
||||
|
||||
@@ -2098,7 +2098,8 @@ public class CardProperty {
|
||||
}
|
||||
return false;
|
||||
} else if (property.equals("NotedColor")) {
|
||||
String colors = sourceController.getDraftNotes().get(spellAbility.getHostCard().getName());
|
||||
// Should Regicide be hardcoded here or part of the property?
|
||||
String colors = sourceController.getDraftNotes().get("Regicide");
|
||||
if (colors == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -2108,13 +2109,15 @@ public class CardProperty {
|
||||
(colors.contains("red") && card.getColor().hasRed()) ||
|
||||
(colors.contains("green") && card.getColor().hasGreen());
|
||||
} else if (property.equals("NotedName")) {
|
||||
String names = sourceController.getDraftNotes().get(spellAbility.getHostCard().getName());
|
||||
// Should Noble Banneret be hardcoded here or part of the property?
|
||||
String names = sourceController.getDraftNotes().get("Noble Banneret");
|
||||
if (names == null || names.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return names.contains(card.getName());
|
||||
} else if (property.equals("NotedTypes")) {
|
||||
String types = sourceController.getDraftNotes().get(spellAbility.getHostCard().getName());
|
||||
// Should Paliano Vanguard be hardcoded here or part of the property?
|
||||
String types = sourceController.getDraftNotes().get("Paliano Vanguard");
|
||||
if (types == null || types.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -522,9 +522,6 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
return getComboColors(sa);
|
||||
}
|
||||
String produced = this.getOrigProduced();
|
||||
if (produced.contains("NotedColor")) {
|
||||
produced = produced.replace("NotedColor", sa.getActivatingPlayer().getDraftNotes().get(""));
|
||||
}
|
||||
if (produced.contains("Chosen")) {
|
||||
produced = produced.replace("Chosen", this.getChosenColor(sa));
|
||||
}
|
||||
@@ -665,11 +662,12 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
origProduced = origProduced.replace("Chosen", getChosenColor(sa));
|
||||
}
|
||||
if (origProduced.contains("NotedColors")) {
|
||||
// Should only be used for Paliano, the High City
|
||||
if (sa.getActivatingPlayer() == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String colors = sa.getActivatingPlayer().getDraftNotes().get(sa.getHostCard().getName());
|
||||
String colors = sa.getActivatingPlayer().getDraftNotes().get("Paliano, the High City");
|
||||
if (colors == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ Types:Legendary Land
|
||||
Draft:Reveal CARDNAME as you draft it.
|
||||
Draft:As you draft CARDNAME, the player to your right chooses a color, you choose another color, then the player to your left chooses a third color.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo NotedColors | Condition$ Add one mana of any color chosen as you drafted cards named CARDNAME. | SpellDescription$ Add one mana of any color chosen as you drafted cards named Paliano, the High City.
|
||||
Oracle:Reveal CARDNAME as you draft it. As you draft CARDNAME, the player to your right chooses a color, you choose another color, then the player to your left chooses a third color.\n{T}: Add one mana of any color chosen as you drafted cards named Paliano, the High City.
|
||||
Oracle:Reveal Paliano, the High City as you draft it. As you draft Paliano, the High City, the player to your right chooses a color, you choose another color, then the player to your left chooses a third color.\n{T}: Add one mana of any color chosen as you drafted cards named Paliano, the High City.
|
||||
|
||||
|
||||
|
||||
@@ -251,6 +251,7 @@ Natural Unity
|
||||
Noble Banneret
|
||||
Paliano Vanguard
|
||||
Pyretic Hunter
|
||||
Regicide
|
||||
Sovereign's Realm
|
||||
Summoner's Bond
|
||||
Weight Advantage
|
||||
|
||||
@@ -159,9 +159,6 @@ public class LimitedPlayer {
|
||||
showRevealedCard(bestPick);
|
||||
}
|
||||
|
||||
// TODO Paliano Vanguard
|
||||
// As you draft a VALID, you may Note its [name/type/], and turn this face down
|
||||
|
||||
if (Iterables.contains(draftActions, "As you draft a card, you may remove it from the draft face up. (It isn’t in your card pool.)")) {
|
||||
// Animus of Predation
|
||||
playerFlags |= AnimusRemoveFromPool;
|
||||
|
||||
Reference in New Issue
Block a user