class Game_Party
def gain_weapon(weapon_id, n,ran = true)
if $scene.is_a?(Scene_Equip) or $scene.is_a?(Scene_Shop) or ran == false
@weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, 99].min
return
end
case rand(100)
when (0..100)
equip_class=",A"
ext_damage=15
ext_power=5
else
end
new_qz = $qianzui_weapons[randg(1,$qianzui_weapons.size-1)]
new_weapon = $data_weapons[weapon_id].dup#clone
new_weapon.id = $data_weapons.size
new_weapon.name = new_qz.name+new_weapon.name+equip_class
for i in weapon_id...$data_weapons.size
if $data_weapons[i].name == new_weapon.name
@weapons[i] = [[weapon_number(i) + n, 0].max, 99].min
return
end
end
new_weapon.atk = randg(0,new_qz.atk)+new_weapon.atk+ext_damage
new_weapon.pdef = randg(0,new_qz.pdef)+new_weapon.pdef
new_weapon.mdef = randg(0,new_qz.mdef)+new_weapon.mdef
new_weapon.str_plus = randg(0,new_qz.str_plus) + new_weapon.str_plus+ext_power
new_weapon.dex_plus = randg(0,new_qz.dex_plus) + new_weapon.dex_plus+ext_power
new_weapon.agi_plus = randg(0,new_qz.agi_plus) + new_weapon.agi_plus+ext_power
new_weapon.int_plus = randg(0,new_qz.int_plus) + new_weapon.int_plus+ext_power
#new_weapon.rang = randg(0,new_qz.rang) + new_weapon.rang 停用附加值
new_weapon.rang = new_weapon.rang
#new_weapon.time = randg(0,new_qz.time) + new_weapon.time 停用附加值
new_weapon.description = new_weapon.description + new_qz.description
new_weapon.element_set = $data_weapons[weapon_id].element_set.dup
new_qz.element_set.each{|ele|new_weapon.element_set.push(ele)}
new_weapon.plus_state_set = $data_weapons[weapon_id].plus_state_set.dup
new_qz.plus_state_set.each{|ele|new_weapon.plus_state_set.push(ele)}
new_weapon.minus_state_set = $data_weapons[weapon_id].minus_state_set.dup
new_qz.minus_state_set.each{|ele|new_weapon.minus_state_set.push(ele)}
$data_weapons.push(new_weapon)
for i in 1...$data_classes.size
if $data_classes[i].weapon_set.include?(weapon_id)
$data_classes[i].weapon_set.push(new_weapon.id)
end
end
@weapons[new_weapon.id] = [[weapon_number(new_weapon.id) + n, 0].max, 99].min
end
def gain_armor(armor_id, n, ran = true)
if $scene.is_a?(Scene_Equip) or $scene.is_a?(Scene_Shop) or ran == false
@armors[armor_id] = [[armor_number(armor_id) + n, 0].max, 99].min
return
end
case rand(100)
when (0..100)
equip_class=",A"
ext_defence=15
ext_power=5
when (0..100)
equip_class=",A"
ext_defence=15
ext_power=5
when (0..100)
equip_class=",A"
ext_defence=15
ext_power=5
when (0..100)
equip_class=",A"
ext_defence=15
ext_power=5
when (0..100)
equip_class=",A"
ext_defence=15
ext_power=5
else
end
new_qz = $qianzui_armors[randg(1,$qianzui_armors.size-1)]
new_armor = $data_armors[armor_id].dup#clone
new_armor.id = $data_armors.size
new_armor.name = new_qz.name+new_armor.name+equip_class
for i in armor_id...$data_armors.size
if $data_armors[i].name == new_armor.name
@armors[i] = [[armor_number(i) + n, 0].max, 99].min
return
end
end
new_armor.eva = new_qz.eva+new_armor.eva
new_armor.pdef = new_qz.pdef+new_armor.pdef+ext_defence
new_armor.mdef = new_qz.mdef+new_armor.mdef+ext_defence
new_armor.str_plus = new_qz.str_plus + new_armor.str_plus+ext_power
new_armor.dex_plus = new_qz.dex_plus + new_armor.dex_plus+ext_power
new_armor.agi_plus = new_qz.agi_plus + new_armor.agi_plus+ext_power
new_armor.int_plus = new_qz.int_plus + new_armor.int_plus+ext_power
new_armor.description = new_armor.description + new_qz.description
new_armor.guard_element_set = $data_armors[armor_id].guard_element_set.dup
new_qz.guard_element_set.each{|ele|new_armor.guard_element_set.push(ele)}
new_armor.guard_state_set = $data_armors[armor_id].guard_state_set .dup
new_qz.guard_state_set .each{|ele|new_armor.guard_state_set .push(ele)}
$data_armors.push(new_armor)
for i in 1...$data_classes.size
if $data_classes[i].armor_set.include?(armor_id)
$data_classes[i].armor_set.push(new_armor.id)
end
end
@armors[new_armor.id] = [[armor_number(new_armor.id) + n, 0].max, 99].min
end
def lose_weapon(weapon_id, n)
if weapon_id > 0
@weapons[weapon_id] = [@weapons[weapon_id] - n, 0].max
end
end
def lose_armor(armor_id, n)
if armor_id > 0
@armors[armor_id] = [@armors[armor_id] - n, 0].max
end
end
end
case weapon.equip_class
when 'A'
self.contents.font.color = font_color("金")
suffix = "「傳說」"
when 'B'
self.contents.font.color = font_color("紫")
suffix = "「史詩」"
when 'C'
self.contents.font.color = font_color("紅")
suffix = "「完美」"
when 'D'
self.contents.font.color = font_color("藍")
suffix = "「精良」"
when 'E'
self.contents.font.color = font_color("綠")
suffix = "「優秀」"
else
self.contents.font.color = font_color("白")
end
self.contents.draw_text(0,h*ch,cw(weapon.name+suffix),ch,weapon.name+suffix)
self.contents.font.size = 16
h += 1
self.contents.font.color = font_color("黃")
h += description(0,h,weapon.description)
if weapon.price != 0
h += 1
#if $scene.is_a?(Scene_BuyShop)
#self.contents.draw_text(0,h*ch,cw("購買價格 :")+cw(weapon.price.to_s),ch,"購買價格 :"+weapon.price.to_s)
#else
#self.contents.draw_text(0,h*ch,cw("出售價格 :")+cw((weapon.price/2).to_s),ch,"出售價格 :"+(weapon.price/2).to_s)
#end
end
self.contents.font.color = font_color("綠")
if weapon.atk != 0
h += 1
self.contents.draw_text(0,h*ch,cw("攻擊力 #{weapon.atk}"),ch,"攻擊力 #{weapon.atk}")
end
if weapon.pdef != 0
h += 1
self.contents.draw_text(0,h*ch,cw("外功防御 #{weapon.pdef}"),ch,"外功防御 #{weapon.pdef}")
end
if weapon.mdef != 0
h += 1
self.contents.draw_text(0,h*ch,cw("內功防禦 #{weapon.mdef}"),ch,"內功防禦 #{weapon.mdef}")
end
self.contents.font.color = font_color("紅")
if weapon.str_plus != 0
h += 1
self.contents.draw_text(0,h*ch,cw("剛勁 #{weapon.str_plus}"),ch,"剛勁 #{weapon.str_plus}")
end
if weapon.dex_plus != 0
h += 1
self.contents.draw_text(0,h*ch,cw("癒勁 #{weapon.dex_plus}"),ch,"癒勁 #{weapon.dex_plus}")
end
if weapon.agi_plus != 0
h += 1
self.contents.draw_text(0,h*ch,cw("輕勁 #{weapon.agi_plus}"),ch,"輕勁 #{weapon.agi_plus}")
end
if weapon.int_plus != 0
h += 1
self.contents.draw_text(0,h*ch,cw("柔勁 #{weapon.int_plus}"),ch,"柔勁 #{weapon.int_plus}")
end
self.contents.font.color = font_color("紫")
if weapon.plus_state_set.size != 0
strtemp=""
weapon.plus_state_set.each{|id|
if strtemp==""
strtemp = "附加狀態 " + $data_states[id].name
else
strtemp = strtemp + $data_states[id].name
h+=1
self.contents.draw_text(0,h*ch,cw(strtemp),ch,strtemp)
strtemp = ""
end
}
if strtemp != ""
h+=1
self.contents.draw_text(0,h*ch,cw(strtemp),ch,strtemp)
strtemp = ""
end
end
@item = weapon
end
#==========================================================
def set_armor(armor)
if armor.nil?
self.visible = false
return
else
self.visible = true
end
return if armor == @item
case armor.equip_class
when 'A'
self.contents.font.color = font_color("金")
suffix = "「傳說」"
when 'B'
self.contents.font.color = font_color("紫")
suffix = "「史詩」"
when 'C'
self.contents.font.color = font_color("紅")
suffix = "「完美」"
when 'D'
self.contents.font.color = font_color("藍")
suffix = "「精良」"
when 'E'
self.contents.font.color = font_color("綠")
suffix = "「優秀」"
else
self.contents.font.color = font_color("白")
end
self.contents.draw_text(0,h*ch,cw(armor.name+suffix),ch,armor.name+suffix)
self.contents.font.size = 16
h += 1
self.contents.font.color = font_color("黃")
h += description(0,h,armor.description)
if armor.price != 0
h += 1
#if $scene.is_a?(Scene_BuyShop)
#self.contents.draw_text(0,h*ch,cw("購買價格 :")+cw(armor.price.to_s),ch,"購買價格 :"+armor.price.to_s)
#else
#self.contents.draw_text(0,h*ch,cw("出售價格 :")+cw((armor.price/2).to_s),ch,"出售價格 :"+(armor.price/2).to_s)
#end
end
self.contents.font.color = font_color("綠")
if armor.pdef != 0
h += 1
self.contents.draw_text(0,h*ch,cw("外功防禦 #{armor.pdef}"),ch,"外功防禦 #{armor.pdef}")
end
if armor.mdef != 0
h += 1
self.contents.draw_text(0,h*ch,cw("內功防禦 #{armor.mdef}"),ch,"內功防禦 #{armor.mdef}")
end
self.contents.font.color = font_color("紅")
if armor.str_plus != 0
h += 1
self.contents.draw_text(0,h*ch,cw("剛勁 #{armor.str_plus}"),ch,"剛勁 #{armor.str_plus}")
end
if armor.dex_plus != 0
h += 1
self.contents.draw_text(0,h*ch,cw("癒勁 #{armor.dex_plus}"),ch,"癒勁 #{armor.dex_plus}")
end
if armor.agi_plus != 0
h += 1
self.contents.draw_text(0,h*ch,cw("輕勁 #{armor.agi_plus}"),ch,"輕勁 #{armor.agi_plus}")
end
if armor.int_plus != 0
h += 1
self.contents.draw_text(0,h*ch,cw("柔勁 #{armor.int_plus}"),ch,"柔勁 #{armor.int_plus}")
end
self.contents.font.color = font_color("紫")
if armor.guard_state_set.size != 0
strtemp=""
armor.guard_state_set.each{|id|
if strtemp==""
strtemp = "抵禦狀態 " + $data_states[id].name
else
strtemp = strtemp + $data_states[id].name
h+=1
self.contents.draw_text(0,h*ch,cw(strtemp),ch,strtemp)
strtemp = ""
end
}
if strtemp != ""
h+=1
self.contents.draw_text(0,h*ch,cw(strtemp),ch,strtemp)
strtemp = ""
end
end
@item = armor
end
#==========================================================
# 套裝顯示(武器) -- 遊戲內設定是沒有武器套裝, 缺功能, 只作備用
#==========================================================
def suit_weapon(weapon)
self.visible = false
return
end
#==========================================================
# 套裝顯示(防具)
#==========================================================
def suit_armor(armor)
if armor.nil?
self.visible = false
return
else
self.visible = true
end
return if armor == @item
local_suit_list = []
SUIT_LIST.each{ |key,value|
if value.include?(armor.id)
local_suit_list.push(key)
end
}
if local_suit_list == []
self.visible = false
return
end