加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 crow2006 于 2014-4-11 11:53 编辑
#-------------------------------------------------------------------------- # ● 附魔属性更改 #-------------------------------------------------------------------------- def equip_fumo(item) item = @fumo_item b = item.level num = item.gifts.size gifts = [] rd = [] rd_1 = [] if item.is_a?(RPG::Weapon) rd_1 = different_rand(PA::WEAPON_E.size - 1, num) for i in 0...num rd << PA::WEAPON_E[rd_1[i]] end end if item.is_a?(RPG::Armor) case item.kind when 0 rd_1 = different_rand(PA::SHIELD_E.size - 1, num) for i in 0...num rd << PA::SHIELD_E[rd_1] end when 1 rd_1 = different_rand(PA::HELMET_E.size - 1, num) for i in 0...num rd << PA::HELMET_E[rd_1[/i] end when 2 rd_1 = different_rand(PA::CLOTHE_E.size - 1, num) for i in 0...num rd << PA::CLOTHE_E[rd_1[i]] end when 3 #首饰 rd_1 = different_rand(PA::NECK_E.size - 1, num) for i in 0...num rd << PA::NECK_E[rd_1[i]] end end end if item.is_a?(RPG::Armor) rd.each{|n| gifts.push Game_Gift.new(n)} a = Game_Equip.reini($base_armors[item.base_id],gifts) Game_Equip.level(a, b) $game_party.gain_item(a, 1) else rd.each{|n| gifts.push Game_Gift.new(n)} a = Game_Equip.reini($base_weapons[item.base_id],gifts) Game_Equip.level(a, b) $game_party.gain_item(a, 1) end $game_party.lose_reini(item, 1) @determine_window.active = false @fumo_window.active = true @price_window.refresh(0) end
#--------------------------------------------------------------------------
# ● 附魔属性更改
#--------------------------------------------------------------------------
def equip_fumo(item)
item = @fumo_item
b = item.level
num = item.gifts.size
gifts = []
rd = []
rd_1 = []
if item.is_a?(RPG::Weapon)
rd_1 = different_rand(PA::WEAPON_E.size - 1, num)
for i in 0...num
rd << PA::WEAPON_E[rd_1[i]]
end
end
if item.is_a?(RPG::Armor)
case item.kind
when 0
rd_1 = different_rand(PA::SHIELD_E.size - 1, num)
for i in 0...num
rd << PA::SHIELD_E[rd_1]
end
when 1
rd_1 = different_rand(PA::HELMET_E.size - 1, num)
for i in 0...num
rd << PA::HELMET_E[rd_1[/i]
end
when 2
rd_1 = different_rand(PA::CLOTHE_E.size - 1, num)
for i in 0...num
rd << PA::CLOTHE_E[rd_1[i]]
end
when 3 #首饰
rd_1 = different_rand(PA::NECK_E.size - 1, num)
for i in 0...num
rd << PA::NECK_E[rd_1[i]]
end
end
end
if item.is_a?(RPG::Armor)
rd.each{|n| gifts.push Game_Gift.new(n)}
a = Game_Equip.reini($base_armors[item.base_id],gifts)
Game_Equip.level(a, b)
$game_party.gain_item(a, 1)
else
rd.each{|n| gifts.push Game_Gift.new(n)}
a = Game_Equip.reini($base_weapons[item.base_id],gifts)
Game_Equip.level(a, b)
$game_party.gain_item(a, 1)
end
$game_party.lose_reini(item, 1)
@determine_window.active = false
@fumo_window.active = true
@price_window.refresh(0)
end
在
rd.each{|n| gifts.push Game_Gift.new(n)}
a = Game_Equip.reini($base_weapons[item.base_id],gifts)
这里,如何能做到不改变装备原本附带的第一条属性,其他的属性随机生成?
补充说明:如图,在我的游戏里,神器装备的第一条属性是特殊属性,可以抽取,但无法被注入,其他的非特殊属性是允许被抽取注入的。
我想做到在附魔(重新生成属性)的时候不改变神器装备的第一条属性。请问如何能做到。
|