mirror of
https://github.com/correl/mage.git
synced 2024-12-24 03:00:14 +00:00
* Fixed a bug that allowed to apply damage prevention replacement effects under certain circumstances multiple times to the same event.
This commit is contained in:
parent
84246e1935
commit
1a1fc09221
2 changed files with 6 additions and 1 deletions
|
@ -87,7 +87,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
private static final Logger log = Logger.getLogger(HumanPlayer.class);
|
||||
|
||||
static {
|
||||
replacementEffectChoice.setMessage("Choose replacement effect");
|
||||
replacementEffectChoice.setMessage("Choose replacement effect to resolve first");
|
||||
staticOptions.put("UI.right.btn.text", "Done");
|
||||
}
|
||||
|
||||
|
|
|
@ -359,6 +359,11 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
}
|
||||
for (PreventionEffect effect: preventionEffects) {
|
||||
if (event.getAppliedEffects() != null && event.getAppliedEffects().contains(effect.getId())) {
|
||||
// Effect already applied to this event, ignore it
|
||||
// TODO: Handle also gained effect that are connected to different abilities.
|
||||
continue;
|
||||
}
|
||||
HashSet<Ability> abilities = preventionEffects.getAbility(effect.getId());
|
||||
HashSet<Ability> applicableAbilities = new HashSet<>();
|
||||
for (Ability ability : abilities) {
|
||||
|
|
Loading…
Reference in a new issue