mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fixed incorrect P/T storing of LKI copies (counters where counted twice).
This commit is contained in:
@@ -3822,7 +3822,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
* @return a int.
|
* @return a int.
|
||||||
*/
|
*/
|
||||||
public final int getNetAttack() {
|
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.getUnswitchedToughness();
|
||||||
}
|
}
|
||||||
return this.getUnswitchedPower();
|
return this.getUnswitchedPower();
|
||||||
@@ -3876,7 +3876,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
* @return a int.
|
* @return a int.
|
||||||
*/
|
*/
|
||||||
public final int getNetDefense() {
|
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.getUnswitchedPower();
|
||||||
}
|
}
|
||||||
return this.getUnswitchedToughness();
|
return this.getUnswitchedToughness();
|
||||||
|
|||||||
@@ -139,8 +139,6 @@ public final class CardUtil {
|
|||||||
newCopy.setOwner(in.getOwner());
|
newCopy.setOwner(in.getOwner());
|
||||||
newCopy.setController(in.getController(), 0);
|
newCopy.setController(in.getController(), 0);
|
||||||
newCopy.getCharacteristics().copyFrom(in.getState(in.getCurState()));
|
newCopy.getCharacteristics().copyFrom(in.getState(in.getCurState()));
|
||||||
newCopy.setBaseAttack(in.getNetAttack());
|
|
||||||
newCopy.setBaseDefense(in.getNetDefense());
|
|
||||||
newCopy.setType(new ArrayList<String>(in.getType()));
|
newCopy.setType(new ArrayList<String>(in.getType()));
|
||||||
newCopy.setTriggers(in.getTriggers());
|
newCopy.setTriggers(in.getTriggers());
|
||||||
for (SpellAbility sa : in.getManaAbility()) {
|
for (SpellAbility sa : in.getManaAbility()) {
|
||||||
@@ -148,9 +146,13 @@ public final class CardUtil {
|
|||||||
sa.setSourceCard(in);
|
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.setCounters(in.getCounters());
|
||||||
newCopy.setExtrinsicKeyword(in.getExtrinsicKeyword());
|
newCopy.setExtrinsicKeyword(in.getExtrinsicKeyword());
|
||||||
//newCopy.setColor(in.getColor());
|
|
||||||
// Determine the color for LKI copy, not just getColor
|
// Determine the color for LKI copy, not just getColor
|
||||||
ArrayList<CardColor> currentColor = new ArrayList<CardColor>();
|
ArrayList<CardColor> currentColor = new ArrayList<CardColor>();
|
||||||
currentColor.add(in.determineColor());
|
currentColor.add(in.determineColor());
|
||||||
|
|||||||
Reference in New Issue
Block a user