| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 6 |
| 经验 | |
| 最后登录 | 2026-5-4 |
| 在线时间 | 921 小时 |
- 梦石
- 0
- 星屑
- 632
- 在线时间
- 921 小时
- 注册时间
- 2013-3-13
- 回帖
- 503
|
发表于 2016-8-15 10:27:34
|
显示全部楼层
[pre lang="ruby"]class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● 变更装备(目标对象)
# equip_type : 装备部分(0~4)
# item_id : 武器或防具ID
# test : 测试标志(战斗测试或暂时装备用)
#--------------------------------------------------------------------------
def change_equip(equip_type, item, test = false)
last_item = equips[equip_type]
#插入开始------------------------------------------------------------
$cwps = [1] #请输入无法卸下的武器编号,例1号武器
return false if last_item.is_a?(RPG::Weapon) and $cwps.include?(last_item.id)
#如果采用了P叔的随机属性脚本,请使用下面这句。
#return false if last_item.is_a?(RPG::Weapon) and $cwps.include?(last_item.base_id)
#插入结束------------------------------------------------------------
unless test
return if $game_party.item_number(item) == 0 if item != nil
$game_party.gain_item(last_item, 1)
$game_party.lose_item(item, 1)
end
item_id = item == nil ? 0 : item.id
case equip_type
when 0 # 武器
@weapon_id = item_id
unless two_hands_legal? # 非双手装备的场合,自动卸下装备
change_equip(1, nil, test)
end
when 1 # 盾
@armor1_id = item_id
unless two_hands_legal? # 非双手装备的场合,自动卸下装备
change_equip(0, nil, test)
end
when 2 # 头部防具
@armor2_id = item_id
when 3 # 身体防具
@armor3_id = item_id
when 4 # 装饰品
@armor4_id = item_id
end
end
end[/pre] |
评分
-
查看全部评分
|