CommandArgs and ability.setChooseTargetAI
Hello,
I'm debugging Hedron Crab. After the conversion of Player to a class, it has exposed a NullPointerException. When the Landfall ability of Hedron Crab is resolved for the AI, you get the Exception. When it is resolved when under Human control, everything works fine.
The problem code is at the end of GameActionUtil.landfall_Hedron_Crab():
but, if I change it to this:
Does anyone know this code well enough to dig in?
-slapshot5
I'm debugging Hedron Crab. After the conversion of Player to a class, it has exposed a NullPointerException. When the Landfall ability of Hedron Crab is resolved for the AI, you get the Exception. When it is resolved when under Human control, everything works fine.
The problem code is at the end of GameActionUtil.landfall_Hedron_Crab():
- Code: Select all
else if(c.getController().equals(AllZone.ComputerPlayer)) {
System.out.print("Setting target player: ");
ability.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
System.out.println("getTargetPlayer(): "+ability.getTargetPlayer());
//AllZone.Stack.add(ability);
}
but, if I change it to this:
- Code: Select all
else if(c.getController().equals(AllZone.ComputerPlayer)) {
System.out.print("Setting target player: ");
ability.setTargetPlayer(AllZone.HumanPlayer);
System.out.println("getTargetPlayer(): "+ability.getTargetPlayer());
AllZone.Stack.add(ability);
}
Does anyone know this code well enough to dig in?
-slapshot5