* Fixed NPE in TargetImpl.

This commit is contained in:
LevelX2 2014-06-15 19:05:58 +02:00
parent e74dc249bc
commit adcbcc75f7
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ public class ProliferateEffect extends OneShotEffect {
//had, if thats the case this ability should fizzle.
if (target.canChoose(controller.getId(), game)) {
boolean abilityApplied = false;
Map<String, Serializable> options = new HashMap<String, Serializable>();
Map<String, Serializable> options = new HashMap<>();
options.put("UI.right.btn.text", "Done");
while (target.canChoose(controller.getId(), game)) {
if (controller.choose(Outcome.Benefit, target, source.getSourceId(), game, options)) {

View file

@ -164,7 +164,7 @@ public abstract class TargetImpl implements Target {
@Override
public boolean isRequired(Ability ability) {
return ability.isActivated() || !(ability.getAbilityType().equals(AbilityType.SPELL) || ability.getAbilityType().equals(AbilityType.ACTIVATED));
return ability == null || ability.isActivated() || !(ability.getAbilityType().equals(AbilityType.SPELL) || ability.getAbilityType().equals(AbilityType.ACTIVATED));
}
@Override