Project1
标题: XAS 死亡之后 可以执行公共事件吗 [打印本页]
作者: j296196585 时间: 2016-11-7 00:22
标题: XAS 死亡之后 可以执行公共事件吗
本帖最后由 j296196585 于 2016-11-7 00:31 编辑
XAS 死亡之后 可以执行公共事件吗
玩家 死亡后游戏不会结束而是执行公共事件
请问大神 知道在哪里看 脚本╮(╯_╰)╭{:2_286:} {:2_248:}
#==============================================================================#
#............................[战斗人员配置设置]................................#
#==============================================================================# #
#==============================================================================#
module XAS_ABS_SETUP
# 受到伤害/给对手造成伤害时是否弹窗显示.................................[是/否]
DAMAGE_POP = true
# 设定伤害的最大值.....................................................[伤害值]
DAMAGE_LIMIT = 9999999
#==============================================================================#
#...................................[防御].....................................#
#==============================================================================#
# 当使用盾撞到敌人敌人是否后退?........................................[是/否]
SHIELD_BLOW = false
# 当防御成功的时候播放的音效.............................................[音效]
SHIELD_SE = RPG::AudioFile.new("097-Attack09", 80, 150)
# 当防御成功的时候播放的动画...........................................[动画ID]
SHIELD_ANIMATION = 242
# 当防御成功的时候显示的文字.............................................[文字]
SHIELD_TEXT = "格挡!"
# 当防御被破坏的时候显示的文字...........................................[文字]
GUARD_BREAK_TEXT = "格挡失败"
# 当防御被破坏的时候播放的音效...........................................[音效]
GUARD_BREAK_SE = RPG::AudioFile.new("158-Skill02", 80, 150)
# 开启防御系统?........................................................[是/否]
DEFENSE_SYSTEM_ACTIVE = true
# 当你成功防御时显示的文字(侧面).......................................[文字]
DEFENSE_TEXT = "格挡!"
#=============================================================================#
# 防御系统的类型 #
# 0 = 当按着防御键的时候就扣除CT #
# 1 = 当受到攻击的时候扣除CT #
# 2 = 普通 #
#=============================================================================#
DEFENSE_COST_TYPE = 1
# 当使用盾时受到侧面攻击的话减少的伤害值...............................[伤害值]
SIDE_DEFENSE_PERC = 50
# 当使用盾时受到背后攻击的话减少的伤害值...............................[伤害值]
BACK_DEFENSE_PERC = 0
#==============================================================================#
# 当敌人逃跑的时候显示的文字.............................................[文字]
ESCAPE_TEXT = "摄退"
# 受到伤害时震动窗口?..................................................[是/否]
BATTLER_SHAKE_EFFECT = true
end
#=============================================================================#
#..................................[敌人].....................................#
#=============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 开关的ID #
#==============================================================================#
#==============================================================================#
module XAS_BA_ENEMY
DEFEAT_SWITCH_IDS = {
7=>57, #大鸟 演示模式结束时的boss
18=>116, #大boss (- -|)
26=>106, #德古拉 开门
27=>114, #米莉亚 演示模式结束时的boss
31=>131, #Mandra 击败
35=>135, #星星 击败
39=>139, #鬼墙 击败
42=>144, #真正的英雄 击败
40=>205, #Dartam
45=>202, #Dartam 左
46=>203, #Dartam 右
48=>241, #史莱姆
53=>253, #Tiamat 头部A
54=>254, #Tiamat 头部B
55=>255, #Tiamat 头部C
56=>272, #暗黑盖亚
57=>295 #爱丽丝
}
# 用来存储敌人的传感器(sensor)的变量ID.................................[变量]
DEFAULT_ENEMY_SENSOR_VARIABLE_ID = 10
#==============================================================================#
#...............................[敌人感应器]...................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 感应器 #
#==============================================================================#
#==============================================================================#
ENEMY_SENSOR = {
7=> 25, #大鸟
15=>7 , #那加(Nadja)
16=>30, #暗黑骑士
22=>25, #危险老鼠
23=>25, #青蛙
26=>25, #德古拉
27=>25, #米莉亚(Miria)
29=>20, #加尔(Garle)
31=>25, #曼德拉
35=>25, #星星
36=>25, #眼睛
39=>30, #鬼墙
40=>25, #Dartam
42=>25, #真正的英雄
43=>6, #冰蝎
44=>20, #大鹏金翅鸟
45=>20, #Dartam 左
46=>20, #Dartam 右
47=>30, #陷阱怪X
52=>25, #Tiamat 身体
53=>25, #Tiamat 头部 A
54=>25, #Tiamat 头部 B
55=>25, #Tiamat 头部 C
56=>30, #暗黑盖亚
58=>25, #德古拉
57=>35 #爱丽丝
}
#==============================================================================#
# 不能被伤害的敌人(陷阱).................................................[陷阱]
ENEMY_OBJECT = [
1, #陷阱
19, #恶魔头部
36, #眼睛
47, #陷阱怪X
52 #Tiamat 身体
]
# 不显示伤害,但是计算伤害的敌人.........................................[物品]
# 这个在设置场景中的互动物品(例如箱子 种子 罐子等)时使用。
ITEM_ENEMY = [
20, #箱子
21, #电箱(mag box)
24, #火焰
32, #触角
49, #箱式炸弹
50 #盒子箭(box arrow)
]
# 当HP达到最大HP的百分之多少的时候则被认定为HP低.......................[伤害值]
LOWHP = 30
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 动画的ID (顺序请参照数据库中敌动画的排序) #
#==============================================================================#
# 当地人死的时候播放的动画ID.............................................[动画]
DEF_ANI = {
2=>235, #史莱姆
3=>184, #雄榫
4=>182, #蝎子
5=>181, #猎人
7=>100, #大鸟
8=>235, #G史莱姆
9=>235, #膨胀史莱姆
10=>235, #史莱姆王
11=>183, #Harpia
12=>184, #Coguna
13=>182, #G毒蝎
14=>233, #蝙蝠
15=>181, #那加(Nadja)
16=>100, #暗黑骑士
17=>181, #吸血鬼
18=>100, #大BOSS
20=>169, #箱子(物品型敌人)
21=>170, #磁性箱子(物品型敌人)
22=>184, #雾
24=>182, #火焰 (物品型敌人)
26=>181, #德古拉
27=>100, #米莉亚
28=>232, #蜥蜴
30=>234, #乌鸦
33=>230, #狼
34=>181, #赤壁恶魔(chibi devil)
37=>183, #Archer
38=>231, #鬼魂
44=>100, #Garuda
49=>169, #B箱子(物品型敌人)
48=>235, #史莱姆
50=>169, #箱子 (物品型敌人)
51=>233, #蝙蝠
58=>235 #樱花十郎
}
# 当死亡的时候会崩坏并且会垂直的变焦的敌人。
COLLAPSE_ZOOM_A = [
11, #Harpia
14, #蝙蝠
17, #吸血鬼
27, #米莉亚
33, #狼
43, #冰蝎子
51 #蝙蝠
]
# 当死亡的时候会崩坏并且会水平的的变焦的敌人。
COLLAPSE_ZOOM_B = [
2, #史莱姆
8, #G史莱姆
9, #膨胀史莱姆
10, #史莱姆王
32, #触角
48 #史莱姆
]
# 当死亡的时候会崩坏并且会垂直+水平的变焦的敌人。
COLLAPSE_ZOOM_C = [
22, #危险老鼠
30, #乌鸦
34, #赤壁恶魔(chibi devil)
38 #鬼魂
]
# 当死亡的时候会崩坏并且会负向变焦的敌人。
COLLAPSE_ZOOM_D = [
20, #箱子
21, #魔法箱子
28, #蜥蜴
41 #熔岩史莱姆
]
#当死亡,崩坏和变焦的时候会改变道路的敌人。
COLLAPSE_ZOOM_E = [
8,
18, # 大BOSS
25, # 邪恶之树
29, # 加尔
31, # 曼德拉
35, # 星星
39, # 鬼墙
40, # Dartam
44, # 大鹏金翅鸟
45, # Dartam L
46, # Dartam R
52, #Tiamat 身体
53, #Tiamat 头部 A
54, #Tiamat 头部 B
55, #Tiamat 头部 C
56 #暗黑盖亚
]
# 敌人是否先跳起来再崩坏................................................[是/否]
COLLAPSE_JUMP = false
#==============================================================================#
#..............................[敌人防御系统]..................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 方向性的抵抗伤害: #
# 2 = 前方防御 #
# 4 = 左侧防御 #
# 6 = 右侧防御 #
# 8 = 后部防御 #
#==============================================================================#
#==============================================================================#
SHILED_DIRECTIONS = {
1=>[2,4,6,8], # 陷阱怪
13=>[2,4,6,8], # G毒蝎
16=>[2,4,6,8], # 暗黑骑士
18=>[2,4,6,8], # 大BOSS
19=>[2,4,6,8], # 恶魔之手
28=>[2], # 蜥蜴
42=>[2,4,6,8], # 真英雄
43=>[2], # 冰蝎子
40=>[2,4,6,8], # Dartam
47=>[2,4,6,8], # 陷阱怪X
52=>[2,4,6,8], # Tiamat 身体
56=>[2,4,6,8], # 暗黑盖亚
57=>[2,4,6,8] # 爱丽丝
}
#==============================================================================#
# 格式: A=>[B,B,B,B,B...] #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 不影响敌人的TOOL的ID #
#==============================================================================#
#==============================================================================#
SHILED_ACTIONS = {
4=>[1,9,12,15,16,19,29,34,38,40,41,48,51,54,55,59,74],# 蝎子
7=>[19,24,29,34,38,40,41,48,51,54,55,59,74],# 大鸟
9=>[24,30,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78],# 膨胀史莱姆
10=>[30,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 史莱姆王
15=>[24,30,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 那加(Nadja)
16=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,50,53,56,77,43,11], # 暗黑骑士
17=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,11], # 吸血鬼
18=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], # 大BOSS
19=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43], # 恶魔之手
20=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], #箱子(物品型敌人)
21=>[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,24,45,46,59,
29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,60,61,62,
63,64,65,66,67,68,69,70,71,76,78,129], # 魔法箱子(物品型敌人)
22=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 危险老鼠
23=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 青蛙
24=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 火焰 (物品型敌人)
25=>[24,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 邪恶之树
26=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,11], # 德古拉
27=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11,44], # 米莉亚
29=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43], # 加尔
31=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43], # 曼德拉
35=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43], # 星星
38=>[24,30,45,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 鬼魂
39=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], # 鬼墙
40=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Dartam
42=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,11], # 真正的英雄
43=>[24,30,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 冰蝎子
44=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 大鹏金翅鸟
45=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Dartam 左
46=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Dartam 右
49=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], #箱子 (物品型敌人)
50=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], #箱子 (物品型敌人)
52=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Tiamat 身体
53=>[129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Tiamat 头A
54=>[129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Tiamat 头B
55=>[129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Tiamat 头C
56=>[129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #暗黑盖亚
57=>[155,156,13,14,38,51,52,53,159,129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11] #爱丽丝
}
# 无视防御的敌人
IGNORE_HERO_SHIELD = [
16, #暗黑骑士
39, #鬼墙
45, #Dartam 左
46 #Dartam 右
]
#==============================================================================#
#....................................[反击系统]................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = TOOL的ID #
#==============================================================================#
#==============================================================================#
COUNTER_ACTION = {
13=>[48], #蝎子
16=>[104], #暗黑盖亚
31=>[50,53,56], #曼德拉
42=>[80], #真英雄
57=>[166] #爱丽丝
}
# 使用与挨打的TOOL相同的TOOL反击的敌人
COUNTER_SAME_ACTION = [
]
# 当动作被反击的时候显示的文字...........................................[文字]
COUNTER_TEXT = "反击"
# 不能被反击的TOOL
NO_COUNTER_ACTION_SKILL = [
]
# 不能被敌人复制的TOOL
NO_COUNTER_SAME_ACTION_SKILL = [
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,
29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,
44,45,46,47
]
#==============================================================================#
#.........................[最终攻击系统(类似自爆)].............................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = TOOL的ID #
#==============================================================================#
#==============================================================================#
# 敌人和对应的死亡的时候使用的TOOL的ID
ENEMY_FINAL_ATTACK = {
13=> [110], #蝎子
15=> [106], #那加
16=> [112], #暗黑骑士
17=> [101], #吸血鬼
38=> [125], #鬼魂
41=> [123] #熔岩史莱姆
}
# 当地人使用最终技能的时候显示的文字.........................[文字]
FINAL_ATTACK_TEXT = "最终技"
#==============================================================================#
# 当受到攻击也不后退的敌人ID
KNOCK_BACK_DISABLES = [
4, # 蝎子
6, # 恶魔之箱
7, # 大鸟
10, # 史莱姆王
13, # G毒蝎
14, # 蝙蝠
16, # 暗黑骑士
17, # 吸血鬼
18, # 大Boss
19, # 恶魔之手
20, # 箱子 (物品型敌人)
21, # 魔法箱子 (物品型敌人)
22, # 危险老鼠
24, # 火焰 (物品型敌人)
25, # 邪恶之树
26, # 德古拉
27, # 米莉亚
29, # 加尔
30, # 乌鸦
31, # 曼德拉
32, # 触角
35, # 星星
39, # 鬼墙
40, # Dartam
41, # 熔岩史莱姆
42, # 真正的英雄
43, # 冰蝎子
44, # 大鹏金翅鸟
45, # Dartam 左
46, # Dartam 右
49, # 箱子炸弹
50, # 箱子箭
51, # 蝙蝠
52, # Tiamat 身体
53, # Tiamat 头部 A
54, # Tiamat 头部 B
55, # Tiamat 头部 C
56, # 暗黑盖亚
57 # 爱丽丝
]
#==============================================================================#
#...............................[敌人的无敌]...................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 敌人在受到伤害后的无敌时间(按帧数计算) #
#==============================================================================#
INVICIBLE_DURATION_ENEMY = {
# A B
1=>1, #陷阱怪
5=>140, #猎人
15=>140, #那加
23=>1, #青蛙
28=>70, #蜥蜴
33=>20, #狼
37=>20, #弓箭手
51=>5, #蝙蝠
53=>30, #Tiamat 头部 A
54=>30, #Tiamat 头部 B
55=>30 #Tiamat 头部 C
}
# 默认的敌人在受到伤害后的无敌时间(按帧数计算) ..........................[帧数]
DEFAULT_INVICIBLE_DURATION_ENEMY = 45
#==============================================================================#
# 受到伤害时不跳跃的敌人
JUMP_HIT_ENEMY_DISABLE = [
4, # 毒蝎
7, # 大鸟
13, # G毒蝎
14, # 蝙蝠
18, # 大Boss
25, # 邪恶之树
26, # 德古拉
27, # 米莉亚
29, # 加尔
30, # 乌鸦
31, # 曼德拉
32, # 触角
35, # 星星
39, # 鬼墙
40, # Dartam
42, # 真正的英雄
43, # 冰蝎子
44, # 大鹏金翅鸟
45, # Dartam 左
46, # Dartam 右
51, # Bat
52, # Tiamat 身体
53, # Tiamat 头部 A
54, # Tiamat 头部 B
55, # Tiamat 头部 C
56, # 暗黑盖亚
57 # 爱丽丝
]
# 模仿呼吸的变焦效果
BREATH_EFFECT = [
29, #加尔
31, #曼德拉
35, #星星
36, #眼睛
40, #Dartam
44, #大鹏金翅鸟
45, #Dartam 左
46, #Dartam 右
52, # Tiamat 身体
53, # Tiamat 头部 A
54, # Tiamat 头部 B
55, # Tiamat 头部 C
56 # 暗黑盖亚
]
# 根据敌人HP的变焦效果(下降).
HP_ZOOM_IN_EFFECT = [
32, #触角
38 #鬼魂
]
# 根据敌人HP的变焦效果(上升).
HP_ZOOM_OUT_EFFECT = [
41 #熔岩史莱姆
]
#==============================================================================#
#.........................[身体方形(BODY SQUARE)]............................#
#==============================================================================#
#格式: A=>B #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 身体方形 #
#==============================================================================#
#==============================================================================#
BODY_SQUARE = {
18=>1, # 大Boss
25=>1, # 邪恶之树
27=>1, # 米莉亚
29=>3, # 加尔
31=>3, # 曼德拉
35=>2, # 星星
39=>1, # 鬼墙
40=>10,# Dartam
44=>1, # 大鹏金翅鸟
45=>1, # Dartam 左
46=>1, # Dartam 右
53=>1, # Tiamat 头部 A
54=>1, # Tiamat 头部 B
55=>2, # Tiamat 头部 C
56=>5 # 暗黑盖亚
}
#==============================================================================#
#...................................[多重掉宝].................................#
#==============================================================================#
# 格式: A=>[B,C,D] #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 宝物的类别: #
# 0 = 物品 #
# 1 = 武器 #
# 2 = 防具 #
# C = 物品的ID, 武器的ID 或者 防具的ID #
# D = 掉宝的概率 #
#==============================================================================#
#==============================================================================#
ENEMY_MULTI_TREASURE = {
5=>[0,10,20], #猎人
8=>[[0,5,20],[0,12,25],[0,13,20]], #史莱姆
9=>[[0,1,20],[0,10,10],[0,14,25],[0,15,20]], #膨胀史莱姆
10=>[[1,1,60],[1,4,50]], #史莱姆王
12=>[0,16,100], #Coguna
13=>[0,7,100], #G毒蝎
15=>[[0,4,20],[0,5,20]], #那加
16=>[[2,9,20],[2,10,100]], #吸血鬼
20=>[[0,12,50],[0,13,50],[0,14,50],[0,15,50]], #箱子 (物品型敌人)
21=>[[0,1,50],[0,3,50],[0,7,50]], #M魔法箱子 (物品型敌人)
24=>[[0,12,50],[0,13,50],[0,14,50],[0,15,50]], #火焰 (物品型敌人)
33=>[[0,15,30]] #狼
}
# 限制对敌人造成的最大伤害值
# 格式: A=>B
# A = 敌人的ID (顺序请参照数据库中敌人的排序)
# B = 一次攻击可以造成的最大伤害
ENEMY_DAMAGE_LIMIT = {
}
#==============================================================================#
#.................................[攻击设置]...................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 按百分比计算的伤害 #
#==============================================================================#
# 根据主角的...计算伤害的敌人
# ...根据当前的HP.
ATTACK_HP_PERC = {
1=>10
}
# ...根据最大HP.
ATTACK_MAXHP_PERC = {
39=>20, #鬼墙
47=>5 #尖钉
}
# ...根据当前的SP.
ATTACK_SP_PERC = {
9=> 5 #膨胀史莱姆
}
# ...根据最大SP.
ATTACK_MAXSP_PERC = {
14=>5, #蝙蝠
19=>5 #恶魔之手
}
#==============================================================================#
# 当攻击主角时给主角附加状态的敌人.
# 格式: A=>B
# A = 敌人的ID (顺序请参照数据库中敌人的排序)
# B = 状态的ID (顺序请参照数据库中状态的排序)
ATTACK_ADD_STATES = {
}
# 当敌人攻击时使你后退的格子
ATTACK_BLOW_POWER = {
9=>2, #膨胀史莱姆
13=>3, #G毒蝎
16=>5, #暗黑骑士
39=>5, #鬼墙
42=>5, #真正的英雄
45=>3, #Dartam 左手
46=>3 #Dartam 右手
}
# 当使用近身TOOL攻击这种敌人的时候会受到伤害
ENEMY_HIT_DAMAGE_REACTION = {
10=>5, #史莱姆王
23=>10 #青蛙
}
# 当时用近身TOOL攻击这种敌人的时候会被附加状态
ENEMY_HIT_ADDSTATES_REACTION = {
10=>13 #史莱姆王
}
# 攻击你时只会把你击退但是不造成伤害的敌人
ONLY_BLOW_EFFECT = [
]
end
#==============================================================================#
module XAS_BA
# 受到伤害时是否跳跃....................................................[是/否]
JUMP_HIT_HERO = true
# 当主角的HP为0的时候是否游戏结束.......................................[是/否]
AUTOGAMEOVER = true
# 用来控制游戏结束的开关ID...............................................[开关]
GAMEOVER_SWITCH_ID = 4
# 当受到伤害时是否制造闪光效果..........................................[是/否]
BLINK_ON = false
# 当受到伤害后的无敌时间(按帧数计算)...................................[帧数]
INVICIBLE_DURATION_HERO = 40
# 受到伤害后无法移动的时间...............................................[帧数]
KNOCK_BACK_DURATION_HERO = 30
# 你和敌人被击退的速度.
KNOCK_BACK_SPEED = 3
# 当主角升级的时候显示的文字.............................................[文字]
LEVEL_UP_TEXT = "等级提升!"
# 当主角升级的时候播放的动画.............................................[动画]
LEVEL_ANIMATION_ID = 229
# 当主角升级的时候播放的音效.............................................[音效]
LEVEL_UP_SE = RPG::AudioFile.new("Level_UP", 130, 100)
# 升级是否回复HP和SP....................................................[是/否]
LEVELUP_RECOVER = true
# 当主角升级的时候可以减速..............................................[是/否]
LEVEL_SLOW_MOTION = true
end
#==============================================================================#
#............................[战斗人员配置设置]................................#
#==============================================================================# #
#==============================================================================#
module XAS_ABS_SETUP
# 受到伤害/给对手造成伤害时是否弹窗显示.................................[是/否]
DAMAGE_POP = true
# 设定伤害的最大值.....................................................[伤害值]
DAMAGE_LIMIT = 9999999
#==============================================================================#
#...................................[防御].....................................#
#==============================================================================#
# 当使用盾撞到敌人敌人是否后退?........................................[是/否]
SHIELD_BLOW = false
# 当防御成功的时候播放的音效.............................................[音效]
SHIELD_SE = RPG::AudioFile.new("097-Attack09", 80, 150)
# 当防御成功的时候播放的动画...........................................[动画ID]
SHIELD_ANIMATION = 242
# 当防御成功的时候显示的文字.............................................[文字]
SHIELD_TEXT = "格挡!"
# 当防御被破坏的时候显示的文字...........................................[文字]
GUARD_BREAK_TEXT = "格挡失败"
# 当防御被破坏的时候播放的音效...........................................[音效]
GUARD_BREAK_SE = RPG::AudioFile.new("158-Skill02", 80, 150)
# 开启防御系统?........................................................[是/否]
DEFENSE_SYSTEM_ACTIVE = true
# 当你成功防御时显示的文字(侧面).......................................[文字]
DEFENSE_TEXT = "格挡!"
#=============================================================================#
# 防御系统的类型 #
# 0 = 当按着防御键的时候就扣除CT #
# 1 = 当受到攻击的时候扣除CT #
# 2 = 普通 #
#=============================================================================#
DEFENSE_COST_TYPE = 1
# 当使用盾时受到侧面攻击的话减少的伤害值...............................[伤害值]
SIDE_DEFENSE_PERC = 50
# 当使用盾时受到背后攻击的话减少的伤害值...............................[伤害值]
BACK_DEFENSE_PERC = 0
#==============================================================================#
# 当敌人逃跑的时候显示的文字.............................................[文字]
ESCAPE_TEXT = "摄退"
# 受到伤害时震动窗口?..................................................[是/否]
BATTLER_SHAKE_EFFECT = true
end
#=============================================================================#
#..................................[敌人].....................................#
#=============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 开关的ID #
#==============================================================================#
#==============================================================================#
module XAS_BA_ENEMY
DEFEAT_SWITCH_IDS = {
7=>57, #大鸟 演示模式结束时的boss
18=>116, #大boss (- -|)
26=>106, #德古拉 开门
27=>114, #米莉亚 演示模式结束时的boss
31=>131, #Mandra 击败
35=>135, #星星 击败
39=>139, #鬼墙 击败
42=>144, #真正的英雄 击败
40=>205, #Dartam
45=>202, #Dartam 左
46=>203, #Dartam 右
48=>241, #史莱姆
53=>253, #Tiamat 头部A
54=>254, #Tiamat 头部B
55=>255, #Tiamat 头部C
56=>272, #暗黑盖亚
57=>295 #爱丽丝
}
# 用来存储敌人的传感器(sensor)的变量ID.................................[变量]
DEFAULT_ENEMY_SENSOR_VARIABLE_ID = 10
#==============================================================================#
#...............................[敌人感应器]...................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 感应器 #
#==============================================================================#
#==============================================================================#
ENEMY_SENSOR = {
7=> 25, #大鸟
15=>7 , #那加(Nadja)
16=>30, #暗黑骑士
22=>25, #危险老鼠
23=>25, #青蛙
26=>25, #德古拉
27=>25, #米莉亚(Miria)
29=>20, #加尔(Garle)
31=>25, #曼德拉
35=>25, #星星
36=>25, #眼睛
39=>30, #鬼墙
40=>25, #Dartam
42=>25, #真正的英雄
43=>6, #冰蝎
44=>20, #大鹏金翅鸟
45=>20, #Dartam 左
46=>20, #Dartam 右
47=>30, #陷阱怪X
52=>25, #Tiamat 身体
53=>25, #Tiamat 头部 A
54=>25, #Tiamat 头部 B
55=>25, #Tiamat 头部 C
56=>30, #暗黑盖亚
58=>25, #德古拉
57=>35 #爱丽丝
}
#==============================================================================#
# 不能被伤害的敌人(陷阱).................................................[陷阱]
ENEMY_OBJECT = [
1, #陷阱
19, #恶魔头部
36, #眼睛
47, #陷阱怪X
52 #Tiamat 身体
]
# 不显示伤害,但是计算伤害的敌人.........................................[物品]
# 这个在设置场景中的互动物品(例如箱子 种子 罐子等)时使用。
ITEM_ENEMY = [
20, #箱子
21, #电箱(mag box)
24, #火焰
32, #触角
49, #箱式炸弹
50 #盒子箭(box arrow)
]
# 当HP达到最大HP的百分之多少的时候则被认定为HP低.......................[伤害值]
LOWHP = 30
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 动画的ID (顺序请参照数据库中敌动画的排序) #
#==============================================================================#
# 当地人死的时候播放的动画ID.............................................[动画]
DEF_ANI = {
2=>235, #史莱姆
3=>184, #雄榫
4=>182, #蝎子
5=>181, #猎人
7=>100, #大鸟
8=>235, #G史莱姆
9=>235, #膨胀史莱姆
10=>235, #史莱姆王
11=>183, #Harpia
12=>184, #Coguna
13=>182, #G毒蝎
14=>233, #蝙蝠
15=>181, #那加(Nadja)
16=>100, #暗黑骑士
17=>181, #吸血鬼
18=>100, #大BOSS
20=>169, #箱子(物品型敌人)
21=>170, #磁性箱子(物品型敌人)
22=>184, #雾
24=>182, #火焰 (物品型敌人)
26=>181, #德古拉
27=>100, #米莉亚
28=>232, #蜥蜴
30=>234, #乌鸦
33=>230, #狼
34=>181, #赤壁恶魔(chibi devil)
37=>183, #Archer
38=>231, #鬼魂
44=>100, #Garuda
49=>169, #B箱子(物品型敌人)
48=>235, #史莱姆
50=>169, #箱子 (物品型敌人)
51=>233, #蝙蝠
58=>235 #樱花十郎
}
# 当死亡的时候会崩坏并且会垂直的变焦的敌人。
COLLAPSE_ZOOM_A = [
11, #Harpia
14, #蝙蝠
17, #吸血鬼
27, #米莉亚
33, #狼
43, #冰蝎子
51 #蝙蝠
]
# 当死亡的时候会崩坏并且会水平的的变焦的敌人。
COLLAPSE_ZOOM_B = [
2, #史莱姆
8, #G史莱姆
9, #膨胀史莱姆
10, #史莱姆王
32, #触角
48 #史莱姆
]
# 当死亡的时候会崩坏并且会垂直+水平的变焦的敌人。
COLLAPSE_ZOOM_C = [
22, #危险老鼠
30, #乌鸦
34, #赤壁恶魔(chibi devil)
38 #鬼魂
]
# 当死亡的时候会崩坏并且会负向变焦的敌人。
COLLAPSE_ZOOM_D = [
20, #箱子
21, #魔法箱子
28, #蜥蜴
41 #熔岩史莱姆
]
#当死亡,崩坏和变焦的时候会改变道路的敌人。
COLLAPSE_ZOOM_E = [
8,
18, # 大BOSS
25, # 邪恶之树
29, # 加尔
31, # 曼德拉
35, # 星星
39, # 鬼墙
40, # Dartam
44, # 大鹏金翅鸟
45, # Dartam L
46, # Dartam R
52, #Tiamat 身体
53, #Tiamat 头部 A
54, #Tiamat 头部 B
55, #Tiamat 头部 C
56 #暗黑盖亚
]
# 敌人是否先跳起来再崩坏................................................[是/否]
COLLAPSE_JUMP = false
#==============================================================================#
#..............................[敌人防御系统]..................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 方向性的抵抗伤害: #
# 2 = 前方防御 #
# 4 = 左侧防御 #
# 6 = 右侧防御 #
# 8 = 后部防御 #
#==============================================================================#
#==============================================================================#
SHILED_DIRECTIONS = {
1=>[2,4,6,8], # 陷阱怪
13=>[2,4,6,8], # G毒蝎
16=>[2,4,6,8], # 暗黑骑士
18=>[2,4,6,8], # 大BOSS
19=>[2,4,6,8], # 恶魔之手
28=>[2], # 蜥蜴
42=>[2,4,6,8], # 真英雄
43=>[2], # 冰蝎子
40=>[2,4,6,8], # Dartam
47=>[2,4,6,8], # 陷阱怪X
52=>[2,4,6,8], # Tiamat 身体
56=>[2,4,6,8], # 暗黑盖亚
57=>[2,4,6,8] # 爱丽丝
}
#==============================================================================#
# 格式: A=>[B,B,B,B,B...] #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 不影响敌人的TOOL的ID #
#==============================================================================#
#==============================================================================#
SHILED_ACTIONS = {
4=>[1,9,12,15,16,19,29,34,38,40,41,48,51,54,55,59,74],# 蝎子
7=>[19,24,29,34,38,40,41,48,51,54,55,59,74],# 大鸟
9=>[24,30,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78],# 膨胀史莱姆
10=>[30,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 史莱姆王
15=>[24,30,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 那加(Nadja)
16=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,50,53,56,77,43,11], # 暗黑骑士
17=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,11], # 吸血鬼
18=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], # 大BOSS
19=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43], # 恶魔之手
20=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], #箱子(物品型敌人)
21=>[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,24,45,46,59,
29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,60,61,62,
63,64,65,66,67,68,69,70,71,76,78,129], # 魔法箱子(物品型敌人)
22=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 危险老鼠
23=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 青蛙
24=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 火焰 (物品型敌人)
25=>[24,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 邪恶之树
26=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,11], # 德古拉
27=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11,44], # 米莉亚
29=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43], # 加尔
31=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43], # 曼德拉
35=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43], # 星星
38=>[24,30,45,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 鬼魂
39=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], # 鬼墙
40=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Dartam
42=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,11], # 真正的英雄
43=>[24,30,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 冰蝎子
44=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], # 大鹏金翅鸟
45=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Dartam 左
46=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Dartam 右
49=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], #箱子 (物品型敌人)
50=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78], #箱子 (物品型敌人)
52=>[24,30,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Tiamat 身体
53=>[129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Tiamat 头A
54=>[129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Tiamat 头B
55=>[129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #Tiamat 头C
56=>[129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11], #暗黑盖亚
57=>[155,156,13,14,38,51,52,53,159,129,24,30,44,45,46,59,60,61,62,63,64,65,66,67,68,69,70,71,76,78,43,11] #爱丽丝
}
# 无视防御的敌人
IGNORE_HERO_SHIELD = [
16, #暗黑骑士
39, #鬼墙
45, #Dartam 左
46 #Dartam 右
]
#==============================================================================#
#....................................[反击系统]................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = TOOL的ID #
#==============================================================================#
#==============================================================================#
COUNTER_ACTION = {
13=>[48], #蝎子
16=>[104], #暗黑盖亚
31=>[50,53,56], #曼德拉
42=>[80], #真英雄
57=>[166] #爱丽丝
}
# 使用与挨打的TOOL相同的TOOL反击的敌人
COUNTER_SAME_ACTION = [
]
# 当动作被反击的时候显示的文字...........................................[文字]
COUNTER_TEXT = "反击"
# 不能被反击的TOOL
NO_COUNTER_ACTION_SKILL = [
]
# 不能被敌人复制的TOOL
NO_COUNTER_SAME_ACTION_SKILL = [
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,
29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,
44,45,46,47
]
#==============================================================================#
#.........................[最终攻击系统(类似自爆)].............................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = TOOL的ID #
#==============================================================================#
#==============================================================================#
# 敌人和对应的死亡的时候使用的TOOL的ID
ENEMY_FINAL_ATTACK = {
13=> [110], #蝎子
15=> [106], #那加
16=> [112], #暗黑骑士
17=> [101], #吸血鬼
38=> [125], #鬼魂
41=> [123] #熔岩史莱姆
}
# 当地人使用最终技能的时候显示的文字.........................[文字]
FINAL_ATTACK_TEXT = "最终技"
#==============================================================================#
# 当受到攻击也不后退的敌人ID
KNOCK_BACK_DISABLES = [
4, # 蝎子
6, # 恶魔之箱
7, # 大鸟
10, # 史莱姆王
13, # G毒蝎
14, # 蝙蝠
16, # 暗黑骑士
17, # 吸血鬼
18, # 大Boss
19, # 恶魔之手
20, # 箱子 (物品型敌人)
21, # 魔法箱子 (物品型敌人)
22, # 危险老鼠
24, # 火焰 (物品型敌人)
25, # 邪恶之树
26, # 德古拉
27, # 米莉亚
29, # 加尔
30, # 乌鸦
31, # 曼德拉
32, # 触角
35, # 星星
39, # 鬼墙
40, # Dartam
41, # 熔岩史莱姆
42, # 真正的英雄
43, # 冰蝎子
44, # 大鹏金翅鸟
45, # Dartam 左
46, # Dartam 右
49, # 箱子炸弹
50, # 箱子箭
51, # 蝙蝠
52, # Tiamat 身体
53, # Tiamat 头部 A
54, # Tiamat 头部 B
55, # Tiamat 头部 C
56, # 暗黑盖亚
57 # 爱丽丝
]
#==============================================================================#
#...............................[敌人的无敌]...................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 敌人在受到伤害后的无敌时间(按帧数计算) #
#==============================================================================#
INVICIBLE_DURATION_ENEMY = {
# A B
1=>1, #陷阱怪
5=>140, #猎人
15=>140, #那加
23=>1, #青蛙
28=>70, #蜥蜴
33=>20, #狼
37=>20, #弓箭手
51=>5, #蝙蝠
53=>30, #Tiamat 头部 A
54=>30, #Tiamat 头部 B
55=>30 #Tiamat 头部 C
}
# 默认的敌人在受到伤害后的无敌时间(按帧数计算) ..........................[帧数]
DEFAULT_INVICIBLE_DURATION_ENEMY = 45
#==============================================================================#
# 受到伤害时不跳跃的敌人
JUMP_HIT_ENEMY_DISABLE = [
4, # 毒蝎
7, # 大鸟
13, # G毒蝎
14, # 蝙蝠
18, # 大Boss
25, # 邪恶之树
26, # 德古拉
27, # 米莉亚
29, # 加尔
30, # 乌鸦
31, # 曼德拉
32, # 触角
35, # 星星
39, # 鬼墙
40, # Dartam
42, # 真正的英雄
43, # 冰蝎子
44, # 大鹏金翅鸟
45, # Dartam 左
46, # Dartam 右
51, # Bat
52, # Tiamat 身体
53, # Tiamat 头部 A
54, # Tiamat 头部 B
55, # Tiamat 头部 C
56, # 暗黑盖亚
57 # 爱丽丝
]
# 模仿呼吸的变焦效果
BREATH_EFFECT = [
29, #加尔
31, #曼德拉
35, #星星
36, #眼睛
40, #Dartam
44, #大鹏金翅鸟
45, #Dartam 左
46, #Dartam 右
52, # Tiamat 身体
53, # Tiamat 头部 A
54, # Tiamat 头部 B
55, # Tiamat 头部 C
56 # 暗黑盖亚
]
# 根据敌人HP的变焦效果(下降).
HP_ZOOM_IN_EFFECT = [
32, #触角
38 #鬼魂
]
# 根据敌人HP的变焦效果(上升).
HP_ZOOM_OUT_EFFECT = [
41 #熔岩史莱姆
]
#==============================================================================#
#.........................[身体方形(BODY SQUARE)]............................#
#==============================================================================#
#格式: A=>B #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 身体方形 #
#==============================================================================#
#==============================================================================#
BODY_SQUARE = {
18=>1, # 大Boss
25=>1, # 邪恶之树
27=>1, # 米莉亚
29=>3, # 加尔
31=>3, # 曼德拉
35=>2, # 星星
39=>1, # 鬼墙
40=>10,# Dartam
44=>1, # 大鹏金翅鸟
45=>1, # Dartam 左
46=>1, # Dartam 右
53=>1, # Tiamat 头部 A
54=>1, # Tiamat 头部 B
55=>2, # Tiamat 头部 C
56=>5 # 暗黑盖亚
}
#==============================================================================#
#...................................[多重掉宝].................................#
#==============================================================================#
# 格式: A=>[B,C,D] #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 宝物的类别: #
# 0 = 物品 #
# 1 = 武器 #
# 2 = 防具 #
# C = 物品的ID, 武器的ID 或者 防具的ID #
# D = 掉宝的概率 #
#==============================================================================#
#==============================================================================#
ENEMY_MULTI_TREASURE = {
5=>[0,10,20], #猎人
8=>[[0,5,20],[0,12,25],[0,13,20]], #史莱姆
9=>[[0,1,20],[0,10,10],[0,14,25],[0,15,20]], #膨胀史莱姆
10=>[[1,1,60],[1,4,50]], #史莱姆王
12=>[0,16,100], #Coguna
13=>[0,7,100], #G毒蝎
15=>[[0,4,20],[0,5,20]], #那加
16=>[[2,9,20],[2,10,100]], #吸血鬼
20=>[[0,12,50],[0,13,50],[0,14,50],[0,15,50]], #箱子 (物品型敌人)
21=>[[0,1,50],[0,3,50],[0,7,50]], #M魔法箱子 (物品型敌人)
24=>[[0,12,50],[0,13,50],[0,14,50],[0,15,50]], #火焰 (物品型敌人)
33=>[[0,15,30]] #狼
}
# 限制对敌人造成的最大伤害值
# 格式: A=>B
# A = 敌人的ID (顺序请参照数据库中敌人的排序)
# B = 一次攻击可以造成的最大伤害
ENEMY_DAMAGE_LIMIT = {
}
#==============================================================================#
#.................................[攻击设置]...................................#
#==============================================================================#
# 格式: A=>B #
# #
# A = 敌人的ID (顺序请参照数据库中敌人的排序) #
# B = 按百分比计算的伤害 #
#==============================================================================#
# 根据主角的...计算伤害的敌人
# ...根据当前的HP.
ATTACK_HP_PERC = {
1=>10
}
# ...根据最大HP.
ATTACK_MAXHP_PERC = {
39=>20, #鬼墙
47=>5 #尖钉
}
# ...根据当前的SP.
ATTACK_SP_PERC = {
9=> 5 #膨胀史莱姆
}
# ...根据最大SP.
ATTACK_MAXSP_PERC = {
14=>5, #蝙蝠
19=>5 #恶魔之手
}
#==============================================================================#
# 当攻击主角时给主角附加状态的敌人.
# 格式: A=>B
# A = 敌人的ID (顺序请参照数据库中敌人的排序)
# B = 状态的ID (顺序请参照数据库中状态的排序)
ATTACK_ADD_STATES = {
}
# 当敌人攻击时使你后退的格子
ATTACK_BLOW_POWER = {
9=>2, #膨胀史莱姆
13=>3, #G毒蝎
16=>5, #暗黑骑士
39=>5, #鬼墙
42=>5, #真正的英雄
45=>3, #Dartam 左手
46=>3 #Dartam 右手
}
# 当使用近身TOOL攻击这种敌人的时候会受到伤害
ENEMY_HIT_DAMAGE_REACTION = {
10=>5, #史莱姆王
23=>10 #青蛙
}
# 当时用近身TOOL攻击这种敌人的时候会被附加状态
ENEMY_HIT_ADDSTATES_REACTION = {
10=>13 #史莱姆王
}
# 攻击你时只会把你击退但是不造成伤害的敌人
ONLY_BLOW_EFFECT = [
]
end
#==============================================================================#
module XAS_BA
# 受到伤害时是否跳跃....................................................[是/否]
JUMP_HIT_HERO = true
# 当主角的HP为0的时候是否游戏结束.......................................[是/否]
AUTOGAMEOVER = true
# 用来控制游戏结束的开关ID...............................................[开关]
GAMEOVER_SWITCH_ID = 4
# 当受到伤害时是否制造闪光效果..........................................[是/否]
BLINK_ON = false
# 当受到伤害后的无敌时间(按帧数计算)...................................[帧数]
INVICIBLE_DURATION_HERO = 40
# 受到伤害后无法移动的时间...............................................[帧数]
KNOCK_BACK_DURATION_HERO = 30
# 你和敌人被击退的速度.
KNOCK_BACK_SPEED = 3
# 当主角升级的时候显示的文字.............................................[文字]
LEVEL_UP_TEXT = "等级提升!"
# 当主角升级的时候播放的动画.............................................[动画]
LEVEL_ANIMATION_ID = 229
# 当主角升级的时候播放的音效.............................................[音效]
LEVEL_UP_SE = RPG::AudioFile.new("Level_UP", 130, 100)
# 升级是否回复HP和SP....................................................[是/否]
LEVELUP_RECOVER = true
# 当主角升级的时候可以减速..............................................[是/否]
LEVEL_SLOW_MOTION = true
end
作者: yang1zhi 时间: 2016-11-7 01:31
本帖最后由 yang1zhi 于 2016-11-7 01:36 编辑
XAS - Defeat Process※
这个是你需要的
if @battler_visible
if @battler.damage == nil and @battler.dead?
if @battler.is_a?(Game_Enemy) and
这里讲的是敌人的情况下。你可以再加个else判断不是敌人时。
执行公共事件:
$game_temp.common_event_id = 编号
作者: j296196585 时间: 2016-11-7 15:53
#===============================================================================
#===============================================================================
# 击败过程/宝物/伤害弹窗
#===============================================================================
#===============================================================================
#===============================================================================
# XAS - Character damage pop mechanism
#===============================================================================
module XRXS_DAMAGE_OFFSET
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
def update
super
@damage_sprites = [] if @damage_sprites.nil?
for damage_sprite in @damage_sprites
damage_sprite.x = self.x
damage_sprite.y = self.y
end
end
end
#===============================================================================
# Sprite_Character
#===============================================================================
class Sprite_Character < RPG::Sprite
include XRXS_DAMAGE_OFFSET
end
#===============================================================================
# module RPG
#===============================================================================
module RPG
class Sprite < ::Sprite
#--------------------------------------------------------------------------
# 崩坏
#--------------------------------------------------------------------------
def collapse
self.opacity = 255
@_collapse_duration = 70
@_whiten_duration = 0
@_appear_duration = 0
@_escape_duration = 0
end
end
end
#===============================================================================
# XRXS_CharacterDamagePop
#===============================================================================
module XRXS_CharacterDamagePop
#--------------------------------------------------------------------------
# 崩坏效果刷新
#--------------------------------------------------------------------------
def collapse_effect_update
if @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::ITEM_ENEMY.include?(@battler.id)
@character.opacity = 0
else
@character.opacity = 256 - (70 - @_collapse_duration) * 3
if @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_A.include?(@battler.id)
self.zoom_x -= 0.02
self.zoom_y += 0.2
elsif @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_B.include?(@battler.id)
self.zoom_x += 0.05
self.zoom_y -= 0.02
elsif @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_C.include?(@battler.id)
self.zoom_x += 0.05
self.zoom_y += 0.05
elsif @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_D.include?(@battler.id)
self.zoom_x -= 0.01
self.zoom_y -= 0.01
elsif @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_E.include?(@battler.id)
if @_collapse_duration > 30
self.zoom_x += 0.04
self.zoom_y -= 0.02
else
self.zoom_x -= 0.1
self.zoom_y += 0.5
end
end
end
end
#--------------------------------------------------------------------------
# 声音刷新
#--------------------------------------------------------------------------
def voice_update
if @battler.is_a?(Game_Actor) and
$game_system.fly == false
#声音类型 -----------------------
#击空
if @battler.damage == "Miss"
voice = XAS_VOICE::HEROMISS
#击败
elsif @battler.damage.is_a?(Numeric) and
@battler.hp == 0
voice = XAS_VOICE::HERODEFEAT
#暴击
elsif @battler.critical == true and
voice = XAS_VOICE::HEROCRITICAL
#普通伤害
elsif @battler.damage.is_a?(Numeric) and
@battler.damage.to_i > 0
voice = XAS_VOICE::HERODAMAGE
#升级
elsif @battler.damage == XAS_BA::LEVEL_UP_TEXT
voice = XAS_VOICE::LEVEL_UP_VOICE
end
#声音活跃 --------------------
if voice != nil
Audio.se_play("Audio/SE/" + voice[rand(voice.size)],130,100) rescue nil
end
else
#声音类型
if @battler.critical == true and not
XAS_BA_ENEMY::ITEM_ENEMY.include?(@battler.id)
voice = XAS_VOICE::ENEMYCRITICAL
elsif @battler.damage.is_a?(Numeric) and
@battler.damage.to_i > 0 and
XAS_VOICE::ENEMY_DAMAGE.include?(@battler.id)
voice = XAS_VOICE::ENEMY_DAMAGE[@battler.id]
end
#声音活跃
if voice != nil
if voice != nil
Audio.se_play("Audio/SE/" + voice[rand(voice.size)],130,100) rescue nil
end
end
end
end
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
def update
super
if [url=home.php?mod=space&uid=133701]@battler[/url] == nil
return
end
@battler.hit_it -= 1 if @battler.hit_it > 0
if @character.collapse_duration != nil
if @character.collapse_duration > 0
collapse
end
@_collapse_duration = @character.collapse_duration
end
@battler_visible = @character.battler_visible
@battler_visible = true if @battler_visible == nil
if @battler.damage_pop
if XAS_ABS_SETUP::DAMAGE_POP == true
unless XAS_BA_ENEMY::ITEM_ENEMY.include?(@battler.id) or
@battler.no_damage == true
if $xrxs_damage_pop != nil
damage(@battler.damage, @battler.critical,@battler.state,@battler.item)
else
damage(@battler.damage, @battler.critical)
end
end
end
voice_update
@battler.damage = nil
@battler.critical = false
@battler.damage_pop = false
if $xrxs_damage_pop != nil
@battler.state = false
@battler.item = false
end
end
unless @battler_visible
if not @battler.hidden and not @battler.dead? and
(@battler.damage == nil or @battler.damage_pop)
appear
@battler_visible = true
end
end
if @battler_visible
if @battler.damage == nil and @battler.dead?
if @battler.is_a?(Game_Enemy)
$game_system.se_play($data_system.enemy_collapse_se) if not XAS_BA_ENEMY::ITEM_ENEMY.include?(@battler.id)
else
$game_system.se_play($data_system.actor_collapse_se)
end
collapse
@battler_visible = false
end
else
if @_collapse_duration > 0
@_collapse_duration -= 1
collapse_effect_update
if @_collapse_duration == 0
@character.collapse_done = true
end
end
end
@character.collapse_duration = @_collapse_duration
@character.battler_visible = @battler_visible
end
end
#===============================================================================
# Sprite_Character
#===============================================================================
class Sprite_Character < RPG::Sprite
include XRXS_CharacterDamagePop
end
#===============================================================================
# Game_Event
#===============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
#敌人击败过程
#--------------------------------------------------------------------------
def enemy_defeat_process(enemy)
last_level = $game_player.battler.level
$game_party.gain_exp(enemy.exp)
$game_party.gain_gold(enemy.gold)
if $mog_rgss_ap_parameter != nil
$game_party.gain_ap(enemy.ap)
end
if last_level < $game_player.battler.level
$game_system.se_play(XAS_BA::LEVEL_UP_SE)
$game_player.battler.damage = XAS_BA::LEVEL_UP_TEXT
$game_player.battler.damage_pop = true
$game_player.need_refresh = true
$game_player.animation_id = XAS_BA::LEVEL_ANIMATION_ID
$game_temp.ifw_text = "Level UP!!! - L " + $game_player.battler.level.to_s
$game_temp.ifw_active = true
$game_temp.slow_motion = 30 if XAS_BA::LEVEL_SLOW_MOTION == true
if XAS_BA::LEVELUP_RECOVER == true
actor = $game_party.actors[0]
actor.hp = actor.maxhp
actor.sp = actor.maxsp
end
end
id = XAS_BA::DEFEAT_NUMBER_ID
$game_variables[id] += 1 if id != 0
switch_id = XAS_BA_ENEMY::DEFEAT_SWITCH_IDS[self.enemy_id]
jumpa(0,0,20) if XAS_BA_ENEMY::COLLAPSE_JUMP == true
if switch_id != nil
$game_switches[switch_id] = true
$game_map.refresh
end
end
end
#===============================================================================
# Game_Party
#===============================================================================
class Game_Party
#--------------------------------------------------------------------------
# 获得经验
#--------------------------------------------------------------------------
def gain_exp(exp)
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
actor.exp += exp
end
end
end
end
#===============================================================================
#===============================================================================
# 宝物
#===============================================================================
#===============================================================================
#===============================================================================
# XAS_BA_ItemDrop
#===============================================================================
module XAS_BA_ItemDrop
#--------------------------------------------------------------------------
# 击败过程
#--------------------------------------------------------------------------
def defeat_process
super
if self.battler.is_a?(Game_Enemy) and self.battler.dead? and
$game_map.passable?(self.x, self.y,2) and
terrain_tag != XAS::FALL_TERRAIN
treasure = nil
enemy = self.battler
if rand(100) < enemy.treasure_prob and
self.battler.steal == false
if enemy.item_id > 0
treasure = $data_items[enemy.item_id]
end
if enemy.weapon_id > 0
treasure = $data_weapons[enemy.weapon_id]
end
if enemy.armor_id > 0
treasure = $data_armors[enemy.armor_id]
end
else
# 多重掉落
tesouro = XAS_BA_ENEMY::ENEMY_MULTI_TREASURE[enemy.id]
if tesouro != nil
item_2treasure = tesouro[rand(tesouro.size)]
end
if item_2treasure != nil
treasure_type = item_2treasure[0]
treasure_id = item_2treasure[1]
treasure_prob = item_2treasure[2]
if rand(100) < treasure_prob
if treasure_type == 0
treasure = $data_items[treasure_id]
end
if treasure_type == 1
treasure = $data_weapons[treasure_id]
end
if treasure_type == 2
treasure = $data_armors[treasure_id]
end
end
end
end
if treasure != nil
item_se = XAS::ITEMDROP_SE
opecode = treasure.is_a?(RPG::Item) ? 126 :
treasure.is_a?(RPG::Weapon) ? 127 :
treasure.is_a?(RPG::Armor) ? 128 :
nil
list = []
if opecode != nil
item_number = XAS::ITEM_NUMBER[treasure.id]
if item_number != nil and treasure.is_a?(RPG::Item)
list[0] = RPG::EventCommand.new(opecode, 0, [treasure.id,0,0,item_number])
else
list[0] = RPG::EventCommand.new(opecode, 0, [treasure.id,0,0,1])
end
list[1] = RPG::EventCommand.new(250, 0, [item_se])
list[2] = RPG::EventCommand.new(116, 0, [])
end
list.push(RPG::EventCommand.new)
command = RPG::MoveCommand.new
command.code = 14
command.parameters = [0,0]
route = RPG::MoveRoute.new
route.repeat = false
route.list = [command, RPG::MoveCommand.new]
page = RPG::Event::Page.new
page.move_type = 3
page.move_route = route
page.move_frequency = 6
page.always_on_top = true
page.trigger = 1
page.list = list
page.through = true
page.condition.variable_id = 10000
page.condition.variable_value = 100 + (40 * MOG::XAS_ICON_ERASE_TIME)
event = RPG::Event.new(self.x, self.y)
event.pages = [page]
token = Token_Event.new($game_map.id, event)
token.icon_name = treasure.icon_name
$game_map.add_token(token)
end
end
end
end
#===============================================================================
# Game_Event
#===============================================================================
class Game_Event < Game_Character
include XAS_BA_ItemDrop
end
#===============================================================================
# Game_Character
#===============================================================================
class Game_Character
attr_accessor :icon_name
end
#===============================================================================
# Sprite_Character
#===============================================================================
class Sprite_Character < RPG::Sprite
attr_accessor :sprite_frames
attr_accessor :sprite_frames_refresh
attr_accessor :sprite_frames_blink
attr_accessor :sprite_y
#--------------------------------------------------------------------------
# 初始化
#--------------------------------------------------------------------------
def initialize(viewport, character = nil)
super(viewport)
[url=home.php?mod=space&uid=2631396]@character[/url] = character
@sprite_frames = 0
@sprite_frames_refresh = 0
@sprite_frames_blink = 0
@sprite_y = 0
end
#--------------------------------------------------------------------------
# 浮动图标刷新
#--------------------------------------------------------------------------
def icon_float_update(icon_ch)
if MOG::XAS_ICON_FLOAT == true
self.sprite_y += 1
if self.sprite_y < 3
self.oy = icon_ch + 1
elsif self.sprite_y < 6
self.oy = icon_ch + 2
elsif self.sprite_y < 9
self.oy = icon_ch + 3
elsif self.sprite_y < 12
self.oy = icon_ch + 4
elsif self.sprite_y < 15
self.oy = icon_ch + 3
elsif self.sprite_y < 18
self.oy = icon_ch + 2
elsif self.sprite_y < 21
self.oy = icon_ch + 1
else
self.oy = icon_ch
self.sprite_y = 0
end
else
self.oy = icon_ch
end
end
#--------------------------------------------------------------------------
# 闪烁图标刷新
#--------------------------------------------------------------------------
def icon_blink_update
if MOG::XAS_ITEM_BLINK == true
self.sprite_frames_blink += 1
if self.sprite_frames_blink > 30
self.sprite_frames_blink = 0
end
if self.sprite_frames_blink > 15
self.opacity = 255
else
self.opacity = 125
end
end
end
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
alias xrxs_charactericon_update update
def update
xrxs_charactericon_update
if @character.throw_on == true
self.z = $game_player.screen_z + 32 + $game_temp.extra_z
else
self.z = @character.screen_z(@ch) + $game_temp.extra_z
end
if @character.is_a?(Game_Player)
if $game_system.fly == true
self.z = 999 + $game_temp.extra_z
else
self.z = @character.screen_z(@ch) + $game_temp.extra_z
end
end
if @character.icon_name != nil
@icon_name = @character.icon_name
self.bitmap = RPG::Cache.icon(@icon_name)
self.src_rect.set(0, 0, 24, 24)
self.ox = 12
self.oy = 24
self.z = 1
end
self.sprite_frames_refresh += 1
if self.sprite_frames_refresh > MOG::XAS_ICON_REF
self.sprite_frames += 1
self.sprite_frames_refresh = 0
end
if @character.icon_name != nil
@icon_name = @character.icon_name
self.bitmap = RPG::Cache.icon(@icon_name)
icon_cw = self.bitmap.width
icon_ch = self.bitmap.height
icon_react_x = self.bitmap.height * self.sprite_frames
if icon_react_x < icon_cw
self.src_rect.set(icon_react_x, 0, icon_ch, icon_ch)
else
self.src_rect.set(0, 0, icon_ch, icon_ch)
self.sprite_frames = 0
end
self.ox = icon_ch / 2
icon_float_update(icon_ch)
icon_blink_update
end
end
end
#===============================================================================
# Interpreter
#===============================================================================
class Interpreter
#--------------------------------------------------------------------------
# Command_126 (物品)
#--------------------------------------------------------------------------
def command_126
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_party.gain_item(@parameters[0], value)
gold_effect = XAS::ITEM_GOLD_EFFECT[@parameters[0]]
exp_effect = XAS::ITEM_EXP_EFFECT[@parameters[0]]
ap_effect = XAS::ITEM_AP_EFFECT[@parameters[0]]
condition_effect = XAS::ITEM_CONDITION_EFFECT[@parameters[0]]
recover_hp_perc_effect = XAS::ITEM_DAMAGE_HP_PERC_EFFECT[@parameters[0]]
recover_sp_perc_effect = XAS::ITEM_DAMAGE_SP_PERC_EFFECT[@parameters[0]]
actor = $game_party.actors[0]
if gold_effect != nil
damage_item = gold_effect.to_s + " " + $data_system.words.gold
$game_party.gain_gold(gold_effect)
$game_party.lose_item(@parameters[0], value)
elsif exp_effect != nil
damage_item = "EXP" + " " + exp_effect.to_s
last_level = actor.level
actor.exp += exp_effect
if last_level < actor.level
$game_system.se_play(XAS_BA::LEVEL_UP_SE)
$game_player.battler.damage = XAS_BA::LEVEL_UP_TEXT
$game_player.battler.damage_pop = true
$game_player.need_refresh = true
$game_player.animation_id = XAS_BA::LEVEL_ANIMATION_ID
$game_temp.ifw_text = "Level UP!!! - L " + actor.level.to_s
$game_temp.ifw_active = true
$game_temp.slow_motion = 30 if XAS_BA::LEVEL_SLOW_MOTION == true
if XAS_BA::LEVELUP_RECOVER == true
actor = $game_party.actors[0]
actor.hp = actor.maxhp
actor.sp = actor.maxsp
end
end
$game_party.lose_item(@parameters[0], value)
elsif ap_effect != nil and $mog_rgss_ap_parameter != nil
damage_item = ap_effect.to_s + " " + MOG::AP_NAME
$game_party.gain_ap(ap_effect)
$game_party.lose_item(@parameters[0], value)
elsif condition_effect != nil
damage_item = ""
actor.add_state(condition_effect)
$game_party.lose_item(@parameters[0], value)
elsif recover_hp_perc_effect != nil
damage = actor.maxhp * recover_hp_perc_effect / 100
damage_item = damage
actor.hp -= damage
$game_party.lose_item(@parameters[0], value)
elsif recover_sp_perc_effect != nil
damage = actor.maxsp * recover_sp_perc_effect / 100
damage_item = $data_system.words.sp + " " + damage.to_s
actor.sp -= damage
$game_party.lose_item(@parameters[0], value)
end
animation_item = XAS::ITEM_ANIMATION_ID[@parameters[0]]
@actor = $game_party.actors[0]
unless $game_temp.message_window_showing or
@actor == nil
item_name = load_data("Data/Items.rxdata")
if damage_item != nil
$game_player.battler.damage = damage_item
$game_player.battler.damage_pop = true
elsif MOG::XAS_ITEM_NAME_POP == true
$game_player.battler.damage = value.to_s + " x "+ item_name[@parameters[0]].name rescue nil
$game_player.battler.damage_pop = true rescue nil
$game_player.battler.item = true
end
if $mog_rgss_active_hud != nil and
damage_item == nil
$game_temp.hud_face_type = 1
$game_temp.hud_face_refresh = true
$game_temp.hud_face_time = 0
$game_temp.hud_face_time2 = 30
end
if $mog_rgss_xas_action_name != nil
if damage_item == nil
$game_temp.if_text = "Got " + value.to_s + " x " + item_name[@parameters[0]].name
$game_temp.if_text_time = 40 * MOG::IFA_TIME
$game_temp.if_start = true
elsif gold_effect != nil
$game_temp.if_text = "Got " + gold_effect.to_s + " " +$data_system.words.gold
$game_temp.if_text_time = 40 * MOG::IFA_TIME
$game_temp.if_start = true
end
end
if animation_item != nil
$game_player.animation_id = animation_item
end
end
return true
end
#--------------------------------------------------------------------------
# Command_127 (武器)
#--------------------------------------------------------------------------
alias mog_xas_ani_item_command_127 command_127
def command_127
mog_xas_ani_item_command_127
@actor = $game_party.actors[0]
if @actor != nil
if $mog_rgss_xas_action_name != nil
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
item_name = load_data("Data/Weapons.rxdata")
$game_temp.if_text = "Got " + value.to_s + " x " + item_name[@parameters[0]].name
$game_temp.if_text_time = 40 * MOG::IFA_TIME
$game_temp.if_start = true
end
if MOG::XAS_ITEM_NAME_POP == true
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
item_name = load_data("Data/Weapons.rxdata")
$game_player.battler.damage = value.to_s + " x "+ item_name[@parameters[0]].name rescue nil
$game_player.battler.damage_pop = true rescue nil
$game_player.battler.item = true rescue nil
end
end
end
#--------------------------------------------------------------------------
# Command_128 (防具)
#--------------------------------------------------------------------------
alias mog_xas_ani_item_command_128 command_128
def command_128
mog_xas_ani_item_command_128
@actor = $game_party.actors[0]
if @actor != nil
if $mog_rgss_xas_action_name != nil
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
item_name = load_data("Data/Armors.rxdata")
$game_temp.if_text = "Got " + value.to_s + " x " + item_name[@parameters[0]].name
$game_temp.if_text_time = 40 * MOG::IFA_TIME
$game_temp.if_start = true
end
if MOG::XAS_ITEM_NAME_POP == true
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
item_name = load_data("Data/Armors.rxdata")
$game_player.battler.damage = value.to_s + " x "+ item_name[@parameters[0]].name rescue nil
$game_player.battler.damage_pop = true rescue nil
$game_player.battler.item = true rescue nil
end
end
end
end
#===============================================================================
#===============================================================================
# 击败过程/宝物/伤害弹窗
#===============================================================================
#===============================================================================
#===============================================================================
# XAS - Character damage pop mechanism
#===============================================================================
module XRXS_DAMAGE_OFFSET
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
def update
super
@damage_sprites = [] if @damage_sprites.nil?
for damage_sprite in @damage_sprites
damage_sprite.x = self.x
damage_sprite.y = self.y
end
end
end
#===============================================================================
# Sprite_Character
#===============================================================================
class Sprite_Character < RPG::Sprite
include XRXS_DAMAGE_OFFSET
end
#===============================================================================
# module RPG
#===============================================================================
module RPG
class Sprite < ::Sprite
#--------------------------------------------------------------------------
# 崩坏
#--------------------------------------------------------------------------
def collapse
self.opacity = 255
@_collapse_duration = 70
@_whiten_duration = 0
@_appear_duration = 0
@_escape_duration = 0
end
end
end
#===============================================================================
# XRXS_CharacterDamagePop
#===============================================================================
module XRXS_CharacterDamagePop
#--------------------------------------------------------------------------
# 崩坏效果刷新
#--------------------------------------------------------------------------
def collapse_effect_update
if @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::ITEM_ENEMY.include?(@battler.id)
@character.opacity = 0
else
@character.opacity = 256 - (70 - @_collapse_duration) * 3
if @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_A.include?(@battler.id)
self.zoom_x -= 0.02
self.zoom_y += 0.2
elsif @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_B.include?(@battler.id)
self.zoom_x += 0.05
self.zoom_y -= 0.02
elsif @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_C.include?(@battler.id)
self.zoom_x += 0.05
self.zoom_y += 0.05
elsif @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_D.include?(@battler.id)
self.zoom_x -= 0.01
self.zoom_y -= 0.01
elsif @battler.is_a?(Game_Enemy) and
XAS_BA_ENEMY::COLLAPSE_ZOOM_E.include?(@battler.id)
if @_collapse_duration > 30
self.zoom_x += 0.04
self.zoom_y -= 0.02
else
self.zoom_x -= 0.1
self.zoom_y += 0.5
end
end
end
end
#--------------------------------------------------------------------------
# 声音刷新
#--------------------------------------------------------------------------
def voice_update
if @battler.is_a?(Game_Actor) and
$game_system.fly == false
#声音类型 -----------------------
#击空
if @battler.damage == "Miss"
voice = XAS_VOICE::HEROMISS
#击败
elsif @battler.damage.is_a?(Numeric) and
@battler.hp == 0
voice = XAS_VOICE::HERODEFEAT
#暴击
elsif @battler.critical == true and
voice = XAS_VOICE::HEROCRITICAL
#普通伤害
elsif @battler.damage.is_a?(Numeric) and
@battler.damage.to_i > 0
voice = XAS_VOICE::HERODAMAGE
#升级
elsif @battler.damage == XAS_BA::LEVEL_UP_TEXT
voice = XAS_VOICE::LEVEL_UP_VOICE
end
#声音活跃 --------------------
if voice != nil
Audio.se_play("Audio/SE/" + voice[rand(voice.size)],130,100) rescue nil
end
else
#声音类型
if @battler.critical == true and not
XAS_BA_ENEMY::ITEM_ENEMY.include?(@battler.id)
voice = XAS_VOICE::ENEMYCRITICAL
elsif @battler.damage.is_a?(Numeric) and
@battler.damage.to_i > 0 and
XAS_VOICE::ENEMY_DAMAGE.include?(@battler.id)
voice = XAS_VOICE::ENEMY_DAMAGE[@battler.id]
end
#声音活跃
if voice != nil
if voice != nil
Audio.se_play("Audio/SE/" + voice[rand(voice.size)],130,100) rescue nil
end
end
end
end
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
def update
super
if [url=home.php?mod=space&uid=133701]@battler[/url] == nil
return
end
@battler.hit_it -= 1 if @battler.hit_it > 0
if @character.collapse_duration != nil
if @character.collapse_duration > 0
collapse
end
@_collapse_duration = @character.collapse_duration
end
@battler_visible = @character.battler_visible
@battler_visible = true if @battler_visible == nil
if @battler.damage_pop
if XAS_ABS_SETUP::DAMAGE_POP == true
unless XAS_BA_ENEMY::ITEM_ENEMY.include?(@battler.id) or
@battler.no_damage == true
if $xrxs_damage_pop != nil
damage(@battler.damage, @battler.critical,@battler.state,@battler.item)
else
damage(@battler.damage, @battler.critical)
end
end
end
voice_update
@battler.damage = nil
@battler.critical = false
@battler.damage_pop = false
if $xrxs_damage_pop != nil
@battler.state = false
@battler.item = false
end
end
unless @battler_visible
if not @battler.hidden and not @battler.dead? and
(@battler.damage == nil or @battler.damage_pop)
appear
@battler_visible = true
end
end
if @battler_visible
if @battler.damage == nil and @battler.dead?
if @battler.is_a?(Game_Enemy)
$game_system.se_play($data_system.enemy_collapse_se) if not XAS_BA_ENEMY::ITEM_ENEMY.include?(@battler.id)
else
$game_system.se_play($data_system.actor_collapse_se)
end
collapse
@battler_visible = false
end
else
if @_collapse_duration > 0
@_collapse_duration -= 1
collapse_effect_update
if @_collapse_duration == 0
@character.collapse_done = true
end
end
end
@character.collapse_duration = @_collapse_duration
@character.battler_visible = @battler_visible
end
end
#===============================================================================
# Sprite_Character
#===============================================================================
class Sprite_Character < RPG::Sprite
include XRXS_CharacterDamagePop
end
#===============================================================================
# Game_Event
#===============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
#敌人击败过程
#--------------------------------------------------------------------------
def enemy_defeat_process(enemy)
last_level = $game_player.battler.level
$game_party.gain_exp(enemy.exp)
$game_party.gain_gold(enemy.gold)
if $mog_rgss_ap_parameter != nil
$game_party.gain_ap(enemy.ap)
end
if last_level < $game_player.battler.level
$game_system.se_play(XAS_BA::LEVEL_UP_SE)
$game_player.battler.damage = XAS_BA::LEVEL_UP_TEXT
$game_player.battler.damage_pop = true
$game_player.need_refresh = true
$game_player.animation_id = XAS_BA::LEVEL_ANIMATION_ID
$game_temp.ifw_text = "Level UP!!! - L " + $game_player.battler.level.to_s
$game_temp.ifw_active = true
$game_temp.slow_motion = 30 if XAS_BA::LEVEL_SLOW_MOTION == true
if XAS_BA::LEVELUP_RECOVER == true
actor = $game_party.actors[0]
actor.hp = actor.maxhp
actor.sp = actor.maxsp
end
end
id = XAS_BA::DEFEAT_NUMBER_ID
$game_variables[id] += 1 if id != 0
switch_id = XAS_BA_ENEMY::DEFEAT_SWITCH_IDS[self.enemy_id]
jumpa(0,0,20) if XAS_BA_ENEMY::COLLAPSE_JUMP == true
if switch_id != nil
$game_switches[switch_id] = true
$game_map.refresh
end
end
end
#===============================================================================
# Game_Party
#===============================================================================
class Game_Party
#--------------------------------------------------------------------------
# 获得经验
#--------------------------------------------------------------------------
def gain_exp(exp)
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
actor.exp += exp
end
end
end
end
#===============================================================================
#===============================================================================
# 宝物
#===============================================================================
#===============================================================================
#===============================================================================
# XAS_BA_ItemDrop
#===============================================================================
module XAS_BA_ItemDrop
#--------------------------------------------------------------------------
# 击败过程
#--------------------------------------------------------------------------
def defeat_process
super
if self.battler.is_a?(Game_Enemy) and self.battler.dead? and
$game_map.passable?(self.x, self.y,2) and
terrain_tag != XAS::FALL_TERRAIN
treasure = nil
enemy = self.battler
if rand(100) < enemy.treasure_prob and
self.battler.steal == false
if enemy.item_id > 0
treasure = $data_items[enemy.item_id]
end
if enemy.weapon_id > 0
treasure = $data_weapons[enemy.weapon_id]
end
if enemy.armor_id > 0
treasure = $data_armors[enemy.armor_id]
end
else
# 多重掉落
tesouro = XAS_BA_ENEMY::ENEMY_MULTI_TREASURE[enemy.id]
if tesouro != nil
item_2treasure = tesouro[rand(tesouro.size)]
end
if item_2treasure != nil
treasure_type = item_2treasure[0]
treasure_id = item_2treasure[1]
treasure_prob = item_2treasure[2]
if rand(100) < treasure_prob
if treasure_type == 0
treasure = $data_items[treasure_id]
end
if treasure_type == 1
treasure = $data_weapons[treasure_id]
end
if treasure_type == 2
treasure = $data_armors[treasure_id]
end
end
end
end
if treasure != nil
item_se = XAS::ITEMDROP_SE
opecode = treasure.is_a?(RPG::Item) ? 126 :
treasure.is_a?(RPG::Weapon) ? 127 :
treasure.is_a?(RPG::Armor) ? 128 :
nil
list = []
if opecode != nil
item_number = XAS::ITEM_NUMBER[treasure.id]
if item_number != nil and treasure.is_a?(RPG::Item)
list[0] = RPG::EventCommand.new(opecode, 0, [treasure.id,0,0,item_number])
else
list[0] = RPG::EventCommand.new(opecode, 0, [treasure.id,0,0,1])
end
list[1] = RPG::EventCommand.new(250, 0, [item_se])
list[2] = RPG::EventCommand.new(116, 0, [])
end
list.push(RPG::EventCommand.new)
command = RPG::MoveCommand.new
command.code = 14
command.parameters = [0,0]
route = RPG::MoveRoute.new
route.repeat = false
route.list = [command, RPG::MoveCommand.new]
page = RPG::Event::Page.new
page.move_type = 3
page.move_route = route
page.move_frequency = 6
page.always_on_top = true
page.trigger = 1
page.list = list
page.through = true
page.condition.variable_id = 10000
page.condition.variable_value = 100 + (40 * MOG::XAS_ICON_ERASE_TIME)
event = RPG::Event.new(self.x, self.y)
event.pages = [page]
token = Token_Event.new($game_map.id, event)
token.icon_name = treasure.icon_name
$game_map.add_token(token)
end
end
end
end
#===============================================================================
# Game_Event
#===============================================================================
class Game_Event < Game_Character
include XAS_BA_ItemDrop
end
#===============================================================================
# Game_Character
#===============================================================================
class Game_Character
attr_accessor :icon_name
end
#===============================================================================
# Sprite_Character
#===============================================================================
class Sprite_Character < RPG::Sprite
attr_accessor :sprite_frames
attr_accessor :sprite_frames_refresh
attr_accessor :sprite_frames_blink
attr_accessor :sprite_y
#--------------------------------------------------------------------------
# 初始化
#--------------------------------------------------------------------------
def initialize(viewport, character = nil)
super(viewport)
[url=home.php?mod=space&uid=2631396]@character[/url] = character
@sprite_frames = 0
@sprite_frames_refresh = 0
@sprite_frames_blink = 0
@sprite_y = 0
end
#--------------------------------------------------------------------------
# 浮动图标刷新
#--------------------------------------------------------------------------
def icon_float_update(icon_ch)
if MOG::XAS_ICON_FLOAT == true
self.sprite_y += 1
if self.sprite_y < 3
self.oy = icon_ch + 1
elsif self.sprite_y < 6
self.oy = icon_ch + 2
elsif self.sprite_y < 9
self.oy = icon_ch + 3
elsif self.sprite_y < 12
self.oy = icon_ch + 4
elsif self.sprite_y < 15
self.oy = icon_ch + 3
elsif self.sprite_y < 18
self.oy = icon_ch + 2
elsif self.sprite_y < 21
self.oy = icon_ch + 1
else
self.oy = icon_ch
self.sprite_y = 0
end
else
self.oy = icon_ch
end
end
#--------------------------------------------------------------------------
# 闪烁图标刷新
#--------------------------------------------------------------------------
def icon_blink_update
if MOG::XAS_ITEM_BLINK == true
self.sprite_frames_blink += 1
if self.sprite_frames_blink > 30
self.sprite_frames_blink = 0
end
if self.sprite_frames_blink > 15
self.opacity = 255
else
self.opacity = 125
end
end
end
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
alias xrxs_charactericon_update update
def update
xrxs_charactericon_update
if @character.throw_on == true
self.z = $game_player.screen_z + 32 + $game_temp.extra_z
else
self.z = @character.screen_z(@ch) + $game_temp.extra_z
end
if @character.is_a?(Game_Player)
if $game_system.fly == true
self.z = 999 + $game_temp.extra_z
else
self.z = @character.screen_z(@ch) + $game_temp.extra_z
end
end
if @character.icon_name != nil
@icon_name = @character.icon_name
self.bitmap = RPG::Cache.icon(@icon_name)
self.src_rect.set(0, 0, 24, 24)
self.ox = 12
self.oy = 24
self.z = 1
end
self.sprite_frames_refresh += 1
if self.sprite_frames_refresh > MOG::XAS_ICON_REF
self.sprite_frames += 1
self.sprite_frames_refresh = 0
end
if @character.icon_name != nil
@icon_name = @character.icon_name
self.bitmap = RPG::Cache.icon(@icon_name)
icon_cw = self.bitmap.width
icon_ch = self.bitmap.height
icon_react_x = self.bitmap.height * self.sprite_frames
if icon_react_x < icon_cw
self.src_rect.set(icon_react_x, 0, icon_ch, icon_ch)
else
self.src_rect.set(0, 0, icon_ch, icon_ch)
self.sprite_frames = 0
end
self.ox = icon_ch / 2
icon_float_update(icon_ch)
icon_blink_update
end
end
end
#===============================================================================
# Interpreter
#===============================================================================
class Interpreter
#--------------------------------------------------------------------------
# Command_126 (物品)
#--------------------------------------------------------------------------
def command_126
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_party.gain_item(@parameters[0], value)
gold_effect = XAS::ITEM_GOLD_EFFECT[@parameters[0]]
exp_effect = XAS::ITEM_EXP_EFFECT[@parameters[0]]
ap_effect = XAS::ITEM_AP_EFFECT[@parameters[0]]
condition_effect = XAS::ITEM_CONDITION_EFFECT[@parameters[0]]
recover_hp_perc_effect = XAS::ITEM_DAMAGE_HP_PERC_EFFECT[@parameters[0]]
recover_sp_perc_effect = XAS::ITEM_DAMAGE_SP_PERC_EFFECT[@parameters[0]]
actor = $game_party.actors[0]
if gold_effect != nil
damage_item = gold_effect.to_s + " " + $data_system.words.gold
$game_party.gain_gold(gold_effect)
$game_party.lose_item(@parameters[0], value)
elsif exp_effect != nil
damage_item = "EXP" + " " + exp_effect.to_s
last_level = actor.level
actor.exp += exp_effect
if last_level < actor.level
$game_system.se_play(XAS_BA::LEVEL_UP_SE)
$game_player.battler.damage = XAS_BA::LEVEL_UP_TEXT
$game_player.battler.damage_pop = true
$game_player.need_refresh = true
$game_player.animation_id = XAS_BA::LEVEL_ANIMATION_ID
$game_temp.ifw_text = "Level UP!!! - L " + actor.level.to_s
$game_temp.ifw_active = true
$game_temp.slow_motion = 30 if XAS_BA::LEVEL_SLOW_MOTION == true
if XAS_BA::LEVELUP_RECOVER == true
actor = $game_party.actors[0]
actor.hp = actor.maxhp
actor.sp = actor.maxsp
end
end
$game_party.lose_item(@parameters[0], value)
elsif ap_effect != nil and $mog_rgss_ap_parameter != nil
damage_item = ap_effect.to_s + " " + MOG::AP_NAME
$game_party.gain_ap(ap_effect)
$game_party.lose_item(@parameters[0], value)
elsif condition_effect != nil
damage_item = ""
actor.add_state(condition_effect)
$game_party.lose_item(@parameters[0], value)
elsif recover_hp_perc_effect != nil
damage = actor.maxhp * recover_hp_perc_effect / 100
damage_item = damage
actor.hp -= damage
$game_party.lose_item(@parameters[0], value)
elsif recover_sp_perc_effect != nil
damage = actor.maxsp * recover_sp_perc_effect / 100
damage_item = $data_system.words.sp + " " + damage.to_s
actor.sp -= damage
$game_party.lose_item(@parameters[0], value)
end
animation_item = XAS::ITEM_ANIMATION_ID[@parameters[0]]
@actor = $game_party.actors[0]
unless $game_temp.message_window_showing or
@actor == nil
item_name = load_data("Data/Items.rxdata")
if damage_item != nil
$game_player.battler.damage = damage_item
$game_player.battler.damage_pop = true
elsif MOG::XAS_ITEM_NAME_POP == true
$game_player.battler.damage = value.to_s + " x "+ item_name[@parameters[0]].name rescue nil
$game_player.battler.damage_pop = true rescue nil
$game_player.battler.item = true
end
if $mog_rgss_active_hud != nil and
damage_item == nil
$game_temp.hud_face_type = 1
$game_temp.hud_face_refresh = true
$game_temp.hud_face_time = 0
$game_temp.hud_face_time2 = 30
end
if $mog_rgss_xas_action_name != nil
if damage_item == nil
$game_temp.if_text = "Got " + value.to_s + " x " + item_name[@parameters[0]].name
$game_temp.if_text_time = 40 * MOG::IFA_TIME
$game_temp.if_start = true
elsif gold_effect != nil
$game_temp.if_text = "Got " + gold_effect.to_s + " " +$data_system.words.gold
$game_temp.if_text_time = 40 * MOG::IFA_TIME
$game_temp.if_start = true
end
end
if animation_item != nil
$game_player.animation_id = animation_item
end
end
return true
end
#--------------------------------------------------------------------------
# Command_127 (武器)
#--------------------------------------------------------------------------
alias mog_xas_ani_item_command_127 command_127
def command_127
mog_xas_ani_item_command_127
@actor = $game_party.actors[0]
if @actor != nil
if $mog_rgss_xas_action_name != nil
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
item_name = load_data("Data/Weapons.rxdata")
$game_temp.if_text = "Got " + value.to_s + " x " + item_name[@parameters[0]].name
$game_temp.if_text_time = 40 * MOG::IFA_TIME
$game_temp.if_start = true
end
if MOG::XAS_ITEM_NAME_POP == true
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
item_name = load_data("Data/Weapons.rxdata")
$game_player.battler.damage = value.to_s + " x "+ item_name[@parameters[0]].name rescue nil
$game_player.battler.damage_pop = true rescue nil
$game_player.battler.item = true rescue nil
end
end
end
#--------------------------------------------------------------------------
# Command_128 (防具)
#--------------------------------------------------------------------------
alias mog_xas_ani_item_command_128 command_128
def command_128
mog_xas_ani_item_command_128
@actor = $game_party.actors[0]
if @actor != nil
if $mog_rgss_xas_action_name != nil
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
item_name = load_data("Data/Armors.rxdata")
$game_temp.if_text = "Got " + value.to_s + " x " + item_name[@parameters[0]].name
$game_temp.if_text_time = 40 * MOG::IFA_TIME
$game_temp.if_start = true
end
if MOG::XAS_ITEM_NAME_POP == true
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
item_name = load_data("Data/Armors.rxdata")
$game_player.battler.damage = value.to_s + " x "+ item_name[@parameters[0]].name rescue nil
$game_player.battler.damage_pop = true rescue nil
$game_player.battler.item = true rescue nil
end
end
end
end
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |