Created
March 31, 2013 12:54
-
-
Save rutan/5280517 to your computer and use it in GitHub Desktop.
【RGSS3】エネミーのトループターゲットランダム化さん for RGSS3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
#=============================================================================== | |
# ■ エネミーのトループターゲットランダム化さん for RGSS3 | |
#------------------------------------------------------------------------------- | |
# 2012/03/03 Ru/むっくRu | |
#------------------------------------------------------------------------------- | |
# 敵に「味方単体」対象の技(例:ヒール)を使わせると, | |
# 同じ敵にずっと使い続けてしまうので, | |
# 対象をランダムにするように変更するスクリプトです. | |
#------------------------------------------------------------------------------- | |
# 【更新履歴】 | |
# 2012/03/03 味方単体(戦闘不能)がきちんと動かない不具合修正orz | |
# 2012/03/03 戦闘不能エネミーがいるとおかしくなるのを修正,味方単体(戦闘不能)に対応 | |
# 2012/03/03 ぶっぱ | |
#------------------------------------------------------------------------------- | |
#=============================================================================== | |
# ↓ 以下、スクリプト部 ↓ | |
#=============================================================================== | |
class Game_Troop < Game_Unit | |
#-------------------------------------------------------------------------- | |
# ● ターゲットのスムーズな決定(エイリアス) | |
#-------------------------------------------------------------------------- | |
alias hzm_vxa_troopTargetRandom_smooth_target smooth_target | |
def smooth_target(index) | |
return random_target unless index >= 0 | |
hzm_vxa_troopTargetRandom_smooth_target(index) | |
end | |
#-------------------------------------------------------------------------- | |
# ● ターゲットのスムーズな決定(戦闘不能)(エイリアス) | |
#-------------------------------------------------------------------------- | |
alias hzm_vxa_troopTargetRandom_smooth_dead_target smooth_dead_target | |
def smooth_dead_target(index) | |
return random_dead_target unless index >= 0 | |
hzm_vxa_troopTargetRandom_smooth_dead_target(index) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment