mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
Small refactor to the fix for #6844.
This commit is contained in:
parent
5a356e1388
commit
4f0ff05069
1 changed files with 2 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ import org.apache.log4j.Logger;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
|
|
@ -114,7 +115,7 @@ public final class GameStateEvaluator2 {
|
||||||
Permanent attachment = game.getPermanent(attachmentId);
|
Permanent attachment = game.getPermanent(attachmentId);
|
||||||
for (Ability a : attachment.getAbilities(game)) {
|
for (Ability a : attachment.getAbilities(game)) {
|
||||||
for (Effect e : a.getEffects()) {
|
for (Effect e : a.getEffects()) {
|
||||||
if (!e.getOutcome().isGood()
|
if (e.getOutcome().equals(Outcome.Detriment)
|
||||||
&& attachment.getControllerId().equals(permanent.getControllerId())) {
|
&& attachment.getControllerId().equals(permanent.getControllerId())) {
|
||||||
value -= 1000; // seems to work well ; -300 is not effective enough
|
value -= 1000; // seems to work well ; -300 is not effective enough
|
||||||
}
|
}
|
||||||
|
|
@ -130,7 +131,6 @@ public final class GameStateEvaluator2 {
|
||||||
public static int evaluateCreature(Permanent creature, Game game) {
|
public static int evaluateCreature(Permanent creature, Game game) {
|
||||||
int value = ArtificialScoringSystem.getFixedPermanentScore(game, creature)
|
int value = ArtificialScoringSystem.getFixedPermanentScore(game, creature)
|
||||||
+ ArtificialScoringSystem.getVariablePermanentScore(game, creature);
|
+ ArtificialScoringSystem.getVariablePermanentScore(game, creature);
|
||||||
System.out.println("The VALUE is : " + value);
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue