forked from External/mage
refactor: expose Player->incrementLandsPlayed for some custom effects. (#10632)
* Expose Player->incrementLandsPlayed for some custom effects. * also expose resetLandsPlayed
This commit is contained in:
parent
a5dbf30605
commit
d658bf2265
4 changed files with 33 additions and 2 deletions
|
|
@ -485,7 +485,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public void beginTurn(Game game) {
|
||||
this.landsPlayed = 0;
|
||||
resetLandsPlayed();
|
||||
updateRange(game);
|
||||
}
|
||||
|
||||
|
|
@ -1285,7 +1285,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
game.fireEvent(landEventBefore);
|
||||
|
||||
if (moveCards(card, Zone.BATTLEFIELD, playLandAbility, game, false, false, false, null)) {
|
||||
landsPlayed++;
|
||||
incrementLandsPlayed();
|
||||
GameEvent landEventAfter = GameEvent.getEvent(GameEvent.EventType.LAND_PLAYED,
|
||||
card.getId(), playLandAbility, playerId, activationStatus.getApprovingObject());
|
||||
landEventAfter.setZone(cardZoneBefore);
|
||||
|
|
@ -1647,6 +1647,16 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
return useable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementLandsPlayed() {
|
||||
landsPlayed++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetLandsPlayed() {
|
||||
landsPlayed = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLandsPlayed() {
|
||||
return landsPlayed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue