mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Fixed a possible endless loop while player left game during damage distribution.
This commit is contained in:
parent
728281524a
commit
ef147bc80c
2 changed files with 2 additions and 2 deletions
|
@ -919,7 +919,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
public void assignDamage(int damage, List<UUID> targets, String singleTargetName, UUID sourceId, Game game) {
|
||||
updateGameStatePriority("assignDamage", game);
|
||||
int remainingDamage = damage;
|
||||
while (remainingDamage > 0) {
|
||||
while (remainingDamage > 0 && isInGame()) {
|
||||
Target target = new TargetCreatureOrPlayer();
|
||||
if (singleTargetName != null) {
|
||||
target.setTargetName(singleTargetName);
|
||||
|
|
|
@ -113,7 +113,7 @@ class MasterOfTheWildHuntEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
List<UUID> wolves = new ArrayList<UUID>();
|
||||
List<UUID> wolves = new ArrayList<>();
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
if (target != null && game.getBattlefield().countAll(filter, source.getControllerId(), game) > 0) {
|
||||
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||
|
|
Loading…
Reference in a new issue