diff -r 7eacf1e21213 -r 0bfd181c663e src/main/java/ru/alphatech/icfpc/cards/Attack.java --- a/src/main/java/ru/alphatech/icfpc/cards/Attack.java Sun Jun 19 17:02:10 2011 +0400 +++ b/src/main/java/ru/alphatech/icfpc/cards/Attack.java Sun Jun 19 17:12:05 2011 +0400 @@ -3,6 +3,7 @@ import ru.alphatech.icfpc.game.ICFPCException; import ru.alphatech.icfpc.game.IValue; import ru.alphatech.icfpc.game.Player; +import ru.alphatech.icfpc.game.Run; import ru.alphatech.icfpc.game.Value; public class Attack implements ICard @@ -53,13 +54,26 @@ { int w = opponent.getSlot(255 - j).getVitality(); - if (w > 0) + if(Run.getAutoMode()) { - int wdec = (int) Math.floor(9 * n / 10); - int resw = w - wdec; + if(w > 0) + { + int wdec = (int) Math.floor(9 * n / 10); + int resw = w + wdec; - opponent.getSlot(255 - j).setVitality(resw < 0 ? 0 : w); + opponent.getSlot(255 - j).setVitality(resw > 65535 ? 65535 : w); + } } + else + { + if (w > 0) + { + int wdec = (int) Math.floor(9 * n / 10); + int resw = w - wdec; + + opponent.getSlot(255 - j).setVitality(resw < 0 ? 0 : w); + } + } return new I(); }