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

@@ -94,7 +94,7 @@ $validConditionTypes = @(
)
$validTriggers = @("battle_start", "battle_begin", "turn_start", "unit_reaches_tile")
$validActions = @("log", "dialogue", "set_objective", "spawn_deployment", "spawn_deployments")
$validEffects = @("heal_hp", "heal_mp")
$validEffects = @("heal_hp", "heal_mp", "cure_status")
$validItemKinds = @("weapon", "armor", "accessory", "consumable")
$validBonusStats = @("hp", "mp", "atk", "def", "int", "agi")
$validSkillKinds = @("damage", "heal", "support")
@@ -686,8 +686,16 @@ function Check-Item-Effects() {
if (-not $validEffects.Contains([string]$effect.type)) {
Fail "Item $itemId has unknown effect: $($effect.type)"
}
if ([int](Get-Prop $effect "amount" 0) -le 0) {
Fail "Item $itemId effect $($effect.type) must have positive amount."
$effectType = [string]$effect.type
if ($effectType -eq "heal_hp" -or $effectType -eq "heal_mp") {
if ([int](Get-Prop $effect "amount" 0) -le 0) {
Fail "Item $itemId effect $effectType must have positive amount."
}
} elseif ($effectType -eq "cure_status") {
$status = [string](Get-Prop $effect "status" "")
if ([string]::IsNullOrWhiteSpace($status) -or -not ($status -match '^[a-z0-9_]+$')) {
Fail "Item $itemId cure_status effect must have a stable status."
}
}
}
}