mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Merge branch 'master' into 'master'
NPE guard when generating description in DamageDealEffect. See merge request core-developers/forge!5827
This commit is contained in:
@@ -123,7 +123,7 @@ public class DamageDealEffect extends DamageBaseEffect {
|
|||||||
stringBuilder.append(".");
|
stringBuilder.append(".");
|
||||||
if (spellAbility.hasParam("ReplaceDyingDefined")) {
|
if (spellAbility.hasParam("ReplaceDyingDefined")) {
|
||||||
String statement = "If that creature would die this turn, exile it instead.";
|
String statement = "If that creature would die this turn, exile it instead.";
|
||||||
String[] sentences = spellAbility.getParam("SpellDescription").split("\\.");
|
String[] sentences = spellAbility.getParamOrDefault("SpellDescription", "").split("\\.");
|
||||||
for (String s : sentences) {
|
for (String s : sentences) {
|
||||||
if (s.contains("would die")) {
|
if (s.contains("would die")) {
|
||||||
statement = s;
|
statement = s;
|
||||||
|
|||||||
Reference in New Issue
Block a user