as.jpg (106.89 KB, 下载次数: 25)
@F22419%ZJOB18~$UW1JT59.jpg (33 KB, 下载次数: 24)
未标题-1.jpg (438.09 KB, 下载次数: 28)
8YGJOR~H5)G~Z0JOT3%SX07.jpg (44.97 KB, 下载次数: 27)
%R%F]MEPLCYZIHMBUB(4N%I.jpg (62.82 KB, 下载次数: 32)
51504.jpg (215.27 KB, 下载次数: 34)
51506.jpg (150.49 KB, 下载次数: 34)
fux2 发表于 2014-5-17 00:54
最近才知道已经有人在做类似工作了(自由扩充数据库及排版的编辑器)。
@IamI 大概你们能扯两句。 ...
Builder.Add(:lazy_choose , {:actual => :armor2_id , :label => 0, :textbook => Help.Get_Default_Text , :choice => { 0 => "(无)" }, :source => Proc.new do |target, parent, control| Data["armor"][Data["class"][parent["@class_id"]]["@armor_set"]].select {|target| target["@kind"].Value == 1} end })
def search_weapon(control) actor_class = Data["class"][control.Container.Container.Value["@class_id"]] actor_features = control.Container.Container.Value["@features"] class_features = actor_class["@features"] type = [] banish = false actor_features.each do |feature| type.push(feature["@data_id"]) if feature["@code"].Value == 51 banish = true if feature["@code"].Value == 54 && feature["@data_id"] == 0 end class_features.each do |feature| type.push(feature["@data_id"]) if feature["@code"].Value == 51 banish = true if feature["@code"].Value == 54 && feature["@data_id"] == 0 end return [] if banish return Data["weapon"].select {|weapon| type.include?(weapon["@wtype_id"]) } end def search_armor(control, id) actor_class = Data["class"][control.Container.Container.Value["@class_id"]] actor_features = control.Container.Container.Value["@features"] class_features = actor_class["@features"] type = [] banish = false actor_features.each do |feature| type.push(feature["@data_id"]) if feature["@code"].Value == 52 banish = true if feature["@code"].Value == 54 && feature["@data_id"] == id end class_features.each do |feature| type.push(feature["@data_id"]) if feature["@code"].Value == 52 banish = true if feature["@code"].Value == 54 && feature["@data_id"] == id end return [] if banish return Data["armor"].select {|weapon| type.include?(weapon["@atype_id"]) && weapon["@etype_id"].Value == id } end def isDouble(control) actor_class = Data["class"][control.Container.Container.Value["@class_id"]] actor_features = control.Container.Container.Value["@features"] class_features = actor_class["@features"] for feature in class_features return true if feature["@code"].Value == 55 end for feature in actor_features return true if feature["@code"].Value == 55 end false end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |