remove redundant null checks before instanceof

This commit is contained in:
Ingmar Goudt 2018-09-17 21:09:42 +02:00
parent d3aea0270c
commit f04d7c9b03
72 changed files with 184 additions and 186 deletions

View file

@ -31,7 +31,7 @@ public class DealsDamageToOneOrMoreCreaturesTriggeredAbility extends DealsDamage
|| game.getTurn().getStepType() == PhaseStep.FIRST_COMBAT_DAMAGE) {
String stepHash = (String) game.getState().getValue("damageStep" + getOriginalId());
String newStepHash = game.getStep().getType().toString() + game.getTurnNum();
if (stepHash == null || !newStepHash.equals(stepHash)) {
if (!newStepHash.equals(stepHash)) {
// this ability did not trigger during this damage step
game.getState().setValue("damageStep" + getOriginalId(), game.getStep().getType().toString() + game.getTurnNum());
return true;