Files
bl/public/assets/monster_refresh.xsd
昔念 081f990110 refactor(assets): 重构资产同步流程并添加宠物相关功能
- 移除了资产同步到私有 B 仓库的工作流
- 在玩家结构中添加了 IsFighting 字段
- 新增了宠物信息相关功能和数据结构
- 优化了地图进入和怪物刷新逻辑
- 调整了玩家登录和地图数据发送流程
- 重构了部分代码以提高可维护性和性能
2025-08-24 17:33:19 +08:00

245 lines
7.2 KiB
Go

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="nieo.seer.org.monster-refresh"
xmlns="nieo.seer.org.monster-refresh"
elementFormDefault="qualified">
<xs:element name="monster">
<xs:annotation>
<xs:documentation><![CDATA[
怪物刷新规范, 其中:
- id: 要刷新的精灵ID
- desc: 精灵描述
- min_level: 允许出现的最低等级
- max_level: 允许出现的最高等级
- rate: 刷新概率
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice minOccurs="0">
<xs:element ref="restrictions" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attributeGroup ref="monsterAttributeGroup"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="location_id">
<xs:annotation>
<xs:documentation><![CDATA[
位置ID, 允许输入范围为1-9
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation><![CDATA[
1号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="2">
<xs:annotation>
<xs:documentation><![CDATA[
2号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="3">
<xs:annotation>
<xs:documentation><![CDATA[
3号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="4">
<xs:annotation>
<xs:documentation><![CDATA[
4号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="5">
<xs:annotation>
<xs:documentation><![CDATA[
5号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="6">
<xs:annotation>
<xs:documentation><![CDATA[
6号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="7">
<xs:annotation>
<xs:documentation><![CDATA[
7号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="8">
<xs:annotation>
<xs:documentation><![CDATA[
8号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="9">
<xs:annotation>
<xs:documentation><![CDATA[
9号刷新位置
]]></xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:element name="location">
<xs:annotation>
<xs:documentation><![CDATA[
在指定ID的位置特定的刷新规范, 将与默认的组合, 全部的概率之和作为总概率
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="monster" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute id="location_id" name="id" type="location_id" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
此位置的ID, 允许范围[1, 9]
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute id="location_combined" name="combined" type="xs:boolean" default="true">
<xs:annotation>
<xs:documentation><![CDATA[
是否将此特定位置下的精灵刷新规则与默认规则合并计算, 默认为true
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element id="monster_restrictions" name="restrictions">
<xs:annotation>
<xs:documentation><![CDATA[
此精灵刷新的限制条件
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute id="monster_restrictions_type" name="type" type="type" use="required"/>
<xs:attribute id="monster_restrictions_value" name="value" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:simpleType id="monster_restrictions_type_enum" name="type">
<xs:annotation>
<xs:documentation><![CDATA[
限制条件的类型
]]></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="timePolicy"/>
</xs:restriction>
</xs:simpleType>
<xs:attributeGroup name="monsterAttributeGroup">
<xs:annotation>
<xs:documentation><![CDATA[
怪物刷新属性组
]]></xs:documentation>
</xs:annotation>
<xs:attribute id="monster_id" name="id" type="xs:integer" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
此精灵的ID
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute id="monster_desc" name="desc" type="xs:string" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
此精灵的描述信息
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute id="monster_min_level" name="min_level" type="xs:integer" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
此精灵可能出现的最低等级
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute id="monster_max_level" name="max_level" type="xs:integer" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
此精灵可能出现的最高等级
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute id="monster_capturable" name="capturable" type="xs:boolean" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
此精灵是否允许捕捉
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute id="monster_rate" name="rate" type="xs:float" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
此精灵刷新的概率
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="map">
<xs:annotation>
<xs:documentation><![CDATA[
地图刷新精灵的相关配置, 其中
- id: 地图ID
- desc: 地图描述信息
此标签下允许出现若干monster标签, 用作默认刷新配置, 此外,
还允许额外出现location标签, 代表只会在某个位置进行额外的概率计算.
通常情况下, 为了减少重复输入的内容, location标签下的概率会结合默认内容进行合并计算,
但是可以通过设置属性combined=false单独使用location下内容计算.
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="monster" maxOccurs="unbounded"/>
<xs:element ref="location" minOccurs="0" maxOccurs="9"/>
</xs:sequence>
<xs:attribute id="map_id" name="id" type="xs:integer" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
地图ID, 类型为数字类型
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute id="map_desc" name="desc" type="xs:string" use="required">
<xs:annotation>
<xs:documentation><![CDATA[
地图的描述信息
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="monsters">
<xs:annotation>
<xs:documentation><![CDATA[
精灵刷新的配置信息
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="map" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>