Revert "Added missing fields to many copy constructors. (#8957)" (#8999)

This reverts commit 82708e4273.

Some of these (AI related result in bloated memory usage, needs more investigation).
This commit is contained in:
Alex Vasile 2022-05-25 12:57:24 -06:00 committed by GitHub
parent 2f3831599d
commit 015cdf3136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 597 additions and 811 deletions

View file

@ -135,7 +135,7 @@ class ReturnAttackerToHandTargetCost extends CostImpl {
filter.add(UnblockedPredicate.instance);
}
private UUID defendingPlayerId;
private UUID defendingPlayerId = null;
public ReturnAttackerToHandTargetCost() {
this.addTarget(new TargetControlledPermanent(filter));
@ -144,7 +144,6 @@ class ReturnAttackerToHandTargetCost extends CostImpl {
public ReturnAttackerToHandTargetCost(ReturnAttackerToHandTargetCost cost) {
super(cost);
this.defendingPlayerId = cost.defendingPlayerId;
}
@Override
@ -153,7 +152,8 @@ class ReturnAttackerToHandTargetCost extends CostImpl {
for (UUID targetId : targets.get(0).getTargets()) {
Permanent permanent = game.getPermanent(targetId);
Player controller = game.getPlayer(controllerId);
if (permanent == null || controller == null) {
if (permanent == null
|| controller == null) {
return false;
}
defendingPlayerId = game.getCombat().getDefenderId(permanent.getId());