mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Use 'addAll' instead of for-loop in getCardRulesWithAdditionalInfo (#8963)
This commit is contained in:
parent
5e26066b24
commit
705816ead1
1 changed files with 2 additions and 4 deletions
|
@ -1099,7 +1099,7 @@ public final class CardUtil {
|
||||||
* Prepare rules list from abilities
|
* Prepare rules list from abilities
|
||||||
*
|
*
|
||||||
* @param rulesSource abilities list to show as rules
|
* @param rulesSource abilities list to show as rules
|
||||||
* @param hintsSource abilities list to show as card hints only (you can add additional hints here; exameple: from second or transformed side)
|
* @param hintsSource abilities list to show as card hints only (you can add additional hints here; example: from second or transformed side)
|
||||||
*/
|
*/
|
||||||
public static List<String> getCardRulesWithAdditionalInfo(Game game, UUID cardId, String cardName,
|
public static List<String> getCardRulesWithAdditionalInfo(Game game, UUID cardId, String cardName,
|
||||||
Abilities<Ability> rulesSource, Abilities<Ability> hintsSource) {
|
Abilities<Ability> rulesSource, Abilities<Ability> hintsSource) {
|
||||||
|
@ -1109,9 +1109,7 @@ public final class CardUtil {
|
||||||
if (game != null) {
|
if (game != null) {
|
||||||
|
|
||||||
// debug state
|
// debug state
|
||||||
for (String data : game.getState().getCardState(cardId).getInfo().values()) {
|
rules.addAll(game.getState().getCardState(cardId).getInfo().values());
|
||||||
rules.add(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ability hints
|
// ability hints
|
||||||
List<String> abilityHints = new ArrayList<>();
|
List<String> abilityHints = new ArrayList<>();
|
||||||
|
|
Loading…
Reference in a new issue