mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Removing unnecessary "HIDDEN" strings (WIP).
This commit is contained in:
@@ -47,6 +47,7 @@ public class TokenEffect extends SpellEffect {
|
||||
private String[] tokenTypes;
|
||||
private String tokenName;
|
||||
private String[] tokenKeywords;
|
||||
private String[] tokenHiddenKeywords;
|
||||
|
||||
private void readParameters(final SpellAbility mapParams) {
|
||||
String image;
|
||||
@@ -59,6 +60,10 @@ public class TokenEffect extends SpellEffect {
|
||||
keywords = new String[0];
|
||||
}
|
||||
|
||||
if (mapParams.hasParam("TokenHiddenKeywords")) {
|
||||
this.tokenHiddenKeywords = mapParams.getParam("TokenHiddenKeywords").split("&");
|
||||
}
|
||||
|
||||
if (mapParams.hasParam("TokenImage")) {
|
||||
image = mapParams.getParam("TokenImage");
|
||||
} else {
|
||||
@@ -197,6 +202,15 @@ public class TokenEffect extends SpellEffect {
|
||||
final List<Card> tokens = CardFactoryUtil.makeToken(substitutedName, imageName, controller, cost,
|
||||
substitutedTypes, finalPower, finalToughness, this.tokenKeywords);
|
||||
|
||||
// Grant rule changes
|
||||
if (this.tokenHiddenKeywords != null) {
|
||||
for (final String s : this.tokenHiddenKeywords) {
|
||||
for (final Card c : tokens) {
|
||||
c.addHiddenExtrinsicKeyword(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Grant abilities
|
||||
if (this.tokenAbilities != null) {
|
||||
final AbilityFactory af = new AbilityFactory();
|
||||
|
||||
Reference in New Issue
Block a user