Merge branch 'newBranch' into 'master'

[Mobile] Don't stack token creature with different PT

See merge request core-developers/forge!3281
This commit is contained in:
Michael Kamensky
2020-10-21 04:04:19 +00:00
2 changed files with 8 additions and 0 deletions

View File

@@ -253,6 +253,13 @@ public class CardView extends GameEntityView {
}
return counters.equals(otherCard.getCounters());
}
public boolean hasSamePT(CardView otherCard) {
if (getCurrentState().getPower() != otherCard.getCurrentState().getPower())
return false;
if (getCurrentState().getToughness() != otherCard.getCurrentState().getToughness())
return false;
return true;
}
void updateCounters(Card c) {
set(TrackableProperty.Counters, c.getCounters());
updateLethalDamage(c);