From be040a74bdf46e8e4e1b5e3f62ec035f9ea965a5 Mon Sep 17 00:00:00 2001 From: OMGeeky <> Date: Thu, 2 Oct 2025 15:57:21 +0200 Subject: [PATCH] change miss_effect to HitEffect instead of HitReceivedEffect (the received effects might have been applied, but the game UI would not display them, so better not show them here too) --- .../gpl/rpg/atcontentstudio/model/gamedata/Item.java | 10 +++++----- .../atcontentstudio/ui/gamedataeditors/ItemEditor.java | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/com/gpl/rpg/atcontentstudio/model/gamedata/Item.java b/src/com/gpl/rpg/atcontentstudio/model/gamedata/Item.java index 265a52f..c7aa412 100644 --- a/src/com/gpl/rpg/atcontentstudio/model/gamedata/Item.java +++ b/src/com/gpl/rpg/atcontentstudio/model/gamedata/Item.java @@ -36,7 +36,7 @@ public class Item extends JSONElement { public String description = null; public HitEffect hit_effect = null; public HitReceivedEffect hit_received_effect = null; - public HitReceivedEffect miss_effect = null; + public HitEffect miss_effect = null; public HitReceivedEffect miss_received_effect = null; public DeathEffect kill_effect = null; public EquipEffect equip_effect = null; @@ -197,7 +197,7 @@ public class Item extends JSONElement { Map missEffect = (Map) itemJson.get("missEffect"); if (missEffect != null) { - this.miss_effect = parseHitReceivedEffect(missEffect); + this.miss_effect = parseHitEffect(missEffect); } Map missReceivedEffect = (Map) itemJson.get("missReceivedEffect"); @@ -309,8 +309,8 @@ public class Item extends JSONElement { copyHitReceivedEffectValues(clone.hit_received_effect, this.hit_received_effect, clone); } if (this.miss_effect != null) { - clone.miss_effect = new HitReceivedEffect(); - copyHitReceivedEffectValues(clone.miss_effect, this.miss_effect, clone); + clone.miss_effect = new HitEffect(); + copyHitEffectValues(clone.miss_effect, this.miss_effect, clone); } if (this.miss_received_effect != null) { clone.miss_received_effect = new HitReceivedEffect(); @@ -415,7 +415,7 @@ public class Item extends JSONElement { } writeHitEffectToMap(itemJson, this.hit_effect, "hitEffect"); writeHitReceivedEffectToMap(itemJson, this.hit_received_effect, "hitReceivedEffect"); - writeHitReceivedEffectToMap(itemJson, this.miss_effect, "missEffect"); + writeHitEffectToMap(itemJson, this.miss_effect, "missEffect"); writeHitReceivedEffectToMap(itemJson, this.miss_received_effect, "missReceivedEffect"); String key; diff --git a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/ItemEditor.java b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/ItemEditor.java index 9cf135f..530ceae 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/ItemEditor.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/gamedataeditors/ItemEditor.java @@ -79,7 +79,7 @@ public class ItemEditor extends JSONElementEditor { private final CommonEditor.HitEffectPane hitEffectPane = new CommonEditor.HitEffectPane<>("Effect on every hit: ", this, null, "npc"); private final CommonEditor.DeathEffectPane killEffectPane = new CommonEditor.DeathEffectPane<>(killLabel, this, null); private final CommonEditor.HitReceivedEffectPane hitReceivedEffectPane = new CommonEditor.HitReceivedEffectPane<>("Effect on every hit received: ", this, "player", "npc"); - private final CommonEditor.HitReceivedEffectPane missEffectPane = new CommonEditor.HitReceivedEffectPane<>("Effect on every miss: ", this, "player", "npc"); + private final CommonEditor.HitEffectPane missEffectPane = new CommonEditor.HitEffectPane<>("Effect on every miss: ", this, "player", "npc"); private final CommonEditor.HitReceivedEffectPane missReceivedEffectPane = new CommonEditor.HitReceivedEffectPane<>("Effect on every miss received: ", this, "player", "npc"); public ItemEditor(Item item) { @@ -172,7 +172,7 @@ public class ItemEditor extends JSONElementEditor { hitReceivedEffectPane.createPaneContent(listener, item.writable, hitReceivedEffect); pane.add(hitReceivedEffectPane.effectPane, JideBoxLayout.FIX); - HitReceivedEffect missEffect = Objects.requireNonNullElseGet(item.miss_effect, HitReceivedEffect::new); + HitEffect missEffect = Objects.requireNonNullElseGet(item.miss_effect, HitEffect::new); missEffectPane.createPaneContent(listener, item.writable, missEffect); pane.add(missEffectPane.effectPane, JideBoxLayout.FIX);