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()) {
|
if (cost.payCostFromSource()) {
|
||||||
return PaymentDecision.card(source);
|
return PaymentDecision.card(source);
|
||||||
}
|
}
|
||||||
|
if (cost.getType().equals("OriginalHost")) {
|
||||||
|
return PaymentDecision.card(ability.getHostCard());
|
||||||
|
}
|
||||||
if (cost.getAmount().equals("All")) {
|
if (cost.getAmount().equals("All")) {
|
||||||
// Does the AI want to use Sacrifice All?
|
// Does the AI want to use Sacrifice All?
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -97,8 +97,11 @@ public class CostSacrifice extends CostPartWithList {
|
|||||||
public final boolean canPay(final SpellAbility ability, final Player activator) {
|
public final boolean canPay(final SpellAbility ability, final Player activator) {
|
||||||
final Card source = ability.getHostCard();
|
final Card source = ability.getHostCard();
|
||||||
|
|
||||||
// You can always sac all
|
if (getType().equals("OriginalHost")) {
|
||||||
if (!payCostFromSource()) {
|
Card originalEquipment = ability.getOriginalHost();
|
||||||
|
return originalEquipment.isEquipping();
|
||||||
|
}
|
||||||
|
else if (!payCostFromSource()) { // You can always sac all
|
||||||
if ("All".equalsIgnoreCase(getAmount())) {
|
if ("All".equalsIgnoreCase(getAmount())) {
|
||||||
CardCollectionView typeList = activator.getCardsIn(ZoneType.Battlefield);
|
CardCollectionView typeList = activator.getCardsIn(ZoneType.Battlefield);
|
||||||
typeList = CardLists.getValidCards(typeList, getType().split(";"), activator, source, ability);
|
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")) {
|
if (amount.equals("All")) {
|
||||||
return PaymentDecision.card(list);
|
return PaymentDecision.card(list);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user