From 5054006ffc214611ef8a46e176932d51b9a09282 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 4 Apr 2024 13:15:53 -0400 Subject: [PATCH] not_enemy_types_json parsed --- src/engine/objects/ItemTemplate.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 241b7d02..4d123ba3 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -504,6 +504,15 @@ public class ItemTemplate { rune_enemy_monster_types.add(monsterType); } + JSONArray not_enemy_types_json = (JSONArray) jsonObject.get("rune_not_enemy_monster_types"); + + for (Object o : enemy_types_json) { + String notenemy = (String) o; + notenemy = notenemy.replaceAll("-", ""); + Enum.MonsterType monsterType = Enum.MonsterType.valueOf(notenemy); + not_enemy_types_json.add(monsterType); + } + rune_renderable = ((Boolean) jsonObject.get("rune_renderable")); rune_natural_power_attack = ((Long) jsonObject.get("rune_natural_power_attack")).intValue();