spellToString. @param bFlag a boolean. @return a java.lang.String object.
(final boolean bFlag)
| 802 | * @return a {@link java.lang.String} object. |
| 803 | */ |
| 804 | private String spellToString(final boolean bFlag) { |
| 805 | final StringBuilder cost = new StringBuilder(); |
| 806 | boolean first = true; |
| 807 | |
| 808 | if (bFlag) { |
| 809 | cost.append("As an additional cost to cast this spell, "); |
| 810 | } else { |
| 811 | // usually no additional mana cost for spells |
| 812 | // only three Alliances cards have additional mana costs, but they |
| 813 | // are basically kicker/multikicker |
| 814 | /* |
| 815 | * if (!getTotalMana().equals("0")) { |
| 816 | * cost.append("pay ").append(getTotalMana()); first = false; } |
| 817 | */ |
| 818 | } |
| 819 | |
| 820 | for (final CostPart part : this.costParts) { |
| 821 | if (part instanceof CostPartMana) { |
| 822 | continue; |
| 823 | } |
| 824 | if (!first) { |
| 825 | cost.append(" and "); |
| 826 | } |
| 827 | if (bFlag) { |
| 828 | cost.append(StringUtils.uncapitalize(part.toString())); |
| 829 | } else { |
| 830 | cost.append(part.toString()); |
| 831 | } |
| 832 | first = false; |
| 833 | } |
| 834 | |
| 835 | if (first) { |
| 836 | return ""; |
| 837 | } |
| 838 | |
| 839 | if (bFlag) { |
| 840 | cost.append(".").append("\n"); |
| 841 | } |
| 842 | |
| 843 | return cost.toString(); |
| 844 | } |
| 845 | |
| 846 | /** |
| 847 | * <p> |
no test coverage detected