From 8e8bc627ef3e343036637fdecae2a6db191c205f Mon Sep 17 00:00:00 2001 From: Agetian Date: Wed, 14 Dec 2016 04:37:49 +0000 Subject: [PATCH] - Fixed generation of Storm description (fixes e.g. Astral Steel and friends crashing). --- forge-game/src/main/java/forge/game/card/Card.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 7ae884ca79a..175dc6ab45e 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -1887,9 +1887,13 @@ public class Card extends GameEntity implements Comparable { .append(".\r\n"); } else if (keyword.startsWith("Storm")) { if (sb.toString().contains("Target") || sb.toString().contains("target")) { - sb.insert( - sb.indexOf("Storm (When you cast this spell, copy it for each spell cast before it this turn.") + 81, - " You may choose new targets for the copies."); + if (sb.toString().contains("Storm (When you cast this spell, copy it for each spell cast before it this turn.")) { + sb.insert( + sb.indexOf("Storm (When you cast this spell, copy it for each spell cast before it this turn.") + 81, + " You may choose new targets for the copies."); + } else { + sb.append("Storm (When you cast this spell, copy it for each spell cast before it this turn. You may choose new targets for the copies."); + } } } else if (keyword.startsWith("Replicate") && !sb.toString().contains("you paid its replicate cost.")) { if (sb.toString().endsWith("\r\n\r\n")) {