mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Fix NPE
This commit is contained in:
@@ -752,14 +752,16 @@ public class CountersPutAi extends CountersAi {
|
|||||||
final int amount = AbilityUtils.calculateAmount(source, amountStr, sa);
|
final int amount = AbilityUtils.calculateAmount(source, amountStr, sa);
|
||||||
int left = amount;
|
int left = amount;
|
||||||
final String[] types;
|
final String[] types;
|
||||||
|
String type = "";
|
||||||
if (sa.hasParam("CounterType")) {
|
if (sa.hasParam("CounterType")) {
|
||||||
// TODO some cards let you choose types, should check each
|
// TODO some cards let you choose types, should check each
|
||||||
types = sa.getParam("CounterType").split(",");
|
types = sa.getParam("CounterType").split(",");
|
||||||
} else {
|
type = types[0];
|
||||||
|
} else if (sa.hasParam("CounterTypes")) {
|
||||||
// all types will be added
|
// all types will be added
|
||||||
types = sa.getParam("CounterTypes").split(",");
|
types = sa.getParam("CounterTypes").split(",");
|
||||||
|
type = types[0];
|
||||||
}
|
}
|
||||||
final String type = types[0];
|
|
||||||
|
|
||||||
if (!sa.usesTargeting()) {
|
if (!sa.usesTargeting()) {
|
||||||
// No target. So must be defined
|
// No target. So must be defined
|
||||||
|
|||||||
Reference in New Issue
Block a user