mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Merge pull request #8330 from weirddan455/prevent-damage
Removed game.preventDamage method (fixes #8280)
This commit is contained in:
commit
4943a16464
2 changed files with 2 additions and 21 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue