Project1
标题:
关于转职后,2刀流的问题
[打印本页]
作者:
三厘米的暧昧
时间:
2009-1-20 18:48
提示:
作者被禁止或删除 内容自动屏蔽
作者:
goahead
时间:
2009-1-20 18:50
提示:
作者被禁止或删除 内容自动屏蔽
作者:
越前リョーマ
时间:
2009-1-20 18:54
#==============================================================================
# 数据库角色选项变为被动技 by 沉影不器
# -----------------------------------------------------------------------------
# 功能描述:
# 把[数据库-角色]右下角某些选项变成角色的被动技,可以学会和遗忘这些技能
# -----------------------------------------------------------------------------
# 使用方法:
# 新建名称为"二刀流"和"药物知识"的属性, 新建"二刀流"和"药物知识"技能
# 技能设为"不可用"(因为被动技),并给技能分别钩选相应属性
# 2008-08-04 新增:
# 角色的"强力防御"和"会心一击"选项也变为被动技,设定方法同上
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ◎ 获取二刀流被动技 id
#--------------------------------------------------------------------------
def two_swords_id
two_swords = 0
# 遍历属性
for i in 1...$data_system.elements.size
if $data_system.elements[i] =~ /二刀流/
two_swords = i
break
end
end
return two_swords
end
#--------------------------------------------------------------------------
# ◎ 获取药物知识被动技 id
#--------------------------------------------------------------------------
def pharmacology_id
cure = 0
# 遍历属性
for i in 1...$data_system.elements.size
if $data_system.elements[i] =~ /药物知识/
cure = i
break
end
end
return cure
end
#--------------------------------------------------------------------------
# ◎ 获取强力防御被动技 id
#--------------------------------------------------------------------------
def super_guard_id
cure = 0
# 遍历属性
for i in 1...$data_system.elements.size
if $data_system.elements[i] =~ /强力防御/
cure = i
break
end
end
return cure
end
#--------------------------------------------------------------------------
# ◎ 获取会心一击被动技 id
#--------------------------------------------------------------------------
def critical_bonus_id
cure = 0
# 遍历属性
for i in 1...$data_system.elements.size
if $data_system.elements[i] =~ /会心一击/
cure = i
break
end
end
return cure
end
#--------------------------------------------------------------------------
# ◎ 觉醒了新的特技
# skill_id : 特技 ID
#--------------------------------------------------------------------------
def learn_skill(skill_id)
unless skill_learn?($data_skills[skill_id])
@skills.push(skill_id)
@skills.sort!
end
# 更改二刀流标志
if $data_skills[skill_id].element_set.include? two_swords_id
$data_actors[@actor_id].two_swords_style = true
# 强制卸装备
if @armor1_id != 0
$game_party.gain_item(@armor1_id, 1)
@armor1_id = 0
end
end
# 更改药物知识标志
if $data_skills[skill_id].element_set.include? pharmacology_id
$data_actors[@actor_id].pharmacology = true
end
# 更改强力防御标志
if $data_skills[skill_id].element_set.include? super_guard_id
$data_actors[@actor_id].super_guard = true
end
# 更改会心一击标志
if $data_skills[skill_id].element_set.include? critical_bonus_id
$data_actors[@actor_id].critical_bonus = true
end
end
#--------------------------------------------------------------------------
# ◎ 忘记特技
# skill_id : 特技 ID
#--------------------------------------------------------------------------
def forget_skill(skill_id)
@skills.delete(skill_id)
# 更改二刀流标志
if $data_skills[skill_id].element_set.include? two_swords_id
$data_actors[@actor_id].two_swords_style = false
# 强制卸装备
if @armor1_id != 0
$game_party.gain_item(@armor1_id, 1)
@armor1_id = 0
end
end
# 更改药物知识标志
if $data_skills[skill_id].element_set.include? pharmacology_id
$data_actors[@actor_id].pharmacology = false
end
# 更改强力防御标志
if $data_skills[skill_id].element_set.include? super_guard_id
$data_actors[@actor_id].super_guard = true
end
# 更改会心一击标志
if $data_skills[skill_id].element_set.include? critical_bonus_id
$data_actors[@actor_id].critical_bonus = true
end
end
end
复制代码
把那些改成被动技就好了。 [LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者:
鸭狐
时间:
2009-1-20 19:04
提示:
作者被禁止或删除 内容自动屏蔽
作者:
三厘米的暧昧
时间:
2009-1-20 19:05
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1