| 赞 | 81 |
| VIP | |
| 好人卡 | |
| 积分 | 71 |
| 经验 | |
| 最后登录 | 2026-7-28 |
| 在线时间 | 607 小时 |
- 梦石
- 0
- 星屑
- 7066
- 在线时间
- 607 小时
- 注册时间
- 2017-11-10
- 回帖
- 656

|
发表于 2026-3-11 08:00:04
|
显示全部楼层
[pre lang="ruby"]#==============================================================================
# ★ RGSS3_自动状态 Ver1.0
#==============================================================================
=begin
作者:tomoaky
webサイト:ひきも記 (http://hikimoki.sakura.ne.jp/)
角色/职业/武器/护甲/敌人备注:
<自动状态 2, 3>
则在战斗开始时,自动附加2、3号状态到角色/敌人身上
=== 注意 ===
・没有可以添加状态持续回合的功能、
在战斗开始时才会重置持续回合数
2011.12.15 Ver1.0
公開
=end
#==============================================================================
# ■ RPG::BaseItem
#==============================================================================
class RPG::BaseItem
#--------------------------------------------------------------------------
# ○ オートステートIDの配列を返す
#--------------------------------------------------------------------------
def auto_states
result = []
if /<自动状态\s+(\d+(?:\s*\,\s*\d+)*)\s*>/ =~ @note
$1.scan(/\d+/).each do |id|
result.push(id.to_i)
end
end
result
end
end
#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# ● 戦闘開始処理
#--------------------------------------------------------------------------
alias tmatst_game_battler_on_battle_start on_battle_start
def on_battle_start
tmatst_game_battler_on_battle_start
add_auto_states
end
end
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor
#--------------------------------------------------------------------------
# ○ オートステートの付加
#--------------------------------------------------------------------------
def add_auto_states
states = self.actor.auto_states + self.class.auto_states
self.equips.compact.each {|item| states += item.auto_states }
states.uniq.each {|id| self.add_state(id) }
end
end
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy
#--------------------------------------------------------------------------
# ○ オートステートの付加
#--------------------------------------------------------------------------
def add_auto_states
self.enemy.auto_states.each {|id| self.add_state(id) }
end
end
[/pre] |
|