Add panacea status cure item
This commit is contained in:
@@ -1831,11 +1831,7 @@ func _apply_item_status_cure(target: Dictionary, status: String) -> Array:
|
||||
var kept_effects := []
|
||||
for effect in _active_status_effects(target):
|
||||
var effect_status := str(effect.get("status", "")).strip_edges().to_lower()
|
||||
var effect_type := str(effect.get("type", ""))
|
||||
var should_cure := (
|
||||
effect_type == "damage_over_time"
|
||||
and (normalized_status.is_empty() or effect_status == normalized_status)
|
||||
)
|
||||
var should_cure := not effect_status.is_empty() and (normalized_status.is_empty() or effect_status == normalized_status)
|
||||
if should_cure:
|
||||
var display_name := _status_display_name(str(effect.get("status", normalized_status)))
|
||||
if not cured_statuses.has(display_name):
|
||||
@@ -1879,9 +1875,9 @@ func _item_curable_status_names(target: Dictionary, item: Dictionary) -> Array:
|
||||
continue
|
||||
var status := str(effect.get("status", "")).strip_edges().to_lower()
|
||||
for active_effect in _active_status_effects(target):
|
||||
if str(active_effect.get("type", "")) != "damage_over_time":
|
||||
continue
|
||||
var active_status := str(active_effect.get("status", "")).strip_edges().to_lower()
|
||||
if active_status.is_empty():
|
||||
continue
|
||||
if not status.is_empty() and active_status != status:
|
||||
continue
|
||||
var display_name := _status_display_name(str(active_effect.get("status", status)))
|
||||
|
||||
Reference in New Issue
Block a user