Continued PRODUCTION/51 -- final stage. Enemy/boss mechanics were display-only; they now produce observable, distinct combat behaviour: - enemy_mechanics.py / .gd: all 55 mechanic tags (21 enemy families + 34 boss tags) resolve to 6 behaviour classes (bulwark/fortify/burrow/attrition/reflect/ swarm) via existing armor/hp/shield/rebuild fields + a new eff_penalty scalar that reduces player output. Boss tags + phase count set shield windows/pressure. - Both sims consume mechanic_eff_penalty (absent -> identity); game_root.gd calls EnemyMechanics.apply_to_scenario on the live P3a path to fold mechanics into each enemy spec. - test_enemy_mechanics.py PASS 6 checks; check_enemy_mechanics_parity.py PASS 21 cases python==gd; check_enemy_mechanics_battle.py PASS 5 mechanics -> 5 distinct durations [23.7/30.1/20.8/25.1/20.2], py==gd. - run_enemy_mechanics_ui_test.sh PASS (real game_root boss node): armour 5->6.5, HP 1500->2100, shield 200->585 from 标记/增援/护盾窗口 mechanics. - 4 new gates; full P2_CHECKS_PASS (82 gates), identity preserved. ALL FIVE STAGES (A-E) COMPLETE: effect primitives, 54-hero skills, talent behaviours, edict rules, enemy/boss mechanics -- each with real differentiated mechanisms, dual-engine parity, focused/distinctness gates, and live-runtime proof. The user's "不能敷衍,各系统不能全压成一个数值" requirement is met. Owner gates (human play feel, physical device, release) remain open. prototype/ untracked.
495 lines
18 KiB
GDScript
495 lines
18 KiB
GDScript
class_name P2BattleSim
|
|
extends RefCounted
|
|
|
|
## Runtime implementation of the frozen P3a/P2 numeric contract.
|
|
##
|
|
## This adapter MUST reproduce `tools/mvp_validation_sim.py` byte for byte.
|
|
## `tools/mvp_parity_gate.py` runs both and diffs the two JSON documents.
|
|
##
|
|
## Rules of the road:
|
|
## * No balance number may be hardcoded here. Everything comes from
|
|
## `data/mvp_battle_rules.json`, which the paper runner also reads.
|
|
## * The per-run efficiency factor is derived from SHA-256 so Python and
|
|
## GDScript land on the same double. Do not swap in RandomNumberGenerator.
|
|
## * `round_metric` uses `String.num` because GDScript's `roundf` rounds
|
|
## half away from zero while Python's `round` is banker's rounding.
|
|
##
|
|
## The simulation is exposed as a stepwise state machine so a live scene can
|
|
## drive it at 1x/2x/3x and inject real touch input on the correct tick.
|
|
## `run_scenario` is a thin loop over the same steps and stays authoritative for
|
|
## the batch/parity gate.
|
|
|
|
const RULES_PATH := "res://data/mvp_battle_rules.json"
|
|
const TIME_EPSILON := 1e-9
|
|
const SkillRuntime = preload("res://scripts/skill_runtime.gd")
|
|
|
|
|
|
static func load_rules() -> Dictionary:
|
|
var file := FileAccess.open(RULES_PATH, FileAccess.READ)
|
|
if file == null:
|
|
push_error("P2 battle rules could not be opened: %s" % RULES_PATH)
|
|
return {}
|
|
var parsed = JSON.parse_string(file.get_as_text())
|
|
if not parsed is Dictionary:
|
|
push_error("P2 battle rules is not a JSON object: %s" % RULES_PATH)
|
|
return {}
|
|
return parsed
|
|
|
|
|
|
static func _unit_from_hash(rules: Dictionary, scenario_id: String, seed_value: int) -> float:
|
|
var seed_spec: Dictionary = rules.get("seed_derivation", {})
|
|
var prefix_bytes := int(seed_spec.get("prefix_bytes", 6))
|
|
var divisor := float(seed_spec.get("divisor", 281474976710656.0))
|
|
var material := str(seed_spec.get("input_format", "{scenario_id}:{seed}")).format(
|
|
{"scenario_id": scenario_id, "seed": seed_value}
|
|
)
|
|
var context := HashingContext.new()
|
|
context.start(HashingContext.HASH_SHA256)
|
|
context.update(material.to_utf8_buffer())
|
|
var digest := context.finish()
|
|
var value := 0
|
|
for index in range(prefix_bytes):
|
|
value = value * 256 + int(digest[index])
|
|
return float(value) / divisor
|
|
|
|
|
|
static func _round_metric(value: float) -> float:
|
|
return float(String.num(value, 3))
|
|
|
|
|
|
static func _tick_time(tick: int, tick_seconds: float) -> float:
|
|
return float(String.num(float(tick) * tick_seconds, 10))
|
|
|
|
|
|
static func _armor_factor(rules: Dictionary, armor: float) -> float:
|
|
var armor_base := float(rules.get("constants", {}).get("armor_base", 100.0))
|
|
return armor_base / (armor_base + armor)
|
|
|
|
|
|
static func _build_enemy(
|
|
rules: Dictionary, enemy_id: String, index: int, spec_override: Dictionary = {}
|
|
) -> Dictionary:
|
|
# P2 scenarios take their stats from the shared rules file. P3a scenarios
|
|
# carry their own specs (from the launch content file) so new enemies never
|
|
# have to be duplicated into the P2 contract.
|
|
var spec: Dictionary = spec_override
|
|
if spec.is_empty():
|
|
spec = rules.get("enemies", {}).get(enemy_id, {})
|
|
var shield := float(spec.get("shield_max", spec.get("shield", 0.0)))
|
|
return {
|
|
"id": "%s#%d" % [enemy_id, index + 1],
|
|
"content_id": enemy_id,
|
|
"hp": float(spec.get("hp", 0.0)),
|
|
"max_hp": float(spec.get("hp", 0.0)),
|
|
"armor": float(spec.get("armor", 0.0)),
|
|
"shield": shield,
|
|
"shield_before": shield,
|
|
"weak_tag": str(spec.get("weak_tag", "")),
|
|
"rebuild_at": (spec.get("rebuild_at", []) as Array).duplicate(),
|
|
"rebuild_amount": float(spec.get("rebuild_amount", 0.0)),
|
|
"shield_broken": false,
|
|
"dead": false,
|
|
}
|
|
|
|
|
|
static func _choose_target(enemies: Array, target_id: String = "") -> Dictionary:
|
|
if not target_id.is_empty():
|
|
for enemy in enemies:
|
|
if not enemy["dead"] and (enemy["content_id"] == target_id or enemy["id"] == target_id):
|
|
return enemy
|
|
for enemy in enemies:
|
|
if not enemy["dead"]:
|
|
return enemy
|
|
return {}
|
|
|
|
|
|
static func _apply_damage(
|
|
rules: Dictionary,
|
|
enemy: Dictionary,
|
|
gross: float,
|
|
label: String,
|
|
timestamp: float,
|
|
event_log: Array,
|
|
weak: bool = false
|
|
) -> Dictionary:
|
|
if enemy.is_empty() or enemy["dead"] or gross <= 0.0:
|
|
return {"hp_damage": 0.0, "shield_damage": 0.0, "broke": false}
|
|
if weak:
|
|
gross *= float(rules.get("constants", {}).get("weak_multiplier", 1.5))
|
|
var mitigated: float = gross * _armor_factor(rules, float(enemy["armor"]))
|
|
var shield_damage: float = minf(float(enemy["shield"]), mitigated)
|
|
enemy["shield"] = float(enemy["shield"]) - shield_damage
|
|
var hp_damage: float = maxf(0.0, mitigated - shield_damage)
|
|
enemy["hp"] = maxf(0.0, float(enemy["hp"]) - hp_damage)
|
|
var broke := (
|
|
float(enemy["shield"]) <= TIME_EPSILON
|
|
and float(enemy["shield_before"]) > 0.0
|
|
and not bool(enemy["shield_broken"])
|
|
)
|
|
if broke:
|
|
enemy["shield_broken"] = true
|
|
event_log.append({
|
|
"time": _round_metric(timestamp),
|
|
"type": "shield_break",
|
|
"target_id": enemy["id"],
|
|
"source": label,
|
|
})
|
|
if float(enemy["hp"]) <= TIME_EPSILON:
|
|
enemy["dead"] = true
|
|
event_log.append({
|
|
"time": _round_metric(timestamp),
|
|
"type": "enemy_defeated",
|
|
"target_id": enemy["id"],
|
|
"source": label,
|
|
})
|
|
return {"hp_damage": hp_damage, "shield_damage": shield_damage, "broke": broke}
|
|
|
|
|
|
static func _sort_input_events(events: Array) -> Array:
|
|
# Stable insertion sort on (time, type) so the runtime matches Python's
|
|
# `sorted(..., key=lambda e: (time, type))` ordering exactly.
|
|
var sorted_events: Array = []
|
|
for event in events:
|
|
var insert_at := sorted_events.size()
|
|
for index in range(sorted_events.size()):
|
|
var other: Dictionary = sorted_events[index]
|
|
var other_time := float(other.get("time", 0.0))
|
|
var other_type := str(other.get("type", ""))
|
|
var event_time := float(event.get("time", 0.0))
|
|
var event_type := str(event.get("type", ""))
|
|
if event_time < other_time or (event_time == other_time and event_type < other_type):
|
|
insert_at = index
|
|
break
|
|
sorted_events.insert(insert_at, event)
|
|
return sorted_events
|
|
|
|
|
|
static func _has_weakness(rules: Dictionary, visible_hero_ids: Array, weak_tag: String) -> bool:
|
|
for hero_id in visible_hero_ids:
|
|
var hero: Dictionary = rules.get("heroes", {}).get(str(hero_id), {})
|
|
var counters: Array = hero.get("counters", [])
|
|
if counters.has(weak_tag):
|
|
return true
|
|
return false
|
|
|
|
|
|
## Build a live battle state. The returned dictionary is mutated by `step_state`.
|
|
static func create_state(
|
|
rules: Dictionary,
|
|
scenario: Dictionary,
|
|
seed_value: int,
|
|
timeout_seconds: float,
|
|
roster_bonus: float = 0.0
|
|
) -> Dictionary:
|
|
var scenario_id := str(scenario.get("id", ""))
|
|
var mode := str(scenario.get("mode", ""))
|
|
var tick_seconds := float(rules.get("tick_seconds", 0.1))
|
|
var constants: Dictionary = rules.get("constants", {})
|
|
var heroes: Dictionary = rules.get("heroes", {})
|
|
|
|
var efficiency := (
|
|
float(constants.get("efficiency_min", 0.86))
|
|
+ _unit_from_hash(rules, scenario_id, seed_value) * float(constants.get("efficiency_range", 0.28))
|
|
)
|
|
# Stage E: enemy mechanics reduce player output (identity when absent).
|
|
var eff_penalty := float(scenario.get("mechanic_eff_penalty", 0.0))
|
|
if eff_penalty > 0.0:
|
|
efficiency = _round_metric(efficiency * (1.0 - minf(0.6, eff_penalty)))
|
|
|
|
var visible_hero_ids: Array = (scenario.get("visible_hero_ids", []) as Array).duplicate()
|
|
var signature_dps := 0.0
|
|
for hero_id in visible_hero_ids:
|
|
signature_dps += float(heroes.get(str(hero_id), {}).get("signature_dps", 0.0))
|
|
var roster_dps := 0.0
|
|
var roster_ids: Array = scenario.get("roster_hero_ids", [])
|
|
if roster_ids.is_empty():
|
|
# P2 scenarios use the whole recruited fixture roster.
|
|
for hero in heroes.values():
|
|
roster_dps += float(hero.get("base_dps", 0.0))
|
|
else:
|
|
# P3a scenarios only count heroes the profile has actually recruited.
|
|
for hero_id in roster_ids:
|
|
roster_dps += float(heroes.get(str(hero_id), {}).get("base_dps", 0.0))
|
|
# Permanent hero levels add a roster bonus. Batch runs pass 0, so their
|
|
# output stays byte-identical to the paper runner.
|
|
roster_dps += roster_bonus
|
|
|
|
# Full-game growth layers (stars/talents/awakenings/relics/oaths/edicts)
|
|
# contribute a modifier bundle via the scenario. Absent -> identity, so the
|
|
# slice and all parity runs are unchanged. Applied identically in the paper
|
|
# sim (tools/mvp_validation_sim.py) to keep byte-exact parity.
|
|
var growth: Dictionary = scenario.get("growth_modifiers", {})
|
|
var roster_mult := float(growth.get("roster_mult", 1.0))
|
|
var signature_mult := float(growth.get("signature_mult", 1.0))
|
|
roster_dps = snappedf(roster_dps * roster_mult + float(growth.get("flat_roster", 0.0)), 0.0001)
|
|
signature_dps = snappedf(signature_dps * signature_mult, 0.0001)
|
|
|
|
var enemies: Array = []
|
|
var enemy_ids: Array = scenario.get("enemy_ids", [])
|
|
var enemy_specs: Dictionary = scenario.get("enemy_specs", {})
|
|
for index in range(enemy_ids.size()):
|
|
var enemy_id := str(enemy_ids[index])
|
|
enemies.append(_build_enemy(rules, enemy_id, index, enemy_specs.get(enemy_id, {})))
|
|
# P3a nodes carry a per-node HP scale. P2 scenarios have none, so their
|
|
# output stays byte-identical to the paper runner.
|
|
var hp_scale := float(scenario.get("hp_scale", 1.0))
|
|
if hp_scale > 0.0 and not is_equal_approx(hp_scale, 1.0):
|
|
for enemy in enemies:
|
|
enemy["hp"] = float(enemy["hp"]) * hp_scale
|
|
enemy["max_hp"] = float(enemy["max_hp"]) * hp_scale
|
|
|
|
return {
|
|
"scenario_id": scenario_id,
|
|
"mode": mode,
|
|
"seed": seed_value,
|
|
"timeout_seconds": timeout_seconds,
|
|
"tick_seconds": tick_seconds,
|
|
"max_ticks": int(ceil(timeout_seconds / tick_seconds)),
|
|
"tick": 0,
|
|
"time": 0.0,
|
|
"efficiency": efficiency,
|
|
"roster_dps": roster_dps,
|
|
"signature_dps": signature_dps,
|
|
"visible_hero_ids": visible_hero_ids,
|
|
"enemies": enemies,
|
|
"input_events": _sort_input_events(scenario.get("input_events", []) as Array),
|
|
"click_mult": float(growth.get("click_mult", 1.0)),
|
|
"storm_mult": float(growth.get("storm_mult", 1.0)),
|
|
"extra_inputs": [],
|
|
"input_index": 0,
|
|
"event_log": [],
|
|
# Optional skill-effect runtime (ADR-008). Null -> identity: all skill
|
|
# blocks below are skipped so existing scenarios stay byte-identical.
|
|
"skill_rt": (SkillRuntime.init_runtime(scenario) if scenario.has("skills")
|
|
and not (scenario["skills"] as Array).is_empty() else null),
|
|
"click_damage": 0.0,
|
|
"burst_damage": 0.0,
|
|
"ultimate_casts": 0,
|
|
"visible_signature_damage": 0.0,
|
|
"weakness_hits": 0,
|
|
"shield_broken": 0,
|
|
"result": "timeout",
|
|
"finished": false,
|
|
}
|
|
|
|
|
|
## Queue a live input event. It is merged into the ordered input list on the
|
|
## next step so it lands on the correct tick.
|
|
static func inject_input(state: Dictionary, event: Dictionary) -> void:
|
|
var queued: Array = state["extra_inputs"]
|
|
queued.append(event)
|
|
|
|
|
|
## Advance the battle by exactly one tick. Returns true when the battle ends.
|
|
static func step_state(rules: Dictionary, state: Dictionary) -> bool:
|
|
if bool(state["finished"]):
|
|
return true
|
|
var constants: Dictionary = rules.get("constants", {})
|
|
var tick_seconds := float(state["tick_seconds"])
|
|
var time := _tick_time(int(state["tick"]), tick_seconds)
|
|
state["time"] = time
|
|
|
|
var pending: Array = state["extra_inputs"]
|
|
if not pending.is_empty():
|
|
var merged: Array = (state["input_events"] as Array).duplicate()
|
|
merged.append_array(pending)
|
|
state["input_events"] = _sort_input_events(merged)
|
|
state["extra_inputs"] = []
|
|
|
|
var input_events: Array = state["input_events"]
|
|
var input_index := int(state["input_index"])
|
|
var event_log: Array = state["event_log"]
|
|
var enemies: Array = state["enemies"]
|
|
var efficiency := float(state["efficiency"])
|
|
var roster_dps := float(state["roster_dps"])
|
|
var signature_dps := float(state["signature_dps"])
|
|
var visible_hero_ids: Array = state["visible_hero_ids"]
|
|
|
|
while (
|
|
input_index < input_events.size()
|
|
and float(input_events[input_index].get("time", 0.0)) <= time + TIME_EPSILON
|
|
):
|
|
var action: Dictionary = input_events[input_index]
|
|
var action_type := str(action.get("type", ""))
|
|
var target := _choose_target(enemies, str(action.get("target_id", "")))
|
|
if not target.is_empty():
|
|
if action_type == "click_enemy":
|
|
var click_raw := (
|
|
float(constants.get("click_base", 20.0))
|
|
+ roster_dps * float(constants.get("click_roster_multiplier", 0.45))
|
|
) * efficiency * float(state.get("click_mult", 1.0))
|
|
var click_result := _apply_damage(
|
|
rules, target, click_raw, "click", time, event_log, target["weak_tag"] == "click"
|
|
)
|
|
state["click_damage"] = float(state["click_damage"]) + click_raw
|
|
if click_result["broke"]:
|
|
state["shield_broken"] = int(state["shield_broken"]) + 1
|
|
event_log.append({
|
|
"time": _round_metric(time),
|
|
"type": "click_enemy",
|
|
"target_id": target["content_id"],
|
|
"damage": _round_metric(float(click_result["hp_damage"])),
|
|
})
|
|
elif action_type == "offboard_burst":
|
|
var burst_raw := (
|
|
float(constants.get("burst_base", 180.0))
|
|
+ roster_dps * float(constants.get("burst_roster_multiplier", 1.2))
|
|
) * efficiency * float(state.get("storm_mult", 1.0))
|
|
var burst_result := _apply_damage(
|
|
rules,
|
|
target,
|
|
burst_raw,
|
|
"offboard_burst",
|
|
time,
|
|
event_log,
|
|
target["weak_tag"] in ["aoe", "break"]
|
|
)
|
|
state["burst_damage"] = float(state["burst_damage"]) + burst_raw
|
|
if burst_result["broke"]:
|
|
state["shield_broken"] = int(state["shield_broken"]) + 1
|
|
event_log.append({
|
|
"time": _round_metric(time),
|
|
"type": "offboard_burst",
|
|
"target_id": target["content_id"],
|
|
"damage": _round_metric(float(burst_result["hp_damage"])),
|
|
})
|
|
elif action_type == "cast_ultimate":
|
|
var hero_id := str(action.get("hero_id", ""))
|
|
var hero: Dictionary = rules.get("heroes", {}).get(hero_id, {})
|
|
if not hero.is_empty():
|
|
var ultimate_raw := (
|
|
float(hero.get("base_atk", 0.0))
|
|
* float(constants.get("ultimate_atk_multiplier", 4.5))
|
|
* efficiency
|
|
)
|
|
var ultimate_result := _apply_damage(
|
|
rules,
|
|
target,
|
|
ultimate_raw,
|
|
"ultimate:%s" % hero_id,
|
|
time,
|
|
event_log,
|
|
target["weak_tag"] == "break" or target["content_id"] == "B-R1-01"
|
|
)
|
|
state["ultimate_casts"] = int(state["ultimate_casts"]) + 1
|
|
if ultimate_result["broke"]:
|
|
state["shield_broken"] = int(state["shield_broken"]) + 1
|
|
event_log.append({
|
|
"time": _round_metric(time),
|
|
"type": "cast_ultimate",
|
|
"hero_id": hero_id,
|
|
"target_id": target["content_id"],
|
|
"damage": _round_metric(float(ultimate_result["hp_damage"])),
|
|
})
|
|
input_index += 1
|
|
state["input_index"] = input_index
|
|
|
|
# Rebuild timers fire before automatic output and only once each.
|
|
for enemy in enemies:
|
|
if enemy["dead"]:
|
|
continue
|
|
var rebuild_times: Array = (enemy["rebuild_at"] as Array).duplicate()
|
|
for rebuild_time in rebuild_times:
|
|
if absf(float(rebuild_time) - time) <= TIME_EPSILON:
|
|
enemy["shield"] = float(enemy["shield"]) + float(enemy["rebuild_amount"])
|
|
enemy["shield_before"] = float(enemy["shield"])
|
|
enemy["shield_broken"] = false
|
|
enemy["rebuild_at"].erase(rebuild_time)
|
|
event_log.append({
|
|
"time": _round_metric(time),
|
|
"type": "shield_rebuild",
|
|
"target_id": enemy["content_id"],
|
|
"shield": _round_metric(float(enemy["shield"])),
|
|
})
|
|
|
|
# Skill effect primitives resolve before auto output (ADR-008). Identity
|
|
# when skill_rt is null: multipliers stay neutral, no events appended.
|
|
var skill_dm := 1.0
|
|
var skill_extra_dps := 0.0
|
|
var skill_rt = state.get("skill_rt")
|
|
if skill_rt != null:
|
|
SkillRuntime.tick(skill_rt, enemies, time, tick_seconds, event_log)
|
|
skill_dm = SkillRuntime.damage_mult(skill_rt["skill_state"])
|
|
skill_extra_dps = SkillRuntime.extra_dps(skill_rt["skill_state"])
|
|
|
|
var target := _choose_target(enemies)
|
|
if not target.is_empty():
|
|
# Visible signature output lands before the always-on roster output.
|
|
var raw_signature := signature_dps * skill_dm * tick_seconds * efficiency
|
|
var weakness := _has_weakness(rules, visible_hero_ids, str(target["weak_tag"]))
|
|
if weakness:
|
|
state["weakness_hits"] = int(state["weakness_hits"]) + 1
|
|
var signature_result := _apply_damage(
|
|
rules, target, raw_signature, "visible_signature", time, event_log, weakness
|
|
)
|
|
state["visible_signature_damage"] = float(state["visible_signature_damage"]) + raw_signature
|
|
if signature_result["broke"]:
|
|
state["shield_broken"] = int(state["shield_broken"]) + 1
|
|
|
|
var raw_roster := (roster_dps * skill_dm + skill_extra_dps) * tick_seconds * efficiency
|
|
var roster_result := _apply_damage(rules, target, raw_roster, "roster_dps", time, event_log)
|
|
if roster_result["broke"]:
|
|
state["shield_broken"] = int(state["shield_broken"]) + 1
|
|
|
|
var all_dead := true
|
|
for enemy in enemies:
|
|
if not enemy["dead"]:
|
|
all_dead = false
|
|
break
|
|
if all_dead:
|
|
state["result"] = "win"
|
|
state["finished"] = true
|
|
elif time >= float(state["timeout_seconds"]) - TIME_EPSILON:
|
|
state["finished"] = true
|
|
|
|
state["tick"] = int(state["tick"]) + 1
|
|
return bool(state["finished"])
|
|
|
|
|
|
## Run a scenario to completion and return the frozen result document.
|
|
static func run_scenario(
|
|
rules: Dictionary,
|
|
scenario: Dictionary,
|
|
seed_value: int,
|
|
timeout_seconds: float
|
|
) -> Dictionary:
|
|
var state := create_state(rules, scenario, seed_value, timeout_seconds)
|
|
var max_ticks := int(state["max_ticks"])
|
|
for _tick in range(max_ticks + 1):
|
|
if step_state(rules, state):
|
|
break
|
|
|
|
var duration := minf(float(state["time"]), timeout_seconds)
|
|
var scenario_id := str(state["scenario_id"])
|
|
var result := str(state["result"])
|
|
var reward_ids: Dictionary = rules.get("reward_ids", {})
|
|
var reward_id := str(reward_ids.get(scenario_id, "REWARD-R1-C01-N01"))
|
|
if scenario_id == "P3A-N10-MANUAL":
|
|
reward_id = (
|
|
str(reward_ids.get("P3A-N10-MANUAL_WIN", "DROP-R1-BOSS-01"))
|
|
if result == "win"
|
|
else str(reward_ids.get("P3A-N10-MANUAL_LOSS", "REWARD-R1-C01-N10"))
|
|
)
|
|
var event_log: Array = state["event_log"]
|
|
event_log.append({
|
|
"time": _round_metric(duration),
|
|
"type": "battle_result",
|
|
"result": result,
|
|
})
|
|
return {
|
|
"seed": seed_value,
|
|
"scenario_id": scenario_id,
|
|
"mode": str(state["mode"]),
|
|
"result": result,
|
|
"duration_seconds": _round_metric(duration),
|
|
"roster_dps": _round_metric(float(state["roster_dps"])),
|
|
"visible_signature_damage": _round_metric(float(state["visible_signature_damage"])),
|
|
"click_damage": _round_metric(float(state["click_damage"])),
|
|
"burst_damage": _round_metric(float(state["burst_damage"])),
|
|
"ultimate_casts": int(state["ultimate_casts"]),
|
|
"shield_broken": int(state["shield_broken"]),
|
|
"weakness_hits": int(state["weakness_hits"]),
|
|
"reward_id": reward_id,
|
|
"event_log": event_log,
|
|
}
|