赞 | 0 |
VIP | 1 |
好人卡 | 0 |
积分 | 1 |
经验 | 3179 |
最后登录 | 2013-10-25 |
在线时间 | 140 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 66
- 在线时间
- 140 小时
- 注册时间
- 2012-2-6
- 帖子
- 384
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 杂兵天下 于 2012-3-11 00:08 编辑
$imported = {} if $imported.nil? if $imported["RuntimeDB"].nil? $imported["RuntimeDB"] = true module DataManager class <<self alias make_save_contents_runtimedb_zabing make_save_contents alias extract_save_contents_runtimedb_zabing extract_save_contents end def self.make_save_contents contents = make_save_contents_runtimedb_zabing contents[:dataactorszabing] = $data_actors contents[:dataclasseszabing] = $data_classes contents[:dataskillszabing] = $data_skills contents[:dataitemszabing] = $data_items contents[:dataweaponszabing] = $data_weapons contents[:dataarmorszabing] = $data_armors contents[:dataenemieszabing] = $data_enemies contents[:datatroopszabing] = $data_troops contents[:datastateszabing] = $data_states contents[:dataanimationszabing] = $data_animations contents[:datatilesetszabing] = $data_tilesets contents[:datacommoneventszabing] = $data_common_events contents[:datasystemzabing] = $data_system contents[:datamapinfoszabing] = $data_mapinfos contents end def self.extract_save_contents(contents) extract_save_contents_runtimedb_zabing(contents) $data_actors = contents[:dataactorszabing] $data_classes = contents[:dataclasseszabing] $data_skills = contents[:dataskillszabing] $data_items = contents[:dataitemszabing] $data_weapons = contents[:dataweaponszabing] $data_armors = contents[:dataarmorszabing] $data_enemies = contents[:dataenemieszabing] $data_troops = contents[:datatroopszabing] $data_states = contents[:datastateszabing] $data_animations = contents[:dataanimationszabing] $data_tilesets = contents[:datatilesetszabing] $data_common_events = contents[:datacommoneventszabing] $data_system = contents[:datasystemzabing] $data_mapinfos = contents[:datamapinfoszabing] end end end #如果用了我的铸剑系统,可以删掉上面这一段。 $imported = {} if $imported.nil? if $imported["RatiosZabi"].nil? #-------------------------------------------------------------------------- # 多项比率选一(Ratios) By.杂兵天下 # 使用 Ratios.Co({对象=>比率},分比数) #-------------------------------------------------------------------------- $imported["RatiosZabi"] = true module Ratios def self.Co(data = {}, b = 100) a = [] a[0] = 0 for i in 1..data.values.size a[i] = data.values[i-1] + a[i-1] end b = rand(a[data.values.size]) for i in 1..data.values.size if (b>=a[i-1])and(b<a[i]) p [data.keys[i-1],data.values[i-1]] return [data.keys[i-1],data.values[i-1]] end end end end end class Game_Interpreter def makeskill(zcid) temp = RPG::Skill.new temp.id = $data_skills.size thishash = { ["拳",116,0,6]=>10, ["爆",119,0,79]=>10, ["斧",128,1,12]=>10, ["爪",129,2,86]=>10, ["枪",130,3,90]=>10, ["剑",131,4,11]=>10, ["刀",132,5,89]=>10, ["箭",133,6,17]=>10, ["匕",134,7,88]=>10, ["锤",135,8,24]=>10, ["杖",136,9,23]=>10, ["铳",137,10,93]=>10, } lwt=Ratios.Co(thishash, 100) temp.icon_index = lwt[0][1] temp.description = $game_actors[zcid].name+"自创的"+lwt[0][0]+"技。" thishash = { [nil,""]=>100, } temp1 = RPG::UsableItem::Effect.new temp1.code = 21 temp1.data_id = 8 temp1.value1 = 0.25 temp1.value2 = 0.0 thishash[[temp1,"晕击"]] = 10 featur = Ratios.Co(thishash, 100) temp.effects = [featur[0][0]] unless featur[0][0].nil? temp.description += "特效1:" + featur[0][1] unless featur[0][1] == "" thishash = { ["",""]=>100, } notetexiao = Ratios.Co(thishash, 100) temp.note = notetexiao[0][0] temp.description += "\n特效2:" + notetexiao[0][1] unless notetexiao[0][1] == "" thishash = { ["之气",2,0]=>10, ["#{ lwt[0][0]}法",1,1]=>10, ["破击",6,1]=>10, } houzhui = Ratios.Co(thishash, 100) temp.scope = houzhui[0][1] temp.occasion = 1 temp.animation_id = lwt[0][3] temp.hit_type = houzhui[0][2] temp.damage.type = 1 thishash = { ["地火",3,'a.atk * 4 - b.def * 2',5]=>10, ["燃冰",4,'a.atk * 8 - b.def * 6',7]=>10, ["奔雷",5,'a.atk * 2',7]=>10, ["太极",1,'b.atk * 4 - b.def * 2',10]=>10, ["青灵",0,'a.atk * 3',8]=>10, ["紫霄",0,'a.atk * 4',9]=>10, } qianzhui = Ratios.Co(thishash, 100) temp.damage.element_id = qianzhui[0][1] temp.damage.formula = qianzhui[0][2] temp.tp_cost = qianzhui[0][3] temp.name = qianzhui[0][0] + houzhui[0][0] temp.message1 = "发动了" + temp.name + "!" temp.required_wtype_id1 = lwt[0][2] $data_skills[$data_skills.size] = temp $game_actors[zcid].learn_skill($data_skills.size - 1) end end
$imported = {} if $imported.nil?
if $imported["RuntimeDB"].nil?
$imported["RuntimeDB"] = true
module DataManager
class <<self
alias make_save_contents_runtimedb_zabing make_save_contents
alias extract_save_contents_runtimedb_zabing extract_save_contents
end
def self.make_save_contents
contents = make_save_contents_runtimedb_zabing
contents[:dataactorszabing] = $data_actors
contents[:dataclasseszabing] = $data_classes
contents[:dataskillszabing] = $data_skills
contents[:dataitemszabing] = $data_items
contents[:dataweaponszabing] = $data_weapons
contents[:dataarmorszabing] = $data_armors
contents[:dataenemieszabing] = $data_enemies
contents[:datatroopszabing] = $data_troops
contents[:datastateszabing] = $data_states
contents[:dataanimationszabing] = $data_animations
contents[:datatilesetszabing] = $data_tilesets
contents[:datacommoneventszabing] = $data_common_events
contents[:datasystemzabing] = $data_system
contents[:datamapinfoszabing] = $data_mapinfos
contents
end
def self.extract_save_contents(contents)
extract_save_contents_runtimedb_zabing(contents)
$data_actors = contents[:dataactorszabing]
$data_classes = contents[:dataclasseszabing]
$data_skills = contents[:dataskillszabing]
$data_items = contents[:dataitemszabing]
$data_weapons = contents[:dataweaponszabing]
$data_armors = contents[:dataarmorszabing]
$data_enemies = contents[:dataenemieszabing]
$data_troops = contents[:datatroopszabing]
$data_states = contents[:datastateszabing]
$data_animations = contents[:dataanimationszabing]
$data_tilesets = contents[:datatilesetszabing]
$data_common_events = contents[:datacommoneventszabing]
$data_system = contents[:datasystemzabing]
$data_mapinfos = contents[:datamapinfoszabing]
end
end
end
#如果用了我的铸剑系统,可以删掉上面这一段。
$imported = {} if $imported.nil?
if $imported["RatiosZabi"].nil?
#--------------------------------------------------------------------------
# 多项比率选一(Ratios) By.杂兵天下
# 使用 Ratios.Co({对象=>比率},分比数)
#--------------------------------------------------------------------------
$imported["RatiosZabi"] = true
module Ratios
def self.Co(data = {}, b = 100)
a = []
a[0] = 0
for i in 1..data.values.size
a[i] = data.values[i-1] + a[i-1]
end
b = rand(a[data.values.size])
for i in 1..data.values.size
if (b>=a[i-1])and(b<a[i])
p [data.keys[i-1],data.values[i-1]]
return [data.keys[i-1],data.values[i-1]]
end
end
end
end
end
class Game_Interpreter
def makeskill(zcid)
temp = RPG::Skill.new
temp.id = $data_skills.size
thishash = {
["拳",116,0,6]=>10,
["爆",119,0,79]=>10,
["斧",128,1,12]=>10,
["爪",129,2,86]=>10,
["枪",130,3,90]=>10,
["剑",131,4,11]=>10,
["刀",132,5,89]=>10,
["箭",133,6,17]=>10,
["匕",134,7,88]=>10,
["锤",135,8,24]=>10,
["杖",136,9,23]=>10,
["铳",137,10,93]=>10,
}
lwt=Ratios.Co(thishash, 100)
temp.icon_index = lwt[0][1]
temp.description = $game_actors[zcid].name+"自创的"+lwt[0][0]+"技。"
thishash = {
[nil,""]=>100,
}
temp1 = RPG::UsableItem::Effect.new
temp1.code = 21
temp1.data_id = 8
temp1.value1 = 0.25
temp1.value2 = 0.0
thishash[[temp1,"晕击"]] = 10
featur = Ratios.Co(thishash, 100)
temp.effects = [featur[0][0]] unless featur[0][0].nil?
temp.description += "特效1:" + featur[0][1] unless featur[0][1] == ""
thishash = {
["",""]=>100,
}
notetexiao = Ratios.Co(thishash, 100)
temp.note = notetexiao[0][0]
temp.description += "\n特效2:" + notetexiao[0][1] unless notetexiao[0][1] == ""
thishash = {
["之气",2,0]=>10,
["#{ lwt[0][0]}法",1,1]=>10,
["破击",6,1]=>10,
}
houzhui = Ratios.Co(thishash, 100)
temp.scope = houzhui[0][1]
temp.occasion = 1
temp.animation_id = lwt[0][3]
temp.hit_type = houzhui[0][2]
temp.damage.type = 1
thishash = {
["地火",3,'a.atk * 4 - b.def * 2',5]=>10,
["燃冰",4,'a.atk * 8 - b.def * 6',7]=>10,
["奔雷",5,'a.atk * 2',7]=>10,
["太极",1,'b.atk * 4 - b.def * 2',10]=>10,
["青灵",0,'a.atk * 3',8]=>10,
["紫霄",0,'a.atk * 4',9]=>10,
}
qianzhui = Ratios.Co(thishash, 100)
temp.damage.element_id = qianzhui[0][1]
temp.damage.formula = qianzhui[0][2]
temp.tp_cost = qianzhui[0][3]
temp.name = qianzhui[0][0] + houzhui[0][0]
temp.message1 = "发动了" + temp.name + "!"
temp.required_wtype_id1 = lwt[0][2]
$data_skills[$data_skills.size] = temp
$game_actors[zcid].learn_skill($data_skills.size - 1)
end
end
用makeskill(1)这样来让角色1习得一个自创武功。
各种破击攻击随机四个对象。
各种之气可以同时攻击全体敌人。
各种剑法、锤法、斧法神马的只能攻击单体敌人。
下面是伤害公式:
地火代表火属性普通攻击
燃冰代表冰系双倍普通攻击-敌人防御*2
奔雷代表雷系2×发动者攻击
太极代表物理系让敌人自己打自己后的伤害
青灵代表无属性3×发动者攻击
紫霄代表无属性4×发动者攻击
这些数据都可以在哈希表中更改。
注意这里的多项比率选一与菜鸟飞呀飞的版本完全不同。
完全独立原创,版主请勿扣分。
默认数据库共有216种可能自创的武功。
在打防御高的怪物时最强的两种武功:紫霄破击(4个以下怪物),紫霄之气(4个以上怪物)
在打攻击高的怪物时最强的两种武功:太极破击(4个以下怪物),太极之气(4个以上怪物)
在打防御低的怪物时最强的两种武功:燃冰破击(4个以下怪物),燃冰之气(4个以上怪物)
恩,好了!就这样,大家自己研究去吧
怎么没人回复啊!!!
经验是象征性的。看看有谁看了帖子 |
评分
-
查看全部评分
|