mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Throwing exception if triggerdAbility == null.
This commit is contained in:
parent
199673622b
commit
8dd1a0fad0
1 changed files with 2 additions and 1 deletions
|
@ -751,7 +751,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
public boolean triggerAbility(TriggeredAbility source, Game game) {
|
||||
if (source == null) {
|
||||
log.warn("Null source in triggerAbility method");
|
||||
return false;
|
||||
throw new IllegalArgumentException("source TriggeredAbility must not be null");
|
||||
}
|
||||
//20091005 - 603.3c, 603.3d
|
||||
int bookmark = game.bookmarkState();
|
||||
|
@ -1065,6 +1065,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
}
|
||||
|
||||
|
||||
@SuppressWarnings({"null", "ConstantConditions"})
|
||||
private int doDamage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, ArrayList<UUID> appliedEffects) {
|
||||
if (damage > 0 && canDamage(game.getObject(sourceId), game)) {
|
||||
GameEvent event = new DamagePlayerEvent(playerId, sourceId, playerId, damage, preventable, combatDamage);
|
||||
|
|
Loading…
Reference in a new issue