forked from External/mage
* Some more fixed/reworked card movement handling.
This commit is contained in:
parent
d07209c33b
commit
dcd3e7c039
34 changed files with 253 additions and 436 deletions
|
|
@ -51,6 +51,9 @@ public final class CardUtil {
|
|||
static final String[] numberStrings = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
|
||||
"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty"};
|
||||
|
||||
static final String[] ordinalStrings = {"first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eightth", "ninth",
|
||||
"tenth", "eleventh", "twelfth", "thirteenth", "fourteenth", "fifteenth", "sixteenth", "seventeenth", "eighteenth", "nineteenth", "twentieth"};
|
||||
|
||||
/**
|
||||
* Increase spell or ability cost to be paid.
|
||||
*
|
||||
|
|
@ -363,6 +366,13 @@ public final class CardUtil {
|
|||
return number;
|
||||
}
|
||||
|
||||
public static String numberToOrdinalText(int number) {
|
||||
if (number >= 1 && number < 21) {
|
||||
return ordinalStrings[number - 1];
|
||||
}
|
||||
return Integer.toString(number) + "th";
|
||||
}
|
||||
|
||||
public static String replaceSourceName(String message, String sourceName) {
|
||||
message = message.replace("{this}", sourceName);
|
||||
message = message.replace("{source}", sourceName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue