- Fixed incorrect P/T storing of LKI copies (counters where counted twice).

This commit is contained in:
Sloth
2013-04-21 21:24:27 +00:00
parent d5f9616ac5
commit d42dffda19
2 changed files with 7 additions and 5 deletions

View File

@@ -3822,7 +3822,7 @@ public class Card extends GameEntity implements Comparable<Card> {
* @return a int.
*/
public final int getNetAttack() {
if ((this.getAmountOfKeyword("CARDNAME's power and toughness are switched") % 2) != 0) {
if (this.getAmountOfKeyword("CARDNAME's power and toughness are switched") % 2 != 0) {
return this.getUnswitchedToughness();
}
return this.getUnswitchedPower();
@@ -3876,7 +3876,7 @@ public class Card extends GameEntity implements Comparable<Card> {
* @return a int.
*/
public final int getNetDefense() {
if ((this.getAmountOfKeyword("CARDNAME's power and toughness are switched") % 2) != 0) {
if (this.getAmountOfKeyword("CARDNAME's power and toughness are switched") % 2 != 0) {
return this.getUnswitchedPower();
}
return this.getUnswitchedToughness();

View File

@@ -139,8 +139,6 @@ public final class CardUtil {
newCopy.setOwner(in.getOwner());
newCopy.setController(in.getController(), 0);
newCopy.getCharacteristics().copyFrom(in.getState(in.getCurState()));
newCopy.setBaseAttack(in.getNetAttack());
newCopy.setBaseDefense(in.getNetDefense());
newCopy.setType(new ArrayList<String>(in.getType()));
newCopy.setTriggers(in.getTriggers());
for (SpellAbility sa : in.getManaAbility()) {
@@ -148,9 +146,13 @@ public final class CardUtil {
sa.setSourceCard(in);
}
// lock in the current P/T without boni from counters
newCopy.setBaseAttack(in.getCurrentPower() + in.getTempAttackBoost() + in.getSemiPermanentAttackBoost());
newCopy.setBaseDefense(in.getCurrentToughness() + in.getTempDefenseBoost() + in.getSemiPermanentDefenseBoost());
newCopy.setCounters(in.getCounters());
newCopy.setExtrinsicKeyword(in.getExtrinsicKeyword());
//newCopy.setColor(in.getColor());
// Determine the color for LKI copy, not just getColor
ArrayList<CardColor> currentColor = new ArrayList<CardColor>();
currentColor.add(in.determineColor());