Re: ETB Replacement

Posted:
12 Sep 2012, 13:07
by moomarc
Hellfish, it seems that
Primordial Hydra isn't working anymore. Casting it crashes with
- Crash | Open
- Code: Select all
java.lang.NumberFormatException: For input string: "X"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at forge.card.abilityfactory.AbilityFactory.calculateAmount(AbilityFactory.java:1784)
at forge.card.cost.CostMana.payHuman(CostMana.java:211)
at forge.card.cost.CostPayment.payCost(CostPayment.java:221)
at forge.card.spellability.SpellAbilityRequirements.startPaying(SpellAbilityRequirements.java:179)
at forge.card.spellability.SpellAbilityRequirements.needPayment(SpellAbilityRequirements.java:165)
Never mind. Seems to be all 'pay
X during resolve' costs.
Edit: Not actually sure where the problem is.
Banefire works fine for example, but
Endless Scream crashes here now too.
Re: ETB Replacement

Posted:
12 Sep 2012, 13:45
by moomarc
Commenting out ln1593 in AbilityFactory.java seems to fix the problem, but I'm not sure what you were trying to do so don't just want to remove the line.
- Code: Select all
if (ability != null) {
svarval = ability.getSVar(amount);
if (svarval.equals("")) {
try {
ln 1593 -> Integer.parseInt(amount);
//If this is reached, amount wasn't an integer
//Print a warning to console to help debug if an ability is not stolen properly.
System.out.println("WARNING:SVar fallback to card with ability present!");
System.out.println("Card:" + card.getName());
System.out.println("Ability:" + ability.toString());
svarval = card.getSVar(amount);
}
catch (Exception ignored) {}
}
}
Re: ETB Replacement

Posted:
12 Sep 2012, 14:34
by Hellfish
That line was meant to test if the amount is an integer or string, I thnk I know the problem, I must've relapsed to c# when I wrote that and another catch block.Will fix this afternoon,thanks!
EDIT: Should be good now, though there were more issues with the hydras and friends to fix.I'm not convinced those weren't from earlier,though.Oh well, it's fixed now.Will commit once my internet connection stops being a jerk.
Re: ETB Replacement

Posted:
13 Sep 2012, 06:50
by Sloth
I still get this error when casting
Chalice of the Void:
- | Open
- java.lang.NumberFormatException: For input string: "X"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at forge.card.abilityfactory.AbilityFactory.calculateAmount(AbilityFactory.java:1784)
at forge.card.cost.CostMana.payHuman(CostMana.java:211)
at forge.card.cost.CostPayment.payCost(CostPayment.java:221)
Re: ETB Replacement

Posted:
13 Sep 2012, 07:21
by moomarc
Sloth wrote:I still get this error when casting
Chalice of the Void:
- | Open
- java.lang.NumberFormatException: For input string: "X"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at forge.card.abilityfactory.AbilityFactory.calculateAmount(AbilityFactory.java:1784)
at forge.card.cost.CostMana.payHuman(CostMana.java:211)
at forge.card.cost.CostPayment.payCost(CostPayment.java:221)
That's weird; the Chalice works fine for me this morning.

Re: ETB Replacement

Posted:
13 Sep 2012, 07:33
by Sloth
moomarc wrote:Sloth wrote:I still get this error when casting
Chalice of the Void:
- | Open
- java.lang.NumberFormatException: For input string: "X"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at forge.card.abilityfactory.AbilityFactory.calculateAmount(AbilityFactory.java:1784)
at forge.card.cost.CostMana.payHuman(CostMana.java:211)
at forge.card.cost.CostPayment.payCost(CostPayment.java:221)
That's weird; the Chalice works fine for me this morning.

Oops, forgot to refresh. Nevermind.
Re: ETB Replacement

Posted:
31 Dec 2012, 19:00
by timmermac
Un-stickied. This seems to be completed. Can re-sticky if that needs to happen.