Merge pull request #8330 from weirddan455/prevent-damage

Removed game.preventDamage method (fixes #8280)
This commit is contained in:
Daniel Bomar 2021-09-29 15:32:50 -05:00 committed by GitHub
commit 4943a16464
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 21 deletions

View file

@ -316,31 +316,17 @@ public interface Game extends MageItem, Serializable, Copyable<Game> {
boolean replaceEvent(GameEvent event, Ability targetAbility);
/**
* Creates and fires an damage prevention event
* Creates and fires a damage prevention event
*
* @param damageEvent damage event that will be replaced (instanceof
* check will be done)
* @param source ability that's the source of the prevention effect
* @param game
* @param amountToPrevent max preventable amount
* @return true prevention was successfull / false prevention was replaced
* @return true prevention was successful / false prevention was replaced
*/
PreventionEffectData preventDamage(GameEvent damageEvent, Ability source, Game game, int amountToPrevent);
/**
* Creates and fires an damage prevention event
*
* @param event damage event that will be replaced (instanceof
* check will be done)
* @param source ability that's the source of the prevention
* effect
* @param game
* @param preventAllDamage true if there is no limit to the damage that can
* be prevented
* @return true prevention was successfull / false prevention was replaced
*/
PreventionEffectData preventDamage(GameEvent event, Ability source, Game game, boolean preventAllDamage);
void start(UUID choosingPlayerId);
void resume();

View file

@ -3067,11 +3067,6 @@ public abstract class GameImpl implements Game {
return state.replaceEvent(event, targetAbility, this);
}
@Override
public PreventionEffectData preventDamage(GameEvent event, Ability source, Game game, boolean preventAllDamage) {
return preventDamage(event, source, game, Integer.MAX_VALUE);
}
@Override
public PreventionEffectData preventDamage(GameEvent event, Ability source, Game game, int amountToPrevent) {
PreventionEffectData result = new PreventionEffectData(amountToPrevent);