mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
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:
@@ -253,6 +253,13 @@ public class CardView extends GameEntityView {
|
|||||||
}
|
}
|
||||||
return counters.equals(otherCard.getCounters());
|
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) {
|
void updateCounters(Card c) {
|
||||||
set(TrackableProperty.Counters, c.getCounters());
|
set(TrackableProperty.Counters, c.getCounters());
|
||||||
updateLethalDamage(c);
|
updateLethalDamage(c);
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ public class VField extends FContainer {
|
|||||||
if (!c.hasCardAttachments() &&
|
if (!c.hasCardAttachments() &&
|
||||||
cardName.equals(c.getCurrentState().getName()) &&
|
cardName.equals(c.getCurrentState().getName()) &&
|
||||||
card.hasSameCounters(c) &&
|
card.hasSameCounters(c) &&
|
||||||
|
card.hasSamePT(c) && //don't stack token with different PT
|
||||||
card.getCurrentState().getKeywordKey().equals(c.getCurrentState().getKeywordKey()) &&
|
card.getCurrentState().getKeywordKey().equals(c.getCurrentState().getKeywordKey()) &&
|
||||||
card.isTapped() == c.isTapped() && // don't stack tapped tokens on untapped tokens
|
card.isTapped() == c.isTapped() && // don't stack tapped tokens on untapped tokens
|
||||||
card.isSick() == c.isSick() && //don't stack sick tokens on non sick
|
card.isSick() == c.isSick() && //don't stack sick tokens on non sick
|
||||||
|
|||||||
Reference in New Issue
Block a user