Refactor: replaced sourceId by source and introduced source param in some methods;

This commit is contained in:
Oleg Agafonov 2020-12-12 20:23:19 +04:00
parent 2bb472607b
commit db239a1055
3205 changed files with 7080 additions and 6795 deletions

View file

@ -49,13 +49,13 @@ public class DoWhenCostPaid extends OneShotEffect {
}
String message = CardUtil.replaceSourceName(chooseUseText, mageObject.getLogName());
Outcome payOutcome = ability.getEffects().getOutcome(source, this.outcome);
if (!cost.canPay(source, source.getSourceId(), player.getId(), game)
if (!cost.canPay(source, source, player.getId(), game)
|| (optional && !player.chooseUse(payOutcome, message, source, game))) {
return false;
}
cost.clearPaid();
int bookmark = game.bookmarkState();
if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
if (cost.pay(source, game, source, player.getId(), false)) {
ability.getEffects().setTargetPointer(getTargetPointer());
game.fireReflexiveTriggeredAbility(ability, source);
player.resetStoredBookmark(game);