- 好友
 - 1
  
- 在线时间
 - 0 小时
  
- 最后登录
 - 2025-4-29
  
 
 
 
 
见习骑士 
  
 
- UID
 - 3209025
  
- 第纳尔
 - 1316 
  
- 精华
 - 0
  
- 互助
 - 2 
  
- 荣誉
 - 0 
  
- 贡献
 - 0 
  
- 魅力
 - 20 
  
- 注册时间
 - 2020-11-30
  
    
 
  鲜花( 3)   鸡蛋( 0)  
 | 
 
 
发表于 2022-12-13 12:51:09
|
显示全部楼层
 
 
 
将单手/双手/长杆的属性值增加400. 
这样的结果是: 对战(比如竞技练习)AI的格挡概率变得特别特别高! 
 
C#源码如下: 
 
using System; 
using System.IO; 
using System.Xml; 
 
namespace XmlEditor 
{ 
    class Program 
    { 
        static void AddSkillById(XmlDocument doc,string id,int add) 
        { 
            string xpath = String.Format("//skill[@id='{0}']", id); 
            XmlNodeList list = doc.SelectNodes(xpath); 
            foreach (XmlNode node in list) 
            { 
                XmlElement ele = (XmlElement)node; 
                String val = ele.GetAttribute("value"); 
                int i = Convert.ToInt32(val); 
                i += add; 
                ele.SetAttribute("value", i.ToString()); 
            } 
        } 
        static void Main(string[] args) 
        { 
            string path = Directory.GetCurrentDirectory() + @"\\spnpccharacters.xml"; 
            XmlDocument doc = new XmlDocument(); 
            doc.Load(path); 
 
            AddSkillById(doc, "OneHanded", 400); 
            AddSkillById(doc, "TwoHanded", 400); 
            AddSkillById(doc, "Polearm", 400); 
 
            string path2 = Directory.GetCurrentDirectory() + @"\\spnpccharacters_new.xml"; 
            doc.Save(path2); 
        } 
    } 
} |   
 
 
 
 |