package xmlres import ( "github.com/ECUST-XX/xml" // 保持与之前一致的XML库 ) // Items 根节点,对应标签 type Items struct { XMLName xml.Name `xml:"Items"` Items []Item `xml:"Item"` // 包含所有物品配置 } type Item struct { ID int `xml:"ID,attr"` // 物品ID(与items.xml一致) Name string `xml:"Name,attr"` // 物品名称 Rarity int `xml:"Rarity,attr,omitempty"` // 稀有度 ItemType int `xml:"ItemType,attr"` // 物品类型(0:胶囊 1:体力药剂 2:活力药剂) Max int `xml:"Max,attr"` // 最大堆叠数量 Price int `xml:"Price,attr"` // 价格 Bonus float64 `xml:"Bonus,attr,omitempty"` // 倍率(如捕捉胶囊的加成倍数,修正为浮点型) Tradability int `xml:"Tradability,attr"` // 可交易性(0/1) VipTradability int `xml:"VipTradability,attr"` // VIP可交易性(0/1) DailyKey int `xml:"DailyKey,attr,omitempty"` // 每日限制键值 DailyOutMax int `xml:"DailyOutMax,attr,omitempty"` // 每日最大产出 Wd int `xml:"wd,attr"` // 未知属性 UseMax int `xml:"UseMax,attr"` // 最大使用次数 LifeTime int `xml:"LifeTime,attr"` // 生命周期(0为永久) Purpose int `xml:"purpose,attr"` // 用途标识 Bean int `xml:"Bean,attr,omitempty"` // 豆子数量 Hide int `xml:"Hide,attr"` // 是否隐藏(0/1) Texture int `xml:"Texture,attr,omitempty"` Sort int `xml:"Sort,attr,omitempty"` // 排序序号 Des string `xml:"des,attr,omitempty"` // 物品用途(XML中无该属性,保留字段供自定义) Color string `xml:"color,attr,omitempty"` // 装备名字颜色 Level int `xml:"level,attr,omitempty"` // 装备等级(星星) VipOnly int `xml:"VipOnly,attr,omitempty"` // VIP专属标识(0/1,如超能胶囊) HP int `xml:"HP,attr,omitempty"` // 体力恢复量(体力药剂专属) PP int `xml:"PP,attr,omitempty"` // 活力恢复量(活力药剂专属) MaxHPUp int `xml:"MaxHPUp,attr,omitempty"` // 体力上限提升值(如初级体力上限提升药剂Ω) MonAttrReset int `xml:"MonAttrReset,attr,omitempty"` // 精灵属性重置标识(精灵还原药剂) MonNatureReset int `xml:"MonNatureReset,attr,omitempty"` // 精灵性格重置标识(性格重塑胶囊) DecreMonLv int `xml:"DecreMonLv,attr,omitempty"` // 精灵降级数值(降级秘药) DualEffectTimes int `xml:"DualEffectTimes,attr,omitempty"` // 双倍效果次数(双倍经验加速器) AutoBtlTimes int `xml:"AutoBtlTimes,attr,omitempty"` // 自动战斗次数(自动战斗器S型) EnergyAbsorbTimes int `xml:"EnergyAbsorbTimes,attr,omitempty"` // 能量吸收次数(能量吸收器) NewSeIdx int `xml:"NewSeIdx,attr,omitempty"` // 能量珠索引(各类能量珠) DualEvTimes int `xml:"DualEvTimes,attr,omitempty"` // 双倍学习力次数(学习力双倍仪) YuanshenDegrade int `xml:"YuanshenDegrade,attr,omitempty"` // 融合精灵还原标识(融合精灵还原药剂) EvRemove int `xml:"EvRemove,attr,omitempty"` // 学习力遗忘类型(各类学习力遗忘剂) SellPrice int `xml:"SellPrice,attr,omitempty"` // 出售价格(出售价格修正) //bShowPetBag int `xml:"bShowPetBag,attr,omitempty"` // 宠物背包显示标识(副融合精灵保留药剂等) Nature *string `xml:"Nature,attr"` // 指向int的指针,无值时为nil NatureSet *string `xml:"NatureSet,attr"` // 指向string的指针,无值时为nil NatureProbs *string `xml:"NatureProbs,attr"` // 指向string的指针,无值时为nil Pet *Pet `xml:"pet,omitempty"` // 精灵属性子节点 TeamPK *TeamPK `xml:"teamPK,omitempty"` // 要塞保卫战子节点 } // Pet 精灵属性子节点,对应标签 // 注:根据实际需求补充字段,这里以常见属性为例 type Pet struct { Attack int `xml:"attack,attr,omitempty"` // 攻击加成 Defense int `xml:"defense,attr,omitempty"` // 防御加成 HP int `xml:"hp,attr,omitempty"` // 生命值加成 Speed int `xml:"speed,attr,omitempty"` // 速度加成 } // TeamPK 要塞保卫战子节点,对应标签 // 注:根据实际需求补充字段,这里以常见属性为例 type TeamPK struct { FortBonus int `xml:"fortBonus,attr,omitempty"` // 要塞加成 DefenseBonus int `xml:"defenseBonus,attr,omitempty"` // 防御加成 AttackBonus int `xml:"attackBonus,attr,omitempty"` // 攻击加成 }