Fix crash for triggers with no description

This commit is contained in:
tool4EvEr
2021-02-25 22:12:23 +01:00
parent 8ccbffce48
commit c59cd875b8
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ Name:Canyon Jerboa
ManaCost:2 W ManaCost:2 W
Types:Creature Mouse Types:Creature Mouse
PT:1/2 PT:1/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl | TriggerZones$ Battlefield | Execute$ DBPumpAll | Landfall — Whenever a land enters the battlefield under your control, creatures you control get +1/+1 until end of turn. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl | TriggerZones$ Battlefield | Execute$ DBPumpAll | TriggerDescription$ Landfall — Whenever a land enters the battlefield under your control, creatures you control get +1/+1 until end of turn.
SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1
SVar:BuffedBy:Land SVar:BuffedBy:Land
Oracle:Landfall — Whenever a land enters the battlefield under your control, creatures you control get +1/+1 until end of turn. Oracle:Landfall — Whenever a land enters the battlefield under your control, creatures you control get +1/+1 until end of turn.

View File

@@ -1726,7 +1726,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
// for the purpose of pre-ordering, no need for extra granularity // for the purpose of pre-ordering, no need for extra granularity
Integer idxAdditionalInfo = firstStr.indexOf(" ["); Integer idxAdditionalInfo = firstStr.indexOf(" [");
StringBuilder saLookupKey = new StringBuilder(idxAdditionalInfo != -1 ? firstStr.substring(0, idxAdditionalInfo - 1) : firstStr); StringBuilder saLookupKey = new StringBuilder(idxAdditionalInfo > 0 ? firstStr.substring(0, idxAdditionalInfo - 1) : firstStr);
char delim = (char) 5; char delim = (char) 5;
for (int i = 1; i < activePlayerSAs.size(); i++) { for (int i = 1; i < activePlayerSAs.size(); i++) {
@@ -1744,7 +1744,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
saLookupKey.append(delim).append(saStr); saLookupKey.append(delim).append(saStr);
idxAdditionalInfo = saLookupKey.indexOf(" ["); idxAdditionalInfo = saLookupKey.indexOf(" [");
if (idxAdditionalInfo != -1) { if (idxAdditionalInfo > 0) {
saLookupKey = new StringBuilder(saLookupKey.substring(0, idxAdditionalInfo - 1)); saLookupKey = new StringBuilder(saLookupKey.substring(0, idxAdditionalInfo - 1));
} }
} }