mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Fix Blazing Torch ability
This commit is contained in:
@@ -510,6 +510,9 @@ public class AiCostDecision extends CostDecisionMakerBase {
|
||||
if (cost.payCostFromSource()) {
|
||||
return PaymentDecision.card(source);
|
||||
}
|
||||
if (cost.getType().equals("OriginalHost")) {
|
||||
return PaymentDecision.card(ability.getHostCard());
|
||||
}
|
||||
if (cost.getAmount().equals("All")) {
|
||||
// Does the AI want to use Sacrifice All?
|
||||
return null;
|
||||
|
||||
@@ -97,8 +97,11 @@ public class CostSacrifice extends CostPartWithList {
|
||||
public final boolean canPay(final SpellAbility ability, final Player activator) {
|
||||
final Card source = ability.getHostCard();
|
||||
|
||||
// You can always sac all
|
||||
if (!payCostFromSource()) {
|
||||
if (getType().equals("OriginalHost")) {
|
||||
Card originalEquipment = ability.getOriginalHost();
|
||||
return originalEquipment.isEquipping();
|
||||
}
|
||||
else if (!payCostFromSource()) { // You can always sac all
|
||||
if ("All".equalsIgnoreCase(getAmount())) {
|
||||
CardCollectionView typeList = activator.getCardsIn(ZoneType.Battlefield);
|
||||
typeList = CardLists.getValidCards(typeList, getType().split(";"), activator, source, ability);
|
||||
|
||||
@@ -1051,6 +1051,16 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
||||
}
|
||||
}
|
||||
|
||||
if (type.equals("OriginalHost")) {
|
||||
Card host = ability.getOriginalHost();
|
||||
if (host.getController() == ability.getActivatingPlayer() && host.isInPlay()) {
|
||||
return player.getController().confirmPayment(cost, Localizer.getInstance().getMessage("lblSacrificeCardConfirm", CardTranslation.getTranslatedName(host.getName())), ability) ? PaymentDecision.card(host) : null;
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (amount.equals("All")) {
|
||||
return PaymentDecision.card(list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user