This commit is contained in:
Chris H
2019-02-22 19:55:26 -05:00
70 changed files with 368 additions and 978 deletions

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

3
.gitignore vendored
View File

@@ -231,3 +231,6 @@ forge-gui/tools/oracleScript.log
/release.properties /release.properties
/target /target
/test-output /test-output
.settings
.classpath
.project

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,7 +0,0 @@
add_header=true
add_todo=false
eclipse.preferences.version=1
header_text=/*\n * Forge\: Play Magic\: the Gathering.\n * Copyright (C) 2011 Forge Team\n *\n * This program is free software\: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * \n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * \n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http\://www.gnu.org/licenses/>.\n */
project_specific_settings=true
replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
visibility_private=false

View File

@@ -1,2 +0,0 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@@ -1,284 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=120
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

126
README.md
View File

@@ -9,7 +9,9 @@ Discord channel [here](https://discordapp.com/channels/267367946135928833/267742
# Requirements / Tools # Requirements / Tools
- Java IDE such as IntelliJ or Eclipse - Java IDE such as IntelliJ or Eclipse
- Java JDK 8 or later
- Git - Git
- Git client (optional)
- Maven - Maven
- Gitlab account - Gitlab account
- Libgdx (optional: familiarity with this library is helpful for mobile platform development) - Libgdx (optional: familiarity with this library is helpful for mobile platform development)
@@ -26,44 +28,130 @@ Discord channel [here](https://discordapp.com/channels/267367946135928833/267742
# Eclipse # Eclipse
Eclipse includes Maven integration so a separate install is not necessary. For other IDEs, your mileage may vary.
## Project Setup ## Project Setup
- Follow the instructions for cloning from Gitlab. You'll need a Gitlab account setup and an SSH key defined. If you are on a - Follow the instructions for cloning from Gitlab. You'll need a Gitlab account setup and an SSH key defined.
Windows machine you can use Putty with TortoiseGit. Run puttygen.exe to generate the key -- save the private key and export
If you are on a Windows machine you can use Putty with TortoiseGit for SSH keys. Run puttygen.exe to generate the key -- save the private key and export
the OpenSSH public key. If you just leave the dialog open, you can copy and paste the key from it to your Gitlab profile under the OpenSSH public key. If you just leave the dialog open, you can copy and paste the key from it to your Gitlab profile under
"SSH keys". "SSH keys". Run pageant.exe and add the private key generated earlier. TortoiseGit will use this for accessing Gitlab.
Run pageant.exe and add the private key generated earlier. TortoiseGit will use this for accessing Gitlab.
- Fork the Forge git repo to your Gitlab account. - Fork the Forge git repo to your Gitlab account.
- Clone your forked repo to your local machine. - Clone your forked repo to your local machine.
- Make sure the Java SDK is installed -- not just the JRE. Java 8 or newer required. At the time of this writing, JDK 11 works as expected. - Make sure the Java SDK is installed -- not just the JRE. Java 8 or newer required. If you execute `java -version` at the shell or command prompt, it should report version 1.8 or later.
- You need maven to load in dependencies and build. Obtain that [from here](https://maven.apache.org/download.cgi). Execute the following from the root repo dir to download dependencies, etc: - Install Eclipse 2018-12 or later for Java. Launch it.
`mvn -U -B clean -P windows-linux install` - Create a workspace. Go to the workbench. Right-click inside of Package Explorer > Import... > Maven > Existing Maven Projects > Navigate to root path of the local forge repo and
ensure everything is checked > Finish.
For the desktop, this will create a populated directory at `forge-gui-desktop/target/forge-gui-desktop-<release-name>` containing typical release files such as the jar, Windows executable, resource files, etc.
- Install Eclipse for Java. Launch it. At the time of this writing, Eclipse 2018-12 works as expected. YMMV for other versions.
- Create a workspace. Go to the workbench. Right-click inside of Package Explorer > Import... > General > Existing Projects into Workspace > Navigate to local forge repo >
Check "Search for nested projects" > Uncheck 'forge', check the rest > Finish.
- Let Eclipse run through building the project. - Let Eclipse run through building the project. You may be prompted for resolving any missing Maven plugins -- accept the ones offered. You may see errors appear in the "Problems" tab. These should
be automatically resolved as plug-ins are installed and Eclipse continues the build process. If this is the first time for some plug-in installs, Eclipse may prompt you to restart. Do so. Be patient
for this first time through.
- Once everything builds, all errors should disappear. You can now advance to Project launch.
## Project Launch ## Project Launch
### Desktop ### Desktop
- Right-click on forge-gui-desktop > Run As... > Java Application > "Main - forge.view" > Proceed This is the standard configuration used for releasing to Windows / Linux / MacOS.
- Right-click on forge-gui-desktop > Run As... > Java Application > "Main - forge.view" > Ok
- The familiar Forge splash screen, etc. should appear. Enjoy!
### Mobile (Desktop dev) ### Mobile (Desktop dev)
- Right-click on forge-gui-mobile-dev > Run As... > Java Application > "Main - forge.app" > Proceed This is the configuration used for doing mobile development using the Windows / Linux / MacOS front-end. Knowledge of libgdx is helpful here.
- Right-click on forge-gui-mobile-dev > Run As... > Java Application > "Main - forge.app" > Ok.
- A view similar to a mobile phone should appear. Enjoy!
## Eclipse / Android SDK Integration
Google no longer supports Android SDK releases for Eclipse. That said, it is still possible to build and debug Android platforms.
### Android SDK
Reference SO for obtaining a specific release: https://stackoverflow.com/questions/27043522/where-can-i-download-an-older-version-of-the-android-sdk
#### Windows
Download the following archived version of the Android SDK: http://dl-ssl.google.com/android/repository/tools_r25.2.3-windows.zip. Install it somewhere on your machine. This is referenced
in the following instructions as your 'Android SDK Install' path.
#### Linux / Mac OSX
TBD
### Android Plugin for Eclipse
Google's last plugin release does not work completely with target's running Android 7.0 or later. Download the ADT-24.2.0-20160729.zip plugin
from: https://github.com/khaledev/ADT/releases
In Eclipse go to: Help > Install New Software... > Add > Name: ADT Update, Click on the "Archive:" button and navigate to the downloaded ADT-24.2.0-20160729.zip file > Add. Install all "Developer Tools". Eclipse
should restart and prompt you to run the SDK Manager. Launch it and continue to the next steps below.
### Android Platform
In Eclipse, if the SDK Manager is not already running, go to Window > Android SDK Manager. Install the following options / versions:
- Android SDK Build-tools 26.0.1
- Android 7.1.1 (API 25) SDK Platform
- Google USB Driver 11
Note that this will populate additional tools in the Android SDK install path extracted above.
### Proguard update
The Proguard included with the Android SDK Build-tools is outdated and does not work with Java 1.8. Download Proguard 6.0.3 from https://sourceforge.net/projects/proguard/files/proguard/6.0/.
- Go to the Android SDK install path. Rename the tools/proguard/ path to tools/proguard4.7/.
- Extract Proguard 6.0.3 to the Android SDK install path under tools/. You will need to rename the dir proguard6.0.3/ to proguard/.
### Android Build
The Eclipse plug-ins do NOT support building things for Android. They do however allow you to use the debugger so you can still set breakpoints and trace
things out. The steps below show how to generate a debug Android build.
Right-click on the forge-gui-android project. Run as.. > Maven build...
On the Main tab, set Goals: install, Profiles: android-debug
On the Environment tab, you may need to define the variable ANDROID_HOME with the value containing the path to your Android SDK installation.
For example, Variable: ANDROID_HOME, Value: Your Android SDK install path here.
You should now be able to "run" the forge-gui-android Maven build. This may take a few minutes. If everything worked, you should see "BUILD SUCCESS" in the Console View.
Assuming you got this far, you should have an Android forge-android-[version].apk in the forge-gui-android/target path.
### Android Deploy
You'll need to have the Android SDK install path platform-tools/ path in your command search path to easily deploy builds.
- Open a command prompt. Navigate to the forge-gui-android/target/ path.
- Connect your Android device to your dev machine.
- Ensure the device is visible using `adb devices`
- Remove the old Forge install if present: `adb uninstall forge.app`
- Install the new apk: `adb install forge-android-[version].apk`
### Android Debugging
Assuming the apk is installed, launch it from the device.
In Eclipse, launch the DDMS. Window > Perspective > Open Perspective > Other... > DDMS. You should see the forge app in the list. Highlight the app, click on the green debug button and a
green debug button should appear next to the app's name. You can now set breakpoints and step through the source code.
# IntelliJ # IntelliJ
TBD TBD

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/forge-core"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-ai</name>
<comment></comment>
<projects>
<project>forge-game</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,3 +0,0 @@
eclipse.preferences.version=1
encoding//src/main/java=ISO-8859-1
encoding/<project>=UTF-8

View File

@@ -1,5 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -233,8 +233,15 @@ public class AttachAi extends SpellAbilityAi {
boolean alternativeConsiderations = hasFloatMana || willDiscardNow || willDieNow || willRespondToStack || willCastAtEOT || willCastEarly; boolean alternativeConsiderations = hasFloatMana || willDiscardNow || willDieNow || willRespondToStack || willCastAtEOT || willCastEarly;
if (!alternativeConsiderations && (combat == null || game.getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) || (!combat.isAttacking(attachTarget) && !combat.isBlocking(attachTarget))) { if (!alternativeConsiderations) {
return false; if (combat == null ||
game.getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) {
return false;
}
if (!(combat.isAttacking(attachTarget) || combat.isBlocking(attachTarget))) {
return false;
}
} }
return true; return true;

View File

@@ -9,7 +9,10 @@ import forge.game.ability.AbilityFactory;
import forge.game.ability.AbilityUtils; import forge.game.ability.AbilityUtils;
import forge.game.ability.ApiType; import forge.game.ability.ApiType;
import forge.game.ability.effects.TokenEffect; import forge.game.ability.effects.TokenEffect;
import forge.game.card.*; import forge.game.card.Card;
import forge.game.card.CardCollection;
import forge.game.card.CardLists;
import forge.game.card.CardPredicates;
import forge.game.card.token.TokenInfo; import forge.game.card.token.TokenInfo;
import forge.game.combat.Combat; import forge.game.combat.Combat;
import forge.game.cost.CostPart; import forge.game.cost.CostPart;
@@ -340,6 +343,7 @@ public class TokenAi extends SpellAbilityAi {
@Override @Override
protected Player chooseSinglePlayer(Player ai, SpellAbility sa, Iterable<Player> options) { protected Player chooseSinglePlayer(Player ai, SpellAbility sa, Iterable<Player> options) {
// TODO: AILogic // TODO: AILogic
readParameters(sa); // remember to call this somewhere!
Combat combat = ai.getGame().getCombat(); Combat combat = ai.getGame().getCombat();
// TokenAttacking // TokenAttacking
if (combat != null && sa.hasParam("TokenAttacking")) { if (combat != null && sa.hasParam("TokenAttacking")) {
@@ -359,6 +363,7 @@ public class TokenAi extends SpellAbilityAi {
@Override @Override
protected GameEntity chooseSinglePlayerOrPlaneswalker(Player ai, SpellAbility sa, Iterable<GameEntity> options) { protected GameEntity chooseSinglePlayerOrPlaneswalker(Player ai, SpellAbility sa, Iterable<GameEntity> options) {
// TODO: AILogic // TODO: AILogic
readParameters(sa); // remember to call this somewhere!
Combat combat = ai.getGame().getCombat(); Combat combat = ai.getGame().getCombat();
// TokenAttacking // TokenAttacking
if (combat != null && sa.hasParam("TokenAttacking")) { if (combat != null && sa.hasParam("TokenAttacking")) {

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-core</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,4 +0,0 @@
eclipse.preferences.version=1
encoding//src/main/java=ISO-8859-1
encoding//src/test/java=ISO-8859-1
encoding/<project>=UTF-8

View File

@@ -1,5 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/forge-core"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-game</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,4 +0,0 @@
eclipse.preferences.version=1
encoding//src/main/java=ISO-8859-1
encoding//src/test/java=ISO-8859-1
encoding/<project>=UTF-8

View File

@@ -1,5 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -94,32 +94,13 @@ public class PumpEffect extends SpellAbilityEffect {
game.fireEvent(new GameEventCardStatsChanged(gameCard)); game.fireEvent(new GameEventCardStatsChanged(gameCard));
} }
}; };
if (sa.hasParam("UntilEndOfCombat")) { addUntilCommand(sa, untilEOT);
game.getEndOfCombat().addUntil(untilEOT);
} else if (sa.hasParam("UntilYourNextUpkeep")) {
game.getUpkeep().addUntil(sa.getActivatingPlayer(), untilEOT);
} else if (sa.hasParam("UntilHostLeavesPlay")) {
sa.getHostCard().addLeavesPlayCommand(untilEOT);
} else if (sa.hasParam("UntilHostLeavesPlayOrEOT")) {
sa.getHostCard().addLeavesPlayCommand(untilEOT);
game.getEndOfTurn().addUntil(untilEOT);
} else if (sa.hasParam("UntilLoseControlOfHost")) {
sa.getHostCard().addLeavesPlayCommand(untilEOT);
sa.getHostCard().addChangeControllerCommand(untilEOT);
} else if (sa.hasParam("UntilYourNextTurn")) {
game.getCleanup().addUntil(sa.getActivatingPlayer(), untilEOT);
} else if (sa.hasParam("UntilUntaps")) {
sa.getHostCard().addUntapCommand(untilEOT);
} else {
game.getEndOfTurn().addUntil(untilEOT);
}
} }
game.fireEvent(new GameEventCardStatsChanged(gameCard)); game.fireEvent(new GameEventCardStatsChanged(gameCard));
} }
private static void applyPump(final SpellAbility sa, final Player p, private static void applyPump(final SpellAbility sa, final Player p,
final List<String> keywords, final long timestamp) { final List<String> keywords, final long timestamp) {
final Game game = p.getGame();
final Card host = sa.getHostCard(); final Card host = sa.getHostCard();
//if host is not on the battlefield don't apply //if host is not on the battlefield don't apply
// Suspend should does Affect the Stack // Suspend should does Affect the Stack
@@ -144,16 +125,32 @@ public class PumpEffect extends SpellAbilityEffect {
} }
} }
}; };
if (sa.hasParam("UntilEndOfCombat")) { addUntilCommand(sa, untilEOT);
game.getEndOfCombat().addUntil(untilEOT); }
} else if (sa.hasParam("UntilYourNextUpkeep")) { }
game.getUpkeep().addUntil(sa.getActivatingPlayer(), untilEOT);
} else if (sa.hasParam("UntilLoseControlOfHost")) { private static void addUntilCommand(final SpellAbility sa, GameCommand untilEOT) {
sa.getHostCard().addLeavesPlayCommand(untilEOT); final Card host = sa.getHostCard();
sa.getHostCard().addChangeControllerCommand(untilEOT); final Game game = host.getGame();
} else {
game.getEndOfTurn().addUntil(untilEOT); if (sa.hasParam("UntilEndOfCombat")) {
} game.getEndOfCombat().addUntil(untilEOT);
} else if (sa.hasParam("UntilYourNextUpkeep")) {
game.getUpkeep().addUntil(sa.getActivatingPlayer(), untilEOT);
} else if (sa.hasParam("UntilHostLeavesPlay")) {
host.addLeavesPlayCommand(untilEOT);
} else if (sa.hasParam("UntilHostLeavesPlayOrEOT")) {
host.addLeavesPlayCommand(untilEOT);
game.getEndOfTurn().addUntil(untilEOT);
} else if (sa.hasParam("UntilLoseControlOfHost")) {
host.addLeavesPlayCommand(untilEOT);
host.addChangeControllerCommand(untilEOT);
} else if (sa.hasParam("UntilYourNextTurn")) {
game.getCleanup().addUntil(sa.getActivatingPlayer(), untilEOT);
} else if (sa.hasParam("UntilUntaps")) {
host.addUntapCommand(untilEOT);
} else {
game.getEndOfTurn().addUntil(untilEOT);
} }
} }

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-gui-android</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -1,2 +0,0 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@@ -1,8 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/forge-gui"/>
<classpathentry combineaccessrules="false" kind="src" path="/forge-ai"/>
<classpathentry combineaccessrules="false" kind="src" path="/forge-core"/>
<classpathentry combineaccessrules="false" kind="src" path="/forge-game"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-gui-desktop</name>
<comment></comment>
<projects>
<project>forge-core</project>
<project>forge-game</project>
<project>forge-gui</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,2 +0,0 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -17,8 +17,11 @@ import forge.Singletons;
import forge.gui.GuiUtils; import forge.gui.GuiUtils;
import forge.screens.home.online.OnlineMenu; import forge.screens.home.online.OnlineMenu;
import forge.util.ReflectionUtil; import forge.util.ReflectionUtil;
import forge.util.Localizer;
public final class ForgeMenu { public final class ForgeMenu {
private JPopupMenu popupMenu; private JPopupMenu popupMenu;
private IMenuProvider provider; private IMenuProvider provider;
private static HashMap<KeyStroke, JMenuItem> activeShortcuts = new HashMap<KeyStroke, JMenuItem>(); private static HashMap<KeyStroke, JMenuItem> activeShortcuts = new HashMap<KeyStroke, JMenuItem>();
@@ -123,7 +126,8 @@ public final class ForgeMenu {
} }
private static JMenuItem getMenuItem_Restart() { private static JMenuItem getMenuItem_Restart() {
JMenuItem menuItem = new JMenuItem("Restart"); final Localizer localizer = Localizer.getInstance();
JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblRestart"));
menuItem.setMnemonic(KeyEvent.VK_R); menuItem.setMnemonic(KeyEvent.VK_R);
menuItem.addActionListener(getRestartAction()); menuItem.addActionListener(getRestartAction());
return menuItem; return menuItem;
@@ -139,7 +143,8 @@ public final class ForgeMenu {
} }
private static JMenuItem getMenuItem_Exit() { private static JMenuItem getMenuItem_Exit() {
JMenuItem menuItem = new JMenuItem("Exit"); final Localizer localizer = Localizer.getInstance();
JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblExit"));
menuItem.setMnemonic(KeyEvent.VK_X); menuItem.setMnemonic(KeyEvent.VK_X);
menuItem.addActionListener(getExitAction()); menuItem.addActionListener(getExitAction());
return menuItem; return menuItem;

View File

@@ -4,6 +4,7 @@ import forge.properties.ForgeConstants;
import forge.toolbox.FOptionPane; import forge.toolbox.FOptionPane;
import forge.util.BuildInfo; import forge.util.BuildInfo;
import forge.util.FileUtil; import forge.util.FileUtil;
import forge.util.Localizer;
import javax.swing.*; import javax.swing.*;
@@ -18,7 +19,8 @@ public final class HelpMenu {
private HelpMenu() { } private HelpMenu() { }
public static JMenu getMenu() { public static JMenu getMenu() {
JMenu menu = new JMenu("Help"); final Localizer localizer = Localizer.getInstance();
JMenu menu = new JMenu(localizer.getMessage("lblHelp"));
menu.setMnemonic(KeyEvent.VK_H); menu.setMnemonic(KeyEvent.VK_H);
menu.add(getMenu_GettingStarted()); menu.add(getMenu_GettingStarted());
menu.add(getMenu_Articles()); menu.add(getMenu_Articles());
@@ -32,7 +34,8 @@ public final class HelpMenu {
} }
private static JMenuItem getMenuItem_About() { private static JMenuItem getMenuItem_About() {
JMenuItem menuItem = new JMenuItem("About Forge..."); final Localizer localizer = Localizer.getInstance();
JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblAboutForge")+ "...");
menuItem.addActionListener(getAboutForgeAction()); menuItem.addActionListener(getAboutForgeAction());
return menuItem; return menuItem;
} }
@@ -41,15 +44,17 @@ public final class HelpMenu {
return new ActionListener() { return new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
final Localizer localizer = Localizer.getInstance();
FOptionPane.showMessageDialog( FOptionPane.showMessageDialog(
"Version : " + BuildInfo.getVersionString(), "Version : " + BuildInfo.getVersionString(),
"About Forge"); localizer.getMessage("lblAboutForge"));
} }
}; };
} }
private static JMenu getMenu_Troubleshooting() { private static JMenu getMenu_Troubleshooting() {
JMenu mnu = new JMenu("Troubleshooting"); final Localizer localizer = Localizer.getInstance();
JMenu mnu = new JMenu(localizer.getMessage("lblTroubleshooting"));
mnu.add(getMenuItem_UrlLink("How to Provide a Useful Bug Report", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=9621")); mnu.add(getMenuItem_UrlLink("How to Provide a Useful Bug Report", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=9621"));
mnu.addSeparator(); mnu.addSeparator();
mnu.add(getMenuItem_ReadMeFile()); mnu.add(getMenuItem_ReadMeFile());
@@ -57,14 +62,16 @@ public final class HelpMenu {
} }
private static JMenu getMenu_Articles() { private static JMenu getMenu_Articles() {
JMenu mnu = new JMenu("Articles"); final Localizer localizer = Localizer.getInstance();
JMenu mnu = new JMenu(localizer.getMessage("lblArticles"));
mnu.add(getMenuItem_UrlLink("HOW-TO: Customize your Sealed Deck games with fantasy blocks", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=8164")); mnu.add(getMenuItem_UrlLink("HOW-TO: Customize your Sealed Deck games with fantasy blocks", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=8164"));
mnu.add(getMenuItem_UrlLink("Quest Mode: Guide to Formats, Worlds, and everything", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=9258")); mnu.add(getMenuItem_UrlLink("Quest Mode: Guide to Formats, Worlds, and everything", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=9258"));
return mnu; return mnu;
} }
private static JMenu getMenu_GettingStarted() { private static JMenu getMenu_GettingStarted() {
JMenu mnu = new JMenu("Getting Started"); final Localizer localizer = Localizer.getInstance();
JMenu mnu = new JMenu(localizer.getMessage("lblGettingStarted"));
mnu.add(getMenuItem_HowToPlayFile()); mnu.add(getMenuItem_HowToPlayFile());
mnu.addSeparator(); mnu.addSeparator();
mnu.add(getMenuItem_UrlLink("Forge Wiki", "http://www.slightlymagic.net/wiki/Forge", KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0))); mnu.add(getMenuItem_UrlLink("Forge Wiki", "http://www.slightlymagic.net/wiki/Forge", KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)));
@@ -73,7 +80,8 @@ public final class HelpMenu {
} }
private static JMenuItem getMenuItem_HowToPlayFile() { private static JMenuItem getMenuItem_HowToPlayFile() {
JMenuItem menuItem = new JMenuItem("How to Play"); final Localizer localizer = Localizer.getInstance();
JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblHowtoPlay"));
menuItem.addActionListener(getOpenFileAction(getFile(ForgeConstants.HOWTO_FILE))); menuItem.addActionListener(getOpenFileAction(getFile(ForgeConstants.HOWTO_FILE)));
return menuItem; return menuItem;
} }
@@ -85,13 +93,15 @@ public final class HelpMenu {
} }
private static JMenuItem getMenuItem_License() { private static JMenuItem getMenuItem_License() {
JMenuItem menuItem = new JMenuItem("Forge License"); final Localizer localizer = Localizer.getInstance();
JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblForgeLicense"));
menuItem.addActionListener(getOpenFileAction(getFile(ForgeConstants.LICENSE_FILE))); menuItem.addActionListener(getOpenFileAction(getFile(ForgeConstants.LICENSE_FILE)));
return menuItem; return menuItem;
} }
private static JMenuItem getMenuItem_ReleaseNotes() { private static JMenuItem getMenuItem_ReleaseNotes() {
JMenuItem menuItem = new JMenuItem("Release Notes"); final Localizer localizer = Localizer.getInstance();
JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblReleaseNotes"));
menuItem.addActionListener(getOpenFileAction(getFile(ForgeConstants.CHANGES_FILE))); menuItem.addActionListener(getOpenFileAction(getFile(ForgeConstants.CHANGES_FILE)));
return menuItem; return menuItem;
} }

View File

@@ -26,6 +26,7 @@ import forge.toolbox.FSkin;
import forge.toolbox.FSkin.SkinnedMenuItem; import forge.toolbox.FSkin.SkinnedMenuItem;
import forge.view.FFrame; import forge.view.FFrame;
import forge.view.FView; import forge.view.FView;
import forge.util.Localizer;
/** /**
* Returns a JMenu containing options associated with game screen layout. * Returns a JMenu containing options associated with game screen layout.
@@ -42,8 +43,8 @@ public final class LayoutMenu {
public JMenu getMenu() { public JMenu getMenu() {
currentScreen = Singletons.getControl().getCurrentScreen(); currentScreen = Singletons.getControl().getCurrentScreen();
final Localizer localizer = Localizer.getInstance();
final JMenu menu = new JMenu("Layout"); final JMenu menu = new JMenu(localizer.getMessage("lblLayout"));
menu.setMnemonic(KeyEvent.VK_L); menu.setMnemonic(KeyEvent.VK_L);
if (currentScreen != FScreen.HOME_SCREEN) { if (currentScreen != FScreen.HOME_SCREEN) {
menu.add(getMenu_ViewOptions()); menu.add(getMenu_ViewOptions());
@@ -60,7 +61,8 @@ public final class LayoutMenu {
} }
private JMenu getMenu_ViewOptions() { private JMenu getMenu_ViewOptions() {
final JMenu menu = new JMenu("View"); final Localizer localizer = Localizer.getInstance();
final JMenu menu = new JMenu(localizer.getMessage("lblView"));
menu.add(getMenuItem_ShowTabs()); menu.add(getMenuItem_ShowTabs());
if (currentScreen != null && currentScreen.isMatchScreen()) { if (currentScreen != null && currentScreen.isMatchScreen()) {
menu.add(getMenuItem_ShowBackgroundImage()); menu.add(getMenuItem_ShowBackgroundImage());
@@ -69,14 +71,16 @@ public final class LayoutMenu {
} }
private JMenu getMenu_FileOptions() { private JMenu getMenu_FileOptions() {
final JMenu menu = new JMenu("File"); final Localizer localizer = Localizer.getInstance();
final JMenu menu = new JMenu(localizer.getMessage("lblFile"));
menu.add(getMenuItem_OpenLayout()); menu.add(getMenuItem_OpenLayout());
menu.add(getMenuItem_SaveLayout()); menu.add(getMenuItem_SaveLayout());
return menu; return menu;
} }
private static JMenu getMenu_ThemeOptions() { private static JMenu getMenu_ThemeOptions() {
final JMenu menu = new JMenu("Theme"); final Localizer localizer = Localizer.getInstance();
final JMenu menu = new JMenu(localizer.getMessage("lblTheme"));
JRadioButtonMenuItem menuItem; JRadioButtonMenuItem menuItem;
final ButtonGroup group = new ButtonGroup(); final ButtonGroup group = new ButtonGroup();
final String currentSkin = prefs.getPref(FPref.UI_SKIN); final String currentSkin = prefs.getPref(FPref.UI_SKIN);
@@ -102,7 +106,8 @@ public final class LayoutMenu {
}; };
private static JMenuItem getMenuItem_ShowBackgroundImage() { private static JMenuItem getMenuItem_ShowBackgroundImage() {
final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem("Background Image"); final Localizer localizer = Localizer.getInstance();
final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(localizer.getMessage("lblBackgroundImage"));
menuItem.setState(prefs.getPrefBoolean(FPref.UI_MATCH_IMAGE_VISIBLE)); menuItem.setState(prefs.getPrefBoolean(FPref.UI_MATCH_IMAGE_VISIBLE));
menuItem.addActionListener(getShowBackgroundImageAction(menuItem)); menuItem.addActionListener(getShowBackgroundImageAction(menuItem));
return menuItem; return menuItem;
@@ -124,7 +129,8 @@ public final class LayoutMenu {
} }
private static JMenuItem getMenuItem_ShowTabs() { private static JMenuItem getMenuItem_ShowTabs() {
final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem("Panel Tabs"); final Localizer localizer = Localizer.getInstance();
final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(localizer.getMessage("lblPanelTabs"));
menuItem.setAccelerator(MenuUtil.getAcceleratorKey(KeyEvent.VK_T)); menuItem.setAccelerator(MenuUtil.getAcceleratorKey(KeyEvent.VK_T));
menuItem.setState(!prefs.getPrefBoolean(FPref.UI_HIDE_GAME_TABS)); menuItem.setState(!prefs.getPrefBoolean(FPref.UI_HIDE_GAME_TABS));
menuItem.addActionListener(getShowTabsAction(menuItem)); menuItem.addActionListener(getShowTabsAction(menuItem));
@@ -142,7 +148,8 @@ public final class LayoutMenu {
} }
private JMenuItem getMenuItem_SaveLayout() { private JMenuItem getMenuItem_SaveLayout() {
final SkinnedMenuItem menuItem = new SkinnedMenuItem("Save Current Layout"); final Localizer localizer = Localizer.getInstance();
final SkinnedMenuItem menuItem = new SkinnedMenuItem(localizer.getMessage("lblSaveCurrentLayout"));
menuItem.setIcon((showIcons ? MenuUtil.getMenuIcon(FSkinProp.ICO_SAVELAYOUT) : null)); menuItem.setIcon((showIcons ? MenuUtil.getMenuIcon(FSkinProp.ICO_SAVELAYOUT) : null));
menuItem.addActionListener(getSaveLayoutAction()); menuItem.addActionListener(getSaveLayoutAction());
return menuItem; return menuItem;
@@ -157,7 +164,8 @@ public final class LayoutMenu {
} }
private JMenuItem getMenuItem_OpenLayout() { private JMenuItem getMenuItem_OpenLayout() {
final SkinnedMenuItem menuItem = new SkinnedMenuItem("Open..."); final Localizer localizer = Localizer.getInstance();
final SkinnedMenuItem menuItem = new SkinnedMenuItem(localizer.getMessage("lblOpen") +"..");
menuItem.setIcon((showIcons ? MenuUtil.getMenuIcon(FSkinProp.ICO_OPENLAYOUT) : null)); menuItem.setIcon((showIcons ? MenuUtil.getMenuIcon(FSkinProp.ICO_OPENLAYOUT) : null));
menuItem.addActionListener(getOpenLayoutAction()); menuItem.addActionListener(getOpenLayoutAction());
return menuItem; return menuItem;
@@ -172,7 +180,8 @@ public final class LayoutMenu {
} }
private JMenuItem getMenuItem_RevertLayout() { private JMenuItem getMenuItem_RevertLayout() {
final SkinnedMenuItem menuItem = new SkinnedMenuItem("Refresh"); final Localizer localizer = Localizer.getInstance();
final SkinnedMenuItem menuItem = new SkinnedMenuItem(localizer.getMessage("lblRefresh"));
menuItem.setIcon((showIcons ? MenuUtil.getMenuIcon(FSkinProp.ICO_REVERTLAYOUT) : null)); menuItem.setIcon((showIcons ? MenuUtil.getMenuIcon(FSkinProp.ICO_REVERTLAYOUT) : null));
menuItem.addActionListener(getRevertLayoutAction()); menuItem.addActionListener(getRevertLayoutAction());
return menuItem; return menuItem;
@@ -187,7 +196,8 @@ public final class LayoutMenu {
} }
private static JMenuItem getMenuItem_SetWindowSize() { private static JMenuItem getMenuItem_SetWindowSize() {
final JMenuItem menuItem = new JMenuItem("Set Window Size"); final Localizer localizer = Localizer.getInstance();
final JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblSetWindowSize"));
menuItem.addActionListener(getSetWindowSizeAction()); menuItem.addActionListener(getSetWindowSizeAction());
return menuItem; return menuItem;
} }
@@ -196,7 +206,8 @@ public final class LayoutMenu {
return new ActionListener() { return new ActionListener() {
@Override public void actionPerformed(final ActionEvent e) { @Override public void actionPerformed(final ActionEvent e) {
final String[] options = {"800x600", "1024x768", "1280x720"}; final String[] options = {"800x600", "1024x768", "1280x720"};
final String choice = GuiChoose.oneOrNone("Choose new window size", options); final Localizer localizer = Localizer.getInstance();
final String choice = GuiChoose.oneOrNone(localizer.getMessage("lblChooseNewWindowSize"), options);
if (choice != null) { if (choice != null) {
final String[] dims = choice.split("x"); final String[] dims = choice.split("x");
Singletons.getView().getFrame().setSize(Integer.parseInt(dims[0]), Integer.parseInt(dims[1])); Singletons.getView().getFrame().setSize(Integer.parseInt(dims[0]), Integer.parseInt(dims[1]));
@@ -207,10 +218,12 @@ public final class LayoutMenu {
private static JMenuItem fullScreenItem; private static JMenuItem fullScreenItem;
public static void updateFullScreenItemText() { public static void updateFullScreenItemText() {
fullScreenItem.setText(Singletons.getView().getFrame().isFullScreen() ? "Exit Full Screen" : "Full Screen"); final Localizer localizer = Localizer.getInstance();
fullScreenItem.setText(Singletons.getView().getFrame().isFullScreen() ? localizer.getMessage("lblExitFullScreen") : localizer.getMessage("lblFullScreen"));
} }
private static JMenuItem getMenuItem_FullScreen() { private static JMenuItem getMenuItem_FullScreen() {
fullScreenItem = new JMenuItem("Full Screen"); final Localizer localizer = Localizer.getInstance();
fullScreenItem = new JMenuItem(localizer.getMessage("lblFullScreen"));
updateFullScreenItemText(); updateFullScreenItemText();
fullScreenItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0)); fullScreenItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0));
fullScreenItem.addActionListener(getFullScreenAction()); fullScreenItem.addActionListener(getFullScreenAction());

View File

@@ -1,5 +1,5 @@
package forge.screens.home; package forge.screens.home;
import forge.util.Localizer;
/** /**
* Submenus each belong to a menu group, which * Submenus each belong to a menu group, which
* is used for several functions, such as expanding * is used for several functions, such as expanding
@@ -8,12 +8,12 @@ package forge.screens.home;
* <br><br><i>(E at beginning of class name denotes an enum.)</i> * <br><br><i>(E at beginning of class name denotes an enum.)</i>
*/ */
public enum EMenuGroup { public enum EMenuGroup {
SANCTIONED ("Sanctioned Formats"), SANCTIONED ("lblSanctionedFormats"),
ONLINE ("Online Multiplayer"), ONLINE ("lblOnlineMultiplayer"),
QUEST ("Quest Mode"), QUEST ("lblQuestMode"),
PUZZLE ("Puzzle Mode"), PUZZLE ("lblPuzzleMode"),
GAUNTLET ("Gauntlets"), GAUNTLET ("lblGauntlets"),
SETTINGS ("Game Settings"); SETTINGS ("lblGameSettings");
private final String strTitle; private final String strTitle;
@@ -21,5 +21,9 @@ public enum EMenuGroup {
private EMenuGroup(final String s0) { strTitle = s0; } private EMenuGroup(final String s0) { strTitle = s0; }
/** @return {@link java.lang.String} */ /** @return {@link java.lang.String} */
public String getTitle() { return this.strTitle; } public String getTitle() {
final Localizer localizer = Localizer.getInstance();
String t = localizer.getMessage(this.strTitle);
return t;
}
} }

View File

@@ -51,9 +51,11 @@ import forge.toolbox.FTextField;
import forge.util.MyRandom; import forge.util.MyRandom;
import forge.util.NameGenerator; import forge.util.NameGenerator;
import forge.util.gui.SOptionPane; import forge.util.gui.SOptionPane;
import forge.util.Localizer;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class PlayerPanel extends FPanel { public class PlayerPanel extends FPanel {
final Localizer localizer = Localizer.getInstance();
private final static ForgePreferences prefs = FModel.getPreferences(); private final static ForgePreferences prefs = FModel.getPreferences();
private static final SkinColor unfocusedPlayerOverlay = FSkin.getColor(FSkin.Colors.CLR_OVERLAY).alphaColor(120); private static final SkinColor unfocusedPlayerOverlay = FSkin.getColor(FSkin.Colors.CLR_OVERLAY).alphaColor(120);
@@ -77,23 +79,23 @@ public class PlayerPanel extends FPanel {
private final FComboBoxWrapper<Object> aeTeamComboBox = new FComboBoxWrapper<Object>(); private final FComboBoxWrapper<Object> aeTeamComboBox = new FComboBoxWrapper<Object>();
private final FLabel closeBtn; private final FLabel closeBtn;
private final FLabel deckBtn = new FLabel.ButtonBuilder().text("Select a deck").build(); private final FLabel deckBtn = new FLabel.ButtonBuilder().text(localizer.getMessage("lblSelectaDeck")).build();
private final FLabel deckLabel; private final FLabel deckLabel;
private final String variantBtnConstraints = "height 30px, hidemode 3"; private final String variantBtnConstraints = "height 30px, hidemode 3";
private final FLabel scmDeckSelectorBtn = new FLabel.ButtonBuilder().text("Select a scheme deck").build(); private final FLabel scmDeckSelectorBtn = new FLabel.ButtonBuilder().text(localizer.getMessage("lblSelectaSchemeDeck")).build();
private final FLabel scmDeckEditor = new FLabel.ButtonBuilder().text("Scheme Deck Editor").build(); private final FLabel scmDeckEditor = new FLabel.ButtonBuilder().text(localizer.getMessage("lblSchemeDeckEditor")).build();
private final FLabel scmLabel; private final FLabel scmLabel;
private final FLabel cmdDeckSelectorBtn = new FLabel.ButtonBuilder().text("Select a Commander deck").build(); private final FLabel cmdDeckSelectorBtn = new FLabel.ButtonBuilder().text(localizer.getMessage("lblSelectaCommanderDeck")).build();
private final FLabel cmdLabel; private final FLabel cmdLabel;
private final FLabel pchDeckSelectorBtn = new FLabel.ButtonBuilder().text("Select a planar deck").build(); private final FLabel pchDeckSelectorBtn = new FLabel.ButtonBuilder().text(localizer.getMessage("lblSelectaPlanarDeck")).build();
private final FLabel pchDeckEditor = new FLabel.ButtonBuilder().text("Planar Deck Editor").build(); private final FLabel pchDeckEditor = new FLabel.ButtonBuilder().text(localizer.getMessage("lblPlanarDeckEditor")).build();
private final FLabel pchLabel; private final FLabel pchLabel;
private final FLabel vgdSelectorBtn = new FLabel.ButtonBuilder().text("Select a Vanguard avatar").build(); private final FLabel vgdSelectorBtn = new FLabel.ButtonBuilder().text(localizer.getMessage("lblSelectaVanguardAvatar")).build();
private final FLabel vgdLabel; private final FLabel vgdLabel;
private FCheckBox chkDevMode; private FCheckBox chkDevMode;
@@ -110,11 +112,11 @@ public class PlayerPanel extends FPanel {
this.mayControl = mayControl; this.mayControl = mayControl;
this.allowNetworking = allowNetworking; this.allowNetworking = allowNetworking;
this.deckLabel = lobby.newLabel("Deck:"); this.deckLabel = lobby.newLabel(localizer.getMessage("lblDeck") + ":");
this.scmLabel = lobby.newLabel("Scheme deck:"); this.scmLabel = lobby.newLabel(localizer.getMessage("lblSchemeDeck") + ":");
this.cmdLabel = lobby.newLabel("Commander deck:"); this.cmdLabel = lobby.newLabel(localizer.getMessage("lblCommanderDeck") + ":");
this.pchLabel = lobby.newLabel("Planar deck:"); this.pchLabel = lobby.newLabel(localizer.getMessage("lblPlanarDeck") + ":");
this.vgdLabel = lobby.newLabel("Vanguard:"); this.vgdLabel = lobby.newLabel(localizer.getMessage("lblVanguard") + ":");
setLayout(new MigLayout("insets 10px, gap 5px")); setLayout(new MigLayout("insets 10px, gap 5px"));
@@ -449,8 +451,8 @@ public class PlayerPanel extends FPanel {
} }
private void populateTeamsComboBoxes() { private void populateTeamsComboBoxes() {
aeTeamComboBox.addItem("Archenemy"); aeTeamComboBox.addItem(localizer.getMessage("lblArchenemy"));
aeTeamComboBox.addItem("Heroes"); aeTeamComboBox.addItem(localizer.getMessage("lblHeroes"));
for (int i = 1; i <= VLobby.MAX_PLAYERS; i++) { for (int i = 1; i <= VLobby.MAX_PLAYERS; i++) {
teamComboBox.addItem(i); teamComboBox.addItem(i);
@@ -553,12 +555,12 @@ public class PlayerPanel extends FPanel {
* @param index * @param index
*/ */
private void createPlayerTypeOptions() { private void createPlayerTypeOptions() {
radioHuman = new FRadioButton("Human"); radioHuman = new FRadioButton(localizer.getMessage("lblHuman"));
radioAi = new FRadioButton("AI"); radioAi = new FRadioButton(localizer.getMessage("lblAI"));
radioOpen = new FRadioButton("Open"); radioOpen = new FRadioButton(localizer.getMessage("lblOpen"));
final JPopupMenu menu = new JPopupMenu(); final JPopupMenu menu = new JPopupMenu();
radioAiUseSimulation = new JCheckBoxMenuItem("Use Simulation"); radioAiUseSimulation = new JCheckBoxMenuItem(localizer.getMessage("lblUseSimulation"));
menu.add(radioAiUseSimulation); menu.add(radioAiUseSimulation);
radioAiUseSimulation.addActionListener(new ActionListener() { radioAiUseSimulation.addActionListener(new ActionListener() {
@Override public final void actionPerformed(final ActionEvent e) { @Override public final void actionPerformed(final ActionEvent e) {
@@ -577,7 +579,7 @@ public class PlayerPanel extends FPanel {
} }
private void createReadyButton() { private void createReadyButton() {
chkReady = new FCheckBox("Ready"); chkReady = new FCheckBox(localizer.getMessage("lblReady"));
chkReady.addActionListener(new ActionListener() { chkReady.addActionListener(new ActionListener() {
@Override public final void actionPerformed(final ActionEvent e) { @Override public final void actionPerformed(final ActionEvent e) {
lobby.setReady(index, chkReady.isSelected()); lobby.setReady(index, chkReady.isSelected());
@@ -586,7 +588,7 @@ public class PlayerPanel extends FPanel {
} }
private void createDevModeButton() { private void createDevModeButton() {
chkDevMode = new FCheckBox("Dev Mode"); chkDevMode = new FCheckBox(localizer.getMessage("cbDevMode"));
chkDevMode.addActionListener(new ActionListener() { chkDevMode.addActionListener(new ActionListener() {
@Override public final void actionPerformed(final ActionEvent e) { @Override public final void actionPerformed(final ActionEvent e) {
@@ -621,7 +623,7 @@ public class PlayerPanel extends FPanel {
* @return * @return
*/ */
private FLabel createNameRandomizer() { private FLabel createNameRandomizer() {
final FLabel newNameBtn = new FLabel.Builder().tooltip("Get a new random name").iconInBackground(false) final FLabel newNameBtn = new FLabel.Builder().tooltip(localizer.getMessage("lblGetaNewRandomName")).iconInBackground(false)
.icon(FSkin.getIcon(FSkinProp.ICO_EDIT)).hoverable(true).opaque(false) .icon(FSkin.getIcon(FSkinProp.ICO_EDIT)).hoverable(true).opaque(false)
.unhoveredAlpha(0.9f).build(); .unhoveredAlpha(0.9f).build();
newNameBtn.setCommand(new UiCommand() { newNameBtn.setCommand(new UiCommand() {
@@ -654,7 +656,7 @@ public class PlayerPanel extends FPanel {
if (index == 0) { if (index == 0) {
name = FModel.getPreferences().getPref(FPref.PLAYER_NAME); name = FModel.getPreferences().getPref(FPref.PLAYER_NAME);
if (name.isEmpty()) { if (name.isEmpty()) {
name = "Human"; name = localizer.getMessage("lblHuman");
} }
} }
else { else {
@@ -669,11 +671,11 @@ public class PlayerPanel extends FPanel {
} }
private FLabel createCloseButton() { private FLabel createCloseButton() {
final FLabel closeBtn = new FLabel.Builder().tooltip("Remove").iconInBackground(false) final FLabel closeBtn = new FLabel.Builder().tooltip(localizer.getMessage("lblRemove")).iconInBackground(false)
.icon(FSkin.getIcon(FSkinProp.ICO_CLOSE)).hoverable(true).build(); .icon(FSkin.getIcon(FSkinProp.ICO_CLOSE)).hoverable(true).build();
closeBtn.setCommand(new Runnable() { closeBtn.setCommand(new Runnable() {
@Override public final void run() { @Override public final void run() {
if (type == LobbySlotType.REMOTE && !SOptionPane.showConfirmDialog(String.format("Really kick %s?", playerName), "Kick", false)) { if (type == LobbySlotType.REMOTE && !SOptionPane.showConfirmDialog(String.format(localizer.getMessage("lblReallyKick"), playerName), localizer.getMessage("lblKick"), false)) {
return; return;
} }
lobby.removePlayer(index); lobby.removePlayer(index);
@@ -691,7 +693,7 @@ public class PlayerPanel extends FPanel {
setRandomAvatar(false); setRandomAvatar(false);
} }
avatarLabel.setToolTipText("L-click: Select avatar. R-click: Randomize avatar."); avatarLabel.setToolTipText(localizer.getMessage("ttlblAvatar"));
avatarLabel.addFocusListener(avatarFocusListener); avatarLabel.addFocusListener(avatarFocusListener);
avatarLabel.addMouseListener(avatarMouseListener); avatarLabel.addMouseListener(avatarMouseListener);
} }

View File

@@ -17,6 +17,7 @@ import forge.screens.home.EMenuGroup;
import forge.screens.home.IVSubmenu; import forge.screens.home.IVSubmenu;
import forge.screens.home.VHomeUI; import forge.screens.home.VHomeUI;
import forge.screens.home.VLobby; import forge.screens.home.VLobby;
import forge.util.Localizer;
/** /**
* Assembles Swing components of constructed submenu singleton. * Assembles Swing components of constructed submenu singleton.
@@ -25,12 +26,12 @@ import forge.screens.home.VLobby;
* *
*/ */
public enum VSubmenuConstructed implements IVSubmenu<CSubmenuConstructed> { public enum VSubmenuConstructed implements IVSubmenu<CSubmenuConstructed> {
SINGLETON_INSTANCE;
SINGLETON_INSTANCE;
final Localizer localizer = Localizer.getInstance();
// Fields used with interface IVDoc // Fields used with interface IVDoc
private DragCell parentCell; private DragCell parentCell;
private final DragTab tab = new DragTab("Constructed Mode"); private final DragTab tab = new DragTab(localizer.getMessage("lblConstructedMode"));
private final GameLobby lobby = new LocalLobby(); private final GameLobby lobby = new LocalLobby();
private final VLobby vLobby = new VLobby(lobby); private final VLobby vLobby = new VLobby(lobby);
private VSubmenuConstructed() { private VSubmenuConstructed() {
@@ -105,7 +106,8 @@ public enum VSubmenuConstructed implements IVSubmenu<CSubmenuConstructed> {
*/ */
@Override @Override
public String getMenuTitle() { public String getMenuTitle() {
return "Constructed";
return localizer.getMessage("lblConstructed");
} }
/* (non-Javadoc) /* (non-Javadoc)

View File

@@ -123,11 +123,16 @@ public class FloatingZone extends FloatingCardArea {
}; };
protected Iterable<CardView> getCards() { protected Iterable<CardView> getCards() {
cardList = new FCollection<CardView>(player.getCards(zone)); Iterable<CardView> zoneCards = player.getCards(zone);
if ( sortedByName ) { if ( zoneCards != null ) {
Collections.sort(cardList, comp); cardList = new FCollection<CardView>(zoneCards);
} if ( sortedByName ) {
return cardList; Collections.sort(cardList, comp);
}
return cardList;
} else {
return null;
}
} }
private FloatingZone(final CMatchUI matchUI, final PlayerView player0, final ZoneType zone0) { private FloatingZone(final CMatchUI matchUI, final PlayerView player0, final ZoneType zone0) {

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/forge-core"/>
<classpathentry combineaccessrules="false" kind="src" path="/forge-game"/>
<classpathentry combineaccessrules="false" kind="src" path="/forge-gui"/>
<classpathentry combineaccessrules="false" kind="src" path="/forge-gui-mobile"/>
<classpathentry combineaccessrules="false" kind="src" path="/forge-ai"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="minlog-1.2.jar"/>
<classpathentry kind="lib" path="libs/gdx-backend-robovm.jar"/>
<classpathentry kind="lib" path="/forge-gui-mobile/libs/gdx.jar" sourcepath="libs/gdx-sources.jar"/>
<classpathentry kind="lib" path="/forge-gui-mobile/libs/gdx-freetype.jar"/>
<classpathentry kind="con" path="org.robovm.eclipse.ROBOVM_CONTAINER"/>
<classpathentry kind="con" path="org.robovm.eclipse.ROBOVM_COCOA_TOUCH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-gui-ios</name>
<comment></comment>
<projects>
<project>forge</project>
<project>forge-ai</project>
<project>forge-core</project>
<project>forge-game</project>
<project>forge-gui</project>
<project>forge-gui-mobile</project>
<project>forge-net</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.robovm.eclipse.RoboVMClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.robovm.eclipse.RoboVMNature</nature>
</natures>
</projectDescription>

View File

@@ -1,2 +0,0 @@
eclipse.preferences.version=1
encoding/<project>=ISO-8859-1

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="libs/gdx-backend-lwjgl-natives.jar"/>
<classpathentry kind="lib" path="libs/gdx-backend-lwjgl.jar" sourcepath="libs/gdx-backend-lwjgl-sources.jar"/>
<classpathentry kind="lib" path="libs/gdx-natives.jar"/>
<classpathentry kind="lib" path="libs/gdx-freetype-natives.jar"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-gui-mobile-dev</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<variableList>
<variable>
<name>copy_PARENT</name>
<value>$%7BPARENT-1-PROJECT_LOC%7D/trunk</value>
</variable>
</variableList>
</projectDescription>

View File

@@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="libs/gdx.jar" sourcepath="libs/gdx-sources.jar"/>
<classpathentry kind="lib" path="libs/gdx-freetype.jar"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-gui-mobile</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>forge-gui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,2 +0,0 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@@ -1,5 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -17,5 +17,5 @@ SVar:DBSac:DB$ Sacrifice | Defined$ Player.IsRemembered | SacValid$ Card.ChosenC
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | References$ X | SubAbility$ DBCleanup SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | References$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$CardPower SVar:X:RememberedLKI$CardPower
SVar:NeedsToPlay:Creature.OppCtrl SVar:SplitNeedsToPlay:Creature.OppCtrl
Oracle:Target player sacrifices a creature with the greatest power among creatures they control. You gain life equal to its power. Oracle:Target player sacrifices a creature with the greatest power among creatures they control. You gain life equal to its power.

View File

@@ -4,7 +4,7 @@ Date=2018-11-16
Name=M19 Gift Pack Name=M19 Gift Pack
Code2=G18 Code2=G18
MciCode=g18 MciCode=g18
Type=Special Type=Other
[cards] [cards]
1 S Angelic Guardian 1 S Angelic Guardian

View File

@@ -3,5 +3,5 @@ Name:Brawl
Order:101 Order:101
Type:Casual Type:Casual
Subtype:Commander Subtype:Commander
Sets:XLN, RIX, DOM, M19, GRN, RNA Sets:XLN, RIX, DOM, M19, G18, GRN, RNA
Banned:Sorcerous Spyglass Banned:Sorcerous Spyglass

View File

@@ -3,5 +3,5 @@ Name:Modern
Order:102 Order:102
Subtype:Modern Subtype:Modern
Type:Sanctioned Type:Sanctioned
Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MM2, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W17, HOU, XLN, RIX, DOM, M19, GRN, RNA Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MM2, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W17, HOU, XLN, RIX, DOM, M19, G18, GRN, RNA
Banned:Ancient Den; Birthing Pod; Blazing Shoal; Chrome Mox; Cloudpost; Dark Depths; Deathrite Shaman; Dig Through Time; Dread Return; Eye of Ugin; Gitaxian Probe; Glimpse of Nature; Golgari Grave-Troll; Great Furnace; Green Sun's Zenith; Hypergenesis; Krark-Clan Ironworks; Mental Misstep; Ponder; Preordain; Punishing Fire; Rite of Flame; Seat of the Synod; Second Sunrise; Seething Song; Sensei's Divining Top; Skullclamp; Splinter Twin; Stoneforge Mystic; Summer Bloom; Treasure Cruise; Tree of Tales; Umezawa's Jitte; Vault of Whispers Banned:Ancient Den; Birthing Pod; Blazing Shoal; Chrome Mox; Cloudpost; Dark Depths; Deathrite Shaman; Dig Through Time; Dread Return; Eye of Ugin; Gitaxian Probe; Glimpse of Nature; Golgari Grave-Troll; Great Furnace; Green Sun's Zenith; Hypergenesis; Krark-Clan Ironworks; Mental Misstep; Ponder; Preordain; Punishing Fire; Rite of Flame; Seat of the Synod; Second Sunrise; Seething Song; Sensei's Divining Top; Skullclamp; Splinter Twin; Stoneforge Mystic; Summer Bloom; Treasure Cruise; Tree of Tales; Umezawa's Jitte; Vault of Whispers

View File

@@ -3,5 +3,5 @@ Name:Standard
Order:101 Order:101
Subtype:Standard Subtype:Standard
Type:Sanctioned Type:Sanctioned
Sets:XLN, RIX, DOM, M19, GRN, RNA Sets:XLN, RIX, DOM, M19, G18, GRN, RNA
Banned: Rampaging Ferocidon Banned: Rampaging Ferocidon

View File

@@ -1,12 +1,9 @@
language.name = English (US) language.name = English (US)
splash.loading.examining-cards = Loading cards, examining folder splash.loading.examining-cards = Loading cards, examining folder
splash.loading.cards-folders = Loading cards from folders splash.loading.cards-folders = Loading cards from folders
splash.loading.cards-archive = Loading cards from archive splash.loading.cards-archive = Loading cards from archive
splash.loading.decks = Loading decks... splash.loading.decks = Loading decks...
#VSubmenuPreferences.java
# VSubmenuPreferences.java
Preferences = Preferences Preferences = Preferences
btnReset = Reset to Default Settings btnReset = Reset to Default Settings
btnDeleteMatchUI = Reset Match Layout btnDeleteMatchUI = Reset Match Layout
@@ -133,13 +130,9 @@ nlEnableSounds = Enable sound effects during the game
nlEnableMusic = Enable background music during the game nlEnableMusic = Enable background music during the game
nlAltSoundSystem = Use the alternate sound system (only use if you have issues with sound not playing or disappearing) nlAltSoundSystem = Use the alternate sound system (only use if you have issues with sound not playing or disappearing)
KeyboardShortcuts = Keyboard Shortcuts KeyboardShortcuts = Keyboard Shortcuts
# VSubmenuAchievements.java # VSubmenuAchievements.java
Achievements = Achievements Achievements = Achievements
# VSubmenuDownloaders.java # VSubmenuDownloaders.java
btnDownloadSetPics = Download LQ Set Pictures btnDownloadSetPics = Download LQ Set Pictures
btnDownloadPics = Download LQ Card Pictures btnDownloadPics = Download LQ Card Pictures
btnDownloadQuestImages = Download Quest Images btnDownloadQuestImages = Download Quest Images
@@ -164,7 +157,6 @@ lblHowToPlay = Rules of the Game.
lblLicensing = Forge legal. lblLicensing = Forge legal.
ContentDownloaders = Content Downloaders ContentDownloaders = Content Downloaders
ReleaseNotes = Release Notes ReleaseNotes = Release Notes
# CSubmenuPreferences.java # CSubmenuPreferences.java
CantChangeDevModeWhileNetworkMath = Can't change DEV_MODE while a network match is in progress! CantChangeDevModeWhileNetworkMath = Can't change DEV_MODE while a network match is in progress!
CompatibilityWarningsReEnabled = Compatibility warnings re-enabled! CompatibilityWarningsReEnabled = Compatibility warnings re-enabled!
@@ -179,3 +171,63 @@ OKresetWorkshopLayout = Workshop layout has been reset.
AresetMatchScreenLayout = This will reset the layout of the Match screen.\n If you want to save the current layout first, please use the Dock tab -> Save Layout option in the Match screen.\n\n Reset layout? AresetMatchScreenLayout = This will reset the layout of the Match screen.\n If you want to save the current layout first, please use the Dock tab -> Save Layout option in the Match screen.\n\n Reset layout?
TresetMatchScreenLayout = Reset Match Screen Layout TresetMatchScreenLayout = Reset Match Screen Layout
OKresetMatchScreenLayout = Match Screen layout has been reset. OKresetMatchScreenLayout = Match Screen layout has been reset.
#EMenuGroup.java
lblSanctionedFormats= Sanctioned Formats
lblOnlineMultiplayer = Online Multiplayer
lblQuestMode = Quest Mode
lblPuzzleMode = Puzzle Mode
lblGauntlets = Gauntlets
lblGameSettings = Game Settings
#VSubmenuConstructed.java
lblConstructedMode = Constructed Mode
lblConstructed = Constructed
#PlayerPanel.java
lblSelectaDeck=Select a deck
lblSelectaSchemeDeck=Select a scheme deck
lblSchemeDeckEditor=Scheme Deck Editor
lblSelectaCommanderDeck=Select a Commander deck
lblSelectaPlanarDeck = Select a planar deck
lblPlanarDeckEditor = Planar Deck Editor
lblSelectaVanguardAvatar = Select a Vanguard avatar
lblDeck=Deck
lblSchemeDeck=Scheme Deck
lblCommanderDeck= Commander Deck
lblPlanarDeck=Planar Deck
lblVanguard=Vanguard
lblHuman=Human
lblAI=AI
lblOpen=Open
lblUseSimulation=Use Simulation
lblGetaNewRandomName=Get a new random name
lblArchenemy=Archenemy
lblHeroes=Heroes
lblRemove=Remove
ttlblAvatar=L-click: Select avatar. R-click: Randomize avatar.
lblReady=Ready
lblKick = Kick
lblReallyKick = Really Kick %s?
#ForgeMenu.java
lblRestart=Restart
lblExit=Exit
#LayoutMenu.java
lblLayout=Layout
lblView=View
lblFile=File
lblTheme=Theme
lblBackgroundImage=Background Image
lblPanelTabs=Panel Tabs
lblSaveCurrentLayout=Save Current Layout
lblRefresh=Refresh
lblSetWindowSize=Set Window Size
lblChooseNewWindowSize=Choose new window size
lblFullScreen=Full Screen
lblExitFullScreen=Exit Full Screen
#HelpMenu.java
lblHelp=Help
lblAboutForge=About Forge
lblTroubleshooting=Troubleshooting
lblArticles=Articles
lblGettingStarted=Getting Started
lblHowtoPlay=How to Play
lblForgeLicense=Forge License
lblReleaseNotes=Release Notes

View File

@@ -0,0 +1,16 @@
[metadata]
Name:Possibility Storm - Ravnica Allegiance #04
URL:http://www.possibilitystorm.com/wp-content/uploads/2019/02/101.-RNA4.jpg
Goal:Win
Turns:1
Difficulty:Rare
Description:Win this turn. Your solution must satisfy all possible blocking scenarios.
[state]
humanlife=20
ailife=13
turn=1
activeplayer=human
activephase=MAIN1
humanhand=Zhur-Taa Goblin;Galloping Lizrog;Incubation Druid;Aeromunculus
humanbattlefield=Rhythm of the Wild;Combine Guildmage|NoETBTrigs;Herald of Secret Streams|NoETBTrigs;Breeding Pool|NoETBTrigs;Breeding Pool|NoETBTrigs;Breeding Pool|NoETBTrigs;Breeding Pool|NoETBTrigs;Stomping Ground|NoETBTrigs;Stomping Ground|NoETBTrigs;Stomping Ground|NoETBTrigs;Stomping Ground|NoETBTrigs
aibattlefield=Hydroid Krasis|Counters:P1P1=4;The Haunt of Hightower|Counters:P1P1=1;Hydroid Krasis|Counters:P1P1=4

View File

@@ -0,0 +1,21 @@
[duel]
[metadata]
Name=Sting 1
Title=Sting
Difficulty=easy
Description=Lots of things that go "ping!" at you.
Icon=Sting.jpg
Deck Type=constructed
[main]
4 Prodigal Sorcerer
4 Prodigal Pyromancer
4 Suq'Ata Firewalker
4 Zuran Spellcaster
4 Jeska, Warrior Adept
4 Kamahl, Pit Fighter
4 Giant Strength
4 Counterspell
4 Rod of Ruin
12 Mountain
12 Island
[sideboard]

View File

@@ -437,13 +437,14 @@ public class QuestController {
String path = ForgeConstants.DEFAULT_CHALLENGES_DIR; String path = ForgeConstants.DEFAULT_CHALLENGES_DIR;
//Use a variant specialized duel manager if this is a variant quest //Use a variant specialized duel manager if this is a variant quest
switch(FModel.getQuest().getDeckConstructionRules()){ if (FModel.getQuest() != null) {
case Default: break; switch(FModel.getQuest().getDeckConstructionRules()){
case Commander: this.duelManager = new QuestEventCommanderDuelManager(); return; case Default: break;
case Commander: this.duelManager = new QuestEventCommanderDuelManager(); return;
}
} }
if (world != null) { if (world != null) {
if (world.getName().equals(QuestWorld.STANDARDWORLDNAME)) { if (world.getName().equals(QuestWorld.STANDARDWORLDNAME)) {
this.duelManager = new QuestEventLDADuelManager(); this.duelManager = new QuestEventLDADuelManager();
return; return;

14
pom.xml
View File

@@ -378,20 +378,6 @@
<ignore /> <ignore />
</action> </action>
</pluginExecution> </pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[3.1,)</versionRange>
<goals>
<goal>testCompile</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
<pluginExecution> <pluginExecution>
<pluginExecutionFilter> <pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>