赞 | 0 |
VIP | 25 |
好人卡 | 0 |
积分 | 1 |
经验 | 126953 |
最后登录 | 2020-5-5 |
在线时间 | 39 小时 |
Lv1.梦旅人 粉蜘蛛秀秀
- 梦石
- 0
- 星屑
- 76
- 在线时间
- 39 小时
- 注册时间
- 2007-6-4
- 帖子
- 384
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
这个帖子里有人求~
所以就应求发布了
原因是自己也是吞食天地作者 所以就不好意思共享出来了
具体使用条件:5人战斗叫脚本,很简单的,推荐自己改
使用方法 自己看了 这里给出了核心~ 很多地方都可以调用
附带脚本重载Table的脚本MT:
因为阵型用到了Table
为啥要重载Table呢 因为Table是不能存放小数点的 为了能存放小数 所以只能重定义了
#kind 是阵型的类型 具体看脚本
# set_pos(kind) #设置坐标 返回的是Array
# set_parameter(kind) #设置参数 返回的是Hash, {"名称"=> MT} 自己取吧
# cost_sp(kind) #设置消耗SP 返回Array
# set_status(kind) #设置附加状态
#-------------------------------------
# 阵型脚本
# 作者 : 秀秀
# set_pos(kind)
# set_parameter(kind)
# cost_sp(kind)
# set_status(kind)
#-------------------------------------
class MT < Table
def [](*args)
return super(*args) / 10.to_f
end
def []=(*args)
super(*(args[0, args.size - 1] << args[-1] * 10))
end
end
module Lineup
# kind 类型
# 0 散开阵
# 1 鹤翼阵
# 2 冲方阵
# 3 白马阵
# 4 鱼鳞阵
# 5 锋箭阵
# 6 一字阵
# 7 背水阵
# 8 静寂阵
# 9 八卦阵
# 函数定义
module_function
# 坐标
def set_pos(kind)
case kind
when 0
return [0,0,0,0,0]
when 1
return [35,0,-35,0,-35]
when 2
return [35,-35,35,-35,35]
when 3
return [35,0,-35,0,-35]
when 4
return [0,35,35,35,0]
when 5
return [-35,0,35,0,-35]
when 6
return [35,35,35,35,35]
when 7
return [35,0,-35,0,35]
when 8
return [0,0,0,0,0]
when 9
return [0,0,0,0,0]
end
end
# 阵型参数([兵力,攻击力,物理防御力,策略防御力,命中,回避,智利])
def set_parameter(kind)
a = MT.new(5,7)
case kind
when 0
name = "散开阵"
pos1 =[1,1,1,1,1,1,1]
pos2 =[1,1,1,1,1,1,1]
pos3 =[1,1,1,1,1,1,1]
pos4 =[1,1,1,1,1,1,1]
pos5 =[1,1,1,1,1,1,1]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 1
name = "鹤翼阵"
pos1 =[1,1,1.4,1,1,0.8,1]
pos2 =[1,1,1.4,1,1,0.8,1]
pos3 =[1,1,1.4,1,1,0.8,1]
pos4 =[1,1,1.4,1,1,0.8,1]
pos5 =[1,1,1.4,1,1,0.8,1]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 2
name = "冲方阵"
pos1 = [1,1.6,1.2,1,1,0.6,1]
pos2 = [1,1.2,1.4,1,1,0.6,1]
pos3 = [1,1.6,1.2,1,1,0.6,1]
pos4 = [1,1.2,1.4,1,1,0.6,1]
pos5 = [1,1.6,1.2,1,1,0.6,1]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 3
name = "白马阵"
pos1 = [1,1,1,1,1,1.5,1]
pos2 = [1,1,1,1,1,1.5,1]
pos3 = [1,1,1,1,1,1.5,1]
pos4 = [1,1,1,1,1,1.5,1]
pos5 = [1,1,1,1,1,1.5,1]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 4
name = "鱼鳞阵"
pos1 = [1,0.2,1.5,1.2,1,1,1]
pos2 = [1,1.5,1.2,1.2,1,1,1]
pos3 = [1,1.5,1.2,1.2,1,1,1]
pos4 = [1,1.5,1.2,1.2,1,1,1]
pos5 = [1,0.2,1.5,1.2,1,1,1]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 5
name = "峰箭阵"
pos1 = [1,0.1,5.5,1,1,0.7,1]
pos2 = [1,1.3,1.7,1,1,0.8,1]
pos3 = [1,3,0.7,1,1,0.9,1]
pos4 = [1,1.3,1.7,1,1,0.8,1]
pos5 = [1,0.1,5.5,1,1,0.7,1]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 6
name = "一字阵"
pos1 = [1,1.5,0.7,1,1,1.2,1]
pos2 = [1,1.5,0.7,1,1,1.2,1]
pos3 = [1,1.5,0.7,1,1,1.2,1]
pos4 = [1,1.5,0.7,1,1,1.2,1]
pos5 = [1,1.5,0.7,1,1,1.2,1]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 7
name = "背水阵"
pos1 = [1,2,0.6,1,1,1,1]
pos2 = [1,2,0.6,1,1,1,1]
pos3 = [1,2,0.6,1,1,1,1]
pos4 = [1,2,0.6,1,1,1,1]
pos5 = [1,2,0.6,1,1,1,1]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 8
name = "静寂阵"
pos1 =[0,0,0,0,0,0,0]
pos2 =[0,0,0,0,0,0,0]
pos3 =[0,0,0,0,0,0,0]
pos4 =[0,0,0,0,0,0,0]
pos5 =[0,0,0,0,0,0,0]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
when 9
name = "八卦阵"
pos1 =[0,0,0,0,0,0,0]
pos2 =[0,0,0,0,0,0,0]
pos3 =[0,0,0,0,0,0,0]
pos4 =[0,0,0,0,0,0,0]
pos5 =[0,0,0,0,0,0,0]
for j in 0..4
for i in 0..6
b = 1 + j
a[j,i] = eval("pos"+"#{b}"+"")
end
end
return {name=>a}
end
end
def cost_sp(kind)
return [0,5,10,15,20,25,30,35,40][kind]
end
#附加状态
# stae_id 自己定义
def set_status(kind)
case kind
when 0
state_id = 0
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 1
state_id = 1
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 2
state_id = 2
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 3
state_id = 3
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 4
state_id = 4
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 5
state_id = 5
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 6
state_id = 6
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 7
state_id = 7
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 8
state_id = 8
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
when 9
state_id = 9
for i in 0...$game_party.actors.size
$game_party.actors.add_state(state_id)
end
end
end
end |
|