Project1
标题:
为什么我的Game_Unit第46行发生错误?
[打印本页]
作者:
635060167
时间:
2011-10-16 13:32
标题:
为什么我的Game_Unit第46行发生错误?
本帖最后由 635060167 于 2011-10-16 13:34 编辑
C:Documents and SettingsAdministratorMy DocumentsDownloads110快来
635060167于2011-10-16 13:35补充以下内容:
就是这个,刚刚发不起来 dsu_plus_rewardpost_czw
作者:
feizhaodan
时间:
2011-10-16 13:45
图挂了
作者:
Sonic1997
时间:
2011-10-20 12:27
本帖最后由 Sonic1997 于 2011-10-19 21:29 编辑
什么情况?
file:///C: Documents%20and%20SettingsAdministratorMy%20DocumentsDownloads110快来
想我把你的C盘翻出来吗?
算了,把整个Game_Unit搬出来吧{:nm_7:}
#==============================================================================
# ■ Game_Unit
#------------------------------------------------------------------------------
# 处理成员的类。
# 这个类是作为Game_Party类和Game_Troop类的超级类而使用。
#==============================================================================
class Game_Unit
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize
end
#--------------------------------------------------------------------------
# ● 取得成员 (重新定义子类)
#--------------------------------------------------------------------------
def members
return []
end
#--------------------------------------------------------------------------
# ● 取得生存成员的序列
#--------------------------------------------------------------------------
def existing_members
result = []
for battler in members
next unless battler.exist?
result.push(battler)
end
return result
end
#--------------------------------------------------------------------------
# ● 取得战斗不能成员的序列
#--------------------------------------------------------------------------
def dead_members
result = []
for battler in members
next unless battler.dead?
result.push(battler)
end
return result
end
#--------------------------------------------------------------------------
# ● 全体成员的战斗行动序列
#--------------------------------------------------------------------------
def clear_actions
for battler in members
battler.action.clear
end
end
#--------------------------------------------------------------------------
# ● 随机目标确定
#--------------------------------------------------------------------------
def random_target
roulette = []
for member in existing_members
member.odds.times do
roulette.push(member)
end
end
return roulette.size > 0 ? roulette[rand(roulette.size)] : nil
end
#--------------------------------------------------------------------------
# ● 随机目标确定(战斗不能)
#--------------------------------------------------------------------------
def random_dead_target
roulette = []
for member in dead_members
roulette.push(member)
end
return roulette.size > 0 ? roulette[rand(roulette.size)] : nil
end
#--------------------------------------------------------------------------
# ● 随机目标确定
# index : 索引
#--------------------------------------------------------------------------
def smooth_target(index)
member = members[index]
return member if member != nil and member.exist?
return existing_members[0]
end
#--------------------------------------------------------------------------
# ● 随机目标确定(战斗不能)
# index : 索引
#--------------------------------------------------------------------------
def smooth_dead_target(index)
member = members[index]
return member if member != nil and member.dead?
return dead_members[0]
end
#--------------------------------------------------------------------------
# ● 计算敏捷性平均值
#--------------------------------------------------------------------------
def average_agi
result = 0
n = 0
for member in members
result += member.agi
n += 1
end
result /= n if n > 0
result = 1 if result == 0
return result
end
#--------------------------------------------------------------------------
# ● 应用连续伤害效果
#--------------------------------------------------------------------------
def slip_damage_effect
for member in members
member.slip_damage_effect
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1