fix [CLB] Baba Lysaga counting of card types dynamically (#10796)

This commit is contained in:
Susucre 2023-08-14 02:43:58 +02:00 committed by GitHub
parent accb7c63bf
commit 95deeafa86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 102 additions and 15 deletions

View file

@ -60,7 +60,7 @@ public class SacrificeTargetCost extends CostImpl implements SacrificeCost {
if (permanent == null) {
return false;
}
permanents.add(permanent.copy());
addSacrificeTarget(game, permanent);
paid |= permanent.sacrifice(source, game);
}
if (!paid && targets.get(0).getNumberOfTargets() == 0) {
@ -70,6 +70,10 @@ public class SacrificeTargetCost extends CostImpl implements SacrificeCost {
return paid;
}
protected void addSacrificeTarget(Game game, Permanent permanent) {
permanents.add(permanent.copy());
}
@Override
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
UUID activator = controllerId;