Commit 568e7abd authored by kevinmxt's avatar kevinmxt

configuration for local

parent 1b95e2a2
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
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="forge-core-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-game-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-gui-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="minlog-1.2" level="project" />
<orderEntry type="module" module-name="main2" />
<orderEntry type="module" module-name="test" />
<orderEntry type="module" module-name="forge-gui-mobile" />
<orderEntry type="module" module-name="main3" />
<orderEntry type="module" module-name="main1" />
<orderEntry type="module" module-name="main4" />
<orderEntry type="module" module-name="test1" />
</component>
</module>
\ No newline at end of file
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
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
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
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="forge-core-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-gui-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="minlog-1.2" level="project" />
<orderEntry type="module" module-name="main2" />
<orderEntry type="module" module-name="test" />
<orderEntry type="module" module-name="forge-gui-mobile" />
<orderEntry type="module" module-name="main1" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="forge-core-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="module" module-name="main1" />
</component>
</module>
\ No newline at end of file
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
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
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="forge-core-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-ai-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-game-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-gui-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="minlog-1.2" level="project" />
<orderEntry type="module" module-name="main2" />
<orderEntry type="module" module-name="test" />
<orderEntry type="module" module-name="forge-gui-mobile" />
<orderEntry type="module" module-name="main1" />
<orderEntry type="module" module-name="main4" />
<orderEntry type="module" module-name="main" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="forge-core-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-ai-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-game-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-gui-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="module" module-name="main2" />
<orderEntry type="module" module-name="forge-gui-mobile" />
<orderEntry type="module" module-name="main3" />
<orderEntry type="module" module-name="main1" />
<orderEntry type="module" module-name="main4" />
<orderEntry type="module" module-name="test1" />
<orderEntry type="module" module-name="main" />
</component>
</module>
\ No newline at end of file
eclipse.preferences.version=1
encoding/<project>=ISO-8859-1
encoding/<project>=UTF-8
eclipse.preferences.version=1
encoding/<project>=UTF-8
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
eclipse.preferences.version=1
encoding/<project>=UTF-8
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
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
package forge.match.input;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import forge.model.FModel;
import forge.properties.ForgePreferences;
import forge.game.GameEntity;
import forge.game.card.Card;
import forge.game.card.CounterType;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.player.PlayerControllerHuman;
import forge.util.ITriggerEvent;
public final class InputProliferate extends InputSelectManyBase<GameEntity> {
private static final long serialVersionUID = -1779224307654698954L;
private final Map<GameEntity, CounterType> chosenCounters = new HashMap<GameEntity, CounterType>();
private SpellAbility sa;
public InputProliferate(final PlayerControllerHuman controller, final SpellAbility sa) {
super(controller, 1, Integer.MAX_VALUE);
this.sa = sa;
}
@Override
protected String getMessage() {
final StringBuilder sb = new StringBuilder();
if ( FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT) &&
sa != null ) {
sb.append(sa.getStackDescription()).append("\n");
}
sb.append("Choose permanents and/or players with counters on them to add one more counter of that type.");
sb.append("\n\nYou've selected so far:\n");
if (chosenCounters.isEmpty()) {
sb.append("(none)");
}
else {
for (final Entry<GameEntity, CounterType> ge : chosenCounters.entrySet()) {
sb.append("* ").append(ge.getKey()).append(" -> ").append(ge.getValue()).append("counter\n");
}
}
return sb.toString();
}
@Override
protected boolean onCardSelected(final Card card, final List<Card> otherCardsToSelect, final ITriggerEvent triggerEvent) {
if (!card.hasCounters()) {
return false;
}
final boolean entityWasSelected = chosenCounters.containsKey(card);
if (entityWasSelected) {
this.chosenCounters.remove(card);
}
else {
final List<CounterType> choices = new ArrayList<CounterType>();
for (final CounterType ct : CounterType.values()) {
if (card.getCounters(ct) > 0) {
choices.add(ct);
}
}
final CounterType toAdd = choices.size() == 1 ? choices.get(0) : getController().getGui().one("Select counter type", choices);
chosenCounters.put(card, toAdd);
}
refresh();
return true;
}
@Override
public String getActivateAction(final Card card) {
if (card.hasCounters() && !chosenCounters.containsKey(card)) {
return "add counter to card";
}
return null;
}
@Override
protected final void onPlayerSelected(final Player player, final ITriggerEvent triggerEvent) {
if (!player.hasCounters()) {
// Can't select a player without counters
return;
}
final boolean entityWasSelected = chosenCounters.containsKey(player);
if (entityWasSelected) {
this.chosenCounters.remove(player);
} else {
final List<CounterType> choices = new ArrayList<CounterType>();
for (final CounterType ct : player.getCounters().keySet()) {
if (player.getCounters(ct) > 0) {
choices.add(ct);
}
}
if (player.hasKeyword("You can't get poison counters")) {
choices.remove(CounterType.POISON);
}
final CounterType toAdd = choices.size() == 1 ? choices.get(0) : getController().getGui().one("Select counter type", choices);
this.chosenCounters.put(player, toAdd);
}
refresh();
}
public Map<GameEntity, CounterType> getProliferationMap() {
return chosenCounters;
}
@Override
protected boolean hasEnoughTargets() { return true; }
@Override
protected boolean hasAllTargets() { return false; }
@Override
public Collection<GameEntity> getSelected() {
// TODO Auto-generated method stub
return chosenCounters.keySet();
}
}
package forge.match.input;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import forge.model.FModel;
import forge.properties.ForgePreferences;
import forge.game.GameEntity;
import forge.game.card.Card;
import forge.game.card.CounterType;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.player.PlayerControllerHuman;
import forge.util.ITriggerEvent;
public final class InputProliferate extends InputSelectManyBase<GameEntity> {
private static final long serialVersionUID = -1779224307654698954L;
private final Map<GameEntity, CounterType> chosenCounters = new HashMap<GameEntity, CounterType>();
private SpellAbility sa;
public InputProliferate(final PlayerControllerHuman controller, final SpellAbility sa) {
super(controller, 1, Integer.MAX_VALUE);
this.sa = sa;
}
@Override
protected String getMessage() {
final StringBuilder sb = new StringBuilder();
if ( FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT) &&
sa != null ) {
sb.append(sa.getStackDescription()).append("\n");
}
sb.append("Choose permanents and/or players with counters on them to add one more counter of that type.");
sb.append("\n\nYou've selected so far:\n");
if (chosenCounters.isEmpty()) {
sb.append("(none)");
}
else {
for (final Entry<GameEntity, CounterType> ge : chosenCounters.entrySet()) {
sb.append("* ").append(ge.getKey()).append(" -> ").append(ge.getValue()).append("counter\n");
}
}
return sb.toString();
}
@Override
protected boolean onCardSelected(final Card card, final List<Card> otherCardsToSelect, final ITriggerEvent triggerEvent) {
if (!card.hasCounters()) {
return false;
}
final boolean entityWasSelected = chosenCounters.containsKey(card);
if (entityWasSelected) {
this.chosenCounters.remove(card);
}
else {
final List<CounterType> choices = new ArrayList<CounterType>();
for (final CounterType ct : CounterType.values()) {
if (card.getCounters(ct) > 0) {
choices.add(ct);
}
}
final CounterType toAdd = choices.size() == 1 ? choices.get(0) : getController().getGui().one("Select counter type", choices);
chosenCounters.put(card, toAdd);
}
refresh();
return true;
}
@Override
public String getActivateAction(final Card card) {
if (card.hasCounters() && !chosenCounters.containsKey(card)) {
return "add counter to card";
}
return null;
}
@Override
protected final void onPlayerSelected(final Player player, final ITriggerEvent triggerEvent) {
if (!player.hasCounters()) {
// Can't select a player without counters
return;
}
final boolean entityWasSelected = chosenCounters.containsKey(player);
if (entityWasSelected) {
this.chosenCounters.remove(player);
} else {
final List<CounterType> choices = new ArrayList<CounterType>();
for (final CounterType ct : player.getCounters().keySet()) {
if (player.getCounters(ct) > 0) {
choices.add(ct);
}
}
if (player.hasKeyword("You can't get poison counters")) {
choices.remove(CounterType.POISON);
}
final CounterType toAdd = choices.size() == 1 ? choices.get(0) : getController().getGui().one("Select counter type", choices);
this.chosenCounters.put(player, toAdd);
}
refresh();
}
public Map<GameEntity, CounterType> getProliferationMap() {
return chosenCounters;
}
@Override
protected boolean hasEnoughTargets() { return true; }
@Override
protected boolean hasAllTargets() { return false; }
@Override
public Collection<GameEntity> getSelected() {
// TODO Auto-generated method stub
return chosenCounters.keySet();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="forge-core-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-ai-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="forge-game-1.6.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="minlog-1.2" level="project" />
<orderEntry type="module" module-name="test" />
<orderEntry type="module" module-name="main1" />
<orderEntry type="module" module-name="main4" />
<orderEntry type="module" module-name="test1" />
<orderEntry type="module" module-name="main" />
</component>
</module>
\ No newline at end of file
......@@ -305,7 +305,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<version>1.8</version>
</plugin>
<plugin>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment