Add antidote status cure item

This commit is contained in:
2026-06-18 09:43:23 +09:00
parent 1fa7e2afac
commit b8b2626d97
15 changed files with 112 additions and 14 deletions

View File

@@ -1161,8 +1161,11 @@ func _item_target_preview_badge(selected: Dictionary, target: Dictionary) -> Dic
var hp_heal := int(preview.get("heal", 0))
var mp_heal := int(preview.get("mp_heal", 0))
if hp_heal <= 0 and mp_heal <= 0:
return _make_target_preview_badge("FULL", "invalid")
var cure_statuses: Array = preview.get("cure_statuses", [])
if hp_heal <= 0 and mp_heal <= 0 and cure_statuses.is_empty():
return _make_target_preview_badge("NO FX", "invalid")
if not cure_statuses.is_empty():
return _make_target_preview_badge("CURE", "support")
if hp_heal > 0 and mp_heal > 0:
return _make_target_preview_badge("+%d/%d" % [hp_heal, mp_heal], "heal")
if hp_heal > 0:
@@ -1474,8 +1477,9 @@ func _update_item_forecast(selected: Dictionary) -> void:
var hp_heal := int(preview.get("heal", 0))
var mp_heal := int(preview.get("mp_heal", 0))
if hp_heal <= 0 and mp_heal <= 0:
forecast_label.text = "%s: %s, %s\nNo recovery needed." % [
var cure_statuses: Array = preview.get("cure_statuses", [])
if hp_heal <= 0 and mp_heal <= 0 and cure_statuses.is_empty():
forecast_label.text = "%s: %s, %s\nNo item effect needed." % [
preview["item_name"],
range_text,
count_text
@@ -1495,6 +1499,8 @@ func _update_item_forecast(selected: Dictionary) -> void:
preview["target_mp_after"],
target.get("max_mp", 0)
])
if not cure_statuses.is_empty():
recovery_parts.append("Cure %s" % _join_strings(cure_statuses, ", "))
forecast_label.text = "%s: %s, %s\n%s." % [
preview["item_name"],
@@ -3389,6 +3395,8 @@ func _format_item_effect_text(item: Dictionary) -> String:
parts.append("Heal %d" % int(effect.get("amount", 0)))
elif str(effect.get("type", "")) == "heal_mp":
parts.append("MP %d" % int(effect.get("amount", 0)))
elif str(effect.get("type", "")) == "cure_status":
parts.append("Cure %s" % str(effect.get("status", "status")).replace("_", " ").capitalize())
if parts.is_empty():
return str(item.get("kind", "item")).capitalize()
return _join_strings(parts, ", ")