mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Merge branch 'playfix' into 'master'
Small PlayEffect fix See merge request core-developers/forge!4952
This commit is contained in:
@@ -472,7 +472,6 @@ public class ComputerUtilCombat {
|
||||
* @return a boolean.
|
||||
*/
|
||||
public static boolean wouldLoseLife(final Player ai, final Combat combat) {
|
||||
|
||||
return (ComputerUtilCombat.lifeThatWouldRemain(ai, combat) < ai.getLife());
|
||||
}
|
||||
|
||||
|
||||
@@ -346,6 +346,19 @@ public class ComputerUtilCost {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check sacrifice cost.
|
||||
*
|
||||
* @param cost
|
||||
* the cost
|
||||
* @param source
|
||||
* the source
|
||||
* @return true, if successful
|
||||
*/
|
||||
public static boolean checkSacrificeCost(final Player ai, final Cost cost, final Card source, final SpellAbility sourceAbility) {
|
||||
return checkSacrificeCost(ai, cost, source, sourceAbility, true);
|
||||
}
|
||||
|
||||
public static boolean isSacrificeSelfCost(final Cost cost) {
|
||||
if (cost == null) {
|
||||
return false;
|
||||
@@ -406,19 +419,6 @@ public class ComputerUtilCost {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check sacrifice cost.
|
||||
*
|
||||
* @param cost
|
||||
* the cost
|
||||
* @param source
|
||||
* the source
|
||||
* @return true, if successful
|
||||
*/
|
||||
public static boolean checkSacrificeCost(final Player ai, final Cost cost, final Card source, final SpellAbility sourceAbility) {
|
||||
return checkSacrificeCost(ai, cost, source, sourceAbility, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* shouldPayCost.
|
||||
|
||||
@@ -187,7 +187,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
|
||||
while (!tgtCards.isEmpty() && amount > 0) {
|
||||
activator.getController().tempShowCards(showCards);
|
||||
Card tgtCard = controller.getController().chooseSingleEntityForEffect(tgtCards, sa, Localizer.getInstance().getMessage("lblSelectCardToPlay"), !singleOption, null);
|
||||
Card tgtCard = controller.getController().chooseSingleEntityForEffect(tgtCards, sa, Localizer.getInstance().getMessage("lblSelectCardToPlay"), !singleOption && optional, null);
|
||||
activator.getController().endTempShowCards();
|
||||
if (tgtCard == null) {
|
||||
break;
|
||||
|
||||
@@ -143,7 +143,7 @@ public class RollDiceEffect extends SpellAbilityEffect {
|
||||
|
||||
final PlayerCollection playersToRoll = getTargetPlayers(sa);
|
||||
|
||||
for(Player player : playersToRoll) {
|
||||
for (Player player : playersToRoll) {
|
||||
rollDice(sa, player, amount, sides);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user