LCOV - code coverage report
Current view: top level - rawschema - models_gen.go Coverage Total Hit
Test: coverage.lcov Lines: 0.0 % 380 0
Test Date: 2026-11-19 00:25:22 Functions: - 0 0

            Line data    Source code
       1              : // Code generated by internal/rawschema/gen. DO NOT EDIT.
       2              : 
       3              : package rawschema
       4              : 
       5              : // Abilities 能力値
       6              : type Abilities struct {
       7              :         Agility Agility `json:"agility"`
       8              : 
       9              :         Defense Defense `json:"defense"`
      10              : 
      11              :         Dexterity Dexterity `json:"dexterity"`
      12              : 
      13              :         Sensation Sensation `json:"sensation"`
      14              : 
      15              :         Strength Strength `json:"strength"`
      16              : 
      17              :         Vitality Vitality `json:"vitality"`
      18              : }
      19              : 
      20              : // AbilityId 能力値。スキルの成長の速さと熟練の効果倍率に効く
      21              : type AbilityId string
      22              : 
      23              : // Defines values for AbilityId.
      24              : const (
      25              :         Agi AbilityId = "agi"
      26              :         Def AbilityId = "def"
      27              :         Dex AbilityId = "dex"
      28              :         Sen AbilityId = "sen"
      29              :         Str AbilityId = "str"
      30              :         Vit AbilityId = "vit"
      31              : )
      32              : 
      33              : // Valid indicates whether the value is a known member of the AbilityId enum.
      34              : func (e AbilityId) Valid() bool {
      35            0 :         switch e {
      36              :         case Agi:
      37            0 :                 return true
      38              :         case Def:
      39            0 :                 return true
      40              :         case Dex:
      41            0 :                 return true
      42              :         case Sen:
      43            0 :                 return true
      44              :         case Str:
      45            0 :                 return true
      46              :         case Vit:
      47            0 :                 return true
      48              :         default:
      49            0 :                 return false
      50              :         }
      51              : }
      52              : 
      53              : // AbilityIdValues は AbilityId の値を、スキーマに書いた順に返す。
      54              : func AbilityIdValues() []AbilityId {
      55            0 :         return []AbilityId{Str, Sen, Dex, Agi, Vit, Def}
      56            0 : }
      57              : 
      58              : // Accuracy 命中率。0で必中なし、100で必中
      59              : type Accuracy = int
      60              : 
      61              : // AccuracyBonus 命中率補正値
      62              : type AccuracyBonus = int
      63              : 
      64              : // ActionCost 行動コスト
      65              : type ActionCost = int
      66              : 
      67              : // Agility 敏捷性。行動順に影響する
      68              : type Agility = int
      69              : 
      70              : // AmbientColor 環境光の色。明るさは daylight が持ち、ここは色味だけを表す
      71              : type AmbientColor struct {
      72              :         B LightLevel `json:"b"`
      73              : 
      74              :         G LightLevel `json:"g"`
      75              : 
      76              :         R LightLevel `json:"r"`
      77              : }
      78              : 
      79              : // Ammo 弾薬設定
      80              : type Ammo struct {
      81              :         AccuracyBonus AccuracyBonus `json:"accuracyBonus"`
      82              : 
      83              :         AmmoTag *AmmoTag `json:"ammoTag,omitempty"`
      84              : 
      85              :         DamageBonus DamageBonus `json:"damageBonus"`
      86              : }
      87              : 
      88              : // AmmoTag 弾薬タグ
      89              : type AmmoTag string
      90              : 
      91              : // Defines values for AmmoTag.
      92              : const (
      93              :         AmmoTagEnergyCell AmmoTag = "energy_cell"
      94              :         AmmoTagN9mm       AmmoTag = "9mm"
      95              :         AmmoTagRifle      AmmoTag = "rifle"
      96              :         AmmoTagShell      AmmoTag = "shell"
      97              : )
      98              : 
      99              : // Valid indicates whether the value is a known member of the AmmoTag enum.
     100              : func (e AmmoTag) Valid() bool {
     101            0 :         switch e {
     102              :         case AmmoTagEnergyCell:
     103            0 :                 return true
     104              :         case AmmoTagN9mm:
     105            0 :                 return true
     106              :         case AmmoTagRifle:
     107            0 :                 return true
     108              :         case AmmoTagShell:
     109            0 :                 return true
     110              :         default:
     111            0 :                 return false
     112              :         }
     113              : }
     114              : 
     115              : // AmmoTagValues は AmmoTag の値を、スキーマに書いた順に返す。
     116              : func AmmoTagValues() []AmmoTag {
     117            0 :         return []AmmoTag{AmmoTagN9mm, AmmoTagRifle, AmmoTagShell, AmmoTagEnergyCell}
     118            0 : }
     119              : 
     120              : // ArmorDefense 防具の防御力
     121              : type ArmorDefense = int
     122              : 
     123              : type AttackCategory string
     124              : 
     125              : // Defines values for AttackCategory.
     126              : const (
     127              :         AttackCategoryBow     AttackCategory = "bow"
     128              :         AttackCategoryCannon  AttackCategory = "cannon"
     129              :         AttackCategoryFist    AttackCategory = "fist"
     130              :         AttackCategoryHandgun AttackCategory = "handgun"
     131              :         AttackCategoryRifle   AttackCategory = "rifle"
     132              :         AttackCategorySpear   AttackCategory = "spear"
     133              :         AttackCategorySword   AttackCategory = "sword"
     134              : )
     135              : 
     136              : // Valid indicates whether the value is a known member of the AttackCategory enum.
     137              : func (e AttackCategory) Valid() bool {
     138            0 :         switch e {
     139              :         case AttackCategoryBow:
     140            0 :                 return true
     141              :         case AttackCategoryCannon:
     142            0 :                 return true
     143              :         case AttackCategoryFist:
     144            0 :                 return true
     145              :         case AttackCategoryHandgun:
     146            0 :                 return true
     147              :         case AttackCategoryRifle:
     148            0 :                 return true
     149              :         case AttackCategorySpear:
     150            0 :                 return true
     151              :         case AttackCategorySword:
     152            0 :                 return true
     153              :         default:
     154            0 :                 return false
     155              :         }
     156              : }
     157              : 
     158              : // AttackCategoryValues は AttackCategory の値を、スキーマに書いた順に返す。
     159              : func AttackCategoryValues() []AttackCategory {
     160            0 :         return []AttackCategory{AttackCategoryFist, AttackCategorySword, AttackCategorySpear, AttackCategoryHandgun, AttackCategoryRifle, AttackCategoryCannon, AttackCategoryBow}
     161            0 : }
     162              : 
     163              : // AttackCount 1ターンあたりの攻撃回数
     164              : type AttackCount = int
     165              : 
     166              : // AttackRange 攻撃種別。武器の攻撃種別は同じ名前の武器スキルで上達する攻撃の射程の区分
     167              : type AttackRange string
     168              : 
     169              : // Defines values for AttackRange.
     170              : const (
     171              :         AttackRangeMelee  AttackRange = "melee"
     172              :         AttackRangeRanged AttackRange = "ranged"
     173              : )
     174              : 
     175              : // Valid indicates whether the value is a known member of the AttackRange enum.
     176              : func (e AttackRange) Valid() bool {
     177            0 :         switch e {
     178              :         case AttackRangeMelee:
     179            0 :                 return true
     180              :         case AttackRangeRanged:
     181            0 :                 return true
     182              :         default:
     183            0 :                 return false
     184              :         }
     185              : }
     186              : 
     187              : // AttackRangeValues は AttackRange の値を、スキーマに書いた順に返す。
     188              : func AttackRangeValues() []AttackRange {
     189            0 :         return []AttackRange{AttackRangeMelee, AttackRangeRanged}
     190            0 : }
     191              : 
     192              : // AttackType 攻撃種別。射程などの計算は Go が持ち、raw は命中で負わせる怪我を持つ
     193              : type AttackType struct {
     194              :         // Accuracy 命中を決める熟練の効果倍率。skill の行が持つ
     195              :         Accuracy ProficiencyId `json:"accuracy"`
     196              : 
     197              :         // Damage ダメージを決める熟練の効果倍率。skill の行が持つ
     198              :         Damage ProficiencyId `json:"damage"`
     199              : 
     200              :         Id AttackCategory `json:"id"`
     201              : 
     202              :         Injury ConditionTypeName `json:"injury"`
     203              : 
     204              :         // MaxRange 遠距離だけが持つ。この距離を超えると撃てない
     205              :         MaxRange *RangeTiles `json:"maxRange,omitempty"`
     206              : 
     207              :         Name EntityName `json:"name"`
     208              : 
     209              :         // OptimalRange 遠距離だけが持つ。この距離までは命中が落ちない
     210              :         OptimalRange *RangeTiles `json:"optimalRange,omitempty"`
     211              : 
     212              :         // PenaltyPerTile 遠距離だけが持つ。最適射程を1タイル超えるごとに下がる命中。百分率
     213              :         PenaltyPerTile *RangePenaltyPercent `json:"penaltyPerTile,omitempty"`
     214              : 
     215              :         Range AttackRange `json:"range"`
     216              : 
     217              :         // Skill 攻撃で上達するスキル
     218              :         Skill SkillId `json:"skill"`
     219              : }
     220              : 
     221              : // AutomataStep セルラーオートマトンで壁を均し、床の連結を部屋にする段
     222              : type AutomataStep struct {
     223              :         Id EntityID `json:"id"`
     224              : 
     225              :         Iterations int `json:"iterations"`
     226              : 
     227              :         // MinRoomTiles 部屋とみなす床の連結の最小のマス数
     228              :         MinRoomTiles int `json:"minRoomTiles"`
     229              : 
     230              :         // WallNeighbors 周囲9マスの壁がこの数以上なら壁にする
     231              :         WallNeighbors int `json:"wallNeighbors"`
     232              : }
     233              : 
     234              : // BaseDamage 基本ダメージ
     235              : type BaseDamage = int
     236              : 
     237              : // Bedding 寝具設定。眠るときの睡眠効率を決める
     238              : type Bedding struct {
     239              :         Quality BeddingQuality `json:"quality"`
     240              : }
     241              : 
     242              : // BeddingQuality 寝具の睡眠効率。100が基準で、高いほど短く深く眠れる
     243              : type BeddingQuality = int
     244              : 
     245              : // BigRoomStep 1つの部屋を描き、柱・障害物・迷路・台座のどれかを足す段
     246              : type BigRoomStep struct {
     247              :         Id EntityID `json:"id"`
     248              : 
     249              :         // MazeGapChance 迷路の壁に穴が開く確率
     250              :         MazeGapChance Chance `json:"mazeGapChance"`
     251              : 
     252              :         // ObstacleArea 障害物1つあたりの部屋の面積
     253              :         ObstacleArea int `json:"obstacleArea"`
     254              : 
     255              :         PillarSpacing RandInt `json:"pillarSpacing"`
     256              : 
     257              :         PlatformRadius RandInt `json:"platformRadius"`
     258              : }
     259              : 
     260              : // BlocksPassage 通行を妨げるかどうか
     261              : type BlocksPassage = bool
     262              : 
     263              : // BlocksView 視線を遮るかどうか
     264              : type BlocksView = bool
     265              : 
     266              : // BodyPart 部位。部位の集合と身体機能との対応は Go が持ち、raw は表示名と命中の重みを持つ
     267              : type BodyPart struct {
     268              :         // HitWeight 戦闘の命中抽選の重み。0 は命中先にならない
     269              :         HitWeight EntryWeight `json:"hitWeight"`
     270              : 
     271              :         Id BodyPartId `json:"id"`
     272              : 
     273              :         Name EntityName `json:"name"`
     274              : }
     275              : 
     276              : // BodyPartId 部位の id
     277              : type BodyPartId = string
     278              : 
     279              : // Book 本の設定
     280              : type Book struct {
     281              :         Skill *SkillBook `json:"skill,omitempty"`
     282              : 
     283              :         TotalEffort ReadingEffort `json:"totalEffort"`
     284              : }
     285              : 
     286              : // BuildingStart 崩れた建物の矩形を部屋として置く最初の段
     287              : type BuildingStart struct {
     288              :         BuildingHeight RandInt `json:"buildingHeight"`
     289              : 
     290              :         BuildingWidth RandInt `json:"buildingWidth"`
     291              : 
     292              :         Buildings RandInt `json:"buildings"`
     293              : 
     294              :         Id EntityID `json:"id"`
     295              : }
     296              : 
     297              : // Chance 確率
     298              : type Chance = float64
     299              : 
     300              : // ClearingStart 円に近い空き地を部屋として置く最初の段
     301              : type ClearingStart struct {
     302              :         // ClearingSize 空き地の幅と高さ。それぞれ引く
     303              :         ClearingSize RandInt `json:"clearingSize"`
     304              : 
     305              :         Clearings RandInt `json:"clearings"`
     306              : 
     307              :         Id EntityID `json:"id"`
     308              : }
     309              : 
     310              : // ColorChannel RGBA色チャネル値 (0-255)
     311              : type ColorChannel = uint8
     312              : 
     313              : // CombatPolicyType 戦闘ポリシー。エンティティの戦闘時の行動方針を定義する
     314              : type CombatPolicyType string
     315              : 
     316              : // Defines values for CombatPolicyType.
     317              : const (
     318              :         Attack CombatPolicyType = "attack"
     319              :         Evade  CombatPolicyType = "evade"
     320              :         Ignore CombatPolicyType = "ignore"
     321              : )
     322              : 
     323              : // Valid indicates whether the value is a known member of the CombatPolicyType enum.
     324              : func (e CombatPolicyType) Valid() bool {
     325            0 :         switch e {
     326              :         case Attack:
     327            0 :                 return true
     328              :         case Evade:
     329            0 :                 return true
     330              :         case Ignore:
     331            0 :                 return true
     332              :         default:
     333            0 :                 return false
     334              :         }
     335              : }
     336              : 
     337              : // CombatPolicyTypeValues は CombatPolicyType の値を、スキーマに書いた順に返す。
     338              : func CombatPolicyTypeValues() []CombatPolicyType {
     339            0 :         return []CombatPolicyType{Attack, Evade, Ignore}
     340            0 : }
     341              : 
     342              : // CommandTable コマンドテーブル
     343              : type CommandTable struct {
     344              :         Entries []CommandTableEntry `json:"entries"`
     345              : 
     346              :         Id EntityID `json:"id"`
     347              : 
     348              :         Name EntityName `json:"name"`
     349              : }
     350              : 
     351              : // CommandTableEntry コマンドテーブルエントリ
     352              : type CommandTableEntry struct {
     353              :         // Id 使う武器の id
     354              :         Id EntityID `json:"id"`
     355              : 
     356              :         Weight EntryWeight `json:"weight"`
     357              : }
     358              : 
     359              : // Condition 不調。痛みと身体機能の低下、回復の仕方、出血を持つ
     360              : type Condition struct {
     361              :         BloodDropPerSeverity *ConditionAmountPerSeverity `json:"bloodDropPerSeverity,omitempty"`
     362              : 
     363              :         BodyFuncDropPerSeverity ConditionAmountPerSeverity `json:"bodyFuncDropPerSeverity"`
     364              : 
     365              :         Cause *ConditionDeathCause `json:"cause,omitempty"`
     366              : 
     367              :         Description EntityDescription `json:"description"`
     368              : 
     369              :         Id ConditionTypeName `json:"id"`
     370              : 
     371              :         Name EntityName `json:"name"`
     372              : 
     373              :         // Onset 不調を起こす仕組み。攻撃で負う怪我と、きっかけの無い不調は省く
     374              :         Onset *ConditionOnset `json:"onset,omitempty"`
     375              : 
     376              :         PainPerSeverity ConditionAmountPerSeverity `json:"painPerSeverity"`
     377              : 
     378              :         // Parts 起こりうる部位。省くと全部位
     379              :         Parts *[]BodyPartId `json:"parts,omitempty"`
     380              : 
     381              :         // RecoverPer 治療済みで1ターンに進行度を減らす基準量
     382              :         RecoverPer *ConditionTimerRate `json:"recoverPer,omitempty"`
     383              : 
     384              :         // Recovery 省くと ConditionSystem の管轄外になる
     385              :         Recovery *RecoveryMode `json:"recovery,omitempty"`
     386              : 
     387              :         // WorsenPer progress_until_tend で未治療のとき1ターンに進行度を増やす量
     388              :         WorsenPer *ConditionTimerRate `json:"worsenPer,omitempty"`
     389              : }
     390              : 
     391              : // ConditionAmountPerSeverity 不調の重症度1段あたりの量。痛み、身体機能の低下、血液量の低下に使う
     392              : type ConditionAmountPerSeverity = int
     393              : 
     394              : // ConditionDeathCause 不調が血液量を尽きさせて倒したときの死因
     395              : type ConditionDeathCause string
     396              : 
     397              : // Defines values for ConditionDeathCause.
     398              : const (
     399              :         BloodLoss ConditionDeathCause = "blood_loss"
     400              :         Frozen    ConditionDeathCause = "frozen"
     401              :         Illness   ConditionDeathCause = "illness"
     402              : )
     403              : 
     404              : // Valid indicates whether the value is a known member of the ConditionDeathCause enum.
     405              : func (e ConditionDeathCause) Valid() bool {
     406            0 :         switch e {
     407              :         case BloodLoss:
     408            0 :                 return true
     409              :         case Frozen:
     410            0 :                 return true
     411              :         case Illness:
     412            0 :                 return true
     413              :         default:
     414            0 :                 return false
     415              :         }
     416              : }
     417              : 
     418              : // ConditionDeathCauseValues は ConditionDeathCause の値を、スキーマに書いた順に返す。
     419              : func ConditionDeathCauseValues() []ConditionDeathCause {
     420            0 :         return []ConditionDeathCause{Frozen, Illness, BloodLoss}
     421            0 : }
     422              : 
     423              : // ConditionOnset 不調を起こす仕組み。仕組みごとにちょうど1つの不調が持つ
     424              : type ConditionOnset string
     425              : 
     426              : // Defines values for ConditionOnset.
     427              : const (
     428              :         Cold       ConditionOnset = "cold"
     429              :         Fatigue    ConditionOnset = "fatigue"
     430              :         Hunger     ConditionOnset = "hunger"
     431              :         RottenFood ConditionOnset = "rotten_food"
     432              : )
     433              : 
     434              : // Valid indicates whether the value is a known member of the ConditionOnset enum.
     435              : func (e ConditionOnset) Valid() bool {
     436            0 :         switch e {
     437              :         case Cold:
     438            0 :                 return true
     439              :         case Fatigue:
     440            0 :                 return true
     441              :         case Hunger:
     442            0 :                 return true
     443              :         case RottenFood:
     444            0 :                 return true
     445              :         default:
     446            0 :                 return false
     447              :         }
     448              : }
     449              : 
     450              : // ConditionOnsetValues は ConditionOnset の値を、スキーマに書いた順に返す。
     451              : func ConditionOnsetValues() []ConditionOnset {
     452            0 :         return []ConditionOnset{Cold, RottenFood, Fatigue, Hunger}
     453            0 : }
     454              : 
     455              : // ConditionSeverity 不調の重症度
     456              : type ConditionSeverity string
     457              : 
     458              : // Defines values for ConditionSeverity.
     459              : const (
     460              :         ConditionSeverityMedium ConditionSeverity = "medium"
     461              :         ConditionSeverityMinor  ConditionSeverity = "minor"
     462              :         ConditionSeveritySevere ConditionSeverity = "severe"
     463              : )
     464              : 
     465              : // Valid indicates whether the value is a known member of the ConditionSeverity enum.
     466              : func (e ConditionSeverity) Valid() bool {
     467            0 :         switch e {
     468              :         case ConditionSeverityMedium:
     469            0 :                 return true
     470              :         case ConditionSeverityMinor:
     471            0 :                 return true
     472              :         case ConditionSeveritySevere:
     473            0 :                 return true
     474              :         default:
     475            0 :                 return false
     476              :         }
     477              : }
     478              : 
     479              : // ConditionSeverityValues は ConditionSeverity の値を、スキーマに書いた順に返す。
     480              : func ConditionSeverityValues() []ConditionSeverity {
     481            0 :         return []ConditionSeverity{ConditionSeverityMinor, ConditionSeverityMedium, ConditionSeveritySevere}
     482            0 : }
     483              : 
     484              : // ConditionTimerRate 不調の1ターンあたりの進行度の増減量
     485              : type ConditionTimerRate = int
     486              : 
     487              : // ConditionTypeName 不調の id。Go の ConditionType 定数の値と同じ
     488              : type ConditionTypeName = string
     489              : 
     490              : // Consumable 消費可能アイテムの設定
     491              : type Consumable struct {
     492              :         TargetGroup TargetGroup `json:"targetGroup"`
     493              : 
     494              :         TargetNum TargetNum `json:"targetNum"`
     495              : 
     496              :         UsableScene UsableScene `json:"usableScene"`
     497              : }
     498              : 
     499              : // CorridorStep 部屋どうしを直線の廊下で結ぶ段
     500              : type CorridorStep struct {
     501              :         Id EntityID `json:"id"`
     502              : 
     503              :         Width int `json:"width"`
     504              : }
     505              : 
     506              : // CrashSite 開始チャンクに置く墜落現場の候補1種
     507              : type CrashSite struct {
     508              :         // Id 施設の id。施設の絵の facility が指す
     509              :         Id EntityID `json:"id"`
     510              : 
     511              :         // Weight 開始チャンクでこの墜落現場を引く重み
     512              :         Weight int32 `json:"weight"`
     513              : }
     514              : 
     515              : // CubeCore キューブの核。使うと隣に新しいキューブが組み上がる
     516              : type CubeCore = map[string]interface{}
     517              : 
     518              : // CubeModule キューブモジュール設定。装着すると展開野営の範囲や燃料タンクの容量を広げる
     519              : type CubeModule struct {
     520              :         FuelCapacityBonus FuelCapacityBonus `json:"fuelCapacityBonus"`
     521              : 
     522              :         RangeBonus RangeBonus `json:"rangeBonus"`
     523              : }
     524              : 
     525              : // DamageBonus ダメージ補正値
     526              : type DamageBonus = int
     527              : 
     528              : // DangerLevel 危険度。経過日数から決まる
     529              : type DangerLevel = int
     530              : 
     531              : // Defense 防御力。被ダメージを軽減する
     532              : type Defense = int
     533              : 
     534              : // Deployable 装着設定。キューブの展開空間へ装着するとフィールドで設備として働くアイテムであることを表す
     535              : type Deployable struct {
     536              :         Bedding *Bedding `json:"bedding,omitempty"`
     537              : 
     538              :         LightSource *LightSource `json:"lightSource,omitempty"`
     539              : 
     540              :         Storage *StorageRaw `json:"storage,omitempty"`
     541              : }
     542              : 
     543              : // Dexterity 器用さ。クリティカル率に影響する
     544              : type Dexterity = int
     545              : 
     546              : // Dialog 会話データ
     547              : type Dialog struct {
     548              :         MessageKey MessageKey `json:"messageKey"`
     549              : }
     550              : 
     551              : // Dialogue NPC の会話。member の dialog の messageKey が id を指す。ページの順に1ページずつ見せる
     552              : type Dialogue struct {
     553              :         Id MessageKey `json:"id"`
     554              : 
     555              :         Pages []DialoguePage `json:"pages"`
     556              : }
     557              : 
     558              : // DialoguePage 会話の1ページ。英語の msgid で、表示のとき query.T で訳す。<keyword> などのマークアップを含められる
     559              : type DialoguePage = string
     560              : 
     561              : // Dice ダイス表記の個数指定。固定値も 1d1 のように書く。consts.ParseDice でパースする
     562              : type Dice = string
     563              : 
     564              : // Disassembly 分解定義。これを持つ prop は殴って壊すと産出を落とす。toolCategory の道具を構えて壊すと多く得る
     565              : type Disassembly struct {
     566              :         Bonus *[]DisassemblyBonus `json:"bonus,omitempty"`
     567              : 
     568              :         ToolCategory *ToolCategory `json:"toolCategory,omitempty"`
     569              : 
     570              :         ToolRequired *DisassemblyToolRequired `json:"toolRequired,omitempty"`
     571              : 
     572              :         Yields []DisassemblyYield `json:"yields"`
     573              : }
     574              : 
     575              : // DisassemblyBonus 分解のボーナス産出。minSkill か minGrade の少なくとも一方を指定する。両方指定した場合は両方を満たす必要がある
     576              : type DisassemblyBonus struct {
     577              :         // Count 産出個数のダイス表記
     578              :         Count Dice `json:"count"`
     579              : 
     580              :         Id EntityID `json:"id"`
     581              : 
     582              :         // MinGrade 工具グレードがこの値以上で産出に加わる
     583              :         MinGrade *ToolGrade `json:"minGrade,omitempty"`
     584              : 
     585              :         // MinSkill 機械スキルがこの値以上で産出に加わる
     586              :         MinSkill *SkillLevel `json:"minSkill,omitempty"`
     587              : }
     588              : 
     589              : // DisassemblyChance 分解産出の確率。百分率
     590              : type DisassemblyChance = int
     591              : 
     592              : // DisassemblyToolRequired 分解定義の道具が無いと殴っても削れないか
     593              : type DisassemblyToolRequired = bool
     594              : 
     595              : // DisassemblyYield 分解の産出エントリ。chance 省略は確定枠
     596              : type DisassemblyYield struct {
     597              :         Chance *DisassemblyChance `json:"chance,omitempty"`
     598              : 
     599              :         // Count 産出個数のダイス表記
     600              :         Count Dice `json:"count"`
     601              : 
     602              :         Id EntityID `json:"id"`
     603              : }
     604              : 
     605              : // District 区域の種類。複数のチャンクにまたがる施設の集まり。リージョンごとに大きさを重みで1つ選び、
     606              : // 余った縦の範囲から位置を選ぶ。区域はリージョンの縦の範囲 spacing - separation からはみ出さない
     607              : type District struct {
     608              :         // Fence 外周に巡らせる塀の家具。北と南に門を開け、道は門を通って区域を抜ける。省けば塀を巡らせない
     609              :         Fence *EntityID `json:"fence,omitempty"`
     610              : 
     611              :         // Id 区域の種類の id。行の順が優先で、重なった後の種類の区域は出さない
     612              :         Id EntityID `json:"id"`
     613              : 
     614              :         // Landmark 区域に1つだけ建てる目玉の施設。区画を割り振る前に、その地区の真ん中へ一番大きく置き、残りの抽選からは外す
     615              :         Landmark *EntityID `json:"landmark,omitempty"`
     616              : 
     617              :         // Layers 地区の層。プレイヤーが入ってくる側から順に並べる。rings は外から内へ、rows は南から北へ
     618              :         Layers []DistrictLayer `json:"layers"`
     619              : 
     620              :         // Name 区域に入ったときと現在地に出す名前
     621              :         Name EntityName `json:"name"`
     622              : 
     623              :         // Pattern 地区の並べ方
     624              :         Pattern DistrictPattern `json:"pattern"`
     625              : 
     626              :         // Separation 隣のリージョンの区域との最小の空き。チャンク数
     627              :         Separation int `json:"separation"`
     628              : 
     629              :         // Sizes 大きさの候補。区域ごとに重みで1つ選ぶ
     630              :         Sizes []DistrictSize `json:"sizes"`
     631              : 
     632              :         // Spacing 当選の間隔。チャンク数
     633              :         Spacing int `json:"spacing"`
     634              : 
     635              :         // Street 街路のタイル
     636              :         Street EntityID `json:"street"`
     637              : 
     638              :         // StreetEnemies チャンクごとに街路へ湧かせる敵の数
     639              :         StreetEnemies Dice `json:"streetEnemies"`
     640              : 
     641              :         // Verge 街路の両端に置く植え込みのタイル。省くと植え込みを置かず、建物と道の間を空けない
     642              :         Verge *EntityID `json:"verge,omitempty"`
     643              : }
     644              : 
     645              : // DistrictLayer 地区の層。候補の地区から区域の seed で1つ選ぶ
     646              : type DistrictLayer struct {
     647              :         // Rows rows の並べ方で、この層が占める行の数
     648              :         Rows *int `json:"rows,omitempty"`
     649              : 
     650              :         // Zones 候補の地区
     651              :         Zones []Zone `json:"zones"`
     652              : }
     653              : 
     654              : // DistrictPattern 地区の並べ方。rings は層を2つ持ち、1つ目を外側、2つ目を中心にする。
     655              : // rows は層を行で分け、rows を省いた層がちょうど1つあって残りの行を占める
     656              : type DistrictPattern string
     657              : 
     658              : // Defines values for DistrictPattern.
     659              : const (
     660              :         DistrictPatternRings DistrictPattern = "rings"
     661              :         DistrictPatternRows  DistrictPattern = "rows"
     662              : )
     663              : 
     664              : // Valid indicates whether the value is a known member of the DistrictPattern enum.
     665              : func (e DistrictPattern) Valid() bool {
     666            0 :         switch e {
     667              :         case DistrictPatternRings:
     668            0 :                 return true
     669              :         case DistrictPatternRows:
     670            0 :                 return true
     671              :         default:
     672            0 :                 return false
     673              :         }
     674              : }
     675              : 
     676              : // DistrictPatternValues は DistrictPattern の値を、スキーマに書いた順に返す。
     677              : func DistrictPatternValues() []DistrictPattern {
     678            0 :         return []DistrictPattern{DistrictPatternRings, DistrictPatternRows}
     679            0 : }
     680              : 
     681              : // DistrictSize 区域の大きさの候補。w が帯の列数を超えるときは帯の全幅に詰める
     682              : type DistrictSize struct {
     683              :         // H 南北の高さ。チャンク数
     684              :         H int `json:"h"`
     685              : 
     686              :         // W 東西の幅。チャンク数
     687              :         W int `json:"w"`
     688              : 
     689              :         // Weight 抽選の重み
     690              :         Weight int `json:"weight"`
     691              : }
     692              : 
     693              : // DoorRaw 扉ローデータ
     694              : type DoorRaw struct {
     695              :         HorizontalClosed SpriteKey `json:"horizontalClosed"`
     696              : 
     697              :         HorizontalOpen SpriteKey `json:"horizontalOpen"`
     698              : 
     699              :         VerticalClosed SpriteKey `json:"verticalClosed"`
     700              : 
     701              :         VerticalOpen SpriteKey `json:"verticalOpen"`
     702              : }
     703              : 
     704              : // DoorStep 部屋の入口に扉を置く段
     705              : type DoorStep struct {
     706              :         Chance Chance `json:"chance"`
     707              : 
     708              :         Id EntityID `json:"id"`
     709              : }
     710              : 
     711              : // DropTable ドロップテーブル
     712              : type DropTable struct {
     713              :         Entries []DropTableEntry `json:"entries"`
     714              : 
     715              :         Id EntityID `json:"id"`
     716              : 
     717              :         Name EntityName `json:"name"`
     718              : 
     719              :         // Nothing 何も落とさない重み。省略すると0で、必ずどれかを落とす
     720              :         Nothing *EntryWeight `json:"nothing,omitempty"`
     721              : }
     722              : 
     723              : // DropTableEntry ドロップテーブルエントリ
     724              : type DropTableEntry struct {
     725              :         // Id ドロップする素材の id
     726              :         Id EntityID `json:"id"`
     727              : 
     728              :         Weight EntryWeight `json:"weight"`
     729              : }
     730              : 
     731              : // Dungeon フロアを生成して潜るダンジョン。id はステージの識別名で、遺跡の入口が指す
     732              : type Dungeon struct {
     733              :         BaseTemp StageBaseTemp `json:"baseTemp"`
     734              : 
     735              :         Description EntityDescription `json:"description"`
     736              : 
     737              :         // EnemyCount フロアに置く敵の数
     738              :         EnemyCount RandInt `json:"enemyCount"`
     739              : 
     740              :         // EnemyTable 敵を引く enemyTables の id
     741              :         EnemyTable EntityID `json:"enemyTable"`
     742              : 
     743              :         // EntranceWeight 遺跡の入口がこのダンジョンを引く重み。0 はデバッグで名前を指して入るだけの行で、一覧と試算に出さない
     744              :         EntranceWeight int `json:"entranceWeight"`
     745              : 
     746              :         // Ground タイルに ground を書いた間取りが使う下地のタイル。そうした間取りを持つなら必須
     747              :         Ground *EntityID `json:"ground,omitempty"`
     748              : 
     749              :         Id EntityID `json:"id"`
     750              : 
     751              :         // ImageKey 背景画像のスプライトキー
     752              :         ImageKey EntityID `json:"imageKey"`
     753              : 
     754              :         // ItemCount フロアに置くアイテムの数
     755              :         ItemCount RandInt `json:"itemCount"`
     756              : 
     757              :         // ItemTable アイテムを引く itemTables の id
     758              :         ItemTable EntityID `json:"itemTable"`
     759              : 
     760              :         Name EntityName `json:"name"`
     761              : 
     762              :         // Planners フロアの間取りの抽選表。行の順に重みを積む
     763              :         Planners []DungeonPlannerWeight `json:"planners"`
     764              : }
     765              : 
     766              : // DungeonPlannerWeight ダンジョンの間取りと、フロアごとに選ばれる重み
     767              : type DungeonPlannerWeight struct {
     768              :         // Id 間取りの表の行の id
     769              :         Id EntityID `json:"id"`
     770              : 
     771              :         Weight EntryWeight `json:"weight"`
     772              : }
     773              : 
     774              : // Element 攻撃属性
     775              : type Element string
     776              : 
     777              : // Defines values for Element.
     778              : const (
     779              :         ElementCHILL   Element = "CHILL"
     780              :         ElementFIRE    Element = "FIRE"
     781              :         ElementNONE    Element = "NONE"
     782              :         ElementPHOTON  Element = "PHOTON"
     783              :         ElementTHUNDER Element = "THUNDER"
     784              : )
     785              : 
     786              : // Valid indicates whether the value is a known member of the Element enum.
     787              : func (e Element) Valid() bool {
     788            0 :         switch e {
     789              :         case ElementCHILL:
     790            0 :                 return true
     791              :         case ElementFIRE:
     792            0 :                 return true
     793              :         case ElementNONE:
     794            0 :                 return true
     795              :         case ElementPHOTON:
     796            0 :                 return true
     797              :         case ElementTHUNDER:
     798            0 :                 return true
     799              :         default:
     800            0 :                 return false
     801              :         }
     802              : }
     803              : 
     804              : // ElementValues は Element の値を、スキーマに書いた順に返す。
     805              : func ElementValues() []Element {
     806            0 :         return []Element{ElementNONE, ElementFIRE, ElementTHUNDER, ElementCHILL, ElementPHOTON}
     807            0 : }
     808              : 
     809              : // EnemyTable 敵テーブル
     810              : type EnemyTable struct {
     811              :         Entries []EnemyTableEntry `json:"entries"`
     812              : 
     813              :         Id EntityID `json:"id"`
     814              : 
     815              :         Name EntityName `json:"name"`
     816              : }
     817              : 
     818              : // EnemyTableEntry 敵テーブルエントリ
     819              : type EnemyTableEntry struct {
     820              :         Id EntityID `json:"id"`
     821              : 
     822              :         MaxDanger DangerLevel `json:"maxDanger"`
     823              : 
     824              :         MinDanger DangerLevel `json:"minDanger"`
     825              : 
     826              :         // Pack 1群あたりの敵数のダイス表記
     827              :         Pack Dice `json:"pack"`
     828              : 
     829              :         Weight EntryWeight `json:"weight"`
     830              : }
     831              : 
     832              : // EntityDescription 説明文
     833              : type EntityDescription = string
     834              : 
     835              : type EntityID = string
     836              : 
     837              : // EntityName エンティティ名
     838              : type EntityName = string
     839              : 
     840              : // EntryWeight テーブルエントリの重み。大きいほど選ばれやすい
     841              : type EntryWeight = float64
     842              : 
     843              : // EquipBonus 装備ボーナス
     844              : type EquipBonus struct {
     845              :         Agility Agility `json:"agility"`
     846              : 
     847              :         Dexterity Dexterity `json:"dexterity"`
     848              : 
     849              :         Sensation Sensation `json:"sensation"`
     850              : 
     851              :         Strength Strength `json:"strength"`
     852              : 
     853              :         Vitality Vitality `json:"vitality"`
     854              : }
     855              : 
     856              : // EquipSlot 装備スロット。防具部位 + 武器スロット
     857              : type EquipSlot string
     858              : 
     859              : // Defines values for EquipSlot.
     860              : const (
     861              :         EquipSlotARMS    EquipSlot = "ARMS"
     862              :         EquipSlotFEET    EquipSlot = "FEET"
     863              :         EquipSlotHANDS   EquipSlot = "HANDS"
     864              :         EquipSlotHEAD    EquipSlot = "HEAD"
     865              :         EquipSlotLEGS    EquipSlot = "LEGS"
     866              :         EquipSlotTORSO   EquipSlot = "TORSO"
     867              :         EquipSlotWEAPON1 EquipSlot = "WEAPON1"
     868              :         EquipSlotWEAPON2 EquipSlot = "WEAPON2"
     869              :         EquipSlotWEAPON3 EquipSlot = "WEAPON3"
     870              :         EquipSlotWEAPON4 EquipSlot = "WEAPON4"
     871              :         EquipSlotWEAPON5 EquipSlot = "WEAPON5"
     872              : )
     873              : 
     874              : // Valid indicates whether the value is a known member of the EquipSlot enum.
     875              : func (e EquipSlot) Valid() bool {
     876            0 :         switch e {
     877              :         case EquipSlotARMS:
     878            0 :                 return true
     879              :         case EquipSlotFEET:
     880            0 :                 return true
     881              :         case EquipSlotHANDS:
     882            0 :                 return true
     883              :         case EquipSlotHEAD:
     884            0 :                 return true
     885              :         case EquipSlotLEGS:
     886            0 :                 return true
     887              :         case EquipSlotTORSO:
     888            0 :                 return true
     889              :         case EquipSlotWEAPON1:
     890            0 :                 return true
     891              :         case EquipSlotWEAPON2:
     892            0 :                 return true
     893              :         case EquipSlotWEAPON3:
     894            0 :                 return true
     895              :         case EquipSlotWEAPON4:
     896            0 :                 return true
     897              :         case EquipSlotWEAPON5:
     898            0 :                 return true
     899              :         default:
     900            0 :                 return false
     901              :         }
     902              : }
     903              : 
     904              : // EquipSlotValues は EquipSlot の値を、スキーマに書いた順に返す。
     905              : func EquipSlotValues() []EquipSlot {
     906            0 :         return []EquipSlot{EquipSlotHEAD, EquipSlotTORSO, EquipSlotARMS, EquipSlotHANDS, EquipSlotLEGS, EquipSlotFEET, EquipSlotWEAPON1, EquipSlotWEAPON2, EquipSlotWEAPON3, EquipSlotWEAPON4, EquipSlotWEAPON5}
     907            0 : }
     908              : 
     909              : // EquipmentCategory 装備部位
     910              : type EquipmentCategory string
     911              : 
     912              : // Defines values for EquipmentCategory.
     913              : const (
     914              :         EquipmentCategoryARMS    EquipmentCategory = "ARMS"
     915              :         EquipmentCategoryFEET    EquipmentCategory = "FEET"
     916              :         EquipmentCategoryHANDS   EquipmentCategory = "HANDS"
     917              :         EquipmentCategoryHEAD    EquipmentCategory = "HEAD"
     918              :         EquipmentCategoryJEWELRY EquipmentCategory = "JEWELRY"
     919              :         EquipmentCategoryLEGS    EquipmentCategory = "LEGS"
     920              :         EquipmentCategoryTORSO   EquipmentCategory = "TORSO"
     921              : )
     922              : 
     923              : // Valid indicates whether the value is a known member of the EquipmentCategory enum.
     924              : func (e EquipmentCategory) Valid() bool {
     925            0 :         switch e {
     926              :         case EquipmentCategoryARMS:
     927            0 :                 return true
     928              :         case EquipmentCategoryFEET:
     929            0 :                 return true
     930              :         case EquipmentCategoryHANDS:
     931            0 :                 return true
     932              :         case EquipmentCategoryHEAD:
     933            0 :                 return true
     934              :         case EquipmentCategoryJEWELRY:
     935            0 :                 return true
     936              :         case EquipmentCategoryLEGS:
     937            0 :                 return true
     938              :         case EquipmentCategoryTORSO:
     939            0 :                 return true
     940              :         default:
     941            0 :                 return false
     942              :         }
     943              : }
     944              : 
     945              : // EquipmentCategoryValues は EquipmentCategory の値を、スキーマに書いた順に返す。
     946              : func EquipmentCategoryValues() []EquipmentCategory {
     947            0 :         return []EquipmentCategory{EquipmentCategoryHEAD, EquipmentCategoryTORSO, EquipmentCategoryARMS, EquipmentCategoryHANDS, EquipmentCategoryLEGS, EquipmentCategoryFEET, EquipmentCategoryJEWELRY}
     948            0 : }
     949              : 
     950              : // EscapeDevice 脱出の装置。使うと惑星を脱出してクリアになる
     951              : type EscapeDevice = map[string]interface{}
     952              : 
     953              : // Facility 市街地の施設1種
     954              : type Facility struct {
     955              :         // EnemyTable 施設に湧く敵の表
     956              :         EnemyTable EntityID `json:"enemyTable"`
     957              : 
     958              :         // Footprints 建物の大きさの候補。チャンク数で、区画に収まらなければ小さくする。省けば 1×1
     959              :         Footprints *[]FacilityFootprint `json:"footprints,omitempty"`
     960              : 
     961              :         // Id 施設の id。施設の絵の facility が指す
     962              :         Id EntityID `json:"id"`
     963              : 
     964              :         // Interior 2チャンク以上の建物の中の繋がり。省けば rooms
     965              :         Interior *FacilityInterior `json:"interior,omitempty"`
     966              : 
     967              :         // LootedChance 収納家具が荒らされて空になっている確率。0から100の百分率で、省略は0
     968              :         LootedChance *int32 `json:"lootedChance,omitempty"`
     969              : 
     970              :         // Zones 施設が建つ地区と抽選の重み
     971              :         Zones []FacilityZone `json:"zones"`
     972              : }
     973              : 
     974              : // FacilityFootprint 建物の大きさの候補
     975              : type FacilityFootprint struct {
     976              :         // H 南北の高さ。チャンク数
     977              :         H int `json:"h"`
     978              : 
     979              :         // W 東西の幅。チャンク数
     980              :         W int `json:"w"`
     981              : 
     982              :         // Weight 抽選の重み
     983              :         Weight int `json:"weight"`
     984              : }
     985              : 
     986              : // FacilityInterior 2チャンク以上の建物の中の繋がり。rooms は部屋を扉で繋ぐ迷路、hall はチャンクの境に壁の無い広い空間
     987              : type FacilityInterior string
     988              : 
     989              : // Defines values for FacilityInterior.
     990              : const (
     991              :         FacilityInteriorHall  FacilityInterior = "hall"
     992              :         FacilityInteriorRooms FacilityInterior = "rooms"
     993              : )
     994              : 
     995              : // Valid indicates whether the value is a known member of the FacilityInterior enum.
     996              : func (e FacilityInterior) Valid() bool {
     997            0 :         switch e {
     998              :         case FacilityInteriorHall:
     999            0 :                 return true
    1000              :         case FacilityInteriorRooms:
    1001            0 :                 return true
    1002              :         default:
    1003            0 :                 return false
    1004              :         }
    1005              : }
    1006              : 
    1007              : // FacilityInteriorValues は FacilityInterior の値を、スキーマに書いた順に返す。
    1008              : func FacilityInteriorValues() []FacilityInterior {
    1009            0 :         return []FacilityInterior{FacilityInteriorRooms, FacilityInteriorHall}
    1010            0 : }
    1011              : 
    1012              : // FacilityZone 施設が出現する地区と抽選重み。市街地の一辺が minSpan 以上のときだけ抽選対象になる
    1013              : type FacilityZone struct {
    1014              :         // MinDanger 区域の北の端の危険度がこの値以上のときだけ抽選する。省けば1で、どの深さでも抽選する
    1015              :         MinDanger *DangerLevel `json:"minDanger,omitempty"`
    1016              : 
    1017              :         // MinSpan 区域の長い方の辺がこのチャンク数以上のときだけ抽選する
    1018              :         MinSpan int32 `json:"minSpan"`
    1019              : 
    1020              :         // Weight 地区の中での抽選の重み
    1021              :         Weight int32 `json:"weight"`
    1022              : 
    1023              :         // Zone 施設が建つ地区
    1024              :         Zone Zone `json:"zone"`
    1025              : }
    1026              : 
    1027              : // FactionMemberType 派閥タイプ
    1028              : type FactionMemberType string
    1029              : 
    1030              : // Defines values for FactionMemberType.
    1031              : const (
    1032              :         FactionNeutral FactionMemberType = "FactionNeutral"
    1033              : )
    1034              : 
    1035              : // Valid indicates whether the value is a known member of the FactionMemberType enum.
    1036              : func (e FactionMemberType) Valid() bool {
    1037            0 :         switch e {
    1038              :         case FactionNeutral:
    1039            0 :                 return true
    1040              :         default:
    1041            0 :                 return false
    1042              :         }
    1043              : }
    1044              : 
    1045              : // FactionMemberTypeValues は FactionMemberType の値を、スキーマに書いた順に返す。
    1046              : func FactionMemberTypeValues() []FactionMemberType {
    1047            0 :         return []FactionMemberType{FactionNeutral}
    1048            0 : }
    1049              : 
    1050              : // FatigueStage 疲労の段階。疲労の割合が from 以上の段階のうち from が最大のものになる
    1051              : type FatigueStage struct {
    1052              :         // BadgeColor HUD に出すバッジの色。省くとバッジを出さない
    1053              :         BadgeColor *RGBAColor `json:"badgeColor,omitempty"`
    1054              : 
    1055              :         // CanSleep この段階で眠れるか。疲れが足りない段階は眠れない
    1056              :         CanSleep bool `json:"canSleep"`
    1057              : 
    1058              :         From NeedRatio `json:"from"`
    1059              : 
    1060              :         Id FatigueStageId `json:"id"`
    1061              : 
    1062              :         Name EntityName `json:"name"`
    1063              : 
    1064              :         // Severity この段階で立つ過労の重症度。省くと立たない
    1065              :         Severity *ConditionSeverity `json:"severity,omitempty"`
    1066              : }
    1067              : 
    1068              : // FatigueStageId 疲労の段階
    1069              : type FatigueStageId string
    1070              : 
    1071              : // Defines values for FatigueStageId.
    1072              : const (
    1073              :         FatigueStageIdExhausted FatigueStageId = "exhausted"
    1074              :         FatigueStageIdNormal    FatigueStageId = "normal"
    1075              :         FatigueStageIdRested    FatigueStageId = "rested"
    1076              :         FatigueStageIdTired     FatigueStageId = "tired"
    1077              : )
    1078              : 
    1079              : // Valid indicates whether the value is a known member of the FatigueStageId enum.
    1080              : func (e FatigueStageId) Valid() bool {
    1081            0 :         switch e {
    1082              :         case FatigueStageIdExhausted:
    1083            0 :                 return true
    1084              :         case FatigueStageIdNormal:
    1085            0 :                 return true
    1086              :         case FatigueStageIdRested:
    1087            0 :                 return true
    1088              :         case FatigueStageIdTired:
    1089            0 :                 return true
    1090              :         default:
    1091            0 :                 return false
    1092              :         }
    1093              : }
    1094              : 
    1095              : // FatigueStageIdValues は FatigueStageId の値を、スキーマに書いた順に返す。
    1096              : func FatigueStageIdValues() []FatigueStageId {
    1097            0 :         return []FatigueStageId{FatigueStageIdRested, FatigueStageIdNormal, FatigueStageIdTired, FatigueStageIdExhausted}
    1098            0 : }
    1099              : 
    1100              : // Fire 遠距離攻撃設定
    1101              : type Fire struct {
    1102              :         Accuracy Accuracy `json:"accuracy"`
    1103              : 
    1104              :         AmmoTag *AmmoTag `json:"ammoTag,omitempty"`
    1105              : 
    1106              :         AttackCategory AttackCategory `json:"attackCategory"`
    1107              : 
    1108              :         AttackCount AttackCount `json:"attackCount"`
    1109              : 
    1110              :         Cost ActionCost `json:"cost"`
    1111              : 
    1112              :         Damage BaseDamage `json:"damage"`
    1113              : 
    1114              :         Element Element `json:"element"`
    1115              : 
    1116              :         MagazineSize MagazineSize `json:"magazineSize"`
    1117              : 
    1118              :         ReloadEffort ReloadEffort `json:"reloadEffort"`
    1119              : 
    1120              :         TargetGroup TargetGroup `json:"targetGroup"`
    1121              : 
    1122              :         TargetNum TargetNum `json:"targetNum"`
    1123              : }
    1124              : 
    1125              : // FireStarter 火種設定。所持していると隣接タイルの燃焼物に火をつけられる道具を表す
    1126              : type FireStarter = map[string]interface{}
    1127              : 
    1128              : // Foliage タイルの植生
    1129              : type Foliage string
    1130              : 
    1131              : // Defines values for Foliage.
    1132              : const (
    1133              :         FoliageForest Foliage = "forest"
    1134              :         FoliageGrass  Foliage = "grass"
    1135              : )
    1136              : 
    1137              : // Valid indicates whether the value is a known member of the Foliage enum.
    1138              : func (e Foliage) Valid() bool {
    1139            0 :         switch e {
    1140              :         case FoliageForest:
    1141            0 :                 return true
    1142              :         case FoliageGrass:
    1143            0 :                 return true
    1144              :         default:
    1145            0 :                 return false
    1146              :         }
    1147              : }
    1148              : 
    1149              : // FoliageValues は Foliage の値を、スキーマに書いた順に返す。
    1150              : func FoliageValues() []Foliage {
    1151            0 :         return []Foliage{FoliageGrass, FoliageForest}
    1152            0 : }
    1153              : 
    1154              : // FoliageEffect 植生がタイルの気温に足す補正
    1155              : type FoliageEffect struct {
    1156              :         Id Foliage `json:"id"`
    1157              : 
    1158              :         TempModifier TileTempModifier `json:"tempModifier"`
    1159              : }
    1160              : 
    1161              : // FreshnessStage 鮮度の段階の境目と表示名と、食べたとき得る栄養の割合
    1162              : type FreshnessStage struct {
    1163              :         // EatLog 食べたときのログの msgid。%s は食べた者と食べ物
    1164              :         EatLog EntityDescription `json:"eatLog"`
    1165              : 
    1166              :         // From この段階が始まる劣化量。食料の stageLength の何倍かで表す。経過した段階数以下で from が最大の段階になり、from の小さい順が新しいものからの並び順になる
    1167              :         From FreshnessStageFrom `json:"from"`
    1168              : 
    1169              :         Id FreshnessStageId `json:"id"`
    1170              : 
    1171              :         // IllnessChancePercent 食べたとき食中毒を起こす確率。百分率。省くと起こさない
    1172              :         IllnessChancePercent *IllnessChancePercent `json:"illnessChancePercent,omitempty"`
    1173              : 
    1174              :         // Marker メニューの行に鮮度を添えるか
    1175              :         Marker bool `json:"marker"`
    1176              : 
    1177              :         Name EntityName `json:"name"`
    1178              : 
    1179              :         NutritionPercent NutritionPercent `json:"nutritionPercent"`
    1180              : }
    1181              : 
    1182              : // FreshnessStageFrom 鮮度の段階が始まる劣化量。食料の stageLength の何倍か
    1183              : type FreshnessStageFrom = int
    1184              : 
    1185              : // FreshnessStageId 鮮度の段階
    1186              : type FreshnessStageId string
    1187              : 
    1188              : // Defines values for FreshnessStageId.
    1189              : const (
    1190              :         Fresh  FreshnessStageId = "fresh"
    1191              :         Rotten FreshnessStageId = "rotten"
    1192              :         Stale  FreshnessStageId = "stale"
    1193              : )
    1194              : 
    1195              : // Valid indicates whether the value is a known member of the FreshnessStageId enum.
    1196              : func (e FreshnessStageId) Valid() bool {
    1197            0 :         switch e {
    1198              :         case Fresh:
    1199            0 :                 return true
    1200              :         case Rotten:
    1201            0 :                 return true
    1202              :         case Stale:
    1203            0 :                 return true
    1204              :         default:
    1205            0 :                 return false
    1206              :         }
    1207              : }
    1208              : 
    1209              : // FreshnessStageIdValues は FreshnessStageId の値を、スキーマに書いた順に返す。
    1210              : func FreshnessStageIdValues() []FreshnessStageId {
    1211            0 :         return []FreshnessStageId{Fresh, Stale, Rotten}
    1212            0 : }
    1213              : 
    1214              : // FuelCapacityBonus キューブモジュールの燃料容量ボーナス。装着するとキューブの燃料ポイントの上限がこの量だけ増える
    1215              : type FuelCapacityBonus = int
    1216              : 
    1217              : // GladeStep 小さな円形の床を撒く段
    1218              : type GladeStep struct {
    1219              :         Id EntityID `json:"id"`
    1220              : 
    1221              :         Spots RandInt `json:"spots"`
    1222              : }
    1223              : 
    1224              : // GlyphChunk 持ち主の行を持たないチャンクの種類。地図記号の行がどの種類を表すかを指す
    1225              : type GlyphChunk string
    1226              : 
    1227              : // Defines values for GlyphChunk.
    1228              : const (
    1229              :         Wasteland GlyphChunk = "wasteland"
    1230              : )
    1231              : 
    1232              : // Valid indicates whether the value is a known member of the GlyphChunk enum.
    1233              : func (e GlyphChunk) Valid() bool {
    1234            0 :         switch e {
    1235              :         case Wasteland:
    1236            0 :                 return true
    1237              :         default:
    1238            0 :                 return false
    1239              :         }
    1240              : }
    1241              : 
    1242              : // GlyphChunkValues は GlyphChunk の値を、スキーマに書いた順に返す。
    1243              : func GlyphChunkValues() []GlyphChunk {
    1244            0 :         return []GlyphChunk{Wasteland}
    1245            0 : }
    1246              : 
    1247              : // GroundCoverEntry 地面を覆う草や土の飾りの prop 1種と、選ばれる重み
    1248              : type GroundCoverEntry struct {
    1249              :         Ref EntityID `json:"ref"`
    1250              : 
    1251              :         Weight int32 `json:"weight"`
    1252              : }
    1253              : 
    1254              : // HealAmount 回復固定量
    1255              : type HealAmount = int
    1256              : 
    1257              : // HealRatio 回復割合。0.0〜1.0
    1258              : type HealRatio = float64
    1259              : 
    1260              : // HealingValueType 回復量の計算方式
    1261              : type HealingValueType string
    1262              : 
    1263              : // Defines values for HealingValueType.
    1264              : const (
    1265              :         ABSOLUTE   HealingValueType = "ABSOLUTE"
    1266              :         NUMERAL    HealingValueType = "NUMERAL"
    1267              :         PERCENTAGE HealingValueType = "PERCENTAGE"
    1268              : )
    1269              : 
    1270              : // Valid indicates whether the value is a known member of the HealingValueType enum.
    1271              : func (e HealingValueType) Valid() bool {
    1272            0 :         switch e {
    1273              :         case ABSOLUTE:
    1274            0 :                 return true
    1275              :         case NUMERAL:
    1276            0 :                 return true
    1277              :         case PERCENTAGE:
    1278            0 :                 return true
    1279              :         default:
    1280            0 :                 return false
    1281              :         }
    1282              : }
    1283              : 
    1284              : // HealingValueTypeValues は HealingValueType の値を、スキーマに書いた順に返す。
    1285              : func HealingValueTypeValues() []HealingValueType {
    1286            0 :         return []HealingValueType{PERCENTAGE, ABSOLUTE, NUMERAL}
    1287            0 : }
    1288              : 
    1289              : // HeatPerKg 材質のkgあたり燃焼熱量。0 なら不燃で燃料にならない
    1290              : type HeatPerKg = int
    1291              : 
    1292              : // HeatRadius 熱の到達半径。チェビシェフ距離、タイル単位
    1293              : type HeatRadius = int
    1294              : 
    1295              : // HeatSource 熱源設定。近接するキャラの低体温を毎ターン回復する
    1296              : type HeatSource struct {
    1297              :         Radius HeatRadius `json:"radius"`
    1298              : 
    1299              :         Warmth HeatWarmth `json:"warmth"`
    1300              : }
    1301              : 
    1302              : // HeatWarmth 熱源が毎ターン下げる低体温タイマーの量
    1303              : type HeatWarmth = float64
    1304              : 
    1305              : // HitPoints 耐久値。削り切られると壊れる
    1306              : type HitPoints = int
    1307              : 
    1308              : // HungerStage 空腹の段階。満腹度の割合が from 以上の段階のうち from が最大のものになる
    1309              : type HungerStage struct {
    1310              :         // BadgeColor HUD に出すバッジの色。省くとバッジを出さない
    1311              :         BadgeColor *RGBAColor `json:"badgeColor,omitempty"`
    1312              : 
    1313              :         From NeedRatio `json:"from"`
    1314              : 
    1315              :         Id HungerStageId `json:"id"`
    1316              : 
    1317              :         Name EntityName `json:"name"`
    1318              : 
    1319              :         // ReachedLog 食べてこの段階に達したときのログの msgid。%s は食べた者。省くと出さない
    1320              :         ReachedLog *EntityDescription `json:"reachedLog,omitempty"`
    1321              : 
    1322              :         // Severity この段階で立つ栄養失調の重症度。省くと立たない
    1323              :         Severity *ConditionSeverity `json:"severity,omitempty"`
    1324              : 
    1325              :         // WakesSleeper 寝ている者を起こす段階か
    1326              :         WakesSleeper *bool `json:"wakesSleeper,omitempty"`
    1327              : }
    1328              : 
    1329              : // HungerStageId 空腹の段階
    1330              : type HungerStageId string
    1331              : 
    1332              : // Defines values for HungerStageId.
    1333              : const (
    1334              :         HungerStageIdHungry   HungerStageId = "hungry"
    1335              :         HungerStageIdNormal   HungerStageId = "normal"
    1336              :         HungerStageIdSatiated HungerStageId = "satiated"
    1337              :         HungerStageIdStarving HungerStageId = "starving"
    1338              : )
    1339              : 
    1340              : // Valid indicates whether the value is a known member of the HungerStageId enum.
    1341              : func (e HungerStageId) Valid() bool {
    1342            0 :         switch e {
    1343              :         case HungerStageIdHungry:
    1344            0 :                 return true
    1345              :         case HungerStageIdNormal:
    1346            0 :                 return true
    1347              :         case HungerStageIdSatiated:
    1348            0 :                 return true
    1349              :         case HungerStageIdStarving:
    1350            0 :                 return true
    1351              :         default:
    1352            0 :                 return false
    1353              :         }
    1354              : }
    1355              : 
    1356              : // HungerStageIdValues は HungerStageId の値を、スキーマに書いた順に返す。
    1357              : func HungerStageIdValues() []HungerStageId {
    1358            0 :         return []HungerStageId{HungerStageIdSatiated, HungerStageIdNormal, HungerStageIdHungry, HungerStageIdStarving}
    1359            0 : }
    1360              : 
    1361              : // IllnessChancePercent 病気を起こす確率。百分率
    1362              : type IllnessChancePercent = int
    1363              : 
    1364              : // ImagePath 画像ファイルパス
    1365              : type ImagePath = string
    1366              : 
    1367              : // InsulationCold 耐寒性能
    1368              : type InsulationCold = int
    1369              : 
    1370              : // InsulationHeat 耐暑性能
    1371              : type InsulationHeat = int
    1372              : 
    1373              : // IsPlayer プレイヤーキャラクターかどうか
    1374              : type IsPlayer = bool
    1375              : 
    1376              : // Item アイテム
    1377              : type Item struct {
    1378              :         Ammo *Ammo `json:"ammo,omitempty"`
    1379              : 
    1380              :         AnimKeys *[]SpriteKey `json:"animKeys,omitempty"`
    1381              : 
    1382              :         Book *Book `json:"book,omitempty"`
    1383              : 
    1384              :         Consumable *Consumable `json:"consumable,omitempty"`
    1385              : 
    1386              :         // CubeCore キューブの核。使うと隣に新しいキューブが組み上がる
    1387              :         CubeCore *CubeCore `json:"cubeCore,omitempty"`
    1388              : 
    1389              :         CubeModule *CubeModule `json:"cubeModule,omitempty"`
    1390              : 
    1391              :         Deployable *Deployable `json:"deployable,omitempty"`
    1392              : 
    1393              :         Description EntityDescription `json:"description"`
    1394              : 
    1395              :         EquipBonus *EquipBonus `json:"equipBonus,omitempty"`
    1396              : 
    1397              :         // EscapeDevice 脱出の装置。使うとクリアになる
    1398              :         EscapeDevice *EscapeDevice `json:"escapeDevice,omitempty"`
    1399              : 
    1400              :         Fire *Fire `json:"fire,omitempty"`
    1401              : 
    1402              :         // FireStarter 火種。所持していると隣接の燃焼物に着火できる
    1403              :         FireStarter *FireStarter `json:"fireStarter,omitempty"`
    1404              : 
    1405              :         Id EntityID `json:"id"`
    1406              : 
    1407              :         InflictsDamage *BaseDamage `json:"inflictsDamage,omitempty"`
    1408              : 
    1409              :         // LightSource 携行光源。装備すると owner を照らす
    1410              :         LightSource *LightSource `json:"lightSource,omitempty"`
    1411              : 
    1412              :         // Material 材質。可燃性と燃焼熱量を導く。可燃な材質のアイテムは地面に置いて着火したり火にくべて燃やせる
    1413              :         Material *Material `json:"material,omitempty"`
    1414              : 
    1415              :         Melee *Melee `json:"melee,omitempty"`
    1416              : 
    1417              :         Name EntityName `json:"name"`
    1418              : 
    1419              :         ProvidesHealing *ProvidesHealing `json:"providesHealing,omitempty"`
    1420              : 
    1421              :         ProvidesNutrition *NutritionAmount `json:"providesNutrition,omitempty"`
    1422              : 
    1423              :         Remedy *Remedy `json:"remedy,omitempty"`
    1424              : 
    1425              :         SpriteKey SpriteKey `json:"spriteKey"`
    1426              : 
    1427              :         SpriteSheetName SpriteSheetName `json:"spriteSheetName"`
    1428              : 
    1429              :         StageLength *StageLengthTurns `json:"stageLength,omitempty"`
    1430              : 
    1431              :         // Tool 道具の性質。合う物を殴って壊すと速く多く得る
    1432              :         Tool *Tool `json:"tool,omitempty"`
    1433              : 
    1434              :         Value ItemValue `json:"value"`
    1435              : 
    1436              :         Wearable *Wearable `json:"wearable,omitempty"`
    1437              : 
    1438              :         // Weight アイテム重量
    1439              :         Weight *Weight `json:"weight,omitempty"`
    1440              : }
    1441              : 
    1442              : // ItemCollection アイテムコレクション。各エントリを chance の確率で独立に判定する。複数当選することもありうる
    1443              : type ItemCollection struct {
    1444              :         Entries []ItemCollectionEntry `json:"entries"`
    1445              : 
    1446              :         Id EntityID `json:"id"`
    1447              : 
    1448              :         Name EntityName `json:"name"`
    1449              : }
    1450              : 
    1451              : // ItemCollectionChance アイテムコレクションのエントリの出現確率。百分率。書き忘れて0になった行を弾くため0は許さない
    1452              : type ItemCollectionChance = float64
    1453              : 
    1454              : // ItemCollectionEntry アイテムコレクションエントリ
    1455              : type ItemCollectionEntry struct {
    1456              :         Chance ItemCollectionChance `json:"chance"`
    1457              : 
    1458              :         Id EntityID `json:"id"`
    1459              : 
    1460              :         // Pack 1山あたりの個数のダイス表記
    1461              :         Pack Dice `json:"pack"`
    1462              : }
    1463              : 
    1464              : // ItemCount アイテム所持数
    1465              : type ItemCount = int
    1466              : 
    1467              : // ItemGroup アイテムグループ。エントリ群から weight の比で1つだけ選ぶ
    1468              : type ItemGroup struct {
    1469              :         Entries []ItemGroupEntry `json:"entries"`
    1470              : 
    1471              :         Id EntityID `json:"id"`
    1472              : 
    1473              :         Name EntityName `json:"name"`
    1474              : }
    1475              : 
    1476              : // ItemGroupEntry アイテムグループエントリ
    1477              : type ItemGroupEntry struct {
    1478              :         Id EntityID `json:"id"`
    1479              : 
    1480              :         // Pack 1山あたりの個数のダイス表記
    1481              :         Pack Dice `json:"pack"`
    1482              : 
    1483              :         Weight EntryWeight `json:"weight"`
    1484              : }
    1485              : 
    1486              : // ItemTable アイテムテーブル
    1487              : type ItemTable struct {
    1488              :         Entries []ItemTableEntry `json:"entries"`
    1489              : 
    1490              :         Id EntityID `json:"id"`
    1491              : 
    1492              :         Name EntityName `json:"name"`
    1493              : }
    1494              : 
    1495              : // ItemTableEntry アイテムテーブルエントリ。アイテムグループかアイテムコレクションを参照する
    1496              : type ItemTableEntry struct {
    1497              :         // Id 参照するアイテムグループかアイテムコレクションの id
    1498              :         Id EntityID `json:"id"`
    1499              : 
    1500              :         MaxDanger DangerLevel `json:"maxDanger"`
    1501              : 
    1502              :         MinDanger DangerLevel `json:"minDanger"`
    1503              : 
    1504              :         Weight EntryWeight `json:"weight"`
    1505              : }
    1506              : 
    1507              : // ItemValue 売買価格
    1508              : type ItemValue = int
    1509              : 
    1510              : // Landmark 原野の点在ランドマーク1種。施設の絵で描く施設を、原野のランドマークの当選チャンクに置く
    1511              : type Landmark struct {
    1512              :         // Id 原野に置く施設の id。地図の記号もこの id で引く
    1513              :         Id EntityID `json:"id"`
    1514              : 
    1515              :         // Weight 原野のランドマークの当選チャンクで、この施設を引く重み
    1516              :         Weight int32 `json:"weight"`
    1517              : }
    1518              : 
    1519              : // Layout ダンジョンのフロアの間取り。最初の段で部屋を決め、中の段を並びの順に走らせる
    1520              : type Layout struct {
    1521              :         Id EntityID `json:"id"`
    1522              : 
    1523              :         // Start 最初の段の表の行の id
    1524              :         Start EntityID `json:"start"`
    1525              : 
    1526              :         // Steps 中の段の表の行の id
    1527              :         Steps []EntityID `json:"steps"`
    1528              : 
    1529              :         // Tiles 中の段が置くタイル。絵の最初の段は絵のタイルを置き、これを使うのは絵の上に重ねる中の段だけである
    1530              :         Tiles LayoutTiles `json:"tiles"`
    1531              : }
    1532              : 
    1533              : // LayoutTiles 間取りが置くタイル。ground と書けば、ダンジョンの行の下地 ground を置く
    1534              : type LayoutTiles struct {
    1535              :         Floor EntityID `json:"floor"`
    1536              : 
    1537              :         // Void 床に接しない壁を置き換えるタイル
    1538              :         Void EntityID `json:"void"`
    1539              : 
    1540              :         Wall EntityID `json:"wall"`
    1541              : }
    1542              : 
    1543              : // LightEnabled 光源が有効かどうか
    1544              : type LightEnabled = bool
    1545              : 
    1546              : // LightLevel 光の強さ。0 が真っ暗、1 が最大
    1547              : type LightLevel = float64
    1548              : 
    1549              : // LightRadius 光の到達半径(タイル単位)
    1550              : type LightRadius = int
    1551              : 
    1552              : // LightSource 光源設定
    1553              : type LightSource struct {
    1554              :         Color RGBAColor `json:"color"`
    1555              : 
    1556              :         Enabled LightEnabled `json:"enabled"`
    1557              : 
    1558              :         Radius LightRadius `json:"radius"`
    1559              : }
    1560              : 
    1561              : // MagazineSize マガジン容量
    1562              : type MagazineSize = int
    1563              : 
    1564              : // MapGlyph 俯瞰地図の記号1種。id は地物・施設の種別 id
    1565              : type MapGlyph struct {
    1566              :         // Chunk この記号で描く、持ち主の行を持たないチャンクの種類。施設と集落とランドマークの記号は持ち主の行の id で引くので省く
    1567              :         Chunk *GlyphChunk `json:"chunk,omitempty"`
    1568              : 
    1569              :         Color RGBAColor `json:"color"`
    1570              : 
    1571              :         Glyph string `json:"glyph"`
    1572              : 
    1573              :         Id EntityID `json:"id"`
    1574              : 
    1575              :         Name string `json:"name"`
    1576              : 
    1577              :         Order int32 `json:"order"`
    1578              : }
    1579              : 
    1580              : // Material 材質。可燃性と燃焼熱量の算出に使う。燃料熱量は材質のkgあたり熱量へ重量を掛けて導く。
    1581              : // 不燃の材質は係数0で燃料にならない。係数は materials の行が持つ
    1582              : type Material string
    1583              : 
    1584              : // Defines values for Material.
    1585              : const (
    1586              :         BONE    Material = "BONE"
    1587              :         CERAMIC Material = "CERAMIC"
    1588              :         CLOTH   Material = "CLOTH"
    1589              :         COAL    Material = "COAL"
    1590              :         CRYSTAL Material = "CRYSTAL"
    1591              :         FOOD    Material = "FOOD"
    1592              :         GLASS   Material = "GLASS"
    1593              :         LEATHER Material = "LEATHER"
    1594              :         LIQUID  Material = "LIQUID"
    1595              :         METAL   Material = "METAL"
    1596              :         OIL     Material = "OIL"
    1597              :         PAPER   Material = "PAPER"
    1598              :         PLANT   Material = "PLANT"
    1599              :         PLASTIC Material = "PLASTIC"
    1600              :         STONE   Material = "STONE"
    1601              :         WOOD    Material = "WOOD"
    1602              : )
    1603              : 
    1604              : // Valid indicates whether the value is a known member of the Material enum.
    1605              : func (e Material) Valid() bool {
    1606            0 :         switch e {
    1607              :         case BONE:
    1608            0 :                 return true
    1609              :         case CERAMIC:
    1610            0 :                 return true
    1611              :         case CLOTH:
    1612            0 :                 return true
    1613              :         case COAL:
    1614            0 :                 return true
    1615              :         case CRYSTAL:
    1616            0 :                 return true
    1617              :         case FOOD:
    1618            0 :                 return true
    1619              :         case GLASS:
    1620            0 :                 return true
    1621              :         case LEATHER:
    1622            0 :                 return true
    1623              :         case LIQUID:
    1624            0 :                 return true
    1625              :         case METAL:
    1626            0 :                 return true
    1627              :         case OIL:
    1628            0 :                 return true
    1629              :         case PAPER:
    1630            0 :                 return true
    1631              :         case PLANT:
    1632            0 :                 return true
    1633              :         case PLASTIC:
    1634            0 :                 return true
    1635              :         case STONE:
    1636            0 :                 return true
    1637              :         case WOOD:
    1638            0 :                 return true
    1639              :         default:
    1640            0 :                 return false
    1641              :         }
    1642              : }
    1643              : 
    1644              : // MaterialValues は Material の値を、スキーマに書いた順に返す。
    1645              : func MaterialValues() []Material {
    1646            0 :         return []Material{WOOD, PAPER, CLOTH, LEATHER, PLANT, FOOD, BONE, OIL, COAL, PLASTIC, METAL, STONE, GLASS, CRYSTAL, CERAMIC, LIQUID}
    1647            0 : }
    1648              : 
    1649              : // MaterialAmount 素材必要数
    1650              : type MaterialAmount = int
    1651              : 
    1652              : // MaterialDef 材質の表示名と燃焼の熱量
    1653              : type MaterialDef struct {
    1654              :         // Disassembly 分解で戻る素材。無い材質のアイテムは分解できない
    1655              :         Disassembly *MaterialDisassembly `json:"disassembly,omitempty"`
    1656              : 
    1657              :         HeatPerKg HeatPerKg `json:"heatPerKg"`
    1658              : 
    1659              :         Id Material `json:"id"`
    1660              : 
    1661              :         Name EntityName `json:"name"`
    1662              : }
    1663              : 
    1664              : // MaterialDisassembly 材質のアイテムを分解したときに戻る素材
    1665              : type MaterialDisassembly struct {
    1666              :         Item EntityID `json:"item"`
    1667              : 
    1668              :         // PerWeight 素材1個に要るアイテムの重さ
    1669              :         PerWeight Weight `json:"perWeight"`
    1670              : }
    1671              : 
    1672              : // Melee 近接攻撃設定
    1673              : type Melee struct {
    1674              :         Accuracy Accuracy `json:"accuracy"`
    1675              : 
    1676              :         AttackCategory AttackCategory `json:"attackCategory"`
    1677              : 
    1678              :         AttackCount AttackCount `json:"attackCount"`
    1679              : 
    1680              :         Cost ActionCost `json:"cost"`
    1681              : 
    1682              :         Damage BaseDamage `json:"damage"`
    1683              : 
    1684              :         Element Element `json:"element"`
    1685              : 
    1686              :         TargetGroup TargetGroup `json:"targetGroup"`
    1687              : 
    1688              :         TargetNum TargetNum `json:"targetNum"`
    1689              : }
    1690              : 
    1691              : // Member メンバー
    1692              : type Member struct {
    1693              :         Abilities Abilities `json:"abilities"`
    1694              : 
    1695              :         AnimKeys *[]SpriteKey `json:"animKeys,omitempty"`
    1696              : 
    1697              :         CombatPolicy *CombatPolicyType `json:"combatPolicy,omitempty"`
    1698              : 
    1699              :         // CommandTableId プレイヤーキャラクターでは省略可能
    1700              :         CommandTableId *EntityID `json:"commandTableId,omitempty"`
    1701              : 
    1702              :         Dialog *Dialog `json:"dialog,omitempty"`
    1703              : 
    1704              :         // DropTableId プレイヤーキャラクターでは省略可能
    1705              :         DropTableId *EntityID `json:"dropTableId,omitempty"`
    1706              : 
    1707              :         FactionType *FactionMemberType `json:"factionType,omitempty"`
    1708              : 
    1709              :         Id EntityID `json:"id"`
    1710              : 
    1711              :         LightSource *LightSource `json:"lightSource,omitempty"`
    1712              : 
    1713              :         MovementPattern *MovementPatternType `json:"movementPattern,omitempty"`
    1714              : 
    1715              :         Name EntityName `json:"name"`
    1716              : 
    1717              :         Player *IsPlayer `json:"player,omitempty"`
    1718              : 
    1719              :         SpriteKey SpriteKey `json:"spriteKey"`
    1720              : 
    1721              :         SpriteSheetName SpriteSheetName `json:"spriteSheetName"`
    1722              : 
    1723              :         // StartingEquips 生成時に装備して持たせるアイテム。startingItems より先に持たせる
    1724              :         StartingEquips *[]ProfessionEquip `json:"startingEquips,omitempty"`
    1725              : 
    1726              :         // StartingItems 生成時にバックパックへ持たせるアイテム
    1727              :         StartingItems *[]ProfessionItem `json:"startingItems,omitempty"`
    1728              : 
    1729              :         // Stock 店の在庫。持つ member は店を開く
    1730              :         Stock *[]ProfessionItem `json:"stock,omitempty"`
    1731              : 
    1732              :         ViewDistance *ViewDistance `json:"viewDistance,omitempty"`
    1733              : }
    1734              : 
    1735              : // MessageKey メッセージリソースのキー
    1736              : type MessageKey = string
    1737              : 
    1738              : // MovementPatternType 非戦闘時の移動パターン
    1739              : type MovementPatternType string
    1740              : 
    1741              : // Defines values for MovementPatternType.
    1742              : const (
    1743              :         Follow      MovementPatternType = "follow"
    1744              :         Patrol      MovementPatternType = "patrol"
    1745              :         Random      MovementPatternType = "random"
    1746              :         Stationary  MovementPatternType = "stationary"
    1747              :         Swarm       MovementPatternType = "swarm"
    1748              :         Territorial MovementPatternType = "territorial"
    1749              :         WallHug     MovementPatternType = "wallHug"
    1750              :         Wander      MovementPatternType = "wander"
    1751              : )
    1752              : 
    1753              : // Valid indicates whether the value is a known member of the MovementPatternType enum.
    1754              : func (e MovementPatternType) Valid() bool {
    1755            0 :         switch e {
    1756              :         case Follow:
    1757            0 :                 return true
    1758              :         case Patrol:
    1759            0 :                 return true
    1760              :         case Random:
    1761            0 :                 return true
    1762              :         case Stationary:
    1763            0 :                 return true
    1764              :         case Swarm:
    1765            0 :                 return true
    1766              :         case Territorial:
    1767            0 :                 return true
    1768              :         case WallHug:
    1769            0 :                 return true
    1770              :         case Wander:
    1771            0 :                 return true
    1772              :         default:
    1773            0 :                 return false
    1774              :         }
    1775              : }
    1776              : 
    1777              : // MovementPatternTypeValues は MovementPatternType の値を、スキーマに書いた順に返す。
    1778              : func MovementPatternTypeValues() []MovementPatternType {
    1779            0 :         return []MovementPatternType{Random, Patrol, WallHug, Stationary, Wander, Territorial, Swarm, Follow}
    1780            0 : }
    1781              : 
    1782              : // NeedRatio 最大値に対する割合
    1783              : type NeedRatio = float64
    1784              : 
    1785              : // NoiseStart 全面に壁を置く確率で撒く最初の段。部屋は後の段が決める
    1786              : type NoiseStart struct {
    1787              :         Id EntityID `json:"id"`
    1788              : 
    1789              :         WallChance Chance `json:"wallChance"`
    1790              : }
    1791              : 
    1792              : // NutritionAmount 栄養価
    1793              : type NutritionAmount = int
    1794              : 
    1795              : // NutritionPercent 食料から得る栄養の満額に対する割合。百分率
    1796              : type NutritionPercent = int
    1797              : 
    1798              : // PassCost 通行コスト加算値。0で変化なし、50でベースコスト+50
    1799              : type PassCost = int
    1800              : 
    1801              : // PointFeature 区域でない地物の置き方。南北に spacing チャンクの帯ごとに1つの当選を置き、隣の帯の当選と separation チャンク以上離す
    1802              : type PointFeature struct {
    1803              :         // Id 地物の種類
    1804              :         Id PointFeatureKind `json:"id"`
    1805              : 
    1806              :         // Road この地物の当選どうしを結ぶ道。省けば道を引かない
    1807              :         Road *Road `json:"road,omitempty"`
    1808              : 
    1809              :         // Salt 乱数の種を地物ごとにずらす値。行ごとに違う値にする。変えると同じ run の seed でも別の世界になる
    1810              :         Salt int `json:"salt"`
    1811              : 
    1812              :         // Separation 隣の帯の当選との最小の空き。チャンク数
    1813              :         Separation int `json:"separation"`
    1814              : 
    1815              :         // Spacing 当選の間隔。チャンク数
    1816              :         Spacing int `json:"spacing"`
    1817              : }
    1818              : 
    1819              : // PointFeatureKind 区域でない地物の種類
    1820              : type PointFeatureKind string
    1821              : 
    1822              : // Defines values for PointFeatureKind.
    1823              : const (
    1824              :         PointFeatureKindLandmark   PointFeatureKind = "landmark"
    1825              :         PointFeatureKindSettlement PointFeatureKind = "settlement"
    1826              : )
    1827              : 
    1828              : // Valid indicates whether the value is a known member of the PointFeatureKind enum.
    1829              : func (e PointFeatureKind) Valid() bool {
    1830            0 :         switch e {
    1831              :         case PointFeatureKindLandmark:
    1832            0 :                 return true
    1833              :         case PointFeatureKindSettlement:
    1834            0 :                 return true
    1835              :         default:
    1836            0 :                 return false
    1837              :         }
    1838              : }
    1839              : 
    1840              : // PointFeatureKindValues は PointFeatureKind の値を、スキーマに書いた順に返す。
    1841              : func PointFeatureKindValues() []PointFeatureKind {
    1842            0 :         return []PointFeatureKind{PointFeatureKindSettlement, PointFeatureKindLandmark}
    1843            0 : }
    1844              : 
    1845              : // Potency 治療の質。基準100の倍率。100が標準、150で回復1.5倍
    1846              : type Potency = int
    1847              : 
    1848              : // Profession 職業
    1849              : type Profession struct {
    1850              :         Abilities Abilities `json:"abilities"`
    1851              : 
    1852              :         Description EntityDescription `json:"description"`
    1853              : 
    1854              :         Equips []ProfessionEquip `json:"equips"`
    1855              : 
    1856              :         Id ProfessionId `json:"id"`
    1857              : 
    1858              :         Items []ProfessionItem `json:"items"`
    1859              : 
    1860              :         Name EntityName `json:"name"`
    1861              : 
    1862              :         Skills *[]ProfessionSkill `json:"skills,omitempty"`
    1863              : }
    1864              : 
    1865              : // ProfessionEquip 職業初期装備
    1866              : type ProfessionEquip struct {
    1867              :         Name EntityName `json:"name"`
    1868              : 
    1869              :         Slot EquipSlot `json:"slot"`
    1870              : }
    1871              : 
    1872              : // ProfessionId 職業ID
    1873              : type ProfessionId = string
    1874              : 
    1875              : // ProfessionItem 職業初期所持アイテム
    1876              : type ProfessionItem struct {
    1877              :         Count ItemCount `json:"count"`
    1878              : 
    1879              :         Name EntityName `json:"name"`
    1880              : }
    1881              : 
    1882              : // ProfessionSkill 職業スキル初期値
    1883              : type ProfessionSkill struct {
    1884              :         Id SkillId `json:"id"`
    1885              : 
    1886              :         Value SkillLevel `json:"value"`
    1887              : }
    1888              : 
    1889              : // ProficiencyId 熟練の効果倍率の id。技能と能力値から導く行動ごとの倍率を指す。怪我・病気・疲労・空腹による身体機能の低下は別に扱う
    1890              : type ProficiencyId string
    1891              : 
    1892              : // Defines values for ProficiencyId.
    1893              : const (
    1894              :         ProficiencyIdBowAccuracy     ProficiencyId = "bow_accuracy"
    1895              :         ProficiencyIdBowDamage       ProficiencyId = "bow_damage"
    1896              :         ProficiencyIdBuyPrice        ProficiencyId = "buy_price"
    1897              :         ProficiencyIdCannonAccuracy  ProficiencyId = "cannon_accuracy"
    1898              :         ProficiencyIdCannonDamage    ProficiencyId = "cannon_damage"
    1899              :         ProficiencyIdChillResist     ProficiencyId = "chill_resist"
    1900              :         ProficiencyIdColdProgress    ProficiencyId = "cold_progress"
    1901              :         ProficiencyIdCraftCost       ProficiencyId = "craft_cost"
    1902              :         ProficiencyIdEnemyVision     ProficiencyId = "enemy_vision"
    1903              :         ProficiencyIdExploration     ProficiencyId = "exploration"
    1904              :         ProficiencyIdFireResist      ProficiencyId = "fire_resist"
    1905              :         ProficiencyIdFistAccuracy    ProficiencyId = "fist_accuracy"
    1906              :         ProficiencyIdFistDamage      ProficiencyId = "fist_damage"
    1907              :         ProficiencyIdHandgunAccuracy ProficiencyId = "handgun_accuracy"
    1908              :         ProficiencyIdHandgunDamage   ProficiencyId = "handgun_damage"
    1909              :         ProficiencyIdHealingEffect   ProficiencyId = "healing_effect"
    1910              :         ProficiencyIdHeavyArmor      ProficiencyId = "heavy_armor"
    1911              :         ProficiencyIdHungerProgress  ProficiencyId = "hunger_progress"
    1912              :         ProficiencyIdMaxWeight       ProficiencyId = "max_weight"
    1913              :         ProficiencyIdMoveCost        ProficiencyId = "move_cost"
    1914              :         ProficiencyIdNightVision     ProficiencyId = "night_vision"
    1915              :         ProficiencyIdPhotonResist    ProficiencyId = "photon_resist"
    1916              :         ProficiencyIdRifleAccuracy   ProficiencyId = "rifle_accuracy"
    1917              :         ProficiencyIdRifleDamage     ProficiencyId = "rifle_damage"
    1918              :         ProficiencyIdSellPrice       ProficiencyId = "sell_price"
    1919              :         ProficiencyIdSmithQuality    ProficiencyId = "smith_quality"
    1920              :         ProficiencyIdSpearAccuracy   ProficiencyId = "spear_accuracy"
    1921              :         ProficiencyIdSpearDamage     ProficiencyId = "spear_damage"
    1922              :         ProficiencyIdSwordAccuracy   ProficiencyId = "sword_accuracy"
    1923              :         ProficiencyIdSwordDamage     ProficiencyId = "sword_damage"
    1924              :         ProficiencyIdThunderResist   ProficiencyId = "thunder_resist"
    1925              : )
    1926              : 
    1927              : // Valid indicates whether the value is a known member of the ProficiencyId enum.
    1928              : func (e ProficiencyId) Valid() bool {
    1929            0 :         switch e {
    1930              :         case ProficiencyIdBowAccuracy:
    1931            0 :                 return true
    1932              :         case ProficiencyIdBowDamage:
    1933            0 :                 return true
    1934              :         case ProficiencyIdBuyPrice:
    1935            0 :                 return true
    1936              :         case ProficiencyIdCannonAccuracy:
    1937            0 :                 return true
    1938              :         case ProficiencyIdCannonDamage:
    1939            0 :                 return true
    1940              :         case ProficiencyIdChillResist:
    1941            0 :                 return true
    1942              :         case ProficiencyIdColdProgress:
    1943            0 :                 return true
    1944              :         case ProficiencyIdCraftCost:
    1945            0 :                 return true
    1946              :         case ProficiencyIdEnemyVision:
    1947            0 :                 return true
    1948              :         case ProficiencyIdExploration:
    1949            0 :                 return true
    1950              :         case ProficiencyIdFireResist:
    1951            0 :                 return true
    1952              :         case ProficiencyIdFistAccuracy:
    1953            0 :                 return true
    1954              :         case ProficiencyIdFistDamage:
    1955            0 :                 return true
    1956              :         case ProficiencyIdHandgunAccuracy:
    1957            0 :                 return true
    1958              :         case ProficiencyIdHandgunDamage:
    1959            0 :                 return true
    1960              :         case ProficiencyIdHealingEffect:
    1961            0 :                 return true
    1962              :         case ProficiencyIdHeavyArmor:
    1963            0 :                 return true
    1964              :         case ProficiencyIdHungerProgress:
    1965            0 :                 return true
    1966              :         case ProficiencyIdMaxWeight:
    1967            0 :                 return true
    1968              :         case ProficiencyIdMoveCost:
    1969            0 :                 return true
    1970              :         case ProficiencyIdNightVision:
    1971            0 :                 return true
    1972              :         case ProficiencyIdPhotonResist:
    1973            0 :                 return true
    1974              :         case ProficiencyIdRifleAccuracy:
    1975            0 :                 return true
    1976              :         case ProficiencyIdRifleDamage:
    1977            0 :                 return true
    1978              :         case ProficiencyIdSellPrice:
    1979            0 :                 return true
    1980              :         case ProficiencyIdSmithQuality:
    1981            0 :                 return true
    1982              :         case ProficiencyIdSpearAccuracy:
    1983            0 :                 return true
    1984              :         case ProficiencyIdSpearDamage:
    1985            0 :                 return true
    1986              :         case ProficiencyIdSwordAccuracy:
    1987            0 :                 return true
    1988              :         case ProficiencyIdSwordDamage:
    1989            0 :                 return true
    1990              :         case ProficiencyIdThunderResist:
    1991            0 :                 return true
    1992              :         default:
    1993            0 :                 return false
    1994              :         }
    1995              : }
    1996              : 
    1997              : // ProficiencyIdValues は ProficiencyId の値を、スキーマに書いた順に返す。
    1998              : func ProficiencyIdValues() []ProficiencyId {
    1999            0 :         return []ProficiencyId{ProficiencyIdFireResist, ProficiencyIdThunderResist, ProficiencyIdChillResist, ProficiencyIdPhotonResist, ProficiencyIdColdProgress, ProficiencyIdHungerProgress, ProficiencyIdHealingEffect, ProficiencyIdMaxWeight, ProficiencyIdExploration, ProficiencyIdEnemyVision, ProficiencyIdNightVision, ProficiencyIdMoveCost, ProficiencyIdCraftCost, ProficiencyIdSmithQuality, ProficiencyIdBuyPrice, ProficiencyIdSellPrice, ProficiencyIdHeavyArmor, ProficiencyIdSwordDamage, ProficiencyIdSpearDamage, ProficiencyIdFistDamage, ProficiencyIdBowDamage, ProficiencyIdHandgunDamage, ProficiencyIdRifleDamage, ProficiencyIdCannonDamage, ProficiencyIdSwordAccuracy, ProficiencyIdSpearAccuracy, ProficiencyIdFistAccuracy, ProficiencyIdBowAccuracy, ProficiencyIdHandgunAccuracy, ProficiencyIdRifleAccuracy, ProficiencyIdCannonAccuracy}
    2000            0 : }
    2001              : 
    2002              : // ProficiencyPerLevel 熟練の効果倍率のスキルLv1あたりの変化量。百分率
    2003              : type ProficiencyPerLevel = int
    2004              : 
    2005              : // Prop 置物
    2006              : type Prop struct {
    2007              :         AnimKeys *[]SpriteKey `json:"animKeys,omitempty"`
    2008              : 
    2009              :         Bedding *Bedding `json:"bedding,omitempty"`
    2010              : 
    2011              :         BlockPass BlocksPassage `json:"blockPass"`
    2012              : 
    2013              :         BlockView BlocksView `json:"blockView"`
    2014              : 
    2015              :         // BurnoutItem 燃え尽きたときに残すアイテム。火のように燃え尽きる prop だけが持つ
    2016              :         BurnoutItem *EntityID `json:"burnoutItem,omitempty"`
    2017              : 
    2018              :         Description EntityDescription `json:"description"`
    2019              : 
    2020              :         Disassembly *Disassembly `json:"disassembly,omitempty"`
    2021              : 
    2022              :         Door *DoorRaw `json:"door,omitempty"`
    2023              : 
    2024              :         HeatSource *HeatSource `json:"heatSource,omitempty"`
    2025              : 
    2026              :         // Hp 耐久。省略した prop は殴れない
    2027              :         Hp *HitPoints `json:"hp,omitempty"`
    2028              : 
    2029              :         Id EntityID `json:"id"`
    2030              : 
    2031              :         LightSource *LightSource `json:"lightSource,omitempty"`
    2032              : 
    2033              :         Name EntityName `json:"name"`
    2034              : 
    2035              :         PassCost *PassCost `json:"passCost,omitempty"`
    2036              : 
    2037              :         SpriteRender SpriteRender `json:"spriteRender"`
    2038              : 
    2039              :         Storage *StorageRaw `json:"storage,omitempty"`
    2040              : 
    2041              :         WarpNextTrigger *WarpNextTriggerRaw `json:"warpNextTrigger,omitempty"`
    2042              : 
    2043              :         WarpPrevTrigger *WarpPrevTriggerRaw `json:"warpPrevTrigger,omitempty"`
    2044              : }
    2045              : 
    2046              : // PropSpot 基準点から相対の位置に置くエンティティ1個
    2047              : type PropSpot struct {
    2048              :         Dx int32 `json:"dx"`
    2049              : 
    2050              :         Dy int32 `json:"dy"`
    2051              : 
    2052              :         Name EntityID `json:"name"`
    2053              : }
    2054              : 
    2055              : // ProvidesHealing 回復効果
    2056              : type ProvidesHealing struct {
    2057              :         Amount HealAmount `json:"amount"`
    2058              : 
    2059              :         Ratio HealRatio `json:"ratio"`
    2060              : 
    2061              :         ValueType HealingValueType `json:"valueType"`
    2062              : }
    2063              : 
    2064              : // RGBAColor RGBA色
    2065              : type RGBAColor struct {
    2066              :         A ColorChannel `json:"a"`
    2067              : 
    2068              :         B ColorChannel `json:"b"`
    2069              : 
    2070              :         G ColorChannel `json:"g"`
    2071              : 
    2072              :         R ColorChannel `json:"r"`
    2073              : }
    2074              : 
    2075              : // RandInt 乱数で決める数。base に 0 以上 spread 未満の乱数を足す
    2076              : type RandInt struct {
    2077              :         Base int `json:"base"`
    2078              : 
    2079              :         Spread int `json:"spread"`
    2080              : }
    2081              : 
    2082              : // RangeBonus キューブ展開範囲の伸び幅。縦横を一律に広げるタイル数
    2083              : type RangeBonus = int
    2084              : 
    2085              : // RangePenaltyPercent 射程の超過1タイルあたりの命中の低下。百分率
    2086              : type RangePenaltyPercent = int
    2087              : 
    2088              : // RangeTiles 射程。タイル
    2089              : type RangeTiles = int
    2090              : 
    2091              : // Raws ローデータ全体。TOMLファイルのルート構造を定義する
    2092              : type Raws struct {
    2093              :         AttackTypes *[]AttackType `json:"attackTypes,omitempty"`
    2094              : 
    2095              :         AutomataSteps *[]AutomataStep `json:"automataSteps,omitempty"`
    2096              : 
    2097              :         BigRoomSteps *[]BigRoomStep `json:"bigRoomSteps,omitempty"`
    2098              : 
    2099              :         BodyParts *[]BodyPart `json:"bodyParts,omitempty"`
    2100              : 
    2101              :         BuildingStarts *[]BuildingStart `json:"buildingStarts,omitempty"`
    2102              : 
    2103              :         ClearingStarts *[]ClearingStart `json:"clearingStarts,omitempty"`
    2104              : 
    2105              :         CommandTables *[]CommandTable `json:"commandTables,omitempty"`
    2106              : 
    2107              :         Conditions *[]Condition `json:"conditions,omitempty"`
    2108              : 
    2109              :         CorridorSteps *[]CorridorStep `json:"corridorSteps,omitempty"`
    2110              : 
    2111              :         CrashSites *[]CrashSite `json:"crashSites,omitempty"`
    2112              : 
    2113              :         Dialogues *[]Dialogue `json:"dialogues,omitempty"`
    2114              : 
    2115              :         Districts *[]District `json:"districts,omitempty"`
    2116              : 
    2117              :         DoorSteps *[]DoorStep `json:"doorSteps,omitempty"`
    2118              : 
    2119              :         DropTables *[]DropTable `json:"dropTables,omitempty"`
    2120              : 
    2121              :         Dungeons *[]Dungeon `json:"dungeons,omitempty"`
    2122              : 
    2123              :         EnemyTables *[]EnemyTable `json:"enemyTables,omitempty"`
    2124              : 
    2125              :         Facilities *[]Facility `json:"facilities,omitempty"`
    2126              : 
    2127              :         FatigueStages *[]FatigueStage `json:"fatigueStages,omitempty"`
    2128              : 
    2129              :         FoliageEffects *[]FoliageEffect `json:"foliageEffects,omitempty"`
    2130              : 
    2131              :         FreshnessStages *[]FreshnessStage `json:"freshnessStages,omitempty"`
    2132              : 
    2133              :         GladeSteps *[]GladeStep `json:"gladeSteps,omitempty"`
    2134              : 
    2135              :         HungerStages *[]HungerStage `json:"hungerStages,omitempty"`
    2136              : 
    2137              :         ItemCollections *[]ItemCollection `json:"itemCollections,omitempty"`
    2138              : 
    2139              :         ItemGroups *[]ItemGroup `json:"itemGroups,omitempty"`
    2140              : 
    2141              :         ItemTables *[]ItemTable `json:"itemTables,omitempty"`
    2142              : 
    2143              :         Items *[]Item `json:"items,omitempty"`
    2144              : 
    2145              :         Landmarks *[]Landmark `json:"landmarks,omitempty"`
    2146              : 
    2147              :         Layouts *[]Layout `json:"layouts,omitempty"`
    2148              : 
    2149              :         MapGlyphs *[]MapGlyph `json:"mapGlyphs,omitempty"`
    2150              : 
    2151              :         Materials *[]MaterialDef `json:"materials,omitempty"`
    2152              : 
    2153              :         Members *[]Member `json:"members,omitempty"`
    2154              : 
    2155              :         NoiseStarts *[]NoiseStart `json:"noiseStarts,omitempty"`
    2156              : 
    2157              :         PointFeatures *[]PointFeature `json:"pointFeatures,omitempty"`
    2158              : 
    2159              :         Professions *[]Profession `json:"professions,omitempty"`
    2160              : 
    2161              :         Props *[]Prop `json:"props,omitempty"`
    2162              : 
    2163              :         Recipes *[]Recipe `json:"recipes,omitempty"`
    2164              : 
    2165              :         RectRoomStarts *[]RectRoomStart `json:"rectRoomStarts,omitempty"`
    2166              : 
    2167              :         RuinedPathSteps *[]RuinedPathStep `json:"ruinedPathSteps,omitempty"`
    2168              : 
    2169              :         RuinedWallSteps *[]RuinedWallStep `json:"ruinedWallSteps,omitempty"`
    2170              : 
    2171              :         ScatterWallSteps *[]ScatterWallStep `json:"scatterWallSteps,omitempty"`
    2172              : 
    2173              :         ScatterZones *[]ScatterZone `json:"scatterZones,omitempty"`
    2174              : 
    2175              :         Seasons *[]Season `json:"seasons,omitempty"`
    2176              : 
    2177              :         Settlements *[]Settlement `json:"settlements,omitempty"`
    2178              : 
    2179              :         ShelterEffects *[]ShelterEffect `json:"shelterEffects,omitempty"`
    2180              : 
    2181              :         SimpleStarts *[]SimpleStart `json:"simpleStarts,omitempty"`
    2182              : 
    2183              :         SimpleSteps *[]SimpleStep `json:"simpleSteps,omitempty"`
    2184              : 
    2185              :         SkillCategories *[]SkillCategory `json:"skillCategories,omitempty"`
    2186              : 
    2187              :         Skills *[]Skill `json:"skills,omitempty"`
    2188              : 
    2189              :         SpriteSheets *[]SpriteSheet `json:"spriteSheets,omitempty"`
    2190              : 
    2191              :         TemplateStarts *[]TemplateStart `json:"templateStarts,omitempty"`
    2192              : 
    2193              :         Tiles *[]Tile `json:"tiles,omitempty"`
    2194              : 
    2195              :         TimesOfDay *[]TimeOfDay `json:"timesOfDay,omitempty"`
    2196              : 
    2197              :         ToolCategories *[]ToolCategoryDef `json:"toolCategories,omitempty"`
    2198              : 
    2199              :         TrailSteps *[]TrailStep `json:"trailSteps,omitempty"`
    2200              : 
    2201              :         TreeSteps *[]TreeStep `json:"treeSteps,omitempty"`
    2202              : 
    2203              :         WaterEffects *[]WaterEffect `json:"waterEffects,omitempty"`
    2204              : 
    2205              :         Weathers *[]Weather `json:"weathers,omitempty"`
    2206              : 
    2207              :         WidenSteps *[]WidenStep `json:"widenSteps,omitempty"`
    2208              : }
    2209              : 
    2210              : // ReadingEffort 読了に必要な総読書量
    2211              : type ReadingEffort = int
    2212              : 
    2213              : // Recipe レシピ
    2214              : type Recipe struct {
    2215              :         Id EntityID `json:"id"`
    2216              : 
    2217              :         Inputs []RecipeInput `json:"inputs"`
    2218              : 
    2219              :         Name EntityName `json:"name"`
    2220              : }
    2221              : 
    2222              : // RecipeInput レシピ素材
    2223              : type RecipeInput struct {
    2224              :         Amount MaterialAmount `json:"amount"`
    2225              : 
    2226              :         Id EntityID `json:"id"`
    2227              : }
    2228              : 
    2229              : // RecoveryMode 不調が未治療のときの振る舞いと治し方
    2230              : type RecoveryMode string
    2231              : 
    2232              : // Defines values for RecoveryMode.
    2233              : const (
    2234              :         ProgressUntilTend RecoveryMode = "progress_until_tend"
    2235              :         RecoverAfterTend  RecoveryMode = "recover_after_tend"
    2236              :         RecoverOverTime   RecoveryMode = "recover_over_time"
    2237              : )
    2238              : 
    2239              : // Valid indicates whether the value is a known member of the RecoveryMode enum.
    2240              : func (e RecoveryMode) Valid() bool {
    2241            0 :         switch e {
    2242              :         case ProgressUntilTend:
    2243            0 :                 return true
    2244              :         case RecoverAfterTend:
    2245            0 :                 return true
    2246              :         case RecoverOverTime:
    2247            0 :                 return true
    2248              :         default:
    2249            0 :                 return false
    2250              :         }
    2251              : }
    2252              : 
    2253              : // RecoveryModeValues は RecoveryMode の値を、スキーマに書いた順に返す。
    2254              : func RecoveryModeValues() []RecoveryMode {
    2255            0 :         return []RecoveryMode{RecoverAfterTend, ProgressUntilTend, RecoverOverTime}
    2256            0 : }
    2257              : 
    2258              : // RectRoomStart 矩形の部屋を、上端と下端に1つずつと rooms の数だけ置く最初の段
    2259              : type RectRoomStart struct {
    2260              :         Id EntityID `json:"id"`
    2261              : 
    2262              :         // RoomSize 部屋の幅と高さ。それぞれ引く
    2263              :         RoomSize RandInt `json:"roomSize"`
    2264              : 
    2265              :         Rooms RandInt `json:"rooms"`
    2266              : }
    2267              : 
    2268              : // ReloadEffort リロードに必要な行動力
    2269              : type ReloadEffort = int
    2270              : 
    2271              : // Remedy 治療する性質。Treats に一致する不調のうち最も重い1つを治療済みにする
    2272              : type Remedy struct {
    2273              :         Potency Potency `json:"potency"`
    2274              : 
    2275              :         Treats []ConditionTypeName `json:"treats"`
    2276              : }
    2277              : 
    2278              : // Road 地物の当選どうしを結ぶ道
    2279              : type Road struct {
    2280              :         // Tile 道のタイル
    2281              :         Tile EntityID `json:"tile"`
    2282              : 
    2283              :         // Width 道の幅。タイル数
    2284              :         Width int `json:"width"`
    2285              : }
    2286              : 
    2287              : // RuinedPathStep 2つの部屋を崩れた通路で結ぶ段
    2288              : type RuinedPathStep struct {
    2289              :         // Chance 2つの部屋を通路で結ぶ確率
    2290              :         Chance Chance `json:"chance"`
    2291              : 
    2292              :         Id EntityID `json:"id"`
    2293              : }
    2294              : 
    2295              : // RuinedWallStep 全面を床にし、部屋の矩形に崩れた外壁と仕切りを描く段
    2296              : type RuinedWallStep struct {
    2297              :         Id EntityID `json:"id"`
    2298              : 
    2299              :         // PartitionGapChance 仕切りの壁に穴が開く確率
    2300              :         PartitionGapChance Chance `json:"partitionGapChance"`
    2301              : 
    2302              :         // WallGapChance 外壁に穴が開く確率
    2303              :         WallGapChance Chance `json:"wallGapChance"`
    2304              : }
    2305              : 
    2306              : // ScatterEntry 散布 prop 1種。ref の空文字は置かないことを表す
    2307              : type ScatterEntry struct {
    2308              :         Big bool `json:"big"`
    2309              : 
    2310              :         Ref string `json:"ref"`
    2311              : 
    2312              :         Satellites *[]PropSpot `json:"satellites,omitempty"`
    2313              : 
    2314              :         Weight int32 `json:"weight"`
    2315              : }
    2316              : 
    2317              : // ScatterWallStep 床に壁を撒く段
    2318              : type ScatterWallStep struct {
    2319              :         Chance Chance `json:"chance"`
    2320              : 
    2321              :         Id EntityID `json:"id"`
    2322              : }
    2323              : 
    2324              : // ScatterZone 開けた地形の散布ゾーン1種。grass は草を置くタイルに、soil は草の生えていない土へ soilDensity の確率で置く地面の飾り
    2325              : type ScatterZone struct {
    2326              :         Entries []ScatterEntry `json:"entries"`
    2327              : 
    2328              :         Grass []GroundCoverEntry `json:"grass"`
    2329              : 
    2330              :         GrassDensity float64 `json:"grassDensity"`
    2331              : 
    2332              :         // Ground チャンクの全面を埋める下地のタイル
    2333              :         Ground EntityID `json:"ground"`
    2334              : 
    2335              :         Id EntityID `json:"id"`
    2336              : 
    2337              :         // LootDensity 屋外の戦利品を置くタイルの、チャンクの面積あたりの割合
    2338              :         LootDensity Chance `json:"lootDensity"`
    2339              : 
    2340              :         LootGroup EntityID `json:"lootGroup"`
    2341              : 
    2342              :         PropDensity float64 `json:"propDensity"`
    2343              : 
    2344              :         Soil []GroundCoverEntry `json:"soil"`
    2345              : 
    2346              :         SoilDensity float64 `json:"soilDensity"`
    2347              : }
    2348              : 
    2349              : // Season 季節の表示名と世界温度。春と秋は年の前半と後半の中点、夏は頂、冬は底の温度で、間を正弦波でつなぐ
    2350              : type Season struct {
    2351              :         Id SeasonId `json:"id"`
    2352              : 
    2353              :         Name EntityName `json:"name"`
    2354              : 
    2355              :         Temp SeasonTemp `json:"temp"`
    2356              : }
    2357              : 
    2358              : // SeasonId 季節
    2359              : type SeasonId string
    2360              : 
    2361              : // Defines values for SeasonId.
    2362              : const (
    2363              :         Autumn SeasonId = "autumn"
    2364              :         Spring SeasonId = "spring"
    2365              :         Summer SeasonId = "summer"
    2366              :         Winter SeasonId = "winter"
    2367              : )
    2368              : 
    2369              : // Valid indicates whether the value is a known member of the SeasonId enum.
    2370              : func (e SeasonId) Valid() bool {
    2371            0 :         switch e {
    2372              :         case Autumn:
    2373            0 :                 return true
    2374              :         case Spring:
    2375            0 :                 return true
    2376              :         case Summer:
    2377            0 :                 return true
    2378              :         case Winter:
    2379            0 :                 return true
    2380              :         default:
    2381            0 :                 return false
    2382              :         }
    2383              : }
    2384              : 
    2385              : // SeasonIdValues は SeasonId の値を、スキーマに書いた順に返す。
    2386              : func SeasonIdValues() []SeasonId {
    2387            0 :         return []SeasonId{Spring, Summer, Autumn, Winter}
    2388            0 : }
    2389              : 
    2390              : // SeasonTemp 季節の世界温度。℃
    2391              : type SeasonTemp = int
    2392              : 
    2393              : // Sensation 感覚。命中率と回避率に影響する
    2394              : type Sensation = int
    2395              : 
    2396              : // Settlement 原野の小集落1種。当選したチャンクで weight の比で種類を選び、中心から相対の位置に住人の member と prop を置く。
    2397              : // id は地図の記号の id を兼ねる。行の順に重みを積む
    2398              : type Settlement struct {
    2399              :         Id EntityID `json:"id"`
    2400              : 
    2401              :         // Members 住人の member。name は members の id
    2402              :         Members []PropSpot `json:"members"`
    2403              : 
    2404              :         Props []PropSpot `json:"props"`
    2405              : 
    2406              :         Weight int32 `json:"weight"`
    2407              : }
    2408              : 
    2409              : // Shelter タイルの囲われの度合い。屋内外の判定と、世界温度の受け方に効く
    2410              : type Shelter string
    2411              : 
    2412              : // Defines values for Shelter.
    2413              : const (
    2414              :         Indoor  Shelter = "indoor"
    2415              :         Outdoor Shelter = "outdoor"
    2416              :         Partial Shelter = "partial"
    2417              : )
    2418              : 
    2419              : // Valid indicates whether the value is a known member of the Shelter enum.
    2420              : func (e Shelter) Valid() bool {
    2421            0 :         switch e {
    2422              :         case Indoor:
    2423            0 :                 return true
    2424              :         case Outdoor:
    2425            0 :                 return true
    2426              :         case Partial:
    2427            0 :                 return true
    2428              :         default:
    2429            0 :                 return false
    2430              :         }
    2431              : }
    2432              : 
    2433              : // ShelterValues は Shelter の値を、スキーマに書いた順に返す。
    2434              : func ShelterValues() []Shelter {
    2435            0 :         return []Shelter{Outdoor, Partial, Indoor}
    2436            0 : }
    2437              : 
    2438              : // ShelterDaylightPercent 地上の日照を受ける割合。百分率。100 なら屋外と同じ明るさ、0 ならダンジョンと同じ暗さになる
    2439              : type ShelterDaylightPercent = int
    2440              : 
    2441              : // ShelterEffect 囲われの度合いごとの、世界温度の受け方と表示名。受ける温度は anchorTemp + (世界温度 - anchorTemp) * influencePercent / 100
    2442              : type ShelterEffect struct {
    2443              :         AnchorTemp TileTempModifier `json:"anchorTemp"`
    2444              : 
    2445              :         // Covered 屋根に覆われているか。覆われない通れるタイルには雪が積もる
    2446              :         Covered bool `json:"covered"`
    2447              : 
    2448              :         // DaylightPercent 地上の日照を受ける割合
    2449              :         DaylightPercent ShelterDaylightPercent `json:"daylightPercent"`
    2450              : 
    2451              :         Id Shelter `json:"id"`
    2452              : 
    2453              :         InfluencePercent ShelterInfluencePercent `json:"influencePercent"`
    2454              : 
    2455              :         Name EntityName `json:"name"`
    2456              : }
    2457              : 
    2458              : // ShelterInfluencePercent 世界温度を引き寄せる割合。百分率。100 なら世界温度をそのまま受ける
    2459              : type ShelterInfluencePercent = int
    2460              : 
    2461              : // SimpleStart 欄を持たない最初の段
    2462              : type SimpleStart struct {
    2463              :         Id EntityID `json:"id"`
    2464              : 
    2465              :         Kind SimpleStartKind `json:"kind"`
    2466              : }
    2467              : 
    2468              : // SimpleStartKind 欄を持たない最初の段の種類。full_room は全面を1つの部屋にする
    2469              : type SimpleStartKind string
    2470              : 
    2471              : // Defines values for SimpleStartKind.
    2472              : const (
    2473              :         SimpleStartKindFullRoom SimpleStartKind = "full_room"
    2474              : )
    2475              : 
    2476              : // Valid indicates whether the value is a known member of the SimpleStartKind enum.
    2477              : func (e SimpleStartKind) Valid() bool {
    2478            0 :         switch e {
    2479              :         case SimpleStartKindFullRoom:
    2480            0 :                 return true
    2481              :         default:
    2482            0 :                 return false
    2483              :         }
    2484              : }
    2485              : 
    2486              : // SimpleStartKindValues は SimpleStartKind の値を、スキーマに書いた順に返す。
    2487              : func SimpleStartKindValues() []SimpleStartKind {
    2488            0 :         return []SimpleStartKind{SimpleStartKindFullRoom}
    2489            0 : }
    2490              : 
    2491              : // SimpleStep 欄を持たない中の段
    2492              : type SimpleStep struct {
    2493              :         Id EntityID `json:"id"`
    2494              : 
    2495              :         Kind SimpleStepKind `json:"kind"`
    2496              : }
    2497              : 
    2498              : // SimpleStepKind 欄を持たない中の段の種類
    2499              : // fill_wall は全面を壁で埋める。draw_rooms は部屋を床で描く。connect_rooms は並びの隣の部屋を太いL字の通路で結ぶ。
    2500              : // debris は部屋に近い床ほど壁を撒く。forest_floor は全面を床にし部屋を円く描く。isolated_walls は床に接しない壁を void にする
    2501              : type SimpleStepKind string
    2502              : 
    2503              : // Defines values for SimpleStepKind.
    2504              : const (
    2505              :         SimpleStepKindConnectRooms  SimpleStepKind = "connect_rooms"
    2506              :         SimpleStepKindDebris        SimpleStepKind = "debris"
    2507              :         SimpleStepKindDrawRooms     SimpleStepKind = "draw_rooms"
    2508              :         SimpleStepKindFillWall      SimpleStepKind = "fill_wall"
    2509              :         SimpleStepKindForestFloor   SimpleStepKind = "forest_floor"
    2510              :         SimpleStepKindIsolatedWalls SimpleStepKind = "isolated_walls"
    2511              : )
    2512              : 
    2513              : // Valid indicates whether the value is a known member of the SimpleStepKind enum.
    2514              : func (e SimpleStepKind) Valid() bool {
    2515            0 :         switch e {
    2516              :         case SimpleStepKindConnectRooms:
    2517            0 :                 return true
    2518              :         case SimpleStepKindDebris:
    2519            0 :                 return true
    2520              :         case SimpleStepKindDrawRooms:
    2521            0 :                 return true
    2522              :         case SimpleStepKindFillWall:
    2523            0 :                 return true
    2524              :         case SimpleStepKindForestFloor:
    2525            0 :                 return true
    2526              :         case SimpleStepKindIsolatedWalls:
    2527            0 :                 return true
    2528              :         default:
    2529            0 :                 return false
    2530              :         }
    2531              : }
    2532              : 
    2533              : // SimpleStepKindValues は SimpleStepKind の値を、スキーマに書いた順に返す。
    2534              : func SimpleStepKindValues() []SimpleStepKind {
    2535            0 :         return []SimpleStepKind{SimpleStepKindFillWall, SimpleStepKindDrawRooms, SimpleStepKindConnectRooms, SimpleStepKindDebris, SimpleStepKindForestFloor, SimpleStepKindIsolatedWalls}
    2536            0 : }
    2537              : 
    2538              : // Skill スキル。同じカテゴリのスキルは行の順に表示する
    2539              : type Skill struct {
    2540              :         Ability AbilityId `json:"ability"`
    2541              : 
    2542              :         Category SkillCategoryId `json:"category"`
    2543              : 
    2544              :         Effect EntityDescription `json:"effect"`
    2545              : 
    2546              :         GainedBy EntityDescription `json:"gainedBy"`
    2547              : 
    2548              :         Id SkillId `json:"id"`
    2549              : 
    2550              :         Name EntityName `json:"name"`
    2551              : 
    2552              :         Proficiencies *[]SkillProficiency `json:"proficiencies,omitempty"`
    2553              : 
    2554              :         Summary EntityDescription `json:"summary"`
    2555              : }
    2556              : 
    2557              : // SkillBook スキル本設定
    2558              : type SkillBook struct {
    2559              :         MaxLevel SkillLevel `json:"maxLevel"`
    2560              : 
    2561              :         RequiredLevel SkillLevel `json:"requiredLevel"`
    2562              : 
    2563              :         TargetSkill SkillId `json:"targetSkill"`
    2564              : }
    2565              : 
    2566              : // SkillCategory スキルのカテゴリ。行の順に表示する
    2567              : type SkillCategory struct {
    2568              :         Id SkillCategoryId `json:"id"`
    2569              : 
    2570              :         Name EntityName `json:"name"`
    2571              : }
    2572              : 
    2573              : // SkillCategoryId スキルのカテゴリの id
    2574              : type SkillCategoryId = string
    2575              : 
    2576              : // SkillId スキルID
    2577              : type SkillId string
    2578              : 
    2579              : // Defines values for SkillId.
    2580              : const (
    2581              :         SkillIdBow           SkillId = "bow"
    2582              :         SkillIdCannon        SkillId = "cannon"
    2583              :         SkillIdChillResist   SkillId = "chill_resist"
    2584              :         SkillIdColdResist    SkillId = "cold_resist"
    2585              :         SkillIdCrafting      SkillId = "crafting"
    2586              :         SkillIdExploration   SkillId = "exploration"
    2587              :         SkillIdFireResist    SkillId = "fire_resist"
    2588              :         SkillIdFist          SkillId = "fist"
    2589              :         SkillIdHandgun       SkillId = "handgun"
    2590              :         SkillIdHealing       SkillId = "healing"
    2591              :         SkillIdHeavyArmor    SkillId = "heavy_armor"
    2592              :         SkillIdHungerResist  SkillId = "hunger_resist"
    2593              :         SkillIdMechanic      SkillId = "mechanic"
    2594              :         SkillIdNegotiation   SkillId = "negotiation"
    2595              :         SkillIdNightVision   SkillId = "night_vision"
    2596              :         SkillIdPhotonResist  SkillId = "photon_resist"
    2597              :         SkillIdRifle         SkillId = "rifle"
    2598              :         SkillIdSmithing      SkillId = "smithing"
    2599              :         SkillIdSpear         SkillId = "spear"
    2600              :         SkillIdSprinting     SkillId = "sprinting"
    2601              :         SkillIdStealth       SkillId = "stealth"
    2602              :         SkillIdSword         SkillId = "sword"
    2603              :         SkillIdThunderResist SkillId = "thunder_resist"
    2604              :         SkillIdWeightBearing SkillId = "weight_bearing"
    2605              : )
    2606              : 
    2607              : // Valid indicates whether the value is a known member of the SkillId enum.
    2608              : func (e SkillId) Valid() bool {
    2609            0 :         switch e {
    2610              :         case SkillIdBow:
    2611            0 :                 return true
    2612              :         case SkillIdCannon:
    2613            0 :                 return true
    2614              :         case SkillIdChillResist:
    2615            0 :                 return true
    2616              :         case SkillIdColdResist:
    2617            0 :                 return true
    2618              :         case SkillIdCrafting:
    2619            0 :                 return true
    2620              :         case SkillIdExploration:
    2621            0 :                 return true
    2622              :         case SkillIdFireResist:
    2623            0 :                 return true
    2624              :         case SkillIdFist:
    2625            0 :                 return true
    2626              :         case SkillIdHandgun:
    2627            0 :                 return true
    2628              :         case SkillIdHealing:
    2629            0 :                 return true
    2630              :         case SkillIdHeavyArmor:
    2631            0 :                 return true
    2632              :         case SkillIdHungerResist:
    2633            0 :                 return true
    2634              :         case SkillIdMechanic:
    2635            0 :                 return true
    2636              :         case SkillIdNegotiation:
    2637            0 :                 return true
    2638              :         case SkillIdNightVision:
    2639            0 :                 return true
    2640              :         case SkillIdPhotonResist:
    2641            0 :                 return true
    2642              :         case SkillIdRifle:
    2643            0 :                 return true
    2644              :         case SkillIdSmithing:
    2645            0 :                 return true
    2646              :         case SkillIdSpear:
    2647            0 :                 return true
    2648              :         case SkillIdSprinting:
    2649            0 :                 return true
    2650              :         case SkillIdStealth:
    2651            0 :                 return true
    2652              :         case SkillIdSword:
    2653            0 :                 return true
    2654              :         case SkillIdThunderResist:
    2655            0 :                 return true
    2656              :         case SkillIdWeightBearing:
    2657            0 :                 return true
    2658              :         default:
    2659            0 :                 return false
    2660              :         }
    2661              : }
    2662              : 
    2663              : // SkillIdValues は SkillId の値を、スキーマに書いた順に返す。
    2664              : func SkillIdValues() []SkillId {
    2665            0 :         return []SkillId{SkillIdSword, SkillIdSpear, SkillIdFist, SkillIdWeightBearing, SkillIdBow, SkillIdHandgun, SkillIdRifle, SkillIdCannon, SkillIdExploration, SkillIdCrafting, SkillIdSmithing, SkillIdNegotiation, SkillIdMechanic, SkillIdSprinting, SkillIdStealth, SkillIdNightVision, SkillIdColdResist, SkillIdHungerResist, SkillIdHealing, SkillIdHeavyArmor, SkillIdFireResist, SkillIdThunderResist, SkillIdChillResist, SkillIdPhotonResist}
    2666            0 : }
    2667              : 
    2668              : // SkillLevel スキルレベル
    2669              : type SkillLevel = int
    2670              : 
    2671              : // SkillProficiency スキルが左右する熟練の効果倍率
    2672              : type SkillProficiency struct {
    2673              :         Id ProficiencyId `json:"id"`
    2674              : 
    2675              :         PerLevel ProficiencyPerLevel `json:"perLevel"`
    2676              : 
    2677              :         // Resists この倍率が受けるダメージを軽減する攻撃属性。無属性を除く属性それぞれをちょうど1つの倍率が持つ
    2678              :         Resists *Element `json:"resists,omitempty"`
    2679              : }
    2680              : 
    2681              : // SnowMeltPercent 地面に積もる雪の量を減らす割合。百分率。100 なら雪が積もらない
    2682              : type SnowMeltPercent = int
    2683              : 
    2684              : // SpellTurns 天候のスペルの基準長。ターン
    2685              : type SpellTurns = int
    2686              : 
    2687              : // SpriteDepth スプライト描画深度
    2688              : type SpriteDepth float32
    2689              : 
    2690              : // Defines values for SpriteDepth.
    2691              : const (
    2692              :         N0 SpriteDepth = 0
    2693              :         N1 SpriteDepth = 1
    2694              :         N2 SpriteDepth = 2
    2695              :         N3 SpriteDepth = 3
    2696              : )
    2697              : 
    2698              : // Valid indicates whether the value is a known member of the SpriteDepth enum.
    2699              : func (e SpriteDepth) Valid() bool {
    2700            0 :         switch e {
    2701              :         case N0:
    2702            0 :                 return true
    2703              :         case N1:
    2704            0 :                 return true
    2705              :         case N2:
    2706            0 :                 return true
    2707              :         case N3:
    2708            0 :                 return true
    2709              :         default:
    2710            0 :                 return false
    2711              :         }
    2712              : }
    2713              : 
    2714              : // SpriteKey スプライトキー
    2715              : type SpriteKey = string
    2716              : 
    2717              : // SpriteRender スプライトレンダー設定
    2718              : type SpriteRender struct {
    2719              :         Depth SpriteDepth `json:"depth"`
    2720              : 
    2721              :         Shape *SpriteShape `json:"shape,omitempty"`
    2722              : 
    2723              :         SpriteKey SpriteKey `json:"spriteKey"`
    2724              : 
    2725              :         SpriteSheetName SpriteSheetName `json:"spriteSheetName"`
    2726              : }
    2727              : 
    2728              : // SpriteShape 3D で置物を立てる形。省くとカメラを向く立て板になる。
    2729              : // inset は扉や窓のように壁の並びにはめる薄い板、facing は棚のように並びと隣の空きに合わせて向きを決め、その向きに回した薄い板
    2730              : type SpriteShape string
    2731              : 
    2732              : // Defines values for SpriteShape.
    2733              : const (
    2734              :         Facing SpriteShape = "facing"
    2735              :         Inset  SpriteShape = "inset"
    2736              : )
    2737              : 
    2738              : // Valid indicates whether the value is a known member of the SpriteShape enum.
    2739              : func (e SpriteShape) Valid() bool {
    2740            0 :         switch e {
    2741              :         case Facing:
    2742            0 :                 return true
    2743              :         case Inset:
    2744            0 :                 return true
    2745              :         default:
    2746            0 :                 return false
    2747              :         }
    2748              : }
    2749              : 
    2750              : // SpriteShapeValues は SpriteShape の値を、スキーマに書いた順に返す。
    2751              : func SpriteShapeValues() []SpriteShape {
    2752            0 :         return []SpriteShape{Inset, Facing}
    2753            0 : }
    2754              : 
    2755              : // SpriteSheet スプライトシート
    2756              : type SpriteSheet struct {
    2757              :         Name EntityName `json:"name"`
    2758              : 
    2759              :         Path ImagePath `json:"path"`
    2760              : }
    2761              : 
    2762              : // SpriteSheetName スプライトシート名
    2763              : type SpriteSheetName = string
    2764              : 
    2765              : // StageBaseTemp ステージの基本気温。℃
    2766              : type StageBaseTemp = int
    2767              : 
    2768              : // StageLengthTurns 1段階の長さ。この経過ターンごとに新鮮→劣化→腐敗と進む。省略すると腐敗しない
    2769              : type StageLengthTurns = int
    2770              : 
    2771              : // StorageRaw 収納ローデータ
    2772              : type StorageRaw struct {
    2773              :         // LootCount 初期アイテム数のダイス表記。省略時は1
    2774              :         LootCount *Dice `json:"lootCount,omitempty"`
    2775              : 
    2776              :         // LootTableId 初期アイテムの抽選に使うItemTable名
    2777              :         LootTableId *EntityID `json:"lootTableId,omitempty"`
    2778              : 
    2779              :         // MaxWeight 収納の最大格納重量
    2780              :         MaxWeight Weight `json:"maxWeight"`
    2781              : }
    2782              : 
    2783              : // Strength 筋力。物理ダメージに影響する
    2784              : type Strength = int
    2785              : 
    2786              : // TargetGroup ターゲットグループ
    2787              : type TargetGroup string
    2788              : 
    2789              : // Defines values for TargetGroup.
    2790              : const (
    2791              :         TargetGroupALLY   TargetGroup = "ALLY"
    2792              :         TargetGroupENEMY  TargetGroup = "ENEMY"
    2793              :         TargetGroupNONE   TargetGroup = "NONE"
    2794              :         TargetGroupWEAPON TargetGroup = "WEAPON"
    2795              : )
    2796              : 
    2797              : // Valid indicates whether the value is a known member of the TargetGroup enum.
    2798              : func (e TargetGroup) Valid() bool {
    2799            0 :         switch e {
    2800              :         case TargetGroupALLY:
    2801            0 :                 return true
    2802              :         case TargetGroupENEMY:
    2803            0 :                 return true
    2804              :         case TargetGroupNONE:
    2805            0 :                 return true
    2806              :         case TargetGroupWEAPON:
    2807            0 :                 return true
    2808              :         default:
    2809            0 :                 return false
    2810              :         }
    2811              : }
    2812              : 
    2813              : // TargetGroupValues は TargetGroup の値を、スキーマに書いた順に返す。
    2814              : func TargetGroupValues() []TargetGroup {
    2815            0 :         return []TargetGroup{TargetGroupENEMY, TargetGroupALLY, TargetGroupWEAPON, TargetGroupNONE}
    2816            0 : }
    2817              : 
    2818              : // TargetNum ターゲット数
    2819              : type TargetNum string
    2820              : 
    2821              : // Defines values for TargetNum.
    2822              : const (
    2823              :         ALL    TargetNum = "ALL"
    2824              :         SINGLE TargetNum = "SINGLE"
    2825              : )
    2826              : 
    2827              : // Valid indicates whether the value is a known member of the TargetNum enum.
    2828              : func (e TargetNum) Valid() bool {
    2829            0 :         switch e {
    2830              :         case ALL:
    2831            0 :                 return true
    2832              :         case SINGLE:
    2833            0 :                 return true
    2834              :         default:
    2835            0 :                 return false
    2836              :         }
    2837              : }
    2838              : 
    2839              : // TargetNumValues は TargetNum の値を、スキーマに書いた順に返す。
    2840              : func TargetNumValues() []TargetNum {
    2841            0 :         return []TargetNum{SINGLE, ALL}
    2842            0 : }
    2843              : 
    2844              : // TemplateStart 施設の絵をそのまま置く最初の段。地図の大きさは絵が決める
    2845              : type TemplateStart struct {
    2846              :         Id EntityID `json:"id"`
    2847              : 
    2848              :         // Template levels の絵の名前
    2849              :         Template EntityID `json:"template"`
    2850              : }
    2851              : 
    2852              : // Tile タイル
    2853              : type Tile struct {
    2854              :         BlockPass BlocksPassage `json:"blockPass"`
    2855              : 
    2856              :         BlockView BlocksView `json:"blockView"`
    2857              : 
    2858              :         Description EntityDescription `json:"description"`
    2859              : 
    2860              :         // Earth 草や木を立てられ、道で上書きしてよい土の地面か
    2861              :         Earth *bool `json:"earth,omitempty"`
    2862              : 
    2863              :         // Foliage 植生。省くと植生なし
    2864              :         Foliage *Foliage `json:"foliage,omitempty"`
    2865              : 
    2866              :         // Id ground は施設のパレットで下地を残す地形の予約語なので、タイルの id に使わない
    2867              :         Id EntityID `json:"id"`
    2868              : 
    2869              :         Name EntityName `json:"name"`
    2870              : 
    2871              :         // Shelter 囲われの度合い。省くと屋外
    2872              :         Shelter *Shelter `json:"shelter,omitempty"`
    2873              : 
    2874              :         // SnowMeltPercent 積もる雪を減らす割合。省くと減らさない
    2875              :         SnowMeltPercent *SnowMeltPercent `json:"snowMeltPercent,omitempty"`
    2876              : 
    2877              :         // Spawn マップの計画からこのタイルを生成するときの仕様。省くと計画に置けない
    2878              :         Spawn *TileSpawn `json:"spawn,omitempty"`
    2879              : 
    2880              :         SpriteRender SpriteRender `json:"spriteRender"`
    2881              : 
    2882              :         // Water 水のタイル。上に立つと水中、隣に立つと水辺の気温の補正を受ける
    2883              :         Water *bool `json:"water,omitempty"`
    2884              : }
    2885              : 
    2886              : // TileSpawn 計画のタイルを実体化する仕様
    2887              : type TileSpawn struct {
    2888              :         // Autotile 周りのタイルを見てオートタイルの添字を計算するか。単一の絵柄のタイルは false
    2889              :         Autotile bool `json:"autotile"`
    2890              : 
    2891              :         // Tile 生成するタイルの id。壁の計画を壁の見た目の別タイルで生成するときに使う。省くと自身
    2892              :         Tile *EntityID `json:"tile,omitempty"`
    2893              : }
    2894              : 
    2895              : // TileTempModifier 水や植生がタイルの気温に足す補正。℃
    2896              : type TileTempModifier = int
    2897              : 
    2898              : // TimeOfDay 時間帯の表示名、世界温度への加算、地上の日照の明るさと環境光の色。
    2899              : // 明るさと色は時間帯の中心の値で、間は隣の時間帯の値と線形に補間する
    2900              : type TimeOfDay struct {
    2901              :         AmbientColor AmbientColor `json:"ambientColor"`
    2902              : 
    2903              :         Daylight LightLevel `json:"daylight"`
    2904              : 
    2905              :         Id TimeOfDayId `json:"id"`
    2906              : 
    2907              :         Name EntityName `json:"name"`
    2908              : 
    2909              :         TempModifier TimeOfDayTempModifier `json:"tempModifier"`
    2910              : }
    2911              : 
    2912              : // TimeOfDayId 時間帯。1日は夜明けで始まり、この順に巡る
    2913              : type TimeOfDayId string
    2914              : 
    2915              : // Defines values for TimeOfDayId.
    2916              : const (
    2917              :         Dawn     TimeOfDayId = "dawn"
    2918              :         Evening  TimeOfDayId = "evening"
    2919              :         Midnight TimeOfDayId = "midnight"
    2920              :         Morning  TimeOfDayId = "morning"
    2921              :         Night    TimeOfDayId = "night"
    2922              :         Noon     TimeOfDayId = "noon"
    2923              : )
    2924              : 
    2925              : // Valid indicates whether the value is a known member of the TimeOfDayId enum.
    2926              : func (e TimeOfDayId) Valid() bool {
    2927            0 :         switch e {
    2928              :         case Dawn:
    2929            0 :                 return true
    2930              :         case Evening:
    2931            0 :                 return true
    2932              :         case Midnight:
    2933            0 :                 return true
    2934              :         case Morning:
    2935            0 :                 return true
    2936              :         case Night:
    2937            0 :                 return true
    2938              :         case Noon:
    2939            0 :                 return true
    2940              :         default:
    2941            0 :                 return false
    2942              :         }
    2943              : }
    2944              : 
    2945              : // TimeOfDayIdValues は TimeOfDayId の値を、スキーマに書いた順に返す。
    2946              : func TimeOfDayIdValues() []TimeOfDayId {
    2947            0 :         return []TimeOfDayId{Dawn, Morning, Noon, Evening, Night, Midnight}
    2948            0 : }
    2949              : 
    2950              : // TimeOfDayTempModifier 時間帯による世界温度への加算。℃
    2951              : type TimeOfDayTempModifier = int
    2952              : 
    2953              : // Tool 道具の性質。道具の分類とグレードを持つ
    2954              : type Tool struct {
    2955              :         Categories []ToolCategory `json:"categories"`
    2956              : 
    2957              :         Grade ToolGrade `json:"grade"`
    2958              : }
    2959              : 
    2960              : // ToolCategory 道具の分類
    2961              : type ToolCategory string
    2962              : 
    2963              : // Defines values for ToolCategory.
    2964              : const (
    2965              :         Chopping  ToolCategory = "chopping"
    2966              :         Cutting   ToolCategory = "cutting"
    2967              :         Mining    ToolCategory = "mining"
    2968              :         Precision ToolCategory = "precision"
    2969              :         Prying    ToolCategory = "prying"
    2970              : )
    2971              : 
    2972              : // Valid indicates whether the value is a known member of the ToolCategory enum.
    2973              : func (e ToolCategory) Valid() bool {
    2974            0 :         switch e {
    2975              :         case Chopping:
    2976            0 :                 return true
    2977              :         case Cutting:
    2978            0 :                 return true
    2979              :         case Mining:
    2980            0 :                 return true
    2981              :         case Precision:
    2982            0 :                 return true
    2983              :         case Prying:
    2984            0 :                 return true
    2985              :         default:
    2986            0 :                 return false
    2987              :         }
    2988              : }
    2989              : 
    2990              : // ToolCategoryValues は ToolCategory の値を、スキーマに書いた順に返す。
    2991              : func ToolCategoryValues() []ToolCategory {
    2992            0 :         return []ToolCategory{Prying, Precision, Cutting, Chopping, Mining}
    2993            0 : }
    2994              : 
    2995              : // ToolCategoryDef 道具の分類と、合う道具で壊したとき伸びるスキル。スキルを省くと伸びない
    2996              : type ToolCategoryDef struct {
    2997              :         Id ToolCategory `json:"id"`
    2998              : 
    2999              :         Skill *SkillId `json:"skill,omitempty"`
    3000              : }
    3001              : 
    3002              : // ToolGrade 道具のグレード。高いほど速く壊し多く得る
    3003              : type ToolGrade = int
    3004              : 
    3005              : // TrailStep 上端から下端への小道と、部屋どうしの小道を引く段
    3006              : type TrailStep struct {
    3007              :         Id EntityID `json:"id"`
    3008              : 
    3009              :         Tile EntityID `json:"tile"`
    3010              : }
    3011              : 
    3012              : // TreeStep 部屋から遠い床ほど木を置く段
    3013              : type TreeStep struct {
    3014              :         // Density 部屋から遠い床に木を置く確率
    3015              :         Density Chance `json:"density"`
    3016              : 
    3017              :         Id EntityID `json:"id"`
    3018              : 
    3019              :         // LargeTreeChance 木の周りにも木を足す確率
    3020              :         LargeTreeChance Chance `json:"largeTreeChance"`
    3021              : }
    3022              : 
    3023              : // UsableScene 使用可能シーン
    3024              : type UsableScene string
    3025              : 
    3026              : // Defines values for UsableScene.
    3027              : const (
    3028              :         ANY    UsableScene = "ANY"
    3029              :         BATTLE UsableScene = "BATTLE"
    3030              :         FIELD  UsableScene = "FIELD"
    3031              : )
    3032              : 
    3033              : // Valid indicates whether the value is a known member of the UsableScene enum.
    3034              : func (e UsableScene) Valid() bool {
    3035            0 :         switch e {
    3036              :         case ANY:
    3037            0 :                 return true
    3038              :         case BATTLE:
    3039            0 :                 return true
    3040              :         case FIELD:
    3041            0 :                 return true
    3042              :         default:
    3043            0 :                 return false
    3044              :         }
    3045              : }
    3046              : 
    3047              : // UsableSceneValues は UsableScene の値を、スキーマに書いた順に返す。
    3048              : func UsableSceneValues() []UsableScene {
    3049            0 :         return []UsableScene{BATTLE, FIELD, ANY}
    3050            0 : }
    3051              : 
    3052              : // ViewDistance AI視界距離(タイル単位)
    3053              : type ViewDistance = int
    3054              : 
    3055              : // Vitality 体力。HPに影響する
    3056              : type Vitality = int
    3057              : 
    3058              : // WarpNextTriggerRaw 次階層ワープトリガー
    3059              : type WarpNextTriggerRaw = map[string]interface{}
    3060              : 
    3061              : // WarpPrevTriggerRaw 前階層ワープトリガー
    3062              : type WarpPrevTriggerRaw = map[string]interface{}
    3063              : 
    3064              : // WaterEffect 水がタイルの気温に足す補正
    3065              : type WaterEffect struct {
    3066              :         Id WaterExposure `json:"id"`
    3067              : 
    3068              :         TempModifier TileTempModifier `json:"tempModifier"`
    3069              : }
    3070              : 
    3071              : // WaterExposure タイルが受ける水の影響
    3072              : type WaterExposure string
    3073              : 
    3074              : // Defines values for WaterExposure.
    3075              : const (
    3076              :         Nearby    WaterExposure = "nearby"
    3077              :         Submerged WaterExposure = "submerged"
    3078              : )
    3079              : 
    3080              : // Valid indicates whether the value is a known member of the WaterExposure enum.
    3081              : func (e WaterExposure) Valid() bool {
    3082            0 :         switch e {
    3083              :         case Nearby:
    3084            0 :                 return true
    3085              :         case Submerged:
    3086            0 :                 return true
    3087              :         default:
    3088            0 :                 return false
    3089              :         }
    3090              : }
    3091              : 
    3092              : // WaterExposureValues は WaterExposure の値を、スキーマに書いた順に返す。
    3093              : func WaterExposureValues() []WaterExposure {
    3094            0 :         return []WaterExposure{Nearby, Submerged}
    3095            0 : }
    3096              : 
    3097              : // Wearable 装備可能設定
    3098              : type Wearable struct {
    3099              :         Defense ArmorDefense `json:"defense"`
    3100              : 
    3101              :         EquipmentCategory EquipmentCategory `json:"equipmentCategory"`
    3102              : 
    3103              :         InsulationCold InsulationCold `json:"insulationCold"`
    3104              : 
    3105              :         InsulationHeat InsulationHeat `json:"insulationHeat"`
    3106              : }
    3107              : 
    3108              : // Weather 天候。遷移の粘りの距離は行の順でなく Go の WeatherKind の並びに依る
    3109              : type Weather struct {
    3110              :         Id WeatherId `json:"id"`
    3111              : 
    3112              :         Name EntityName `json:"name"`
    3113              : 
    3114              :         Seasons []WeatherSeasonWeight `json:"seasons"`
    3115              : 
    3116              :         Severity WeatherSeverity `json:"severity"`
    3117              : 
    3118              :         SpellTurnsMax SpellTurns `json:"spellTurnsMax"`
    3119              : 
    3120              :         SpellTurnsMin SpellTurns `json:"spellTurnsMin"`
    3121              : 
    3122              :         TempModifier WeatherTempModifier `json:"tempModifier"`
    3123              : 
    3124              :         VisionDelta WeatherVisionDelta `json:"visionDelta"`
    3125              : }
    3126              : 
    3127              : // WeatherId 天候の種類
    3128              : type WeatherId string
    3129              : 
    3130              : // Defines values for WeatherId.
    3131              : const (
    3132              :         Blizzard WeatherId = "blizzard"
    3133              :         Clear    WeatherId = "clear"
    3134              :         Cloudy   WeatherId = "cloudy"
    3135              :         ColdSnap WeatherId = "cold_snap"
    3136              :         Rain     WeatherId = "rain"
    3137              :         Snow     WeatherId = "snow"
    3138              : )
    3139              : 
    3140              : // Valid indicates whether the value is a known member of the WeatherId enum.
    3141              : func (e WeatherId) Valid() bool {
    3142            0 :         switch e {
    3143              :         case Blizzard:
    3144            0 :                 return true
    3145              :         case Clear:
    3146            0 :                 return true
    3147              :         case Cloudy:
    3148            0 :                 return true
    3149              :         case ColdSnap:
    3150            0 :                 return true
    3151              :         case Rain:
    3152            0 :                 return true
    3153              :         case Snow:
    3154            0 :                 return true
    3155              :         default:
    3156            0 :                 return false
    3157              :         }
    3158              : }
    3159              : 
    3160              : // WeatherIdValues は WeatherId の値を、スキーマに書いた順に返す。
    3161              : func WeatherIdValues() []WeatherId {
    3162            0 :         return []WeatherId{Clear, Cloudy, Rain, Snow, Blizzard, ColdSnap}
    3163            0 : }
    3164              : 
    3165              : // WeatherSeasonWeight 季節ごとの天候の出やすさ
    3166              : type WeatherSeasonWeight struct {
    3167              :         Id SeasonId `json:"id"`
    3168              : 
    3169              :         Weight EntryWeight `json:"weight"`
    3170              : }
    3171              : 
    3172              : // WeatherSeverity 天候の寒さの厳しさ。奥地ほど厳しい天候を厚くし、冬と奥地で長引かせるのに使う
    3173              : type WeatherSeverity = int
    3174              : 
    3175              : // WeatherTempModifier 天候による世界温度への加算。℃
    3176              : type WeatherTempModifier = int
    3177              : 
    3178              : // WeatherVisionDelta 天候による視程レンジへの加算。タイル。負で狭くなる
    3179              : type WeatherVisionDelta = int
    3180              : 
    3181              : // Weight 重量。単位付き文字列で指定する。例: "500 g" "2 kg" "1 mg"
    3182              : type Weight = string
    3183              : 
    3184              : // WidenStep 床に2マス以上接する壁を床にして通路を広げる段
    3185              : type WidenStep struct {
    3186              :         Chance Chance `json:"chance"`
    3187              : 
    3188              :         Id EntityID `json:"id"`
    3189              : }
    3190              : 
    3191              : // Zone 区域の地区。区域の層が候補として持ち、施設は建つ地区として持つ
    3192              : type Zone string
    3193              : 
    3194              : // Defines values for Zone.
    3195              : const (
    3196              :         CampusGate       Zone = "campus_gate"
    3197              :         CampusInner      Zone = "campus_inner"
    3198              :         CampusQuarantine Zone = "campus_quarantine"
    3199              :         Downtown         Zone = "downtown"
    3200              :         FarmField        Zone = "farm_field"
    3201              :         FarmYard         Zone = "farm_yard"
    3202              :         Industrial       Zone = "industrial"
    3203              :         MilitaryArmory   Zone = "military_armory"
    3204              :         MilitaryGate     Zone = "military_gate"
    3205              :         MilitaryInner    Zone = "military_inner"
    3206              :         PlantCore        Zone = "plant_core"
    3207              :         PlantOuter       Zone = "plant_outer"
    3208              :         Residential      Zone = "residential"
    3209              : )
    3210              : 
    3211              : // Valid indicates whether the value is a known member of the Zone enum.
    3212              : func (e Zone) Valid() bool {
    3213            0 :         switch e {
    3214              :         case CampusGate:
    3215            0 :                 return true
    3216              :         case CampusInner:
    3217            0 :                 return true
    3218              :         case CampusQuarantine:
    3219            0 :                 return true
    3220              :         case Downtown:
    3221            0 :                 return true
    3222              :         case FarmField:
    3223            0 :                 return true
    3224              :         case FarmYard:
    3225            0 :                 return true
    3226              :         case Industrial:
    3227            0 :                 return true
    3228              :         case MilitaryArmory:
    3229            0 :                 return true
    3230              :         case MilitaryGate:
    3231            0 :                 return true
    3232              :         case MilitaryInner:
    3233            0 :                 return true
    3234              :         case PlantCore:
    3235            0 :                 return true
    3236              :         case PlantOuter:
    3237            0 :                 return true
    3238              :         case Residential:
    3239            0 :                 return true
    3240              :         default:
    3241            0 :                 return false
    3242              :         }
    3243              : }
    3244              : 
    3245              : // ZoneValues は Zone の値を、スキーマに書いた順に返す。
    3246              : func ZoneValues() []Zone {
    3247            0 :         return []Zone{Downtown, Residential, Industrial, CampusGate, CampusInner, CampusQuarantine, MilitaryGate, MilitaryInner, MilitaryArmory, PlantOuter, PlantCore, FarmYard, FarmField}
    3248            0 : }
        

Generated by: LCOV version 2.0-1