Add named equipment rewards

This commit is contained in:
2026-06-18 11:58:47 +09:00
parent 5e24817d10
commit c062fbc832
12 changed files with 72 additions and 8 deletions

View File

@@ -96,6 +96,7 @@ $validTriggers = @("battle_start", "battle_begin", "turn_start", "unit_reaches_t
$validActions = @("log", "dialogue", "set_objective", "grant_item", "grant_items", "spawn_deployment", "spawn_deployments")
$validEffects = @("heal_hp", "heal_mp", "cure_status")
$validItemKinds = @("weapon", "armor", "accessory", "consumable")
$validItemRarities = @("common", "named")
$validBonusStats = @("hp", "mp", "atk", "def", "int", "agi")
$validSkillKinds = @("damage", "heal", "support")
$validSkillTargets = @("enemy", "ally", "self", "any")
@@ -703,6 +704,12 @@ function Check-Item-Effects() {
if ([int](Get-Prop $item "price" 0) -lt 0) {
Fail "Item $itemId has negative price."
}
if (Has-Prop $item "rarity") {
$rarity = [string](Get-Prop $item "rarity" "")
if (-not $validItemRarities.Contains($rarity)) {
Fail "Item $itemId has unknown rarity: $rarity"
}
}
if ($kind -eq "weapon") {
if (-not (Has-Prop $item "weapon_type")) {
Fail "Weapon item $itemId is missing weapon_type."