mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +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.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public static boolean wouldLoseLife(final Player ai, final Combat combat) {
|
public static boolean wouldLoseLife(final Player ai, final Combat combat) {
|
||||||
|
|
||||||
return (ComputerUtilCombat.lifeThatWouldRemain(ai, combat) < ai.getLife());
|
return (ComputerUtilCombat.lifeThatWouldRemain(ai, combat) < ai.getLife());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -346,6 +346,19 @@ public class ComputerUtilCost {
|
|||||||
return true;
|
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) {
|
public static boolean isSacrificeSelfCost(final Cost cost) {
|
||||||
if (cost == null) {
|
if (cost == null) {
|
||||||
return false;
|
return false;
|
||||||
@@ -406,19 +419,6 @@ public class ComputerUtilCost {
|
|||||||
return true;
|
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>
|
* <p>
|
||||||
* shouldPayCost.
|
* shouldPayCost.
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
while (!tgtCards.isEmpty() && amount > 0) {
|
while (!tgtCards.isEmpty() && amount > 0) {
|
||||||
activator.getController().tempShowCards(showCards);
|
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();
|
activator.getController().endTempShowCards();
|
||||||
if (tgtCard == null) {
|
if (tgtCard == null) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ public class RollDiceEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
final PlayerCollection playersToRoll = getTargetPlayers(sa);
|
final PlayerCollection playersToRoll = getTargetPlayers(sa);
|
||||||
|
|
||||||
for(Player player : playersToRoll) {
|
for (Player player : playersToRoll) {
|
||||||
rollDice(sa, player, amount, sides);
|
rollDice(sa, player, amount, sides);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user