feat: complete playtest parity improvements
This commit is contained in:
@@ -71,6 +71,11 @@ func recompute_player(player) -> void:
|
||||
player.normalize_resources()
|
||||
elif player is ActorState:
|
||||
player.recompute_equipment_modifiers(attributes, skills, combat)
|
||||
var main_hand := item_in_slot(&"main_hand")
|
||||
if main_hand != null and main_hand.definition != null and StringName(main_hand.definition.raw.get("weapon_kind", "")) != &"ranged":
|
||||
player.metadata["melee_weapon_name"] = main_hand.definition.name
|
||||
else:
|
||||
player.metadata.erase("melee_weapon_name")
|
||||
|
||||
func _accumulate_combat_modifiers(item: ItemInstance, combat: Dictionary[StringName, Variant]) -> void:
|
||||
var raw := item.definition.raw
|
||||
|
||||
@@ -92,6 +92,8 @@ func use_item(instance_id: StringName, default_target, identification: ItemIdent
|
||||
var status := StringName(effect_data.get("status", ""))
|
||||
recipient.apply_status(StatusEffect.new(status, int(effect_data.get("duration", -1)), int(effect_data.get("magnitude", 0)), item.definition.id))
|
||||
effects.append({"type": effect_type, "status": status})
|
||||
&"learn_spell":
|
||||
effects.append({"type": effect_type, "spell": StringName(effect_data.get("spell", ""))})
|
||||
_:
|
||||
effects.append({"type": effect_type})
|
||||
var consumed := remove_item(instance_id)
|
||||
|
||||
Reference in New Issue
Block a user