New developer - trivial grammar bugfix patch inline
Hey guys. I just found Forge last week and have found a few bugs. I figured I should try to fix them. I read the new developer page, which said to click the box to ask for dev permissions, and got an email from Sloth telling me to post a patch here. So here's a simple one for an annoying little grammar nit (sorry if the forum software mangles whitespace):
$ svn diff
Index: src/main/java/forge/game/player/PlayerControllerHuman.java
===================================================================
--- src/main/java/forge/game/player/PlayerControllerHuman.java (revision 23110)
+++ src/main/java/forge/game/player/PlayerControllerHuman.java (working copy)
@@ -415,7 +415,11 @@
}
InputSelectCards inp = new InputSelectCardsFromList(min, max, valid);
- inp.setMessage(sa.hasParam("AnyNumber") ? "Discard up to %d cards" : "Discard %d cards");
+ if (max == 1) {
+ inp.setMessage(sa.hasParam("AnyNumber") ? "Discard up to %d card" : "Discard %d card");
+ } else {
+ inp.setMessage(sa.hasParam("AnyNumber") ? "Discard up to %d cards" : "Discard %d cards");
+ }
Singletons.getControl().getInputQueue().setInputAndWait(inp);
return inp.getSelected();
}
I currently have no ideas for big changes. Just a few little ones:
1. Fix bugs.
a. I reported a crash (a ConcurrentModificationException) in the forum. I'll try to hunt it down.
b. I also saw a crash (NullPointerException) but the forum software thought my traceback looked "too spammy for a new user" and wouldn't let me post it. I'll try to fix that one too.
c. The AI plays Seal of Fire poorly. I'd like it to be a bit more patient rather than chucking it at the player to reduce him from 20 life to 18.
2. Add a preferences checkbox to make foil effects optional. (Foil effects make the cards hard to read on my machine.)
$ svn diff
Index: src/main/java/forge/game/player/PlayerControllerHuman.java
===================================================================
--- src/main/java/forge/game/player/PlayerControllerHuman.java (revision 23110)
+++ src/main/java/forge/game/player/PlayerControllerHuman.java (working copy)
@@ -415,7 +415,11 @@
}
InputSelectCards inp = new InputSelectCardsFromList(min, max, valid);
- inp.setMessage(sa.hasParam("AnyNumber") ? "Discard up to %d cards" : "Discard %d cards");
+ if (max == 1) {
+ inp.setMessage(sa.hasParam("AnyNumber") ? "Discard up to %d card" : "Discard %d card");
+ } else {
+ inp.setMessage(sa.hasParam("AnyNumber") ? "Discard up to %d cards" : "Discard %d cards");
+ }
Singletons.getControl().getInputQueue().setInputAndWait(inp);
return inp.getSelected();
}
I currently have no ideas for big changes. Just a few little ones:
1. Fix bugs.
a. I reported a crash (a ConcurrentModificationException) in the forum. I'll try to hunt it down.
b. I also saw a crash (NullPointerException) but the forum software thought my traceback looked "too spammy for a new user" and wouldn't let me post it. I'll try to fix that one too.
c. The AI plays Seal of Fire poorly. I'd like it to be a bit more patient rather than chucking it at the player to reduce him from 20 life to 18.
2. Add a preferences checkbox to make foil effects optional. (Foil effects make the cards hard to read on my machine.)
which may be the cause of
) -