| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 7 |
| 经验 | |
| 最后登录 | 2026-11-21 |
| 在线时间 | 2185 小时 |
- 梦石
- 0
- 星屑
- 687
- 在线时间
- 2185 小时
- 注册时间
- 2009-12-6
- 回帖
- 571

|
发表于 2012-4-15 18:26:59
|
显示全部楼层
[pre lang="ruby"]% Z3 V5 x4 o. o( I
# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
! p; w) N& R! k. p/ N#===============================================================================
1 z# d% N x* I4 V( e# BATTLER / SENSOR RANGE / PLAYER COMMANDS / ENEMY COMMANDS
1 l( Z$ V7 s2 y6 k, R& ?#===============================================================================" E% x: K' s+ h
# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
4 C6 n( k& E* @
. I1 @ Q) P5 T6 e
$ f+ [2 z- M. k# ?% h5 t
( j/ \8 I/ z2 H; i/ a" o
( f+ R0 u/ ~3 a- O$ ?0 o' K#===============================================================================
* E- Q( s' w) q x# ■ SENSOR ( V7 ^8 }# Z* P0 G5 n
#===============================================================================
6 v* m$ u8 z X; L Dmodule XRXS_EnemySensor1 s r+ \2 X8 ~& H; I+ s# b
$ }- R f' ^$ Y+ p- K #--------------------------------------------------------------------------
. n' a4 s8 d$ s/ O# p# C # ● Update Sensor
% a6 l8 N) S9 _) w0 k! k #--------------------------------------------------------------------------
% F" i6 W* I2 b9 f# S def update_sensor$ \. [. z O) w, p; h3 P
return if self.dead? or self.erased or self.tool_id > 0
+ d7 y3 _" R. ?* t2 z( l if self.battler.is_a?(Game_Actor); u* c7 B9 k1 Q& l
enemy_sensor = 4% ]% Q% p3 U0 I
else
& _' w0 H+ C# s( y8 i5 H enemy_sensor = XAS_BA_ENEMY::ENEMY_SENSOR[self.battler.id]: Y+ Q& U$ u# A# g& k( v8 R& x; v" g
end
9 s2 Q$ k% l3 W* ^% ?$ a if self.battler != nil and self.battler.sensor_range > 0
* M8 _0 H8 V v3 N J( ` @sensor_range = enemy_sensor 0 _8 i+ O' R8 j7 v: _! r
else 8 j3 I& h6 @ o$ i1 y; Q1 }2 R
@sensor_range = $game_variables[XAS_BA_ENEMY::DEFAULT_ENEMY_SENSOR_VARIABLE_ID]
; c( i5 T6 ]" x( k+ G end ( W7 @. k/ c3 _* ?" j' p" D! c
@sensor_range = -1 if self.battler != nil and cancel_sensor?
" [( P' k9 P j5 [! e+ H1 y distance = ($game_player.x - self.x).abs + ($game_player.y - self.y).abs
* b0 y A" f3 N enable = (distance <= @sensor_range)
- x8 E# O7 N: X) F z s$ ` key = [$game_map.map_id, self.id, XAS_BA::SENSOR_SELF_SWITCH]
# _2 A5 W, k+ E' h* e9 I" o- K m1 g# X last_enable = $game_self_switches[key]
) ` Z$ k7 D" J" y last_enable = false if last_enable == nil+ J9 y1 K$ a9 {) I4 T
if enable
' [2 k) R3 Z" j6 `& ? self.range_type = 0
: r! e+ K$ T5 g g* F else ; I' y; ]+ p, D& K4 M. m; y5 v) A* T" z
self.range_type = 1
' ]! Y K7 u' s" K2 `# z' S end + v7 G# ]* I8 Q/ P* q, W% F; v
if enable != last_enable( @; W8 X o; z$ T* [$ A
self.action_times = 0! W8 n$ N3 P7 G0 K- t( |1 e
$game_self_switches[key] = enable
8 g7 i/ U! f8 u. C. m attack_off if self.battler != nil
! U. H+ w0 Z; W. L self.refresh
/ n: v8 f4 G5 |$ a* V end9 E9 t: a4 T/ s+ o" A$ P& p' B
end9 V5 e; z, I [1 @- C1 c* a0 i5 q
) X1 K E% [; |( s
#--------------------------------------------------------------------------
. W( }0 k3 l# o- @1 J3 U1 Y# a1 m # ● Cancel Sensor, x" A0 E5 [, Z5 i
#--------------------------------------------------------------------------
% |6 R4 j' W! c5 } G9 v% f( u def cancel_sensor?4 S7 l, W3 J5 w( q0 s
return true if @actor == nil
- a( n7 _! j7 z# g! y v return true if self.knockbacking?) g5 U$ J( e3 I' z% w( G
return true if self.throw_active
2 `, }* L# I1 `7 D: G0 K7 y4 x+ y- p* o return true if self.battler.e_passive 2 y+ _4 ]( w9 U
return true if self.battler.stop$ w, z8 K' ~! u0 x9 A) }# M1 ^
return true if self.battler.state_sleep % `7 t- O- A( M: s. E
if self.battler.sensor_range < 15) x1 j4 r+ x- ?& u
return true if self.battler.state_cancel_sensor! r7 E4 H: N4 j3 }' _+ X
return true if $game_player.battler.state_cancel_sensor
* I0 \1 j# f4 R/ q end
# ~' j1 E0 A9 A; q8 t return false 9 h7 H3 ^) b# r2 y1 |
end' _6 p1 q/ p- r' k
end 0 n" _# h$ ^" q" T& h- K
4 Q1 a+ t4 r& F* ]#===============================================================================
( O3 i- r! A8 d9 K+ m! j J7 h/ S# ■ Game_Event
( t+ }/ M" v$ O#===============================================================================& b; y% M! p/ y3 R& F
class Game_Event < Game_Character
3 A$ _7 T- H7 Z$ [! }" U include XRXS_EnemySensor6 B6 D+ H) {& T8 j8 i: i/ s6 m
end
2 ^% T: e8 R* n4 ~- u
! k8 ?7 @4 z( e8 J3 F* v, y& o. G* V# Z) [: }/ \) R
3 `9 l5 F% I) B1 E ~4 e0 C& j
! t6 d) U0 `" O( [0 |9 A( }" B* f3 r4 o& L6 H$ v H
#===============================================================================
- ?) m. i. P: k# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
0 H& {8 Z" d( H U/ n, L# CT METER
1 |1 N6 B2 z: |! v( U6 n- |# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■4 Q+ l, f6 E9 I7 u# x2 `; p
#===============================================================================
V" K( ]; e1 T9 |- l5 o d1 R' r5 x3 F2 I* a. T& z
#===============================================================================
( V& b0 W6 Q) C# t# ■ GAME_PLAYER
' z0 T3 {; k# N I7 U#===============================================================================
- L) K9 T% ^0 G$ gclass Game_Player < Game_Character
' [% q8 Q- k+ f- H" Y: J9 G" U4 W. Z
7 M. I2 m6 `- K! U' _ #--------------------------------------------------------------------------
# X3 J3 @2 T" X$ p/ V # ● Update CT Meter Speed
6 \, Z8 t4 _" O* [/ Z: p* \! q #--------------------------------------------------------------------------
" b/ x* k! f4 j def update_ct_meter_speed
1 U* y5 z4 ]4 h# F return if $game_switches[XAS::CT_DISABLE_SWITCH]* U4 C3 T9 z/ T2 v/ ~* M) C
if self.battler.state_ctdown
( ~+ a" M* s; q' Q ct_meter_limit = XAS::CT_METER_SPEED * XAS::CT_POWER $ h+ R, r! n# m$ d
else
$ X ^1 S' n" N2 c [9 p ct_meter_limit = XAS::CT_METER_SPEED
; D7 B8 O2 ^7 {7 f. C end
. b% A6 q6 v8 ] $game_system.action_meter_refresh += 1; I5 I) L% T$ X6 M& |; o$ U* }: Z r
$game_system.action_meter_refresh = 0 if $game_system.action_meter_refresh > ct_meter_limit $ S4 R! h5 O$ @
if self.battler.state_ctup
; `- E. n4 P7 \4 B( w/ n& _ ct_speed_down = 1
$ `# K4 \& c+ o/ i1 `# ] ct_speed_up = XAS::CT_POWER
% d5 d5 g% ^: t) X3 P' p ct_speed_up = 0 if $game_temp.xas_charge_time > 53 p0 G% _- K5 k1 I5 D; E
elsif self.battler.state_ctdown
+ m* t+ L+ Y; E* }8 A; d& B ct_speed_down = XAS::CT_POWER
6 a+ ^$ f5 g. X3 C ct_speed_up = 1
7 p2 j' L1 X, y2 _- l" S2 G9 ~ ct_speed_up = 0 if $game_temp.xas_charge_time > 5
' |3 ?2 x, ~# [' _9 n' p/ f else
) x9 ]& t9 M) @% j ct_speed_down = 1
9 u) z3 B! ? x/ d$ m" B$ y' \ ct_speed_up = 10 h% m; K- k9 D; f. D! r
ct_speed_up = 0 if $game_temp.xas_charge_time > 5% B; n3 u; R, m
end
& B: l$ O8 c5 O$ B% K6 P0 x if Input.press?(XAS_COMMAND::DASH_BUTTON) or can_shield?(0)
8 j( k" v! ]5 s. \ if $game_system.action_meter_refresh == 0
2 b& E& h; D% w8 r6 K! B $game_system.action_meter -= ct_speed_down if $game_player.action == nil) l% p8 ~& ]% Y% j, C) _
end C+ A+ x5 Q7 F9 K* ^2 Z
else # ^$ ~5 |3 Z+ @/ \! w+ i
if $game_system.action_meter_refresh == 0 and not can_shield?(1) & _1 ^7 ^ _5 P/ ?
$game_system.action_meter += ct_speed_up
. ^' U' h6 K; q+ g# g) j; q& v end& H5 \+ j5 n- p/ M+ Q
end5 z6 g! P( C& o/ _6 }. } \: F
end : {% m: S u( t; N
, _3 {; ^, n* @$ d& X, Z
end ( V1 B) _( n) k
( Y n2 ?7 c+ \* |5 u; H
- G; v5 L. z: B, P, A
( V9 d/ u- K/ v3 l, J5 G! p5 ~
2 l7 T! T7 S: S5 t+ [! t
7 W6 Q8 a! P0 b2 ~8 c% M- B' y* [6 t. r# {0 A4 f q
$ ]$ H8 r# K$ a+ A( X; r
# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■4 T, U6 K$ @, k7 \* I
#===============================================================================
1 Q) Z. D z( L2 A0 o* y, }2 t# COMMAND. V0 N c" c9 \8 L# q8 m7 K
#===============================================================================; {& A t! q! n# D
# ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■4 e& B- {% _- |$ V# [* I# {6 p
4 q2 T& v& R {% @2 S
class Game_Player < Game_Character
% `$ O4 T" `2 g4 V #--------------------------------------------------------------------------
5 K& O. r2 ^+ O7 ?6 i8 b7 m# _) } # ● Update Command
3 {* m# _( e2 |4 Q0 l0 { #-------------------------------------------------------------------------- / I/ ?2 |0 }2 Z) h
def update_command
& a6 g8 f U/ r& H if Input.trigger?(XAS_COMMAND::ATTACK_ACTION1) 4 W/ u+ B/ t2 A) h. C j
active_attack #ATTACK
2 y& `: g: i! U9 ^1 A elsif Input.trigger?(XAS_COMMAND::SKILL_ACTION) or $command_skill != 0
& D$ r: G. J4 S active_skill #SKILL
" p, b$ x3 z9 Q% e9 M" S, b/ M4 ` elsif Input.trigger?(XAS_COMMAND::ATTACK_ACTION2)
8 W& v/ @$ d9 n9 C" y/ Z/ K _ active_shield #SHIELD
/ [$ W9 E+ ]1 | elsif Input.trigger?(XAS_COMMAND::ITEM_ACTION) or $command_item != 08 C- }8 d1 z. h+ u
active_item #ITEM
; Y, a2 O: T4 A$ F1 J elsif Input.trigger?(XAS_COMMAND::DASH_BUTTON)
& f$ G; b) i( O0 I0 [+ L W active_dodge #DODGE' d+ |8 Y- G$ I4 F7 @/ S1 ?
elsif Input.trigger?(XAS_COMMAND::SKILL_CHANGE)
0 e( R2 Q# I& l& I if $game_system.quick_menu and can_call_menu? #Quik Menu Skill # B" h7 O8 {$ V: W
$scene = Quick_Menu_Skill.new6 s4 A7 E- ^& C4 T) H) j, z
else 6 q9 p6 m) ]) u) c& w9 c" a
active_change_skill #Change Skill
+ @/ M; F5 ~: `3 d end + \ X. y! v, e
elsif Input.trigger?(XAS_COMMAND::ITEM_CHANGE) ' [6 g+ r7 z5 i8 d* c* T( N
if $game_system.quick_menu and can_call_menu?
4 S; \6 u5 A' C0 f $scene = Quick_Menu_Item.new #Quik Menu Item $ E \: Z) U4 V: Z. x" ~ g
else: i1 U3 ], x; u/ A$ N7 q, ^9 d
active_change_item #Change Item % m5 F' ]/ e6 C" a
end 8 m/ s* i0 l w! m4 _8 |2 F7 M
end U( n4 ^; x3 n- @+ z: p9 i
end
5 i4 j( i* S" u, H' p/ e
- m& u- d- s, J; m2 _ #--------------------------------------------------------------------------
) X) B s/ T5 V& w( k, g # ● Can Action
% H! t7 C# X) M+ s2 ` #--------------------------------------------------------------------------
6 y( a t" j) I8 k ^# {! ` def can_action?& h' O7 p$ s7 W3 C* ]2 D( C+ u" ]
return false if self.action != nil0 I3 L" _$ q# @9 `' |
return false if self.knockbacking?0 D0 v6 d6 X5 b" B0 K# r& H3 W- K
return false if $game_temp.xas_charge_time >= 10
- W7 ?9 C- `. k7 V return false if $game_temp.cast_time > 0 E% m6 B. B5 \) n
return false if jumping?& f) S* X. |8 w
return false if $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == true: H# F6 K, ~9 Y+ @0 s3 v
return false if $game_temp.lock_command ; W, s2 s! {0 S1 ^1 M6 h
return false if $game_system.fly0 x6 l1 I, u, X" d. |. V
return false if @swimming 2 i3 b7 n: D+ ~9 O j
return false if @pickup_lock ' `. \2 B! x. p5 z' @# y$ F7 @
return false if @pickup_lock_time > 0 : a2 Z: t- m2 _/ L5 N% Z# f
return false if terrain_tag == XAS::FALL_TERRAIN and @fall_safe_time == 0
& |% N8 {: N$ D1 L p return false if terrain_tag == XAS::SLIP_TERRAIN
2 Q a2 x/ t! q& I$ h3 l return false unless $game_temp.hook_x == 0 and $game_temp.hook_y == 0 5 ]2 v( c2 n5 Q# }
return true9 k6 l) k: a; m2 O4 ^8 X, c; S
end
6 z* b( b0 s* d/ f" U9 s2 i
4 J: E' m3 G/ b% B0 f#-------------------------------------------------------------------------- H! W6 [3 g: \! x
# ● Check Combo
' Q* n( U% n8 Z#--------------------------------------------------------------------------. V6 v d* n, N/ w0 ?- C0 r
def check_combo(action_id,type)' v9 U# r. Y# ?, b, Y I
combo_id = Database_Bullet::LINK_ACTION_ID[action_id] # h6 O8 `; Y r8 U9 W0 u3 l
return false if combo_id == 0
3 j2 u4 E. l# G% J8 ^+ D+ k0 w combo_time = Database_Bullet::SUFLAGS[action_id] + XAS_SKILL::COMBO_TIME
% _+ H0 P+ F5 Z8 |8 m0 c3 t" b case type
3 C0 Q9 Z* i- t5 [! L0 q# k when 1 #Attack
F- A9 L1 z( g5 E; N8 {. S $game_temp.xas_combo_attack_id = combo_id
0 p& w' @" G( v; V $game_temp.xas_combo_attack_time = combo_time
7 G: r I* s3 | $game_temp.xas_combo_skill_id = 0) Z: Y2 W) f' z5 O
$game_temp.xas_combo_skill_time = 08 M G' \* |1 Y% R$ _
$game_temp.xas_combo_item_id = 0
q+ C( j; Z2 X# `" Q $game_temp.xas_combo_item_time = 0 8 l) g D ^8 R; Q: }$ |5 c
when 2 #Skill
r: X( O, m0 _+ m& p $game_temp.xas_combo_attack_id = 0
# E0 L) u, [1 O# X9 M! j $game_temp.xas_combo_attack_time = 0- P0 r* p4 A1 c/ C3 v
$game_temp.xas_combo_skill_id = combo_id
5 @' C+ s6 T6 M4 ~& x $game_temp.xas_combo_skill_time = combo_time
+ {/ c7 Q% |0 \6 t# ]4 s0 ` $game_temp.xas_combo_item_id = 0
# \- s1 {0 Z$ ^- c0 t% z& F $game_temp.xas_combo_item_time = 0 " L$ @4 t+ \. Z, J* C2 x. Y
when 3 #Item
# C- {8 O: k. A $game_temp.xas_combo_attack_id = 0
) l0 B! Z6 P& |& {$ I6 r $game_temp.xas_combo_attack_time = 0
# _1 ?9 b. ^+ p $game_temp.xas_combo_skill_id = 0 P* a- C" y& v- x2 X
$game_temp.xas_combo_skill_time = 0
: l8 B# `7 x) O/ A/ w1 p# _! \ $game_temp.xas_combo_item_id = combo_id
7 {# n0 H' a8 x4 L; y* r $game_temp.xas_combo_item_time = combo_time . F1 v2 M9 C9 _0 I& \
end & L, k/ S# c! o9 n' U
end 2 u$ W1 l, }6 s0 X
K) f5 J5 O q: i5 r/ U G) t#--------------------------------------------------------------------------& r6 K$ w/ C$ z$ s" h4 T" K
# ● Cast Action ?" ^+ R# T) m, s
#--------------------------------------------------------------------------
% h! `1 z7 F$ d4 Y" j" } def cast_action?(action_id,type)
+ J8 o# G6 r7 Y4 P; e cast_time = Database_Bullet::PLAYER_CAST_TIME[action_id] % o$ M- R4 {! I+ Y z# s' T5 u
return false if cast_time <= 0
" F+ B1 J, M6 b2 l! Y( x return false if $game_temp.cast_skill_id != 0: Q. h9 }* K7 T" M3 k% }! f
return false if $game_temp.force_action_now_id != 0 or $game_temp.force_action_id != 0
/ `/ w0 h I! m; K1 j( X# U $game_temp.cast_type = type
' L" V6 ^: G7 K6 w: g# l% T- [- ~ skill_id = action_id
2 q/ L0 e/ j1 m1 r3 ^' x' Q skill = skill_id == nil ? nil : $data_skills[skill_id]6 X6 V9 l I0 f/ S0 V w
sp_cost = skill.sp_cost # R& g6 e# {- H1 t; U$ T$ b4 Y
if @actor.sp >= skill.sp_cost X( I# L) r6 z3 G9 p! G9 y8 n
$game_player.animation_id = XAS_SKILL::DEFAULT_CAST_ANIMATION_ID ' K2 [0 j) L1 M O
end
# G5 y1 o1 `7 `3 R3 i) {9 `/ j1 j$ y $game_temp.cast_skill_id = action_id5 p! k" R) A5 t
$game_temp.cast_time = 10 * cast_time
) O/ D3 e) D; K' s* n% M1 u return true
4 H% n1 u. D7 ]' A6 @ end
4 z2 s1 A! h/ v) x5 f0 q0 ?& F( \ ]1 s
#--------------------------------------------------------------------------
' H% k9 J2 l v/ x) {8 D" H# ● Can Target?6 m$ x" Q9 N- ^* J+ Y9 L# ?
#--------------------------------------------------------------------------
' ^6 L0 ?7 V9 \9 x" v" \1 ]" ] def update_shoot_on_target
T4 _, a8 w, e5 E return if $game_temp.xas_target_time == 0
% k( j' O! A: T, ~/ T0 B return if $game_temp.xas_target_shoot_id == 0# N- P% h8 ?9 g, W1 @+ e
return if $game_temp.xas_target_x == 0 and $game_temp.xas_target_y == 0 ; R; c+ p% ]1 w7 u1 O- N
$game_temp.xas_target_time -= 1! Q0 K% J+ C* Q" |
if $game_temp.xas_target_time == 00 Z2 W2 {0 O2 s _& `' k5 f2 c
self.shoot($game_temp.xas_target_shoot_id) 7 [% p3 P5 }/ z" R$ ^; B6 a. `
$game_temp.xas_target_shoot_id = 0
" }9 z, q1 k$ m ]% [* v1 d" g end
1 s0 |0 N7 l& v3 h4 @( v, @ end
& j1 {5 e# G$ r; f' u, e/ {! r
2 v: i( \: T& R#--------------------------------------------------------------------------( Y8 L3 [2 w R: V2 l* j
# ● XAS - Button SKILL
% c& R& e: s2 h3 z#--------------------------------------------------------------------------
+ n; L6 Y: J' r a( K1 G' P def active_skill7 ]) G- W: x h f" J0 L# B3 J8 c( ^
type = 2$ u: H& J) l7 Z( G% S
if seal_state?(type) 4 t6 n k2 I3 v. ?* o/ `2 g+ u9 w
seal_text. ?' N& q( \) `6 J* a
return
" C5 h1 ]5 z0 t' H* W- o end8 b. X7 M; }3 S8 h% O6 q
if $game_temp.xas_combo_skill_time > 0 1 H" [1 J& u: z& g/ u$ | m
action_id = $game_temp.xas_combo_skill_id! V9 B) Y- W/ _5 b% q( `
else" H, d4 Y H, ?( h2 g
if $command_skill != 0
1 n* a+ Q( b0 E* J: O: d0 }' R1 N action_id = $command_skill;$command_skill = 06 |3 r e$ F, @6 Z; c- ^) h1 @
else
, F1 U0 { k; Q: a8 P0 V/ u action_id = $game_system.xas_skill_id( t j. Z% J+ o, v$ w9 {( ?0 }
end
+ X( i) \ t5 C" c6 z" C( l end
. d8 A, B" t( L+ y
8 H% e" {. b- @: g8 h6 I return false unless check_action_exist?(action_id)
3 _0 Y1 z3 P, z4 ^: `# _) U1 E" l check_combo(action_id,type)$ Y! o S6 y( v& f5 o* a
return if cast_action?(action_id,type)
. b& i4 e9 W# Y8 @" _ self.shoot(action_id)* ~- R/ R o0 g# M
end
1 k& N% N! i8 C$ P* u) E: L H/ ` A$ S; D/ s
#--------------------------------------------------------------------------) _' z, q$ `! F3 M1 k( L7 c
# ● XAS - Button Attack1 ~6 x7 F0 E: p
#--------------------------------------------------------------------------
6 f' i9 l. R( b7 } n def active_attack( O6 ~( N3 j, L0 g' ^
type = 1" w8 `- |" B2 v9 V3 j% Z
if seal_state?(type)
C5 n' X# K0 y- a. U seal_text/ j6 W& ?! C" u- U
return
1 W! K( ?4 ^; Z, m end 1 S, \' M9 Y+ M' m( k' @6 K
if $game_temp.xas_combo_attack_time > 0 " E$ F. [" R# G4 g( q1 n* M7 F
action_id = $game_temp.xas_combo_attack_id+ ~( @% }9 ]( {% q ?4 \
else3 |0 c: p* a& W# v: W
action_id = $game_system.xas_action_slash_id
, `( Y$ @) X+ S end
- o+ L6 w+ m. p9 C$ Z! g return false unless check_action_exist?(action_id) / T+ E) l, F3 o" O0 {
check_combo(action_id,type)
' s, S* l, w' R% t: j5 p5 T return if cast_action?(action_id,type) 1 @* P3 @; O* G) B L/ a
self.shoot(action_id) 4 E# N$ ?0 q+ u5 j4 G5 t" U$ m
end
/ }+ H% h T0 X0 b. t: T7 ~3 @' Q5 {" ~
#--------------------------------------------------------------------------
) ^# k" h% i; ], d; _ s# ● XAS - Button Shield
7 M) ^/ N" T( g7 Z7 m8 C! }#--------------------------------------------------------------------------
% p6 S# I5 L- U% a def active_shield
5 r L- ?" d/ z6 p+ B type = 1
3 n+ I) E8 ?- K% T+ M0 ` if seal_state?(type) 5 \' B* H; N' o
seal_text
- T' q+ m/ R% l ~ return6 ]7 s) C& I" w
end $ p. w7 z/ v1 Z! \; B2 _4 P/ i
action_id = $game_system.xas_action_slash_id2 }5 l3 t _. E$ }
return false unless check_action_exist?(action_id) % G$ W5 \( E2 V8 J7 o) C
return if cast_action?(action_id,type) * m7 }# i5 G+ J8 @- ~4 Y' z
self.shoot(action_id) 7 ?" A% z4 s" [
$game_temp.clear_setting3+ y# U s- W/ ~& G- Q5 q( x
end
' o9 X+ K% s9 b, S9 \" N$ I) o* l7 {) ~& a; g- h4 A" ^3 o, E
#--------------------------------------------------------------------------
^$ j2 o) i- L, o! s U# ● XAS - Button Item
1 b% i/ V# N( U$ B, J#--------------------------------------------------------------------------
# m" ^( M! ^1 Y$ v/ J. U/ m$ I def active_item
( D) [6 z4 R* Q; ] [+ |- k) K2 V6 n type = 35 S# p# ?& V- t8 }
return if ($mog_rgss_xas_extra_skill != nil and Input.press?(Input::L))
2 D! r" b' E) f$ O \, a if seal_state?(type) * R- z, ]( h$ L6 B0 K" s+ t& q' G
seal_text0 d9 Z `9 S: x
return: N( b& K& |! v4 g$ U7 S) o. z
end & r$ t! u1 t5 }' |
if $game_temp.xas_combo_item_time > 0
$ U4 h/ C; `: Y# f8 \8 w+ H action_id = $game_temp.xas_combo_item_id4 E6 g8 r/ o3 Y) ]$ b
else/ ]$ l( G7 t$ p+ N2 Z5 _
if $command_item != 0
: N3 N, a/ H2 {5 ]; j action_id = $command_item;$command_item = 0! S5 r& L9 ^2 ^) V! _% _* d
else
5 U* A* P1 y m- i. B action_id = item_tool_id = XAS::XASITEM_ID[$game_system.xas_item_id]
$ s. m% h) [3 G( J) r end
* D1 W! D0 e6 H U, H% M& {2 ? end' K5 K: N- A' x1 w* r% G
return false unless check_action_exist?(action_id)
8 |, @9 \* t7 n+ a ?5 W* l check_combo(action_id,type)
5 J4 t( w4 ^! h0 d0 T6 k& d' [ return if cast_action?(action_id,type)
! Y( h4 Q% W! }; W7 n. B self.shoot(action_id) & H S/ N( `0 s5 g B* A2 Y
end
; S* T5 i$ a8 J- h: K
a; \! k, ^5 W+ p4 e- S$ M #--------------------------------------------------------------------------
* U6 t. r5 t* q! Q/ P8 W # ● XAS - Dodge Efect
/ ~. X: V( K( j3 A# y5 I" l' m$ _9 M #------------------------------------------------ --------------------------
# D5 A* d F* D& Z5 r def dodge_effect - i# W" s3 Z3 H7 E7 k1 S/ f6 M
jump(0,0)0 B4 ^7 n/ m6 S3 _: d* g, R
@need_refresh_pose = true( ^; u0 h' ]( D6 m% R/ R$ k
$game_temp.dodge_time_real = 15
: n/ k) i+ ]6 A& B( E8 L4 V$ S9 _% L $game_temp.lock_command = true* S$ K" Q2 S& }0 s) x6 H
$game_system.se_play(XAS::SE_DODGE)! S9 \# j+ O! J8 [
$game_system.action_meter -= XAS::DODGE_COST" S7 [) P3 Z) {) P8 Z$ U
$game_player.animation_id = XAS::DODGE_ANIMATION_ID
# o: q% _( g( Q2 Z power = XAS::DODGE_RANGE : e: c. ~( `& Q- b* b+ {
power.times do
. l5 u! P. u8 _ move_backward# _$ R2 S: U" F) s
end c# p8 P: c, D* E1 x/ P
end # ^" v. c8 f' e$ q6 n
+ `' N) Q+ S& E" h
#--------------------------------------------------------------------------
$ x* s) r( B) t! p. Q # ● XAS - DODGE9 {4 ?8 x" l; B: t
#--------------------------------------------------------------------------
' X* u* `- O6 j+ B/ F6 ~6 Q' p) L def active_dodge " S9 N; I' }7 {+ {6 {& ^
return if XAS::DODGE_SYSTEM == false
; i2 K1 }% V. N. ~7 N& ^; \0 ~ return if $game_switches[XAS::CT_DISABLE_SWITCH]
% I9 U! y, o) ~* H8 [: x9 t if $game_temp.dodge_time > 0
" b" }. h6 ` k/ [ if $game_system.action_meter > XAS::DASH_ACTIVE_PERC 8 T( R3 n# {* R
dodge_effect / k+ F/ g: J3 M! p
else
1 a& ~1 Q R6 l7 b" X8 j $game_system.se_play($data_system.buzzer_se)
9 l# _ ~4 `' A5 W1 u$ b% W end
5 {5 x+ C3 _. P/ l3 b $game_temp.clear_setting2
* q9 A/ y% e7 P5 [$ y) } else
/ B5 L1 g: M( | $game_temp.dodge_time = 156 x% f1 v9 s4 X& a) B9 a
$game_temp.dodge = true 8 F% i# ?1 v% C! P. v0 ~! ?. D7 X
end
4 K; F) M1 L0 O0 x# E/ X2 e% O end& m! d ?- I: I# a. A8 M( d5 D, w' j
1 g; \3 K, a% h3 d" V#--------------------------------------------------------------------------
: C( n$ e- c4 s# ● XAS - CAST TIME: K- a( M4 R, W& g l
#--------------------------------------------------------------------------" r* Y' S; ~; b) q/ j3 F+ H+ V
def update_release_cast_action0 t2 R& y7 F* o2 B/ e. }
if $game_temp.cast_time == 0 and $game_temp.cast_skill_id != 0, I; C, h- ?" t
if seal_state?($game_temp.cast_type)
) g; u' K9 b5 J0 n seal_text# K y# A8 C- [; r& e5 S
return
2 E3 E' p! W( C7 Z end & l0 ^' e) v, M% v0 h ^! F
action_id = $game_temp.cast_skill_id/ V& O+ ]9 t( f: b% g
force_move = Database_Bullet::FORCE_MOVE[action_id] 6 F# ~2 `3 y( Q% K) G: H+ N* C/ e( L
@actor.hit_it = 1 if force_move != nil
, P; n. t' R: e W9 }/ ~# J; g self.shoot(action_id)
7 Z: R5 C& e. |8 N- \1 _( _ ' B5 g& P q, ]3 p: R' ]# h7 b2 D
$game_temp.clear_setting2
* ~4 D& n1 [2 z! {2 g end q- r& M- G2 W e5 I+ f! z
end 6 [1 \) l9 Q/ d1 y. x3 o* S
: F; S# L) q) j) w
#--------------------------------------------------------------------------- m! C( v( e |- f
# ● XAS - Change Skill3 I* ]5 P! k2 U; U$ X5 P) L
#--------------------------------------------------------------------------
, e2 v0 b. U! ]- n0 i6 o def active_change_skill
" N3 P% V7 r9 z3 P# O6 a @data = []
, |9 g8 W1 u5 h) g+ v4 b for i in 0...@actor.skills.size
; t0 x" f! k. g# I skill = $data_skills[@actor.skills]
6 @" {' v4 u1 M if skill != nil
9 \2 g& ^$ z& Z: L! M @data.push(skill)% s4 B/ p8 {6 h+ p* h* S
end2 \; Y+ q a; k" L+ U
end2 L1 B- k) G( P: }/ o
if skill == nil
0 c/ N- F6 g, h3 y $game_system.se_play($data_system.buzzer_se)
% i) f$ d5 f) g- L& u+ k; @$ y return
7 o4 P& e9 z9 j8 d end) S/ q4 T/ `% b4 o2 _: b
$game_system.xas_skill_index += 16 w4 `2 D! _! W+ u! n$ }! j6 h' K
if $game_system.xas_skill_index == @data.size
/ j7 i/ O7 A9 E% Y( C! Z $game_system.xas_skill_index = 0 2 }1 I% w2 ~9 w3 c2 s
end9 ?. u: K, k+ Z3 v
skill = @data[$game_system.xas_skill_index]& o# ]- V m+ a8 W
skill_action = skill.id
: K+ j3 g% \: ]4 Y9 x4 |' q $game_system.xas_skill_id = skill.id+ ]" g& @7 P' R/ b r+ `
$game_system.se_play($data_system.cursor_se)- s; z- |. g% b( S P
end
( C7 o, K, ~% D+ z% J, _ ' {& t8 A% W; S
#--------------------------------------------------------------------------, u+ ^4 [& i9 d5 u5 r. w$ M7 J9 K `
# ● XAS - Change Item3 N! G/ W6 \9 M
#-------------------------------------------------------------------------- " t1 k! c) ]* ~- V* e4 r* r8 @1 Z
def active_change_item
- l) c! ~+ U8 q7 F" e7 \ @data2 = []
0 R4 B" y- ^9 [* A' E& \, \ for i in 1...$data_items.size" ]7 w: l( k$ G" D* z
if $game_party.item_number(i) > 0 and $game_party.item_can_use?(i)$ v4 g" E5 _# h9 M8 x# R
@data2.push($data_items)
* l. E4 j7 `2 E5 @ end
: p& i% ]* A* q2 h end 2 s( A8 |4 Y1 g5 J4 P/ N8 h
item = @data2[$game_system.xas_item_index]
4 M6 M2 f2 u# g r( K& v3 s if item == nil
% ^& K; k# N* M' | $game_system.se_play($data_system.buzzer_se)
+ _" W; Q8 _/ y9 ~ return
0 m! r, B; B/ i5 c x5 f end
8 F# a4 V7 h* r7 D9 h) U# D( e. c $game_system.xas_item_index += 1
5 @( L1 K8 d* ~$ D" U if $game_system.xas_item_index == @data2.size 3 [1 U6 T& J# s3 w/ S' y
$game_system.xas_item_index = 0
. c+ D" E, n& _% h" U( F end
8 K+ s" K/ v( {1 M! I( _ item = @data2[$game_system.xas_item_index]
) k. q# I: O& b6 t2 g- _0 b. F item_action = item.id: Z/ Y) J" _. p0 k6 x
$game_system.xas_item_id = item.id* M7 p4 b0 e' \9 f0 e: _, e( X$ ^& L
$game_system.se_play($data_system.cursor_se)
/ g; F+ [1 |- O, o3 h end8 t2 y- X# |. O2 U- D
' z) J# U* P( p |#--------------------------------------------------------------------------3 K" b) r; t& J9 l
# ● XAS - Force_Action_Now, T0 ^& \6 p9 T; G" x7 m" R
#--------------------------------------------------------------------------1 Q3 C, l$ L# C1 B& ]1 D$ Q
def update_force_action R) z% u3 S8 K
if $game_temp.force_action_now_id != 0 and not2 X$ y# a7 k2 |% u4 O
(self.knockbacking? or @actor.state_sleep or @actor.stop)
$ m# k. v0 H9 o if seal_state?(0) 9 B$ ^$ S4 g: q
seal_text# e% v5 L$ V1 ~% Q* b. n& r- o
return false9 \6 ^+ t3 h1 V
end 4 M/ {' f5 d8 X- K! a1 b& Y2 ~8 y
action_id = $game_temp.force_action_now_id
5 [) ?; d& R$ h) b9 ^. S self.shoot(action_id)
+ I! u! z0 s( J K% ~) p elsif self.action == nil and $game_temp.force_action_id != 0 and not
4 ~% T6 o& g4 C% j# I$ B (self.knockbacking? or @actor.state_sleep or @actor.stop)
?' h# A& O! |- o1 l$ ^0 z' V0 ~% | if seal_state?(0) 5 j( Y, O0 l/ x% U
seal_text, B1 a. m: U4 E6 z {+ @
return false) M2 G- P4 n' i% G0 a
end
/ h! O, s Y0 W i; ? action_id = $game_temp.force_action_id( v. }2 Y* U" d: F/ [
self.shoot(action_id)
5 w1 o/ q+ t: T) f# P' O! K end 2 Z* k4 [7 E0 \4 ^! k
end 5 b5 Z2 `) z+ W# Y! V q
/ X, U- z5 E i. m#--------------------------------------------------------------------------+ V8 t1 x) s% l7 i) c, [
# ● Can Charge?
( H8 ~- e' k& D5 o6 y' x7 v0 O#--------------------------------------------------------------------------
$ F' Q5 M# [! A1 i: G$ u6 N5 bdef can_charge?
}. p2 t& o4 b/ A1 H5 N return false if $game_temp.cast_time > 05 c5 [5 k, y z& K; g3 o2 L
return false if seal_state?(0) 0 ?$ O) S/ _" p$ b
return false if $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH]
: e* \# S) F; b! K) R. T& b1 @ return false if @wp_tool_id == nil: I8 @" E2 B7 u' Z0 P, P- J
return false if @pickup_lock
# x! l5 v2 Z6 u. y return false if @swimming # z% h, W) q. d, S% U5 m
return true
, R z" P" K j) d8 u: }5 `! Hend
7 k' I1 z7 L' G7 ~( S
; X1 P- i2 o9 ^: ?" j#--------------------------------------------------------------------------
( l0 x8 [7 {) i4 p2 f# ● XAS - CHARGE * `. C9 G6 U ?& X( a* S" h# P
#--------------------------------------------------------------------------
6 q I0 s7 T6 Y: G, A& ^def update_charge_button2 u& _& [5 q7 f+ k
unless self.action != nil or self.knockbacking? 1 o; s \/ x) B! w
if Input.press?(XAS_COMMAND::SKILL_CHARGE) and can_charge? 6 r, k/ \% K9 l/ M
if $game_temp.xas_charge_time > 10% c9 R# Y( o' e) T- {
if MOG::FIXED_DIRECTION_SKILL.include?(@wp_tool_id)+ l3 Z8 z# c# G3 i' H' l: ~
@direction_fix = true , l" @/ }/ i7 ^0 h
@action_move_speed = -1
" \% v' P9 E- N$ L4 R2 H else
8 e0 [! J% g" M3 E @action_move_speed = 0+ U* y# B% m+ ?
end 9 g2 P9 T8 N) {+ B
end
% `! v, ~0 t$ S @wp_tool_time = WEP_CHARGE_TIME[@wp_id]
c# [/ R+ [6 g& F) w if @wp_tool_time != nil w+ T$ H0 G! v/ C% S$ G9 f( r& u$ }
$game_temp.xas_charge_time += @wp_tool_time if $game_temp.xas_charge_time < 100% ]" @$ e, r9 S" W0 ^! T
$game_temp.xas_anime_loop += @wp_tool_time ' r& S% w, @/ L4 i# u- G- L1 M
$game_temp.xas_anime_loop2 += @wp_tool_time # ?1 h3 c) N v( Z
loop = 40 * @wp_tool_time( a* ~: ]/ V4 x* }! k
else3 g* Y4 w8 t2 w
$game_temp.xas_charge_time += DEFAULT_CHARGE_TIME if $game_temp.xas_charge_time < 100 V6 S9 j$ {- N" k: T- u" r. G b
$game_temp.xas_anime_loop += DEFAULT_CHARGE_TIME , r% P, @+ f* f* t
$game_temp.xas_anime_loop2 += DEFAULT_CHARGE_TIME
+ ?. k8 j- u0 J( J, N. r loop = 40 * DEFAULT_CHARGE_TIME # y9 Q* F8 y# z; {* |
end
2 _+ [) h0 k, n0 g" A- [ if $game_temp.xas_anime_loop > loop
; _/ a, s. M" Z9 X/ Z if $game_temp.xas_anime_loop2 >= 100
0 f% H2 `# v+ R7 x. [1 H $game_player.animation_id = XAS_FULL_ANIME
4 y9 d# U- Q6 l; j else+ f: `" C8 s C9 `) y! C4 b& N
$game_player.animation_id = XAS_CHARGE_ANIME 1 z. k L* x2 C L
end/ ]8 @6 K& M1 Z2 O) L
$game_temp.xas_anime_loop = 0
1 W" u/ R9 M) s" V/ A' w( V9 E end 2 D$ u/ s* ^3 ?0 c; h
else+ u/ N+ h, s# k# v. z$ Q$ u4 P
reset_charge_mode(true)
* M! \# d, ~/ A, g8 B end
- V) c* s9 g! v0 d8 @ Kend2 E- L: y) X: i( ~( A6 s, x
end y( Z, c9 S+ O q K5 q& S
% ~5 L% A$ S: F) Q* r9 n#--------------------------------------------------------------------------3 g9 v" Z3 C8 w2 d
# ● Release Charge Update" z4 q9 E" s" X0 }: E) L F
#--------------------------------------------------------------------------0 b7 g( U, I7 Q. X# i* D' l
def update_release_charge 6 I. }; [& a3 h1 ~7 _8 {* ]" i
if $game_temp.xas_charge_time >= 100 and not Input.press?(XAS_COMMAND::SKILL_CHARGE)
& n9 v( R n |# q# e8 l1 \ unless self.action != nil or self.knockbacking?$ c$ s E/ | l( ~ r) K; q3 V9 U
action_id = @wp_tool_id if @wp_tool_id != nil 2 B6 A3 ]+ V$ I+ I6 H9 C! ~
return if action_id == nil or action_id == 0
. Y; j. p' z! L* A" @* i9 |* l; q# ?& v if seal_state?(1) 1 j+ {- x1 o, E' b6 F8 c
seal_text
9 M- j" V% j# j( g1 f reset_charge_mode D# o# p- ~. c, }
return 1 _8 x( X8 E6 g) o+ B5 S2 p- Y
end
1 }( ^, B* e9 e* E/ f; }' h1 S' V self.shoot(action_id) if action_id != nil 3 } @% y5 T- {8 a6 [
end2 @6 Y0 z* c4 C& s2 V0 _6 {# \
$game_temp.clear_setting2% O) B8 `& Z O
reset_charge_mode
4 C; j/ K8 q0 N* j& ?5 C end
( @: z, y8 e |! i end
9 I$ O4 F& }; v$ f4 q& \: c$ ], P4 I, D ~% b0 i
#--------------------------------------------------------------------------
9 @0 c8 N' T) t; C; I# ● Reset Charge Mode
/ F" c+ Y) h9 M, V- {+ {+ Y2 Z#--------------------------------------------------------------------------3 o% J3 Y! {7 d% [2 @
def reset_charge_mode(max = false)
" S+ f# B1 |* |, V3 [5 A% A4 c return if $game_temp.xas_charge_time == 07 [: H: R0 @/ u" ?# O
if max
+ K6 G; m1 t& j+ V& [$ T1 H; } $game_temp.xas_charge_time = 0 if $game_temp.xas_charge_time < 100* B5 U7 T/ i: h, p$ I% `
else
% U7 ?3 r* G/ l# M $game_temp.xas_charge_time = 0
# _, B. x: b0 C- ]- \ end
0 Q& }- {" ?: \+ s: b- B $game_temp.xas_anime_loop2 = 0! @9 x3 \! N$ C. F: ?. T; g) ~+ w
$game_temp.xas_anime_loop = 0; E: T6 A& c1 C/ m ~
@action_move_speed = 0
3 @: O9 Q( \) a2 m! {0 |' m @direction_fix = false
, o/ H: ~$ L; {( ]* P @need_refresh_pose = true if @pose_type == "Charge"
6 d- J% @ I$ @8 O, L! Q end
* [% J6 Y! ~4 j
0 w) z" P+ Y- Z- o g 3 d# z K5 u0 V( i7 k+ U
#--------------------------------------------------------------------------/ v+ Q2 m0 X7 A9 x* n( K
# ● Shield Direction
( j2 m) x9 B! ^, `' G #-------------------------------------------------------------------------- B7 W+ Q) ?! L4 ?4 c s
def update_shield_direction 4 l* w! m) U8 _! ^7 s2 s6 i
if $data_skills[self.action.id].element_set.include?($data_system.elements.index(XAS_ELEMENT::SHIELD_EFFECT))
! P3 M0 a" \% v: }" `9 e n; ^- ^+ C5 c+ ? if self.battler.state_confuse1 B0 S1 a, H3 d( E
turn_reverse_direction
1 N- k6 l4 Q8 C+ z5 _0 E3 N6 Z else
( O5 z0 K7 U' S1 w turn_normal_direction ( }7 @; I) B! A7 Z* \3 u
end8 ?2 M! ^& F% a( v
end
3 O( A2 a# V e) w# O6 |7 i end ; D T, I- x9 h q3 i* v( w
3 @) P N0 @/ @ k+ t$ ]% m #--------------------------------------------------------------------------- f1 P+ ~$ V/ C1 _1 s1 Z
# ● Turn_normal_direction2 r6 P, |$ ~' [6 v
#--------------------------------------------------------------------------
, K+ j" c4 T, I0 V$ V8 R/ ]9 x def turn_normal_direction
2 E% {$ d# z, H4 @ if Input.press?(Input::UP)& T) v& T0 @, i
turn_up
. Y; k7 |( t8 S' i5 h: w elsif Input.press?(Input::DOWN)6 H/ q- M4 }* s
turn_down
2 G" i4 u1 t3 z! \/ `4 b elsif Input.press?(Input::RIGHT)
$ w4 I+ W8 [ l7 y8 b turn_right
& `1 K) p# H1 V; I+ Y$ ] elsif Input.press?(Input::LEFT)' L I' q) n& V3 S. P
turn_left8 M& o; m0 e1 \3 E6 m5 K; y
end
: @ T( t7 x! ]9 m3 U9 G- } end
/ L F2 j, S$ R" Q
! z& b3 Z3 T. B" b& H #--------------------------------------------------------------------------' Q2 G$ A/ ?5 U& o7 w! E* X8 N: X
# ● Turn_reverse_direction
" }4 @3 d$ Q' Y; N #--------------------------------------------------------------------------
" M( P0 C# h( C9 v def turn_reverse_direction2 Q v& n- ^$ Z5 n3 U
if Input.press?(Input::UP)
% Z4 z1 A7 w- S6 s turn_down0 X) Q) X" }" g2 d' n: \
elsif Input.press?(Input::DOWN)
" B. [* s! u$ O7 a* s( V turn_up
" y% T+ D9 e- D$ N7 r elsif Input.press?(Input::RIGHT)' F* ]3 {3 h8 l! L0 g I
turn_left% F1 J% R3 n2 ^* f. H# v
elsif Input.press?(Input::LEFT). O! Y- u3 ~/ E+ S0 g
turn_right
, B1 k* Z9 P0 k j. Y% D3 O* m end % m0 q5 Y- V. Q: }
end& o6 G% B' L5 k) A; x% h
Q# R- i3 V( z1 C2 R; F #--------------------------------------------------------------------------7 n$ V! D* m5 \$ H0 t) B
# ● Direction Fix Update ! v7 b$ m6 P) C2 u6 h+ D
#--------------------------------------------------------------------------
6 `7 y/ Y/ Z2 ?, A def update_direction_fix
2 ]" h- E" \, ?& C) z if $game_temp.xas_combo_attack_time > 15 or
h- ]6 K! E- S j5 A( O; {& r! h $game_temp.xas_combo_skill_time > 15 or
3 U, a7 q9 s1 o3 k $game_temp.xas_combo_item_time > 15 or
7 y& k8 a* u \+ @, z! d7 Y2 r $game_temp.xas_charge_time > 10 and MOG::FIXED_DIRECTION_SKILL.include?(@wp_tool_id)# Q- s4 w3 @- U! J2 ?! }$ l, u2 }& e
@direction_fix = true. C9 e' g q1 P( T+ ~
else , J3 ?, ?6 F3 j5 a4 \. y; M' Y; E
@direction_fix = false
6 p' \1 B2 X1 w R7 H4 Q end * Y1 E7 F7 G( R) I( E* H! Z
end 9 ]8 h* F, S; D5 ~, T5 `/ I0 x
) ~0 @9 F0 g/ g; Y6 N1 w
#--------------------------------------------------------------------------5 v6 W. l, t8 w. @8 h0 r7 G- f
# ● Check Equipment ID
6 l! B+ @! A1 S2 B, V# e: g #--------------------------------------------------------------------------
" T" k; Z# i7 F5 _5 M& P) R+ B def update_check_equipment_id# k6 p- O5 v6 v
if @wp_id != @actor.weapon_id . v- u5 l; T# I. Y6 Y% e9 j
@wp_id = @actor.weapon_id
" \( L% Q7 M# k @wp_tool_id = WEP_CHARGE_ID[@wp_id]
+ F# Y9 d; F% Z @wp_tool_time = WEP_CHARGE_TIME[@wp_id] 1 r$ |( z, e @, c0 I+ c, R; F
@weapon_tool_id = XAS_SKILL::WEAPON_ID_TOOL[@wp_id]- X2 x q$ {. T5 B) s
$game_system.xas_action_slash_id = @weapon_tool_id
1 y$ q5 V8 C$ I8 d5 v end g$ z, J8 k! v% r8 x3 |" Y
if @armor_id != @actor.armor1_id / s* C" {9 S" e
@armor_id = @actor.armor1_id+ g5 l |- E7 W j3 K6 Q1 K) O6 E4 p& m
@armor_tool_id = XAS_SKILL::SHIELD_ID_TOOL[@armor_id]
$ D9 j. i; ~, \: | $game_system.xas_action_slash_id2 = @armor_tool_id / r9 H2 w' w6 j6 B+ Z, y
end
. L' x% g$ q: C D' }8 U0 Y7 O end
! a& D, y- u& c" r9 }
# b9 i9 R; M* r. x- C #--------------------------------------------------------------------------# ~# ~" d1 g( d- ]: J
# ● Pressed Button! Y9 B, R: {1 b3 D6 g
#--------------------------------------------------------------------------
; A4 I+ P8 }3 |! M8 w9 S7 \6 Z def pressed_button?) a5 h( ^8 H/ ?9 O6 P
return false if self.knockbacking?
& [" P N* g* ~# J+ U( ] return false if $game_system.map_interpreter.running?
& b/ [) ^% O* Z q return false if @pickup_lock
# y+ n7 b$ D4 B* B2 i. p' Z, Z; I# f8 R" @ return true if Input.press?(XAS_COMMAND::ATTACK_ACTION1)
3 c! z5 s; N1 v2 ]2 I/ | return true if Input.press?(XAS_COMMAND::ATTACK_ACTION2); V$ d- P( K- D8 G' Z
return true if Input.press?(XAS_COMMAND::ITEM_ACTION)
y4 B9 j; B7 u% `$ i, n return true if Input.press?(XAS_COMMAND::SKILL_ACTION)
9 c1 I, Y* S% K' e. B- X return true if Input.press?(XAS_COMMAND::DASH_BUTTON)9 \/ P' X! ~8 a# @2 I. b
return false5 f) e1 H. | P% {5 T
end
8 ?8 u- l1 ?- C, g # \ {3 z, U0 D
#--------------------------------------------------------------------------/ Y# z5 {' s4 ?
# ● Trigger Button
* \5 d+ A' Q/ \; X5 H #--------------------------------------------------------------------------
- b' e3 P. p( J' W. G3 N def trigger_button?
0 H) [$ A, {1 f5 u% f" |; G return true if Input.trigger?(XAS_COMMAND::ATTACK_ACTION1)/ `8 b2 o. l! h, }2 u
return true if Input.trigger?(XAS_COMMAND::ATTACK_ACTION2)
. i! N% Y. N/ j# @ return true if Input.trigger?(XAS_COMMAND::ITEM_ACTION)
0 t, \( [3 l& v) q return true if Input.trigger?(XAS_COMMAND::SKILL_ACTION)0 t5 G, v* M; @) o# s% u1 C
return true if Input.trigger?(XAS_COMMAND::DASH_BUTTON)
9 W4 @0 V. ]* [9 o' C9 |% I1 x return false
8 E6 P/ h6 J% P4 A end
6 M& V6 A n* t: Y3 l7 |; U! X4 f
% {& P" b! Z1 n, y #--------------------------------------------------------------------------
) }0 z' ~* c8 t% G # ● Pressed Check
2 T9 L( l3 L$ e2 A p #--------------------------------------------------------------------------
0 T3 _4 y# q: x# R1 I! P6 N def update_pressed_check
+ Z8 k! o$ H% N1 u, H if pressed_button?% m% L8 o4 I0 k/ A1 w z% r# m3 ]
$game_temp.pressed_attack = true5 A* P3 f6 w _" }1 B4 f9 C
$game_temp.pressed_attack = false if trigger_button?
2 p, N% r5 j7 z9 i2 i else " J7 `9 T' S: L* Q( U
$game_temp.pressed_attack = false
$ Z( r4 S ]9 v" \. M6 @" C6 G3 R end 6 j+ W" M& I6 @- Q# w/ \
end 0 o3 [+ P- {8 x+ ?- A" r, c- a
8 P _9 `2 ]8 C, s- u7 ]
#--------------------------------------------------------------------------
* T$ o2 V1 P( ~1 S$ l- v+ i. [ # ● Call Menu
* @1 }/ L: m' A& X9 w #-------------------------------------------------------------------------- # a3 `, m! r; F2 ~
def can_call_menu?
0 l8 C4 [5 J T f& H return false if $game_temp.slow_motion > 00 [6 A9 d' r5 n) g- Q
return true
, l4 W/ ^. [* I: j8 Z end
5 S# \+ l. j2 X' U0 i7 ~) p" F n/ O
( s/ w! D {! P( \7 F7 C4 V0 b7 O% v0 eend
" I: A8 M+ }. u$ |# j0 m
) g( w3 O) s/ E9 z* z: b* ~#===============================================================================- B2 X* F+ H) S
# ■ Game_Character. O6 b7 y" E5 [0 a0 C
#===============================================================================
$ x1 m" ]0 L% y5 V" f9 xclass Game_Character
9 M/ K& J. O! T3 }1 i& ] #--------------------------------------------------------------------------
, `/ \0 q2 l2 h E # ● Passable Hookshot% l- J2 ^6 f$ {" Y3 }5 g
#--------------------------------------------------------------------------
0 g4 G! ]: Z8 H def passable_hookshot?(x, y, d)/ e7 a+ w' X$ d4 j- a% c
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
( U: F6 C2 P0 ~3 v, M: E& L$ ` new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)* _. D* |* C, G, J' `
unless $game_map.valid?(new_x, new_y)
n) G# F! v# ?% F. L' N return false/ B- e8 ^' G- ^; @. K
end
% s! z( r; e7 @/ Q) I if @through
: a3 y) w. T" K7 u0 ~ return true
9 `; N. S* e- h3 l" M; ? end- m J% w7 |$ L) u. b
for event in $game_map.events.values. N+ p, M4 d. t7 s0 T
if event.x == new_x and event.y == new_y
. i! h% T; |6 }/ T m; h1 m if event.character_name == "") ?3 A8 l4 Q4 t0 \$ f
return true- H5 v$ k+ Q0 f' w& f: a
end
?, c& S- u0 g unless event.through
4 H7 ^: R6 x: s if self != $game_player
3 Z4 y1 w( g: T: G/ l return false
% h, w& q. ]9 I/ e7 H+ V end
- }, F; w( s/ \& w/ o- t if event.character_name != ""
* ?; B2 U9 u) e8 N! t F, n return false
5 N6 j4 F+ l5 D end
8 \. [+ y+ J2 z8 H end
% x5 i u: x* z t4 j, `! p0 \ end
2 @+ t4 U: N C. A1 Y% x% r end# I7 ~& e- M- |. r/ y/ L$ z; r* }
if $game_player.x == new_x and $game_player.y == new_y
b1 C `" T: g unless $game_player.through
6 [+ l0 \! d! `% H" ?7 X if @character_name != ""
" K& {2 R. {, K return false
5 @9 I# Q# J8 | end- I" e3 l. w7 Z5 f: q. w
end( z1 c M: o6 _ g9 h
end3 x! x1 q8 W! r7 K" X6 |0 N
return true
7 z& X* M- ]. U' N end3 q7 B' Z" d8 J$ l' Y$ l/ o: V. o
6 A; m$ U4 H( n; Kend 9 S3 @- P8 W) p" l0 `3 h( D
+ J3 b# `6 _: @& v$ q
#===============================================================================
" _9 T5 D8 u/ T8 P" M3 Y$ ]! u# ■ Scene_Save
8 F4 z h. T3 z5 ?; s5 o- z#===============================================================================
3 ^8 j& I$ Y! i# }+ oclass Scene_Save
m0 Y8 b. W/ v
0 ~* x, m( W. z7 m #--------------------------------------------------------------------------+ [+ i- x9 s, d7 l6 s
# ● update / K+ F; f# L+ x+ i2 `
#--------------------------------------------------------------------------
, K- D. E" {& a3 m7 { alias xas_background_on_decision on_decision
) T. _9 B- ~8 f+ C7 \' ` def on_decision(filename)
% k' }% I$ c7 r4 G+ j8 N" F% N if $game_temp.background_effect_time > 0 " ]: z) F' e1 l! R- W2 P! s
$game_temp.background_effect_time = 05 e# N: o# Y6 E* [0 |
$game_map.panorama_name = $game_temp.pre_panorama_name
L: H( ]' M2 y' ] $game_map.panorama_hue = $game_temp.pre_panorama_hue5 S# K$ ?% w& u/ d
end
9 l+ s$ B6 a& A& F" ` xas_background_on_decision(filename)
! A7 p, Z8 Y, c# [" | end c& {# }* H" R4 h$ `6 Z& T
end
9 p, q. ^& s. _/ R4 w
# d- |9 x" Q2 G# G* H/ x
7 S; L% z! v- ]) }; _
0 {1 U. d a: E1 f* L D4 I' ?* k1 n- Y. x, N$ z9 w4 v
( A3 P/ J3 }' D6 O
#===============================================================================# B& G5 q: V0 Y6 @' }" |
# ■ XAS_ACTION
( q* a& {2 t/ P/ [1 [/ `#===============================================================================
8 w3 J3 s9 N, v. L) s+ r; Jmodule XAS_ACTION
+ \0 v) [2 A0 l* l7 |) H0 h : y( D5 s7 i; k1 i) s$ K/ g
#===============================================================================
% k9 D- |+ f1 {# `. D+ @# ■ Battler Commands
) C, g9 ], k m/ P9 [#===============================================================================
# ?. A/ R! Y& F3 H% s9 ?
/ _& j$ @5 J8 H( \ #--------------------------------------------------------------------------. N; X4 Q6 g3 [: T
# ● Anime
' H. W& R; C$ I. f& A. O% ` #--------------------------------------------------------------------------
8 a' ]) o& ~ ?5 @) i& Z def anime(anime_id)" n1 v' ~1 L2 Y# {$ [" ~+ |
self.animation_id = anime_id 5 ~! i" p: G; v9 C; y2 z
end
$ L/ E4 E, V6 q( J7 a+ G! B) ^
0 |$ X% h4 T6 P, G% d6 s9 F' e8 Z #--------------------------------------------------------------------------
! l$ Q3 x+ @* \1 P8 s8 T4 \ # ● Anime D# B' ~, Q: ~% u' V
#--------------------------------------------------------------------------2 I/ K& k6 p' C0 G
def anime_d(u,d,l,r)
2 P$ c) S8 u: G C( |+ H X6 N if @direction == 27 C$ I+ K' x" m
self.animation_id = d
1 r h( H% t" b3 y9 h, I5 M* g elsif @direction == 8* U! i/ X, u, Q7 X
self.animation_id = u
* ~/ C5 d6 t. k elsif @direction == 4 [) c+ I o# M8 ]. g4 L8 E
self.animation_id = l
_. ]6 s9 I" G$ b elsif @direction == 6: W! G+ N# X& s4 O* E- z5 ?/ N
self.animation_id = r
5 @ n, d: h8 W' u8 l end 8 ? J, w) q r- }
end 8 ]/ l$ h9 d9 b/ b
2 w+ r2 T# L" e2 {3 n #--------------------------------------------------------------------------* B3 @3 E7 q1 }+ @. s8 B: N, K$ b
# ● Invunerable) { B; j4 ]) _/ t, p v2 N: o# C
#--------------------------------------------------------------------------- ]$ @' x! x' i! Y8 |
def invunerable3 Q8 \0 e) D0 }7 C. B# d
return unless check_battler_exist?/ P. i8 W( @& c7 m ? u! _- x
self.battler.no_damage = true6 j' `" d! B+ @7 B* \, |
end7 g+ L" O4 C- g: R L
0 r3 E0 o5 T" T5 J$ {+ `! A
#--------------------------------------------------------------------------1 U" E- X: u* R: M- q4 `
# ● Vunerable0 Q3 o/ E! B$ D* y
#--------------------------------------------------------------------------
5 R& P/ [4 ~6 G1 e: ^" G6 ~ def vunerable$ n2 z6 J) g3 L1 { i+ J
return unless check_battler_exist?
( _2 d' E% f/ R8 S self.battler.no_damage = false( O) c$ g6 S* ~
end
. U S. F& }# \! e/ o: e1 Y
6 p6 ^* l, B+ [' O0 ^ #--------------------------------------------------------------------------
4 i9 a8 o% }0 V; P& q # ● Text
( Z% U3 T7 |7 V4 W# c# N. D; N& F #--------------------------------------------------------------------------
' a! Z- y4 I6 A* h+ `4 k def text(tx,perc)
6 Q" [; L7 e, z c5 \0 z return unless check_battler_exist?
6 R0 }+ P7 D3 ?( F, G/ r& I if rand(100) <= perc, L2 T2 N" V, J5 W
self.battler.damage = tx.to_s v. e% |" u+ D$ d! P3 F
self.battler.damage_pop = true5 H) M/ Z& U( w1 d* x
end8 q% n$ E1 D5 [6 V0 Y
end
8 Q6 n. c' `5 ?7 C0 R" d+ Q5 O0 S
- x/ ~' Y5 p4 P: k% E+ k B! \ #--------------------------------------------------------------------------
0 z, A: v" n. n+ e& Z2 j* F7 O4 Q # ● Zoom# j0 C# L! R7 [5 P9 j
#--------------------------------------------------------------------------9 F. z$ p6 s& `/ d1 h! }! y4 g/ I
def zoom(x,y)
) C- _2 M V+ q$ V5 Z# @ return unless check_battler_exist?- [& p+ X% T' ^
self.battler.zoomx = x
; Y, d2 Y- Y; H6 _) O self.battler.zoomy = y7 r1 e2 s+ D. w2 D; d
end 3 h+ V/ j1 v9 B
4 f' D" |, s% d0 ^1 j #--------------------------------------------------------------------------
% d/ t& |( i9 L# T, l # ● Zoom fast
# T$ \5 ]7 a$ Y4 d& P8 d$ v #--------------------------------------------------------------------------
* m. ^7 H& ~8 U& N9 N+ x5 h8 l1 E def fastzoom(valor)* J# d. g8 z2 H
return unless check_battler_exist?
0 h% p- e% O6 F' H1 ^6 E$ M self.battler.zoom_fast = valor! \. d; U/ F+ f# I$ {
end
/ X5 D5 V7 M6 n+ [. K #--------------------------------------------------------------------------6 c' O9 E3 v: P: y! w1 @/ }
# ● Self Damage
' A) i7 Y5 q. L #--------------------------------------------------------------------------* ^# k/ A7 d3 D R. O! U
def selfdamage(damage,perc); h0 Z5 c. ~4 [
return unless check_battler_exist?
6 n# q# W) d j0 r3 ?! A+ p% n if rand(100) <= perc
/ w* t- y+ l X% Q& j self.battler.damage = damage.to_i; e' y; ?! ~: c8 u
self.battler.damage_pop = true . W( E3 x1 G- P! u' z, q& z$ {
self.battler.hp -= damage
* A5 u* }7 B& n* J/ b* ^. y! C if self.battler.hp <= 0 : u1 Q2 b0 @; T
self.battler.gain_exp_act = false
0 Z; @. T$ {* b) D1 Z end
: G, i" q/ N- [: u* W) e+ S8 j end, Y- C h' v- ]$ R4 R4 j3 P, J: n
end# g$ V" I6 O6 t" E: z- l+ g
/ n" K0 k) P, P3 N, B+ `9 s
#--------------------------------------------------------------------------
$ G* r+ a4 l) D+ Y4 W( m4 W3 e # ● Add State+ K ]* N( \* K* v, \
#--------------------------------------------------------------------------
& ~* c, D& [5 ]# m/ x: ]; ^ def addstate(states_id,perc)
: d, ^4 u# [6 t4 k0 D2 k3 {) ^ return unless check_battler_exist?
, F0 o! y1 a4 b if rand(100) <= perc1 Y: K3 @ [' c, Q" u+ }- i
self.battler.add_state(states_id)
& W1 y& q. `$ L4 `( n end4 j* W# _- p% U/ c( @
end # u) Q. J1 h2 @, Y# u2 j# ]4 E
4 v2 H4 t) D! a2 G) M6 F
#--------------------------------------------------------------------------8 { M- Z2 x% Y3 n7 d
# ● Counter ON4 \5 t+ _+ f2 f5 j6 \9 l
#--------------------------------------------------------------------------
: C; U, _( ]/ d+ Z+ a/ s8 [ def counter_on
3 c7 t3 I# a. U. H+ ^( l7 d return unless check_battler_exist?0 U$ E! |! \9 h& B
self.battler.counter_on = true8 S5 y8 v" ] a& B+ C, \3 q
end u5 @9 E/ U7 Z
- [0 `$ G$ j: C4 S. ~0 u+ |
#--------------------------------------------------------------------------* o4 }2 b, D. z4 F% z3 u+ r
# ● Counter Off2 F3 X( {/ i$ f5 c9 }' X" j [/ j
#--------------------------------------------------------------------------. h# S2 I$ H1 D8 T. `
def counter_off0 |; m% v; M; u1 H6 E% a& U
return unless check_battler_exist?$ j) o& l) S: r1 n! k0 k$ M
self.battler.counter_on = false5 F0 x' h% x1 @8 }" g
end 7 f4 ~( S! k1 B% a
; p$ S+ e! k$ j+ | #--------------------------------------------------------------------------0 s4 N" P0 v. ^' |+ i
# ● LowHP Add State Q8 c5 L* p P' Z
#--------------------------------------------------------------------------
4 e8 j c Q! B! }: Z def lowhp_addstate(states_id,perc)
/ t/ L; H/ o" G! a9 K; N6 Y b6 K return unless check_battler_exist?
$ ]6 i( t+ t' N2 F7 Y: |) M3 W4 Q lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
, \% B! n% l; Y+ Q if rand(100) <= perc
T: u& R4 `! T$ Y& L if self.battler.hp <= lowhp6 q5 E8 g* q* S9 Y5 B3 v6 Q- Z" J
self.battler.add_state(states_id)
. Z) ?0 e: }, f2 e$ E7 ^# c7 T! b" j end2 I9 x: a+ w! _% i" D
end7 S( n* Q( M& e+ k* o
end
, C: }0 t+ J3 l
- @% K1 }! A, G$ r/ n$ F9 d# R #--------------------------------------------------------------------------6 M5 \- `) n8 r0 x6 Y2 v
# ● LowHP Remove State
9 Y$ }& L5 n/ V F #--------------------------------------------------------------------------2 ^: o |0 U+ a* h! s: @
def lowhp_removestate(states_id,perc)' M; C0 ~2 F- p/ E7 _
return unless check_battler_exist?
4 L1 x' U) G) E1 a lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100% S+ ]0 H# E7 o. f# @+ S1 J- J1 ~! I
if rand(100) <= perc
- U) `; {1 R4 R if self.battler.hp <= lowhp& n( s) z* w3 p4 T0 U' ?+ e
self.battler.remove_state(states_id)
! [9 Z+ P4 H( e( }, y( B$ S8 K4 n end
9 n) N a* A: p/ j+ {2 v end' w8 H2 j" H+ z: E
end
" Z. D( O" m' {7 H- a ( X( B" r, Y4 M3 s/ ?2 [
#--------------------------------------------------------------------------- O/ y9 b4 q: M% U4 I4 S& H& ^; v+ M
# ● Remove State
+ ?* t3 v* W. B: f( w2 I #--------------------------------------------------------------------------
6 w- h& e* i; p def removestate(states_id,perc)
" |# \* o" S! q1 `" u return unless check_battler_exist?
/ F% {+ a& Q) k* @2 D7 S if rand(100) <= perc/ Z7 k: _% i" |* {* ]6 B7 J7 m( b
self.battler.remove_state(states_id): J" Q! j- }6 X: A) u
end6 J. T! _0 R% j" u- e( I& i
end ! ~' n) ^5 u# G8 l: {9 |
# D3 z" `* @8 A0 f/ ^
#--------------------------------------------------------------------------
* j% r w6 _& q; F # ● Recover All0 k$ d* c5 ]6 D' D3 o, _
#--------------------------------------------------------------------------: V) _- G, D: q8 z
def recoverall(per)
2 P3 k2 P0 T* _ return unless check_battler_exist?
/ f" y( `+ o& x0 D6 p4 F6 { self.battler.damage = "Recover"
0 l. ~# M# t$ W self.battler.damage_pop = true
h% Z# U2 Z& F/ [% K5 ^ self.battler.recover_all0 V- D- n, F3 V, `
end( }+ w) t4 z. Y5 z* g. n
5 a1 p6 P* Q4 [2 I2 k. O #--------------------------------------------------------------------------
. x' G' Z$ G! E4 C # ● LowHP Recover All4 Z3 b `; u/ i/ u
#--------------------------------------------------------------------------( M/ ^+ J2 m. c
def lowhp_recoverall(per)
. W! f2 y7 ^' w5 {$ S% ^- U' l6 @ return unless check_battler_exist?
% d2 d5 a5 i- b4 @: K lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100( z2 }0 M* i/ q0 a- d" A1 c& m( Q* X1 p
if self.battler.hp <= lowhp. i( F0 `3 b: T$ T) Z# L. P6 P
self.battler.damage = "Recover"
+ ~8 t* P( ?/ E& ~9 i7 R) w& z self.battler.damage_pop = true
9 c3 S9 b* Y# u5 y% b self.battler.recover_all: u" ~1 T2 [& b
end: }8 D( v6 ~3 L: V
end ! g& J! }7 ^/ Q
$ K x; g$ i8 ?, P
#--------------------------------------------------------------------------0 ?+ B5 O4 R5 M% t& h8 M& c
# ● Low HP Anime1 {, j5 T' v* H7 X# U
#--------------------------------------------------------------------------! l% S0 A, ^/ Q ?& M
def lowhp_anime(anime_id)/ n M( t9 H J' f' e, ]
return unless check_battler_exist?
. d1 `% C' y& ]+ c4 v0 N# J lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
) ^; F$ y5 g2 a% v& T0 L, S3 R if self.battler.hp <= lowhp
7 q1 k( k4 ~ s self.animation_id = anime_id 1 N4 @' j: r' I$ V0 I1 l/ W7 f! G& t
end
. `+ u: n: f' L7 X3 U end # B+ d8 F( C2 O u
" W% I1 y( d8 \# `* c" \ #--------------------------------------------------------------------------
! w1 ^( N( \2 Y3 @, ?& ?, h3 _ # ● HP Anime
: n. P" P0 d3 c+ I, ? S: @ #--------------------------------------------------------------------------/ h0 J. J. V* P4 D# B$ J/ ], [5 ?
def hp_anime(anime_id1,anime_id2)
5 t) I& z f3 l- Y$ p! A return unless check_battler_exist?
1 j0 b& B- W9 R- ^ k$ ], D) { lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
' ?, A) x/ t( Q4 B3 W if self.battler.hp > lowhp
3 i( A9 r7 m( s! o% d% e* R self.animation_id = anime_id12 V8 L9 H/ W; M$ M J: c
else
( ~! D1 l1 z* ] h. t7 F1 R self.animation_id = anime_id2
# c- e3 H0 X5 K4 H0 J8 g$ }8 g end* r' D9 G/ A3 S% ?: ]2 ]4 G+ {+ F% d1 O
end " Q# e! y& N& E* x, o& m1 W1 {) v5 ^
9 j1 o I! \8 m/ y7 K9 b0 u
#--------------------------------------------------------------------------3 p8 Z% V- f# V
# ● Speed& G: ~7 \( x: o4 b
#--------------------------------------------------------------------------, c6 u+ U8 h, Z( Q
def speed(x)
$ H q$ `/ M$ D2 h8 J& ?) A; S @base_move_speed = x
& f+ p* p1 n0 V% _5 h7 l end 0 H* s8 T3 J. e/ C! [) |$ t
3 o% ^' ^3 x8 o #--------------------------------------------------------------------------
) e* s( s1 X t8 j% ~ # ● Freq. c) X+ x { s7 [$ Y
#-------------------------------------------------------------------------- & ~! q- l' W1 `2 P9 x! {* q8 l
def freq(x)
& M9 T, W* B# J2 ^0 X @move_frequency = x( w4 Y6 ?- e( e, t( R
end# h! d2 w6 a8 _6 G& H
#--------------------------------------------------------------------------- F% N1 s5 P* ^5 d
# ● LowHP Speed
; {; q6 ?% w }/ L #--------------------------------------------------------------------------
& R% {9 ?: I/ {9 ~ def lowhp_speed(x)# D- I/ \( L. Z* Y# Y! P* |
lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
b w: p+ M% Q8 | if self.battler.hp <= lowhp" r/ k9 y/ `8 o6 ?, Y
@move_speed = x' V( S' J7 P4 i! t c; n
end' h* |" ?! Q- v# t6 d5 ]
end
* Q4 N2 n) f, i5 U! U7 z/ Q* [. h
% K# K9 w" U) ^9 ] #--------------------------------------------------------------------------
. U7 v; c9 u+ a( e h6 b # ● HP Speed/ [, X% C! Z# d3 Z& V3 u
#--------------------------------------------------------------------------) j- O+ s* \8 x( M% ~
def hp_speed(x1,x2)
1 H; ?; j" n k7 R# \" U lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
0 _) d9 l0 c9 ? ?' X if self.battler.hp > lowhp ! M% Z( X* Z0 g" r$ q3 s
@move_speed = x1
( J6 G: x( Q# t- R& { else' C1 P( z. S6 l; G) E
@move_speed = x2
{/ C- v2 ?1 b2 O end7 }. v- m' L% K) s. i
end ! B, }4 o) a- ?
0 A* T" D* ^0 U
#-------------------------------------------------------------------------- M* Z' p: C( l- x
# ● LowHP Switch
0 s" p. |3 T# p. j #--------------------------------------------------------------------------- D4 I9 z2 r W) W4 i
def lowhp_switch(x,on)
2 ]4 b+ d. I+ o; d" O return unless check_battler_exist?' @. e7 @ u5 {
lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
! e" Q6 u9 g C. ]! R1 Z5 i3 b7 B if self.battler.hp <= lowhp
# V( N S8 W' Y- }+ Y $game_switches[x] = on- Q) E+ T' S* ]% `
$game_map.need_refresh = true if $game_map.need_refresh == false( z8 e0 ?+ q) V( \5 Z0 }: H- H
self.refresh
7 a: s$ x( D% f. t& a I% B end3 d8 E+ Y( }) e
end " e: e* {6 x5 O$ O6 K0 P
! {. [& [2 v8 o+ R9 Q5 f4 [: F
#--------------------------------------------------------------------------1 x5 r2 P' T8 Y# E0 F+ ^7 @* S5 V5 D1 l
# ● Hero LowHP Switch$ d- E2 }# @1 M' B0 ~
#--------------------------------------------------------------------------
* m: j! i- v4 J9 \3 y def hero_lowhp_switch(x,on)1 y) l& b( |) W M# x! k/ B% O
actor = $game_party.actors[0]
8 M4 t2 N4 s) Y d/ i, I1 e) ^7 V1 P lowhp = actor.maxhp * XAS_BA_ENEMY::LOWHP / 100# S6 F: S4 {9 g+ U8 J
if actor.hp <= lowhp
# ]4 Z6 V( z* J- ]5 h- x. n. i $game_switches[x] = on
4 O9 g# g( A4 @2 X $game_map.need_refresh = true if $game_map.need_refresh == false, [) o0 W6 v& \& E# z3 p
self.refresh1 k0 V5 w2 E+ I# o/ i7 z* H1 I) o' b
end* x. _. `7 ?; N( b: k! N. v
end 1 Z3 v. X k% R" [- X. B
$ s8 |2 j/ h" o( M* q2 z
#--------------------------------------------------------------------------; T9 Z- Z! s& V) i! `3 o! q0 ^
# ● Dual Switch
- ?# i0 {8 E5 a9 S: K; F, d( K3 G #--------------------------------------------------------------------------
6 W' ]& o1 p. n& |* { def dual_switch(a,b,perc) . o+ J& t: u: k X
if rand(100) <= perc
, M0 R4 C/ t7 G6 ]7 [+ s' U& C if $game_switches[a] == true
) [( ]& ], W% | $game_switches[a] = false+ C0 S1 Y& d, [
$game_switches = true
, l' I, _ h- q+ C! Z else
# ^* g) {" K3 J4 ~& Z* T0 x $game_switches[a] = true
. u. i5 G' F1 n. t } $game_switches = false8 s0 O, \8 z4 _9 E, W# A
end
, q+ [7 d& U. @ end
' k X4 P" [+ @3 ] B! m self.refresh5 ?' ?3 V6 i. p- z+ g0 n [' s
$game_map.need_refresh = true if $game_map.need_refresh == false
# `- a' H5 @* {' e* n4 [1 {. s end
: n& T8 m- k2 k' m% p* O6 @
) J$ N# t. ]& K1 |4 e3 K #--------------------------------------------------------------------------
4 y" D5 V" P! V! {; _/ z # ● Hero Level Switch
3 F i" D" X7 j #--------------------------------------------------------------------------, A5 }$ N; O6 f5 X
def hero_level_switch(x,level,on)
# w( j2 i. e& I r2 u7 e actor = $game_party.actors[0]
+ i+ J3 }3 F9 {: X6 ]- j$ L* v9 d2 S if actor.level >= level
: D: P; f6 N( H8 O$ _! x1 F8 d $game_switches[x] = on
8 j0 r" w" _: O3 e) Q* A9 s $game_map.need_refresh = true if $game_map.need_refresh == false
0 O7 h8 z$ U. ~7 O end
/ }+ r1 Y( v; X0 y9 c end 8 G; S( u% w7 h0 D P
; L) X \3 n! b% W. P: c7 c
#--------------------------------------------------------------------------
7 \" [1 d( O K% z # ● Hero HP Anime' c- h/ r& C/ h1 ?
#--------------------------------------------------------------------------3 K- Z: L0 s* n9 ^
def hero_hp_anime(anime_id1,anime_id2)
" I6 I1 P8 b* w% |6 \1 w0 w actor = $game_party.actors[0]
9 m' ~& C/ ` F+ l: s8 @ lowhp = actor.maxhp * XAS_BA_ENEMY::LOWHP / 100
/ d; W1 x' z- C; l6 R0 Q/ g# k if actor.hp > lowhp
6 O0 n4 W a/ O self.animation_id = anime_id1 - p! O- A+ e* c+ C
else
& H- V% M/ `! L self.animation_id = anime_id2
+ [0 p+ o; m n* x4 h end
5 Z& W% S n/ s9 C5 M7 D end
' l( y, S% N/ u% @; r. F9 U( t . e8 z0 I% s& x9 k
#--------------------------------------------------------------------------! N$ T, u4 @# n0 y
# ● Hero Level Anime
1 X; c1 M* ]2 ^3 ], w5 x# l3 S #--------------------------------------------------------------------------9 v- K: }# A% I3 ^0 _2 [: b
def hero_level_anime(anime_id1,anime_id2,level)
8 H h, k% u# u+ x actor = $game_party.actors[0]
: ?) ~! [7 E- H. `* R" z% E if actor.level >= level 1 ?6 |% s2 u. P% l/ ~
self.animation_id = anime_id1
, F7 v6 H/ b2 z r6 l5 ?2 g M else6 `, G; Q7 Z9 C0 J; X, l
self.animation_id = anime_id2 # Y# T) r3 C7 P! A' O4 a" A1 {
end. `: a: L1 M$ y6 v
end
9 p$ u3 {. f7 E0 Q" K* i
5 R% r; _# ?7 Y1 @3 J #--------------------------------------------------------------------------
3 Y {% o2 f1 c$ w # ● Hero Level Speed
0 w! y) T7 q, V3 ^' x7 o# O7 ` #--------------------------------------------------------------------------
! X4 [" K6 X* Z1 x* d" V/ F def hero_level_speed(x1,x2,level): l/ z* _7 f0 P5 J
actor = $game_party.actors[0]
7 s. E7 z) F8 n if actor.level >= level % M9 ~. |. c, t; y, V! e- i- e
@move_speed = x1 & T6 ~4 ?6 h4 m7 {* m0 M
else4 r' f4 V: r6 r; r4 z) |
@move_speed = x2
; `8 k4 b. g* T* G; m* o end & o" n2 U- H4 c5 Z
end 3 k; q" h+ b4 A& N" v( b
, G: a' m+ p- x1 n: Z: r- l
#--------------------------------------------------------------------------% @( j3 z- S7 N s
# ● Hero HP Switch8 R; H2 \7 S3 y1 V. y
#--------------------------------------------------------------------------
1 t, e/ n k8 m6 z, K' r2 l G* j def hero_hp_switch(x,on). U9 d2 S& E5 H/ E
actor = $game_party.actors[0]8 q" s; A% e, P
lowhp = actor.maxhp * XAS_BA_ENEMY::LOWHP / 100/ A; C& ^7 i/ P. z2 y( x4 h
if actor.hp > lowhp
+ G, v7 K+ J& d6 L7 {: i $game_switches[x] = on
x% B* _2 @6 G. D* E9 w $game_map.need_refresh = true& ^6 b. B5 N) L" B8 }6 q: B! Z
else
" i! W- ~1 u8 S' l. b% ] if on == true! J6 D$ r' _9 ^9 \
$game_switches[x] = false
" y7 ?" J2 v* K. s' f else
" T8 L8 t+ C C0 z# ` s) O8 ] $game_switches[x] = true
3 f, w2 \; X5 {/ y end : i" m0 ^* B2 y, V6 n
$game_map.need_refresh = true if $game_map.need_refresh == false, e) ?# b3 J7 H% v1 @3 z
end7 f; f# j) I( d" m- ?
end ( O$ s3 G* y+ X
Y( z; W# c* u6 L #--------------------------------------------------------------------------
3 x9 Q0 ?' D/ J- @; [4 m, |/ N- M" q3 o # ● Hero Level Shoot# y% o) E* B1 t+ o! H+ c; j2 A
#--------------------------------------------------------------------------+ t ~. k+ j& A
def hero_level_shoot(x1,x2,level,perc)6 c9 [8 T. x- M) Z/ J
if rand(100) <= perc& }3 E6 d. h; O5 r: j/ a: x* _
actor = $game_party.actors[0], r& Z* x8 I: G4 E I" ^
if actor.level >= level
* s/ V h9 O& L" y) _ shoot(x1)
2 q$ A; }) V2 Z7 g1 A3 ^1 i+ T/ w else, h8 Z9 q7 {0 \
shoot(x2)
o+ l/ [7 Y) ?; `# P6 S% R7 [ end
. e* q! {, P' Y end % S2 S- q2 R/ x* J
end 7 w1 Q9 y0 P2 x5 E
) M# I ?' c$ ^' p3 j- Q* T# T+ }
#--------------------------------------------------------------------------
) Z/ f9 I% s, R4 y$ W # ● Hero Level Escape" Z- H5 h4 \ B. y/ l
#--------------------------------------------------------------------------
# R& l. N6 y8 N def hero_level_escape(level,perc)
& O. ^7 U) Y& b- s" E1 i! _& H return unless check_battler_exist?3 r3 ^- m {% P* x- P. H5 Y1 ^
if rand(100) <= perc
) y* ?6 N3 U+ n3 r! | actor = $game_party.actors[0]# m# r& ?$ e9 f
if actor.level >= level# E9 o; J7 E+ Y! \
self.battler.no_damage = true' r: S+ ]5 H# j
self.battler.damage = "Escape"9 w. m. K: s+ L% ~5 g; r
self.battler.damage_pop = true
$ b: E, L& g# U9 y5 i z, _% ] self.collapse_done = true
- t+ o7 e7 p' k" f. O5 u2 l! I $game_system.se_play($data_system.escape_se)
. s g4 h' v7 ~$ s end( L& \' o5 g% ~& k v! e
end
2 p! i$ V$ l. ? end * l$ z6 O2 z5 h% t: P
( w; x0 J% z& b) o# F #--------------------------------------------------------------------------
, O! y) @! Q. c: J/ Y # ● HP Switch' x" C6 L4 K2 ]
#--------------------------------------------------------------------------$ o! s* u7 T7 t2 l( p
def hp_switch(x,on)
- Z$ b$ h/ F# j$ m return unless check_battler_exist?
, p8 r4 S& a" O( Z a# f lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 1005 l# C3 F$ _0 _5 @& T: q2 Y
if self.battler.hp > lowhp 9 Y) s# {* j% x' k
$game_switches[x] = on
9 N% {4 d/ |$ ^$ q! ` $game_map.need_refresh = true% n; N, v) ~- d2 ]
else
2 N0 I7 o( m! P: z$ z3 K if on == true
+ o! e) n( g! v! ~ h" w# N $game_switches[x] = false
9 f8 i) V1 c' |' Q, \: i else ; s q' F4 o! H v& \3 J
$game_switches[x] = true
. E9 l! i- ~; `$ K" _ e* r0 W% ~( ^ end
# ~: ^9 W: y, T8 R, @9 u $game_map.need_refresh = true if $game_map.need_refresh == false B0 c X# P1 E
end( z& m- {0 O8 g) s9 o$ x
end
* F2 v) U0 b! ^ J' o: P . O1 ^/ t+ D6 G) x& o3 x
#--------------------------------------------------------------------------: u1 X$ K4 z* @9 U+ c4 p
# ● Escape4 @ z7 a6 v- y9 e6 P
#--------------------------------------------------------------------------+ U8 }( K% X0 }% d8 B! @2 E
def escape(perc)
: u% ^! s: W! v, B3 r b8 w$ X return unless check_battler_exist?# u# j- ]9 S' i
if rand(100) <= perc$ g2 m. w/ s% m4 J4 o! {
self.battler.damage = XAS_ABS_SETUP::ESCAPE_TEXT9 b9 G2 x i7 C- y. ]. {
self.battler.damage_pop = true0 f' O* p. |+ z* X: J. \$ Y! m0 B
self.collapse_done = true0 {5 j9 u+ J/ N& L1 D# f
$game_system.se_play($data_system.escape_se)
1 ?- S0 ]6 D2 S; Z3 D# ^3 U self.erase" x, Q, F, c4 Q4 _
end
6 e; M/ {& R y end
# i! O; r6 x! T $ [1 J5 k k' Q+ [+ ]# s$ x) A% R
#--------------------------------------------------------------------------3 l, y$ R3 N; q5 H
# ● LowHP Escape) w. G3 ?7 W3 [
#--------------------------------------------------------------------------
* ~( ]' Q. C! }/ M7 m0 d, x$ B def lowhp_escape(perc)+ K! y7 s3 W' S% [& M
return unless check_battler_exist? |- T0 _: V8 U) |
if rand(100) <= perc: }+ X0 D' A$ ~) p
lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
; L) V( ^& X" K* U; e' t- B if self.battler.hp <= lowhp
5 h. L" g" r9 k y% Q6 p. D self.battler.damage = XAS_ABS_SETUP::ESCAPE_TEXT
4 C2 O/ y0 w% [$ V. l. @ self.battler.damage_pop = true5 }2 L! I: i+ {
self.collapse_done = true
5 e& B6 y+ w) t# k $game_system.se_play($data_system.escape_se)
2 N( \$ k+ k0 e3 k4 ^# D end `5 O5 T+ L: b1 H2 j+ a
end" y/ v; S$ e. l6 a+ M7 D( a
end
6 I. g5 w! M7 S. u ' g; ]' ~9 Q- q
#--------------------------------------------------------------------------
, ?8 K0 u/ |, b; s% h3 s' N # ● Shoot Chance
9 I- x& R. f! ~- s4 `2 R #--------------------------------------------------------------------------
/ e" [' Y" F8 o0 x def shoot_chance(action_id,perc)7 T; ?8 G; j7 H. L. m2 H
if rand(100) <= perc6 j/ p! ~6 v% n, q) y4 S. @6 P; P
shoot(action_id)
2 r7 M6 b3 c) C! y1 @* b& X6 B' q1 C end
9 ^; A# p: D2 k/ A end + N2 ^7 u, H, p4 N6 a3 ~: L4 w
, I" i( s/ ^4 i9 i# F7 C
#--------------------------------------------------------------------------
" H& I7 S: i- E4 k4 R! n0 a # ● Jump Org( |- @' u% f6 v# E
#--------------------------------------------------------------------------
; q/ W- Z+ |6 f def jump_org
* k! m2 r" K, E* u: S/ W range_x = org_x - self.x
$ l7 n6 y& C3 v2 o range_y = org_y - self.y
1 w; l) a* E" J5 I) O jump(range_x,range_y)/ e5 j' b8 Z$ b- Z
end ) k+ d' e; z( M! i! q6 t* W/ q
/ X: d# _3 D9 ?+ T #--------------------------------------------------------------------------
: R: |8 T8 Z. }9 }! ~. ~3 {6 e # ● Org Here* e o0 V& Q. |+ g3 H) g
#--------------------------------------------------------------------------
7 C; Y* [. ]" |% A G3 h% ? def org_here! j( X3 D2 K; K' n; S$ y! r
self.org_x = self.x
# f' }! c7 O3 m. S! ~; T self.org_y = self.y9 ?. u# U, j) q* ?& f( u
end ; N- ?. m3 J5 e* O- [( J
& C( G2 A$ G. `9 M #--------------------------------------------------------------------------
* F! X8 Q, H: a3 { # ● Jump Near6 @/ l2 I$ d# s% V
#--------------------------------------------------------------------------* W/ ^8 E7 `4 ~3 `- o! b
def jump_near
2 f# z$ k1 b/ i; ` if $game_player.x > self.x and: t" X0 u1 G8 ^2 R
$game_player.y > self.y
+ \, d3 Q( U/ V4 ~$ [3 P% v, u range_x = $game_player.x - self.x
) R" m6 c+ T% l1 x range_y = -1 + $game_player.y - self.y : q- ^( g% s0 J7 B! ~8 U8 g1 A" E
elsif $game_player.x < self.x and
6 H) H, x& `, w- A% I- h $game_player.y < self.y
# m# {7 s9 P+ H0 n3 w6 K7 a range_x = $game_player.x - self.x 5 S, o0 Y8 U% [5 o o5 E& `
range_y = 1 + $game_player.y - self.y
8 t& I$ i1 A" y# ?! S elsif $game_player.x > self.x and+ D0 y& R/ [/ s6 {
$game_player.y < self.y& w: n& p2 i/ f$ R! S
range_x = $game_player.x - self.x ( Y) d+ A: T& T1 q l
range_y = 1 + $game_player.y - self.y
7 e6 L0 K' B* I elsif $game_player.x < self.x and
& q- D* |, }; w9 D6 v. V $game_player.y > self.y! h' ]. h6 q1 t' C$ e9 B
range_x = $game_player.x - self.x
8 F/ D" n! H. J- k/ n range_y = -1 + $game_player.y - self.y
6 \2 Q% h* S8 r. J. `! T elsif $game_player.x < self.x and
4 l# P! Q% D3 j# c) F" x% h $game_player.y == self.y
! k4 Y. z9 E' E, `# F range_x = 1 + $game_player.x - self.x
6 q/ t* z* A5 E' Q8 Z' }3 k range_y = $game_player.y - self.y
$ C) y/ A# ?' d: ?. D9 j! u elsif $game_player.x > self.x and
( U" f9 z3 E# @. |' V $game_player.y == self.y3 h& D/ @8 e! F6 Y; e4 M' T
range_x = -1 + $game_player.x - self.x 5 [8 y a0 a& e& T; Q
range_y = $game_player.y - self.y + A W* g, A3 @; A! s0 L8 J
elsif $game_player.x == self.x and* y' M! C' |9 Z4 L) Y8 Y; j
$game_player.y > self.y5 ?& C( v! X* n
range_x = $game_player.x - self.x
1 k: o& R& y+ O. ^2 O range_y = -1 + $game_player.y - self.y 7 x) o: D* ^/ U4 h9 x% X0 }; s
elsif $game_player.x == self.x and$ u: A" D. g( y" z' C+ y
$game_player.y < self.y
( I4 M( l% ~% w% o2 |7 t, b range_x = $game_player.x - self.x
# i/ J4 s4 [4 h3 u range_y = 1 + $game_player.y - self.y 1 V5 N( C% \, j, b0 x
else 3 i2 D- `2 g; {# ^2 U4 |9 n" X! L% |
range_x = 0/ ?, s9 n/ V: G7 J# _3 f/ F
range_y = 0
+ R( s5 j/ v- @
! s5 f& g1 z t4 W- V8 u end- m. D! Q# m1 O& r/ ^! M6 o
jump(range_x,range_y) unless range_y == 0 and range_x == 0
8 n A$ x; ]. I7 I1 Q end ( J; P. v% ^7 S) ^: h8 D
6 ], q, d( N: r; Q$ ^0 t) T
#--------------------------------------------------------------------------
; _ @5 V: m9 ?" s. G% M& | # ● Lowhp Shoot2 o; X& j* a4 {# H l4 O
#--------------------------------------------------------------------------
! @1 h# c7 G+ r, {' ^* g6 D def lowhp_shoot(action_id,perc)8 c) g) a0 Y! g+ Y! _2 `, Y6 E
return unless check_battler_exist?
& H% z( w' r$ a; e9 W4 n) ] if rand(100) <= perc2 v5 b' q3 @8 a) P3 K- I
lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100% D o# G: ^: m, {
if self.battler.hp <= lowhp
/ ^: s6 j* X" u! Q; G0 [: c9 C& R shoot(action_id)
+ I1 H4 t+ m7 @: O2 {# W end
) }. d$ s( }( |2 b( M" d) } end
- T9 J% H- m- A. \' h end / P$ [- S' J/ P& K
0 T8 q3 x3 ]( R4 ~% w% D1 s
#--------------------------------------------------------------------------! }$ n+ c, ?9 d
# ● Fatal Shoot# @. P- S8 w; H5 y
#--------------------------------------------------------------------------
+ a/ \0 V) d! A6 K def fatal_shoot(action_id,perc)9 I" n* L# z! g j
return unless check_battler_exist? C$ c1 j) `& x8 p6 d- V* k
if rand(100) <= perc$ j" l. p8 U4 [3 A
shoot(action_id)
7 w c* u! u8 p$ F* M$ Z6 m; b# Z self.battler.damage = self.battler.hp" L2 r) t6 [) C* r4 Y N% I. p# g
self.battler.damage_pop = true 9 {) f9 g% H6 r6 U
self.battler.gain_exp_act = false
. ]& ?2 r9 w% z! a/ k% a$ J, k8 X self.battler.hp -= self.battler.hp) U* @ |" E0 {5 L" N7 x
end
+ l/ j+ U! R: G6 A( O% E5 r( t5 o7 X3 ~8 f end 5 G, V8 Y7 m1 Z& z5 z
/ }$ y' f! @* b; O# ^" F: i0 i #--------------------------------------------------------------------------. R u% a) k* i# p& r
# ● Lowhp Fatal Shoot
7 ?4 D7 Y( Y9 F' G- [ #--------------------------------------------------------------------------
! t( ?' s5 @" U$ P3 V u2 e def lowhp_fatal_shoot(action_id,perc)$ e9 r a4 J3 t) u- x$ H
return unless check_battler_exist?
2 q% c: ^5 f \. ?7 n2 b; d lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
) V: U! a0 s5 e, x! V if self.battler.hp <= lowhp
5 A% E6 L9 ?. w+ D/ V; f# z; G1 W if rand(100) <= perc/ T3 c+ E$ Y: ?
shoot(action_id)& x4 Q6 w: Y& M' B! ?2 N& ? q3 `
self.battler.damage = self.battler.hp
$ h( Z( M: I2 l self.battler.damage_pop = true: s5 h. t; X8 ?$ E$ a
self.battler.gain_exp_act = false) ^) Y" y* K* T" ]
self.battler.hp -= self.battler.hp0 _3 d! z5 k: ^* f- W" |" V0 F
end
: Z5 L1 ]0 `: r1 b( R1 m! G% [ end* ?& D1 K7 I, c% g& Y
end / r! |% \( T5 H
8 Q8 ]1 v* o- g! G2 `& |0 B
#--------------------------------------------------------------------------
7 H& l7 P" v( }! c' ^4 q* ~9 x2 W+ R # ● HP Shoot
) Q% o0 Y: b/ u# K- f7 W #--------------------------------------------------------------------------: U7 j/ F. t8 y& e; ]9 E! V; R7 ^
def hp_shoot(hp_high,hp_low,perc)( f, y4 ^4 D6 V0 \+ S2 @8 A
return unless check_battler_exist?
1 E# s3 ^7 W4 Q, { if rand(100) <= perc
) n6 H' u0 d$ A: Q# | lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
. G$ U- S: w' U! g- x1 M if self.battler.hp >= lowhp
6 Z) s7 o& h; k* F9 }# `& R shoot(hp_high)
r0 u( ]0 m; @ else2 B! j1 K% _% Q4 y5 G+ W
shoot(hp_low)6 ~$ q5 K* m V1 x4 N/ V. O P5 @
end
n D9 ^! y1 e* Y end( X: U+ ], _6 s6 x% Z& J$ {
end
6 H( h1 U$ c6 @* J 1 a- w' Y6 g) a. U+ q) Q
#--------------------------------------------------------------------------1 `1 t0 O$ Z+ r( m
# ● Hero LOWHP Shoot3 O4 \. Z3 ]6 t4 U: m) z7 C
#--------------------------------------------------------------------------, _' q# u$ d( l
def hero_lowhp_shoot(x,perc)
' }% \- g/ i" Z5 d/ ~7 P( n7 z# k actor = $game_party.actors[0]
# | d, s3 |) ?! X5 q5 | if rand(100) <= perc! u5 ?( Z7 X$ ^! b6 f8 O7 p* F0 C
lowhp = actor.maxhp * XAS_BA_ENEMY::LOWHP / 100
: a- N: L# X# _ if actor.hp <= lowhp ' K" Z$ o) v- [$ P1 B
shoot(x)
# X& y" E7 [+ y$ \ end
' h a" W( r& Y4 \9 f8 D end
! `0 R7 ~( ^& I& A( N" q end
$ ] U. M$ z2 N : w2 I) T. Q$ I( J) z
#--------------------------------------------------------------------------
" v L1 S! R3 }( T # ● Hero HP Shoot$ ?- n( `/ ^. z1 T
#--------------------------------------------------------------------------
" ~* I: e; B) l6 n6 z def hero_hp_shoot(hp_high,hp_low,perc); e) ]& ?. {5 G4 ?3 B( V3 E4 o
actor = $game_party.actors[0]) o9 U0 j8 y8 E8 c! @
if rand(100) <= perc5 c8 \ l& A5 c6 u! L; r
lowhp = actor.maxhp * XAS_BA_ENEMY::LOWHP / 100
4 W) _$ q# s {! z8 b if actor.hp > lowhp 9 z3 M8 z7 T I, z, Z0 x9 s6 k
shoot(hp_high)
3 k4 @# A) H: B* Q/ ?# [ else : C3 t' Q4 F; Y7 S. I
shoot(hp_low)
- P3 h g# f* [ w# o end! K& j9 ?) W4 j+ s- x
end8 G! A! C% j% N, K; |7 |
end
7 C& _. j( ^) q+ B. |9 l
5 j: \3 k- m8 h# E8 N' H #--------------------------------------------------------------------------
9 U) x$ k- A+ o# k # ● Lowhp Rand Shoot
2 A. q* `* d# a; w3 t: t #--------------------------------------------------------------------------
) O; F7 J0 `' v3 z( n. n, M5 J+ ` def lowhp_rand_shoot(a,b,c,d,e) ) L6 g# }3 P: w) n
attack_off7 V+ _$ |% m9 y+ q" `! H
lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
1 U) W7 p$ N1 O6 i- Y9 b if self.battler.hp <= lowhp
, c- p: Z1 r" l/ Q, w case rand(5)
$ @. k* C$ s" ]+ A* F when 0; h: w8 f5 z( N2 P" ?! Q
if a == 00 p4 W2 p; n/ L% ~2 E
attack_on2 t8 |5 o3 g4 E9 t
else
+ N+ P+ o. W% I/ M shoot(a)% E- u; B* M9 \+ T2 R- k6 W& O! Q# b5 D
end9 C$ X G) |0 r. {
when 1
6 i. O# S, r% v" B; x if b == 0$ ?- ?' M5 U/ _, P4 d) l* N
attack_on4 v# j8 B0 }! S' j$ Z/ ]
else1 X W) n. f3 ?- h2 m/ ~: R6 A8 {
shoot(b)
1 y+ X5 h3 s! s ?9 C7 r2 k end
5 M% g, a* G7 b" J" r when 2
3 v, s+ i4 k% S Q3 j3 B if c == 0
. |/ w7 G( u; A$ B; m6 ~ attack_on4 T- W ?" U* h
else/ ]: u! ]5 w2 K" W. }
shoot(c)
: Y( k" p+ C; R* v7 H8 B7 l1 L! J end8 F* W- ]# ?! h) B2 ~% g6 B, _# K
when 3 3 T4 v0 K6 M' P* V* s' c" t# d/ G
if d == 0
' \# B7 b* a$ b4 u7 V attack_on3 Q' I" T1 r* h/ a
else
" k- [! D" b, k0 h4 B shoot(d)( w# Q/ B5 @ H
end
5 S6 C$ S0 j% ] when 4 % E. z) h( }' Y* }1 j
if e == 0/ G6 ^6 o1 Q+ b+ |* ^0 D
attack_on% b; \# P% ?2 I$ ]5 M' P
else
8 Q: l/ A, J, h5 J3 a shoot(e)
3 \5 X/ W+ q# Z+ e0 A r end ) e: h: t1 N! J; F( n
end
5 J7 e6 `! i0 A; a end
& D1 Q$ m% |& ] end 9 L7 S1 \ T& ~1 l
5 l; f2 P. y! U# O
#--------------------------------------------------------------------------
* o% [3 s1 g# s8 K# @( T) n7 D { # ● Rand Shoot
7 `' @( Q9 D% s #--------------------------------------------------------------------------
+ D# E1 V0 c; |4 Q y def rand_shoot(a,b,c,d,e) 9 C6 O1 \: B! s# n) i ?* e# d
attack_off
5 n9 {$ x( |% Q7 F% H case rand(5)5 y0 S/ v/ `7 T+ e( \
when 0' }3 }- @0 y# N% m1 {" b, I
if a == 07 F$ i$ S5 r5 D! S
attack_on% y4 n' P, j( T. S9 F6 m. F
else3 y8 D* A3 l7 N2 f' X, @0 {
shoot(a)
, L( k9 r+ R% p1 L end* e z. L6 `" F% b3 h( V
when 1
/ s& K. s8 Z; P( h* k if b == 0
5 i' f* N F c4 I4 u* } attack_on
! k) b) g& `' k% ^ else
. T f6 N, `/ e0 l, |$ T/ v2 ^ shoot(b)& b' ~" z7 S6 N) m
end
2 G% u7 k- C. f: O& b J when 2- y; q1 H' ]/ m. g2 A
if c == 0
1 b4 @4 m; y2 ?' ~; O2 o attack_on
" f" l7 x2 H1 F5 u else
+ z! W) e% M9 @% s# q7 G shoot(c)
# E( J( N) m0 j, f5 H end e/ g3 @7 b0 I9 [7 k
when 3 1 P8 N) Q7 T* T1 \. n7 U1 @
if d == 0
3 i* |& n! Y4 k1 Q4 l4 U4 L1 w/ J attack_on' V8 J$ n3 |) j$ o. o% q
else
$ @6 z5 N- Y. O, ]+ L; P3 B shoot(d)8 u# G3 w3 F9 A9 \; L) g
end + }+ m8 B0 S' w D' A5 ?
when 4
$ N4 v8 i& }; n K" n0 F9 p if e == 00 b. t/ H* K* F# H$ l
attack_on% e0 @' z# v+ R5 i9 L4 {4 L; Y9 a8 ?; I
else
+ |- B2 d, [) U/ O shoot(e)# V) M+ V) s$ i3 ~3 u
end 3 X* o/ F E# ^) Q/ _
end 7 e& k A, U& B! W2 X( b8 s
end + E+ a" {- z) ~9 _; h
0 v s0 B( t, x0 ^
end # S: {% @* C1 o) g2 R
' T/ v7 A& v4 X9 O3 b/ b' W$ Z
) `0 H k1 J( h5 H. Y# @# e$ l9 B7 T4 e1 {
$ k: {+ h5 J: P( Y( d4 U% p
# s) A$ i- t( O9 v9 m7 L$ Z
: p) \- Y; {4 {, m5 G9 A. i#===============================================================================
1 ^5 a' V' V" p3 D# i; ^# ■ Game_Enemy
z% I8 Q7 ?7 _6 {% h' [9 [ m#===============================================================================
/ d! V. j# C r5 f6 D$ i3 Rclass Game_Battler$ q" y+ X0 q8 l! @0 N0 r% Q! x9 l) b
* ~1 @( y- ~5 _1 p8 Q attr_accessor :e_object
1 f! X% e: ~: N attr_accessor :e_item- v, y9 q$ N$ |1 f' z+ _
attr_accessor :e_ignore_hero_shield
; q$ |' ~7 i$ F+ ]+ @ attr_accessor :e_knockback_disable
0 p' Z' ~& i% b# c attr_accessor :e_jump_hit_disable
+ X/ A$ E/ P% v# s/ q% L Z) t# B attr_accessor :e_breath_effect
D. i/ w6 m- t% F6 w3 ^9 } attr_accessor :e_zoom_in_effect2 B' |4 Q" K+ u" e: e
attr_accessor :e_zoom_out_effect: {' b0 r( W ~2 S2 G, x
attr_accessor :e_only_blow
, l+ m0 D$ K2 K* h9 K" A attr_accessor :e_passive
3 P0 P% K0 k" ^ j- E% c1 W) H. F* w+ H3 _ attr_accessor :e_drain
5 f( U; N- s- t5 U attr_accessor :e_sp_damage3 W6 e% h# k) j2 u$ r& u
#--------------------------------------------------------------------------
8 Q5 D4 ?. v3 z3 K+ E# ● Initialize
- a( z* e8 D6 i: u& ]#--------------------------------------------------------------------------" X# l5 G3 W! k
alias xas_enemy_parameter_initialize initialize
x5 X. R0 n4 M5 Z+ h) } def initialize. ?/ x, I- N2 c! M" S* @
xas_enemy_parameter_initialize4 K8 `9 c: ]8 c6 E% g i3 a
@e_object = false
1 z, q4 W* P7 n2 i9 v5 p6 Y, N @e_item = false
3 ^1 R! _ k3 J$ K' F$ w1 @ @e_ignore_hero_shield = false
/ d3 K% j- w) D, F* p @e_knockback_disable = false
7 Q; t, x7 Z+ h* c- P- S4 E @e_jump_hit_disable = false
% |/ }, {8 W9 m" H( Y @e_breath_effect = false & _/ Z0 i; |1 [: G
@e_zoom_in_effect = false * Y3 e2 o4 M, T' n" K1 \
@e_zoom_out_effect = false + ]8 @. \; S, }
@e_only_blow = false5 }; h+ O: u3 B% K/ W- E
@e_passive = false: x( F$ j8 F" H5 x
@e_drain = false
$ Z0 l) ~& [9 S @e_sp_damage = false 8 {8 |2 y( \( W
end
, I- Z1 p5 w* vend" v! {0 ~3 X; A# u
8 i' g, {( ^% B4 t1 C* h
#===============================================================================( H- _' ?1 n" ^$ C- a
# ■ Game_Enemy/ W' Q. [! G" s! G
#===============================================================================
2 Q k# _+ v! S6 I, e5 I. u2 O( bclass Game_Enemy < Game_Battler: z2 m; C) d0 K
: Z3 R4 j8 g0 a' Z#--------------------------------------------------------------------------& s1 Q! Z5 m. l) `, k/ s2 [" @
# ● Initialize
1 B1 u6 }# _" _+ b#--------------------------------------------------------------------------
' D1 u: \, S# p8 \: a" t alias xas_enemy_initialize initialize
3 U6 x! v4 r$ @8 K( k2 v: s# B: r def initialize(troop_id, member_index)7 Q" z7 W+ k ?
xas_enemy_initialize(troop_id, member_index)0 N- x% {, T# Y0 I8 ]
for i in 1...$data_system.elements.size7 \6 f+ e$ ?+ Y
if $data_enemies[@enemy_id].element_ranks != 3
4 v* |6 e( R2 V1 X" X6 k @e_object = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_OBJECT)
8 h2 e+ r3 o/ c2 k; a5 h @e_item = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_ITEM)
, I: W# v, c$ s' \0 a- _ @e_ignore_hero_shield = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_IGNORE_HERO_SHIELD) & u# a1 s$ Y6 W% X) u
@e_knockback_disable = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_KNOCKBACK_DISABLE)
; S! R5 H( s3 B5 G$ l7 R3 l6 Q @e_jump_hit_disable = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_JUMP_HIT_DISABLE) ; q8 |1 x% Z/ |8 l- j
@e_breath_effect = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_BREATH_EFFECT)
, @+ C+ q* W: q+ D% G% S @e_zoom_in_effect = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_ZOOM_IN_EFFECT)
5 h( h; n* ^5 p @e_zoom_out_effect = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_ZOOM_OUT_EFFECT) 1 o$ j- \ }$ A/ b
@e_zoom_out_effect = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_ONLY_BLOW_TOUCH) ) B3 I9 d7 h( Q' `1 k
@e_passive = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_PASSIVE)
6 Y* T I! n) [+ o3 _4 B @e_drain = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_DRAIN)
' z. Z7 I2 X8 N- f" D @e_sp_damage = true if $data_system.elements.index(ENEMY_ELEMENT::ENEMY_SP_DAMAGE)
# [# u* A8 C( r end
; D) ?& S- q4 b+ K' x5 `* Z end
0 A2 g# v$ @/ M self.gain_exp_act = true
5 r6 v* x6 k9 s2 R end & s3 @' N0 D+ k* A5 M1 M: q/ ~
end
8 l+ \ l# U8 L2 V. W d7 t4 W$ v9 ?8 u+ ^/ H( Z$ T
#===============================================================================8 O8 {! Y9 G- I- l
# Game_Player
9 {8 _7 B3 c8 W5 I#===============================================================================
: { n0 j1 ?. R2 T4 Kclass Game_Player < Game_Character9 H9 l, t- g7 ^$ V1 z
include XRXS_BattlerAttachment
; B Q5 i' l/ h5 t; ` 7 p5 U1 N8 Q% H+ y* p
#--------------------------------------------------------------------------
* U" p5 Z$ u0 @8 c2 |# Q # ● Battler7 r9 u+ h" J5 e% u0 r5 o( E
#--------------------------------------------------------------------------! q; a9 w( X& f- m/ a+ Y
def battler
# P7 y" L1 x# s return $game_party.actors[0]
[* ?7 \( _* K0 U- D' f1 S end' |% x! c! O7 q6 ~$ K& \- {+ _
; a: h9 I w4 `# K' Q
#--------------------------------------------------------------------------( n, @, b6 L. r9 w- l
# ● Defeat Process
- P5 E' q% Q l: {+ e* N) T/ l, x9 W #--------------------------------------------------------------------------
1 a7 J3 y' i2 U" U3 T& j def defeat_process6 _1 y; `: A( H4 H
super & {( U/ \: ?: E
if RPG_FileTest.character_exist?(@actor.character_name + "_HIT")
3 ]; @( G) e, H3 [ q7 Q. [4 B% _ @character_name = @actor.character_name + "_HIT"0 p) A1 h1 l% o
end
9 H; [- [) y: H7 f if XAS_BA::AUTOGAMEOVER == true6 x7 d7 q( ]$ F9 J7 p
if self.collapse_done " O1 d0 D9 d) f; l6 K! y* a
$scene = Scene_Gameover.new rescue nil, J- q' g- e/ T. I& q0 O
end
" u0 g5 ^% [: V! x* J else / i. W8 I$ o* `. _$ h5 D
$game_switches[XAS_BA::GAMEOVER_SWITCH_ID] = true% m+ G" W, s4 o: b/ y9 a8 e* w* u
$game_map.refresh
$ E, k( W/ \; i; W) g end
" `2 K- E( t6 c end! f) b2 f) C$ `1 F! C# H' Q& q
end2 K# H3 \% y. G/ N/ u
( g6 U/ D9 E' X2 z4 G2 V$ ?1 D#===============================================================================
1 Z! o5 J, O+ Z, T4 N# ■ Game Event6 g. i0 S9 s" A5 g; Y8 Q* [% h. s
#===============================================================================4 e! f" D1 n1 m
class Game_Event < Game_Character
/ k/ d% ^4 m7 K; w. @: j6 u include XRXS_BattlerAttachment! P& @1 |9 f8 H! Z6 u- R4 T& G
$ E" }' {( ~+ V3 [4 G #-------------------------------------------------------------------------- M/ F# b, Y G
# ● Battler# J$ C' X p/ p9 [* N
#--------------------------------------------------------------------------3 o( w4 c8 P+ W3 w, z9 L
def battler! O- d) |* Z* M* n( |
return @battler
# I# \5 C9 }! G, |: R$ h end
4 n" ^" a- l7 I3 Q
a7 U. ~* c/ h7 w$ J/ v #--------------------------------------------------------------------------4 [7 s- b9 H# d3 Q5 F6 |2 ?" {" a
# ● Refresh9 Y4 {# I% @1 U/ d
#--------------------------------------------------------------------------3 }6 _- ]7 R7 K2 C2 p, m5 D( s# h
alias xrxs64c_refresh refresh0 C5 P9 }4 A$ p
def refresh/ j5 _* T3 m4 F
xrxs64c_refresh" }0 f( | F- d% \/ C; O. Z& X
self.battler_recheck' l/ R7 k, ^2 _) b z$ i9 ^( p
end) }4 f2 x6 `; b+ Q( j
# A( T" Q% A. S8 A/ G7 t- A+ v
#--------------------------------------------------------------------------
- ~* f5 r/ k/ c+ L% Q # ● Battler Recheck6 f$ h7 Y) V1 w
#--------------------------------------------------------------------------4 N% d0 g- J- [6 k; ]- o
def battler_recheck+ I7 }) x% L9 j- n# N
return if @battler != nil# g( Y y; {7 E! L) k
if @page == nil' s) l$ i, ~1 G
return
|, J% d4 N* e3 H5 `" Y E end8 L O& H: h# e
if self.event_name =~ /<Actor>/
9 _* ~: y! c; ] g: H( w+ H! ^ actor = $game_party.actors[0]
5 s H9 ^$ M5 N0 Z" ~" q$ p {; H; B0 O @battler = Game_Actor.new(actor.id)
0 C ]7 N8 R% b6 F# S return
8 E9 w. Z3 T' M7 L4 {+ Y else
& ^9 M" N G5 a4 _6 T6 _ @enemy_id = 0
9 ^9 O% Q1 k, U+ A) b0 Y if self.event_name =~ /<Enemy(\d+)>/i
6 Y! C6 V& h) u& M/ S @enemy_id = $1.to_i 4 S7 Y N* l2 r) }
end
( A" Y& Z4 w M! N X) ^) t if @enemy_id == 0
. n9 A T3 d0 F. Z/ k return
V1 E7 o, z) a3 L/ R& n/ C end+ ?3 b9 H% i) d
end 3 ]7 K6 g p# R, u7 B2 n
troop_id = -1
/ r- F6 T+ z0 M. k U1 H member_index = -19 j5 X6 I) R7 D2 ?2 Q
for troop in $data_troops" j5 d9 ]! {0 J# f, @& b
next if troop == nil
) e& d" M0 j+ x- \, H/ L" [ for enemy in troop.members3 j' k! f1 Q) u, m7 \" U6 P
if enemy.enemy_id == @enemy_id$ h) s8 p6 I0 K# P5 e3 [
troop_id = $data_troops.index(troop)5 I, K& J! W; |$ z; a$ i" @# B
member_index = troop.members.index(enemy)
: u/ S: n& N) x, Z* h5 V+ v, P break' O7 x# R8 h/ L: Q, y5 G. Z
end! c9 Z; e# y% Q1 a& |( n* @
end2 U# q* i2 `( o% u# o( Q
end3 q) d8 y4 i8 B. J. Q
if troop_id != -1 and member_index != -19 E7 {0 @7 _! Y$ A, B' Y5 v! d& Q
@battler = Game_Enemy.new(troop_id, member_index)
% y! V$ l4 ?2 }8 N$ ~4 `6 M4 k c end
4 d' u, q6 e6 {/ w) u end
) [% w, Q" i" K1 Y$ e( H' ^ - z5 w& X+ H X4 f5 ]: F" L
#--------------------------------------------------------------------------, N& F1 q/ s- H
# ● Enemy Id
+ c2 h+ w6 T* @3 M# o #--------------------------------------------------------------------------0 \5 D2 v$ l7 A; d7 Q
def enemy_id! }8 @( M) T& C5 h; l' s& a
self.battler
& @8 C$ w4 R1 F ^) X return @enemy_id0 f! d: d3 x2 H J) M& O0 z7 {+ `
end k" i& }5 Y4 ~9 a8 [; E
; D# G, e) d# L( o! F, t #--------------------------------------------------------------------------
3 u4 V. _ H4 F # ● update_gained_exp_gold# P$ v; J, S- b; ], h
#--------------------------------------------------------------------------
3 @& M6 R$ d# H$ i def update_defeated
1 y) n) S) U: o) r+ ?3 t+ d return if self.battler == nil
. S. k, o: U$ |! G5 C% [; h# T* `& t0 x if self.battler.dead? and self.battler.defeated == false" n$ f" x+ p7 Q1 h( q
self.battler.defeated = true
: d; `4 H, }4 T' |6 V$ [ defeated_effect
! a0 a3 i& E+ s( K! z, d5 p end - U2 O% p1 c \( F
end
8 w. ?, w4 \% t6 J! d8 e/ F9 ?
$ R5 z, @! [" ?! i# @ #--------------------------------------------------------------------------- `7 o" ?, D6 ?7 `6 S: o* [
# ● Defeated Effect
3 N& _# o7 Q5 H9 L) q #-------------------------------------------------------------------------- ' e. m# r" E% g' x
def defeated_effect
8 Z$ b" d$ C& U4 c& G" C self.through = true5 Z( f6 @" V7 Q, N4 M
last_attack = XAS_BA_ENEMY::ENEMY_FINAL_ATTACK[self.battler.id]
; Q* Q* |: G1 I d( j! ] self.battler.last_attack_time = 15 if last_attack != nil 5 z- c0 M$ e2 P0 k% m, \
unless self.tool_id > 0 or self.battler.e_item% W/ Y5 C$ E: v+ j( t
@actor.exp += self.battler.exp; L, B6 `! y5 ]9 w
$game_party.gain_gold(self.battler.gold) 9 g- G/ \$ R/ @9 m6 N: Q
end
$ a+ n8 C& h& b; e5 E+ N( P id = XAS_BA::DEFEAT_NUMBER_ID& c6 o; {6 }+ M7 F$ a
$game_variables[id] += 1 if id != 05 D; Q2 F) t6 ]8 q% Q
jumpa(0,0,20) if XAS_BA_ENEMY::COLLAPSE_JUMP == true
E0 ]& C, r; r* ]% q2 w6 R: A switch_id = XAS_BA_ENEMY::DEFEAT_SWITCH_IDS[self.battler.id]
5 s- F. \# k% ] L( B _ if switch_id != nil
5 {& Q% F. {) s4 ~# g $game_switches[switch_id] = true
! e9 A _* r; Y# N, ~ p* y: h $game_map.refresh6 x# x+ J5 y1 z. ?* s* z8 _& Y
end
+ R$ ? z, d- [ end
4 u b/ J8 s# s* D ! C9 e. i( p4 W2 K
$ m1 M( F* ]0 q$ l , ~9 p5 E) G% |( P: H
#--------------------------------------------------------------------------
7 z& E, d$ x+ l# q; X7 r5 ~: K! S # ● Treasure Dispose
3 t1 z1 x* B4 q; q9 c0 X) d+ \6 [ #--------------------------------------------------------------------------/ A' C* i" r6 H
def treasure_dispose* |: d8 K# ?7 {& \1 {4 E9 j
if self.battler == nil and self.is_a?(Game_Event)
% I' c I( ^, v. l5 x Z% B7 g if self.treasure_time > 0 and # h) ~: S+ v5 K+ w/ M: y* [1 h4 G
self.treasure_time -= 1 $ ^ d; b/ n: s' n3 H
if self.alwaly_on_target_id != 0
# z) o2 O3 y+ x self.zoom_x = 1.00
+ b5 `7 L) k$ L) h R- X& t4 l elsif self.treasure_time < 100
; G# D6 B) l" ^# z* k8 [ self.zoom_x -= 0.01 if self.zoom_x > 0.01
& L7 G$ {7 i% ]/ |% S $game_map.remove_token(self) if self.treasure_time == 0
2 i+ ^- E- U# l9 d4 w$ W end" b w; z( q$ `& t* |, _
end
S+ `2 f o5 Q6 d0 K9 e end
( i& L2 ^% s b7 X end 0 J2 e3 o1 i! |
4 Y- m; |) w! L( m) ~' d #--------------------------------------------------------------------------5 v' V9 J% Q, O
# ● Hit Reaction ON
( B) C; [+ h8 m% `2 V8 k) L #--------------------------------------------------------------------------! a v) v5 D, U% @
def hit_reaction_on! O4 D. `+ ^0 S) k
return unless check_battler_exist?
' A$ x" x1 y3 c9 G, Z6 Y0 L self.hit_reaction = true
7 {' R1 Y7 ~1 B# g8 V% ? end
/ o7 R# _6 A) _2 T
; T/ Y, I7 V: y/ {+ ?; K! D/ c #--------------------------------------------------------------------------
T2 t }) k; e2 b5 a # ● Hit Reaction Off4 a( P1 W0 H! E+ h4 ~$ N! \
#--------------------------------------------------------------------------
, P# T+ b5 y5 C K, D( r4 A def hit_reaction_off
$ F/ o# ^; t$ d& w return unless check_battler_exist? , y1 @, b; x9 R/ v- D; }5 x3 S8 \2 k
self.hit_reaction = false
2 y+ P: J% W4 F% f- C end 0 |4 M) f q+ s; I& d# t
1 t9 @# F$ |* j* L- e
#--------------------------------------------------------------------------3 K' ]$ K7 d+ b$ X& J1 A
# ● Hp Hit Reaction
+ h3 }* R5 p1 }# F2 @* }; Y+ ^ #--------------------------------------------------------------------------
' [# i" N* n1 b7 R% ^. k! N def hp_hit_reaction(on)
7 S( C" y/ ~; W Z return unless check_battler_exist?
2 F+ e& v, V/ a lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
" ?- w5 O s8 |6 d if self.battler.hp > lowhp + S0 r8 ]5 I* h1 P. ?, P {( o
self.hit_reaction = on
3 A# X3 q. k4 }5 L/ o' |* i else
- d, B* L* H2 c+ l c* b, V6 @$ O+ x/ @ R if on == true: j2 O/ r n E; @4 K
self.hit_reaction = false3 d" d# w/ b: ^% C) ?! I" O! Q6 u
else- L9 a4 `, b5 N0 H% H. u
self.hit_reaction = true& G# _( _# `" p
end6 q2 Q9 L) i8 s0 |. Z0 [" U2 Y
end
: w) r" C$ I# ?# w) z end
; a" q o. J' h5 N" {
3 Z; s" ~7 D" v: U9 o3 }( c) x7 w #--------------------------------------------------------------------------
- x9 L8 L9 ]! t6 K0 y+ r # ● Hero Level Hit Reaction' K/ N. h1 n1 W+ [0 T
#--------------------------------------------------------------------------0 \3 l7 ^, E1 g$ W5 ?0 X
def hero_level_hit_reaction(level,on)
. C* {% ^4 ]" t* G. G: ^. I return unless check_battler_exist?
' M% }" L" r; e actor = $game_party.actors[0]
# G) n4 A5 N1 G: t7 V if actor.level >= level
. h% ?. X* L# K' }, ~; _ self.hit_reaction = on6 u2 ~2 B4 ?6 }
else- \* @* \; a( s/ e1 K4 `
if on == true# y' R- D% H. f! l g
self.hit_reaction = false
& n) U6 }6 G* C' M else6 r/ [( _! R% k- u' p. U. }
self.hit_reaction = true, ~( ]! r+ {% z" f2 f
end
/ S+ @7 Z( z( h* D; S+ v. y2 y7 ~. O end 7 f0 F, Z# `7 v, S6 N& H+ \3 Z
end
; C& x) ^' b( V- F/ @
3 V5 l6 J: @1 y9 b6 P1 x# R #--------------------------------------------------------------------------$ p* {8 v5 X5 G
# ● Shield Enable!
9 I8 l7 K* V2 Q- z' B) k2 E3 \ #--------------------------------------------------------------------------
7 [ | k3 ^4 Z4 b6 i* [ def shield_enable!
4 O3 B9 i/ D1 Y: p& c' f# [4 r# F return unless check_battler_exist?
" ]+ c/ \ G3 |3 }& N @shield_disable = nil
8 S: K+ I3 y) Y* {/ d self.battler.shield_active = true
0 a9 F7 c$ ~( I8 p- } end# P/ C$ W# G p1 J$ w7 s5 s1 S
s4 V( Z8 O% [- S
#--------------------------------------------------------------------------9 \8 p* c% z2 a& ^3 Z* V
# ● Shield Disable! " x* N3 w. Z& p% q2 Z, f6 E1 a) }
#--------------------------------------------------------------------------
1 B" J) [+ \5 D2 g, S def shield_disable!3 N) L' @7 Y; g; s
return unless check_battler_exist?
& b1 u; y/ ?7 W( T7 I @shield_disable = true5 w# P9 S8 ^' j
self.battler.shield_active = false: q% a) v3 A4 i" p
end
- A5 ]. Y6 ^7 V! G' |/ _4 T
3 [9 G' O8 H9 k( Z #--------------------------------------------------------------------------
' A- x5 S) Z1 j # ● LowHP Shield
8 O+ Y( T8 x& _+ k #--------------------------------------------------------------------------. _ P. `2 _2 H& }( I1 Z2 C
def lowhp_shield(on)
1 F/ C& L0 u8 Y3 X return unless check_battler_exist? 0 c7 A9 k) J2 C, U
lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 1006 Y7 v6 `% U; F3 b, m# ~+ h
if on == true5 {: G I* D) H$ F, `- Q* [# R
@shield_disable = true
1 k" B& K1 C4 N elsif on == false2 T& p+ l, X% n2 b
@shield_disable = nil4 p' i. t' l& j% t P
end
% a9 O% s' w! l) [6 j& L/ ? end + \) T4 K& J0 u
: g7 j8 b8 y0 U+ B5 z3 m #--------------------------------------------------------------------------$ l3 K' y+ l Y8 {! f! c f3 y2 Z
# ● Hero HP Shield
0 v: ]' L: i/ P8 O P #--------------------------------------------------------------------------$ P0 @) g* |3 f7 _; e' M; X
def hp_shield(on)
0 Q: T; D0 W0 ]! I return unless check_battler_exist?
% K% t+ A5 M0 B6 S, S. N+ s lowhp = self.battler.maxhp * XAS_BA_ENEMY::LOWHP / 100
+ A: @! v3 s2 b9 J$ `& ^4 F if self.battler.hp > lowhp* M2 L9 R t8 z6 r$ f) G0 f, [
if on == true
7 a, \" n+ t* m @shield_disable = nil
3 K6 [" Q9 ?) C. ~% H$ h else
( _( ? R+ T7 m3 m! T# ? @shield_disable = true
- g: H8 o' m& A" y end) G }( ]3 n* O/ u$ x4 X" p
else6 s3 ?: I0 K g6 ?3 @1 @9 u
if on == true3 S. M0 X: Z$ @0 h4 W# h
@shield_disable = true
6 r0 c! ~9 v; z+ U) b" V else8 @8 A- [9 ?7 t( I9 H: z$ u& Z( G% V
@shield_disable = nil( y& Y2 a- s; E+ P. L
end 1 W/ ]. H' X& c- J* ]
end6 u# i+ v9 m8 {+ A
end
! m- ^! [% [" ?8 v0 o. w7 P
* X/ `# D4 |2 z #--------------------------------------------------------------------------7 Y2 O$ O9 L* \, P9 Q9 P! k2 |
# ● Hero Level Shield 9 v; x- a- g1 ] z% p! M# Q
#--------------------------------------------------------------------------5 F8 w9 V* z: S2 @3 `+ P
def hero_level_shield(level,on)1 R! [* K' h# h M
return unless check_battler_exist?
# P) J4 L7 p8 o4 ^ actor = $game_party.actors[0]
& H; S i, y J& u' D, o if actor.level >= level 8 U# ?6 W+ C7 D. ~2 X# X
if on == true0 c- Z) E- }0 i- `. H
@shield_disable = nil) x2 d1 g: ]3 H8 D& E! ]$ ^+ F3 i
else
/ G# H( d7 P7 n, | @shield_disable = true
. {" g- l! Y, m" E- u end & c/ I# A- `7 R. D4 o2 _! r
else
' O% J( ^7 G* j if on == true- f+ f# ]9 r9 s; e
@shield_disable = true
$ x7 T- H' U: _: p" [: V else
: r Q% U0 i X/ y2 v" e3 j @shield_disable = nil
8 o! r+ j, I# k end $ z% i' S/ W, ^6 h$ x5 I& C5 v# n+ _
end2 n3 Z3 T% a7 d# f
end
, X1 q0 U) {9 C; {
) l6 A. k0 C5 m( j; N* M2 N6 G #--------------------------------------------------------------------------' `5 L, \) `! u* V) x ] |. s3 r3 \
# ● Shield Directions * _: l; K2 k/ A3 M5 T
#--------------------------------------------------------------------------
; m+ b- ^/ E$ Z' w; ^ def shield_directions
8 {. j( }. W9 ?# x if self.battler.auto_action
1 e/ }5 H5 b' \ i% G set = @shield_disable ? [] : [2,4,6,8]* }& @/ g: D1 }" b! G# Z! G
else! D0 z: c0 H1 o0 o+ X
set = @shield_disable ? [] : XAS_BA_ENEMY::SHILED_DIRECTIONS[self.enemy_id]
S5 K4 x7 V& G7 [* ?$ U; A end
0 j. j( c$ i3 I set = [] if set == nil' `" a$ ]3 |: n3 c( q$ s+ T
return set
; w9 x# C. [" c! H) J% y5 N8 F end g" O) C7 y5 [# }4 d
' r+ A& |& n; X. ^ #--------------------------------------------------------------------------2 \' x. I' ^, c; e/ B
# ● Shield Actions
; w( A. A1 u2 p$ ]$ p, } #--------------------------------------------------------------------------% _) c, i" W' F% n) ?
def shield_actions
5 a+ D3 G0 |; x! x n! f set = XAS_BA_ENEMY::SHILED_ACTIONS[self.enemy_id]
0 t7 x& z2 S& B, V set = [] if set == nil3 o2 I3 m3 P6 U
return set+ B2 h; q: }. P' {* |! t, m! O
end
: i6 X/ z: l; L0 z+ g' q
- M! @1 {0 L# K- C #--------------------------------------------------------------------------
0 D8 m N4 d6 C( o6 N# P' K7 W # ● Knock Back Disable
6 i& ]6 D- j$ _0 S" g/ d& B; Q #--------------------------------------------------------------------------7 F" j! y# a: c8 m" E9 Y
def knock_back_disable
- m; j. b6 g( E" ^! N' ~2 E3 g3 t return self.battler.e_knockback_disable2 c% S0 M/ K$ H* a. ]1 ?
end
, O3 j8 U- w: f+ u
8 D. `7 j# G9 B5 A3 k #--------------------------------------------------------------------------( j# H$ d) M/ F% [7 c
# ● Body Size8 x' x7 I9 J9 X! p1 C
#--------------------------------------------------------------------------. E! a+ U+ T4 Q2 O: X
def body_size
) Y4 W8 L. L1 m/ o) g& X; u( Y return XAS_BA_ENEMY::BODY_SQUARE[self.enemy_id].to_i6 G9 w O' U* `
end3 _' s' A: W6 t& |" {) m* J' z! T) O
" `4 p% Y. E/ C! f4 \* \3 D! N #--------------------------------------------------------------------------: W. H5 t4 Z# s8 ^2 X2 w
# ● Defeat Process2 g1 E/ ~9 x! O' x
#--------------------------------------------------------------------------
1 }5 G; t7 u- H! n& ]8 Z" ? def defeat_process. F9 K2 ]" Y- Y Y& A- N" n$ Q
super
% w" [. [' |/ f4 H. | enemy_defeat_process(self.battler)
0 G: F4 C( G- v. W2 L& u3 ? end/ L- C5 k, h! S1 K2 D
end$ n* R# A J' Q' F3 Q- k- j/ h
/ L+ v) c" ~6 G+ j#===============================================================================& u3 ? b$ F$ n1 c( S
# ■ Game Event
! c8 X% n7 U9 R! i% R, R* l6 n#===============================================================================8 W' N$ @( o. A% l
class Game_Event < Game_Character
5 F, V- i) N& l v attr_reader :collision_attack 8 W9 T+ w6 b C, {9 V
H" t0 e5 C3 k9 D #--------------------------------------------------------------------------
" w6 |8 |, G K' N # ● Attack ON
8 A$ x- Z D/ i& v2 [/ G* k( g7 c #--------------------------------------------------------------------------! \6 x1 e- j! I( ^
def attack_on) a! c! F8 ^% j* ~
return unless check_battler_exist? 1 v: c1 w& n( O
if seal_state?(1)
9 I6 ^6 U' Q) w% B seal_text
6 ~1 Z$ G. m3 s" O: z @collision_attack = false
8 y- ?4 \9 h d) L return 1 @/ h0 \: r% e/ ~5 b. ?& E
end
; t. }9 @6 U: y$ V4 S: k3 V* _ @collision_attack = true3 E9 q/ x7 o1 i X
self.animation_id = self.battler.animation1_id
) J; q! {% |- Z; K! n name = @page.graphic.character_name + "_ACT"
, \; q! Z+ o7 `. } if RPG_FileTest.character_exist?(name) x9 P3 y8 W9 u/ g# w
@character_name = name
# ^: ]& N R. `4 b; y/ e, l$ y+ b end
- h! \/ F" }2 t6 H; u% S self.refresh
: w/ L$ l4 W( ~4 t# j8 u end
! X9 ]6 V# S' r) J I ( d: m3 n$ I" c3 R
#--------------------------------------------------------------------------) C$ N K4 L3 E1 \6 o* G
# ● Attack Off3 u) w7 B) H* A
#--------------------------------------------------------------------------* G; @2 _6 H% g
def attack_off0 t0 u( f6 h) U- M4 i
return unless check_battler_exist? ! m' j% K$ n5 l7 [' g4 c$ K
@collision_attack = false % c5 t$ I; K% O' ]$ Z4 Y3 a0 E
return if @page == nil
: p/ \8 L9 O" `/ e' ]3 O @character_name = @page.graphic.character_name7 m* l, y& K4 G: H4 s) A% c
self.refresh
! D) h: c8 j" {1 f9 Q end7 l( J6 |" m0 G# ~. m# h
end2 S8 j7 f5 j1 d
+ q/ p, W$ O' `% l
& \, d- z8 m. _& j! p! f$ u
#===============================================================================
9 F, Q8 O( W" }# ■ Game_Player* V+ L$ a% Q$ S, V |" u6 K
#===============================================================================- ], H! B% {* k9 [; {" W$ X3 a
class Game_Player < Game_Character
" t; G+ \6 V+ q) S# ~' [" n2 \7 c 7 }/ ~+ ~6 Z2 _1 x% L& T2 i$ A
#--------------------------------------------------------------------------
( U' \ `* x8 C; p0 ? # ● Can Touch Damage/ f4 P: E) `. J% T
#--------------------------------------------------------------------------
+ a. w% h# o8 j$ o5 c! `: |" P8 g def can_touch_damage?(event)% K$ g5 ~" t5 v; M4 \6 B
return false if event.erased
7 c4 a/ {' |4 P. e return false if event.battler.dead?
6 Q2 K- H5 B) U0 R3 X7 Y return false if event.knockbacking? 0 E0 m# k4 @5 {: Y; P }
return false if event.battler.stop+ l* V H) |! G# w2 l- w6 c
return false if event.battler.state_sleep - J, Z6 ~! V f% }: O, Y
return true
# S! o9 o2 J1 e end
# @. o+ w6 c7 I
* B. x z& d" f8 d #--------------------------------------------------------------------------
% b; d) }! Z' X* O+ G6 R9 ] # ● Check Event Trigger Touch
5 @4 V( M' L: l- e) ]2 @ #--------------------------------------------------------------------------9 W3 n, H0 G3 T/ ~$ o. W
alias xrxs64c_check_event_trigger_touch check_event_trigger_touch: F; @6 i) P6 S# d$ k7 V
def check_event_trigger_touch(x, y)
1 |9 w6 [1 r* \, T# ]$ j xrxs64c_check_event_trigger_touch(x, y)0 t" I& d7 |6 k& E R
if $game_system.map_interpreter.running?
0 C1 A6 |! P+ M0 N* A return( y0 W4 @' N8 m5 N2 Q+ v
end
$ a& a1 u3 I+ i' N8 k8 J for event in $game_map.events.values: U5 q# {5 Q) y) k4 ]& W
next unless event.collision_attack 5 R$ Z, `4 n& A5 A9 x1 s" u; v3 N
unless [1,2].include?(event.trigger)/ j- p& L) v$ N! [
if event.battler != nil and event.x == x and event.y == y and
3 Z/ _% F5 a* e/ i' [ can_touch_damage?(event)" m* r& o5 i$ W* H5 X) E
$game_player.attack_effect(event)
% V) B' p; I# P1 g/ d3 N: ] end
3 S& O" a! z- P. W( B0 c end* _2 L1 O& n: Y+ ?, f
end
5 Z) B, O# O, o! [" q3 F4 j" M `- I end
; P0 P2 E' g6 |' Y' F- rend; Q% p9 _" G5 d$ ]2 L
4 x; E8 G/ u( u/ ?
#===============================================================================5 W# a# T: p' `3 F
# ■ Game_Event! p7 o* N/ h- V0 ~3 ?2 Y1 j- t; |
#===============================================================================' H0 M- M! E: C! s* D/ F$ t
class Game_Event < Game_Character# @9 @" ]. r. a N( @7 V
) o* `( G" @( B( \0 J& ^ #--------------------------------------------------------------------------# `0 |* s# X M* A# Z
# ● Check Event Trigger Touch0 T, y9 n4 e( e8 n+ K+ s
#--------------------------------------------------------------------------
5 q4 P* G2 [; |# G alias xrxs64c_check_event_trigger_touch check_event_trigger_touch! g a2 f3 I" a; o! }" \, V
def check_event_trigger_touch(x, y)2 A" q9 D8 _8 L4 c9 p, ~% R
xrxs64c_check_event_trigger_touch(x, y)% O8 P' i' j) D& A& k
if $game_system.map_interpreter.running?: a/ k! y, D$ b# J4 z! W4 i
return5 ^! x8 s- O3 p E1 k
end/ \) n7 Q3 i# T% [' ^, W
return unless self.collision_attack6 Y6 z, P# g$ Z; p! e
if self.battler != nil and x == $game_player.x and y == $game_player.y
' A* M* ?8 X) G9 r' s/ D7 ? $game_player.attack_effect(self)$ v& a6 ^# A) Q8 l' Z% E6 g
end: m; {) {" p* O$ D
end' ~0 _5 {* }$ \8 u: G" L# d3 g# b7 E% P- ^
end# g' P T2 E$ H/ W' y0 P) Q+ @
( h$ L( O9 Y7 l) o#===============================================================================. Z3 r% K3 X# p6 C, ~
# ■ XAS_BA_BATTLEEVENT_NONPREEMPT1 c' a0 q& }% ?6 N* o; I$ H
#===============================================================================' O0 ~) u( O4 E7 x" P& ^3 }- g, t
module XAS_BA_BATTLEEVENT_NONPREEMPT
% _( F' C. k9 \( F F8 t! j5 Y U 2 V! Y6 O3 {6 _1 w
#--------------------------------------------------------------------------
; G# O2 d" ?3 Y2 D. Q # Update
& x9 f4 }' ~2 `7 ] #--------------------------------------------------------------------------8 @3 n9 u+ b M t- j
def update
5 ^/ q# j) U8 Z5 u6 A return if self.battler != nil and $game_system.map_interpreter.running?
j; Y& \' D" V( @" [% E. n: E+ g5 H super: e6 F2 m, g; S5 J$ v9 H( Z
end
3 g7 R6 v+ C" f; Y9 mend. ^8 x; A& e0 x$ C
+ ^# l1 G; Z3 S" d#===============================================================================5 G! n$ b3 L7 E2 E, {" e+ N! T& a
# ■ Game_Event9 [" Q+ x r, s4 T
#===============================================================================
. i2 a( \8 X* @. H, b" O' Iclass Game_Event < Game_Character
5 ^. K- y K, ~/ [+ |; e; [ include XAS_BA_BATTLEEVENT_NONPREEMPT. J( _/ {5 B s, i9 U
end
: n5 S. O/ c& C3 ?+ A- O, F) D8 [( o; P
% O. K( W: E: z# h5 b" D
, a6 K F4 `: T& p3 K" {4 {8 ^
% J+ [; |" p) @# b; J/ w
) S( _ i8 c# M& l
+ ]5 ?2 q0 T7 X9 Q q" \4 |: q
#===============================================================================+ l4 _3 r _* u& h
# ■ Game_Character
2 g+ z, h$ ]- }. w, p#===============================================================================0 B( q5 U5 P5 O$ N; T
class Game_Character) A0 ^! `" U" m3 Q
, [! e1 E7 W$ i: o0 E4 E
#--------------------------------------------------------------------------
2 d/ L. ~; i. C6 x5 f& k # ● Blow
) H4 W3 Q. t$ G #--------------------------------------------------------------------------
( p- f i. \: L4 t" e def blow(d, power = 1)
8 |- d$ j; |* W. ~ E5 | if self.move_route_forcing and $game_system.map_interpreter.running?
$ I+ B# D/ x; m+ ]6 ~' v1 q$ E return ) F5 z9 C+ r$ ?# U! I
end 6 f+ `+ u$ c3 L: y v; b
@need_refresh_pose = true
3 O' F3 m; n) S @pose_type_old = " X " ) e: Z9 {) R: `+ W' f2 @* n! W
@knock_back_prespeed = @move_speed if @knock_back_prespeed == nil
" H: S- N' _8 ~% _: Y return if self.knock_back_disable0 L" y/ L# G1 N* X% N
reset_pickup if self.battler.is_a?(Game_Actor)3 H* `4 S" |; K# }( M1 q
power.times do
, n& ~" Z7 [- e+ d) c if passable?(self.x, self.y, d)
" z) Y4 O) m# X ] @x += ([3,6,9].include?(d) ? 1 : [1,4,7].include?(d) ? -1 : 0)+ b# U- Q6 v+ }3 N
@y += ([1,2,3].include?(d) ? 1 : [7,8,9].include?(d) ? -1 : 0)8 ]% B: E) z- D5 i) {3 y$ ^6 j
end
, P9 N9 D9 q9 M9 ?$ H end/ F- o D! t" A
if self.battler.is_a?(Game_Enemy) ' p6 U! B! @- y. y# |/ }
enemy_knock_duration = XAS_BA_ENEMY::INVICIBLE_DURATION_ENEMY[enemy_id]6 _" l# ~8 N4 ]& \8 w' ~
if enemy_knock_duration != nil
) G7 L- t$ M5 K: }" n @knock_back_duration = enemy_knock_duration
7 K7 l. O6 ] i+ o" P# D+ I else9 o0 M5 M" ~+ i, x! C+ n+ p3 o1 N8 l
@knock_back_duration = XAS_BA_ENEMY::DEFAULT_INVICIBLE_DURATION_ENEMY # r# j3 f" Q) l$ D- C* B
end
3 a$ ^9 |4 u& _; K else( ]9 |* d) h5 Q# i: Y
@knock_back_duration = XAS_BA::KNOCK_BACK_DURATION_HERO
% {& F, E; N: x. ` jump(0,0) if XAS_BA::JUMP_HIT_HERO and self.action == nil
% c+ j% t) S+ y6 x# n4 m end 2 z" W" W' [! B
@move_speed = XAS_BA::KNOCK_BACK_SPEED
6 c1 u" F# p) K7 m/ G! t end
6 t% f. S; h0 T) ^+ b
3 e: x5 |/ y7 G% C #--------------------------------------------------------------------------
3 M- V" Q& M- [6 a # ● knockbacking?( \# s$ C# B% x" m
#--------------------------------------------------------------------------7 w) ]- b1 ~( V% ?* k. N
def knockbacking?
; W8 p$ E6 w6 @$ l% V return @knock_back_duration != nil! u4 q) W1 j& K# V- S) I# x
end; t! a. n0 I) z% G: D$ C" M, ]
) m3 f/ [( v- T) r
#--------------------------------------------------------------------------
/ m* m) c$ f" {: i/ m9 s0 m # ● Collapsing?
1 [, q+ c* h" q9 h4 ]2 Q0 i( d #--------------------------------------------------------------------------
! } d: K6 A4 s/ `2 \1 s def collapsing?& O- S5 k. z" ?, n% ]
return self.collapse_duration.to_i > 0! e! s- Z3 d! w" } [; `& \3 @
end
# _( D! U8 e5 L- H. X
2 w3 d8 B" ^& E0 u; D* v #--------------------------------------------------------------------------; P4 q5 k0 T( t
# ● update_text_popup - d" J! {! d& k8 i' ]/ S# g) R( k
#--------------------------------------------------------------------------
: n' @1 X: } H0 ` def update_after_text_popup ) d0 {0 S6 A" N8 v0 x! E X; S7 z
return if self.battler.after_damage_pop_time == 0
$ u7 \, u7 Z7 D5 { self.battler.after_damage_pop_time -= 1
' ^8 S% y& } G$ d# r$ H display_damage(self.battler.after_damage_pop) if self.battler.after_damage_pop_time == 0% {; I# l" _6 i7 K
end 5 t7 U+ J Y( e% x" P$ P
# N" {3 ?& O- _, b
#--------------------------------------------------------------------------
1 W9 |3 n2 I) S# j # ● update after animation+ G3 W0 m3 _" {3 I. Y! x# B5 [
#--------------------------------------------------------------------------
2 E) h8 H5 ^- G5 Y; h+ R( \ def update_after_animation+ u! h& R5 ~8 M. H
return if self.battler.after_animation_time == 0
9 c3 B/ m% |% c( _ self.battler.after_animation_time -= 1) o% J+ ?0 m$ h/ A% d% j3 c
self.animation_id = self.battler.after_animation_id if self.battler.after_animation_time == 0
3 n3 b" {7 m: l# D- q end 6 V& g5 l' ~& d" D) X# D" s# ]
" u$ L* X( e9 R" _
#--------------------------------------------------------------------------
$ _* R. j$ n; ~' {- o # ● update knockbacking
+ Q U( c* N% ~$ [/ Y #-------------------------------------------------------------------------- / h- R8 V3 z. E4 ?
def update_knockbacking$ z4 f$ Q( P) l; H/ k$ Y
@knock_back_duration = 5 if self.battler.state_sleep
) s: i* z; N: x8 Z% k return unless self.knockbacking?
* x! N5 ?. k a. k- S return if self.battler.stop, u5 ?2 ^9 }7 j" g, F% q k: \
@pattern = 0 unless @direction_fix* T2 C! G, T: N+ ] u- ~
@knock_back_duration -= 1 unless self.throw_active # s0 c2 a& u) l1 H% T1 V8 I
update_knockbacksprite
3 n& [; y0 Q" j if @knock_back_duration <= 0
* I( v( B+ j3 o% F. P" c @knock_back_duration = nil
: ?0 p% a9 g. Z @knock_back_prespeed = nil
- A5 j$ P* ~4 s8 @. |5 f! q+ \ if self.is_a?(Game_Event)5 ?7 N2 j- S) }$ k9 v/ ^! h# x$ {
@pose_type = "" ( Z" y; d8 o* o' D3 W1 O
@pose_type_old = @pose_type% I" Z B4 o; W- A" i7 O% F ~
@character_name = @page.graphic.character_name
0 z. y% z- l6 B ?# j8 s" @1 G2 W self.refresh
$ o$ P) `6 T& O/ f. C9 U end
4 Z) k5 [5 L: l end
& v5 k( |) }! z( W! n$ M! | end2 E/ d7 q4 z% F+ _4 I' K1 q/ {% T
. o6 I* v$ {7 \5 S6 z# ]1 V #--------------------------------------------------------------------------$ |7 z m4 @" T
# ● Update Knockback Sprite4 M+ q! M3 \3 G- u
#-------------------------------------------------------------------------- . b6 l% u, U( }
def update_knockbacksprite& ~ |. d3 r3 c9 k( ~- c$ c
return if @pose_type == "Refresh"/ a3 I7 G8 ?% P \
return if self.is_a?(Game_Player) # |% T t# e9 g4 e; D
@pose_type = "Refresh" ; k, Z. v3 o, V
name = @page.graphic.character_name + "_HIT"0 {8 s1 C) m/ e8 a. c7 [; ?
if RPG_FileTest.character_exist?(name)# v* E* u1 L" x- k: d7 J, {: G
@character_name = name
5 p. V5 w# z4 O. V self.refresh- ^4 c) z X9 G* ]9 U6 A5 i( l% I( i
end
: Y/ ^( ~* g3 s+ o end
& X- a j7 v7 _2 c0 j1 R 0 N2 {' }# r8 e$ A/ N- Z2 d
#--------------------------------------------------------------------------, v0 l- g* E9 o
# ● Seal State! o$ T$ ]8 x9 j0 w, N
#-------------------------------------------------------------------------- " J$ J+ b- }( c- q. F
def seal_state?(type) M/ a% [9 s. i9 w
case type 1 o- _$ C! }% U" T9 I
when 0 #Mute 1 L/ R2 d" F3 C4 ?. s
return true if self.battler.state_mute
$ M( n8 E' N) H T- l. E when 1 #Seal Attack) ` K. U$ c; l z. v
return true if self.battler.state_mute9 {' F. f+ ~# j4 L* Y( v- l& T
return true if self.battler.state_seal_attack
) K3 g5 b9 w- n% s when 2 #Seal Skill
) U' v* m, o5 B return true if self.battler.state_mute ! V' d# d6 ?0 s! X7 N* I1 {2 s
return true if self.battler.state_berserk
/ L/ C W. [1 [! y( w0 l return true if self.battler.state_seal_skill
# e: r$ o, V2 K4 L5 | when 3 #Seal Item
! B: r; k1 W. N% | return true if self.battler.state_mute
2 M- r/ ~; r$ E* {% { return true if self.battler.state_berserk
/ k% \' P0 a3 Z return true if self.battler.state_seal_item" g: I# p: e5 Y8 D L
end
, p# H8 e1 A' o2 A1 c( d7 l return false/ [0 B. L* g" l( |( R
end 6 ~6 c1 D' O$ t/ g0 `4 R! r! {/ [
* x( W7 T* U& c4 B #--------------------------------------------------------------------------( K; `6 X# j- k% I2 _5 P; c0 ?
# ● Seal Text
2 n, `# L' p& x' c #--------------------------------------------------------------------------1 ?6 u8 z7 W2 U
def seal_text) A& W/ f/ Z, }/ h/ a( O1 X) f
self.battler.damage = XAS::SEALED_TEXT5 M* _3 L ~2 g& p: Q3 Q
self.battler.damage_pop = true
, M2 _& Q) b, i) W& |& H" a $game_system.se_play(XAS::SEALED_SE)
4 r) o) h3 V( L7 R $game_temp.clear_setting2 if self.battler.is_a?(Game_Actor)
2 K# X( V) k0 @/ s* Z, |: d! \& V: d end
8 Y5 ^! A; L% ?/ g: G + B& u8 Q( M8 F+ Y1 @5 W! O3 m
end
7 e* ?$ A! D9 E2 p2 j#===============================================================================
3 [) U4 p( E" c; F( G E# ■ XAS_DamageStop
6 j# u. j! R9 l# N% E ^% ~ F#===============================================================================- q0 g" M, Q5 J" A% M( t
module XAS_DamageStop
, d: d0 J+ @' J, T1 ~' G : K3 F, @/ L0 {# W6 N
#--------------------------------------------------------------------------
6 ^; U( k( P& |$ B* L1 H/ B # ● Actiong?
! j, y3 y: X. W8 N5 E* o #--------------------------------------------------------------------------
9 k- `: K+ K* c- O1 L/ y3 _& ^ def acting?, s3 R# X) y r6 Y9 T3 [
return (super or self.knockbacking? or self.collapsing?)' G* k7 h3 i# |# y' v, f3 z
end
5 F1 `+ m3 P* z1 q- n, N1 d* d/ uend% e* W, w* @$ ^2 A6 s
* C3 ?6 }5 V- X6 _
#===============================================================================" U% I0 {, w; B( v; y
# ■ Game_Player
) Z. v; i3 r( o2 W#===============================================================================
3 x, B ]9 Q/ e* c" `class Game_Player < Game_Character: Q3 G; H5 b9 L8 a V
include XAS_DamageStop
?* z: e" N( O& v+ V, Tend8 g7 @, F& @5 |# J+ p# ^
5 K! R2 e2 `: V9 q& f) F#===============================================================================
" q" R/ [; e" {, t+ F/ `: h( A4 q* W8 F# ■ Game_Event9 X) G* k! `4 g k; P: X
#===============================================================================
7 n6 g B, _& A8 |class Game_Event < Game_Character
& c& n. m/ ?5 t include XAS_DamageStop
g. t( w W8 K; |4 R0 E$ [end6 q" T* H" q5 N" S& [
4 L5 j$ [# S2 v i) p
#===============================================================================# `- p2 k; G) n d% J
# ■ Game_Map
6 c& S3 ?$ \% E# U% N#===============================================================================
$ E8 P3 i. L8 f* gclass Game_Map" U/ n8 q; e Y5 L3 {
" t! }! u$ M: j& v# ?" y: `) h: W
#--------------------------------------------------------------------------5 R. S/ P+ f; H4 \
# ● Starting?
2 L! t& O: v# j" m# q. l #-------------------------------------------------------------------------- ~- u3 ^. C6 `/ s7 {$ u& a7 [
def starting?
$ _/ F; [$ _; [& v8 h if $game_system.map_interpreter.running?
) a, m, M) w$ n return true
* l8 W6 R2 c" i \ end5 C- a8 F' }4 z( y' M) z* L
for event in $game_map.events.values( P# V5 i/ p4 D" u3 ^5 n
return true if event.starting+ U8 ~% d1 C% [
end
: T: S0 I l2 W5 H return false
! C y4 t3 k: k8 x* s8 @6 R h% k end
, V. k Q0 j' D2 B; @end
# l& E) O A, H/ d
, U0 h; m( N: I#===============================================================================1 [: J s. J8 t/ e% Q$ l8 ^6 q; T
# ■ Interpreter
/ \% u6 }# h( M) E* m0 Q#===============================================================================" `. M5 I, a9 t+ n8 F/ Q
module XAS_ACTION. Q. D o, \! m( h! P# x* i
1 c' l7 v$ x0 P$ b
#--------------------------------------------------------------------------8 x2 K1 z2 B2 z" G2 s
# ● Xas Z Shoot Bullet% r. U2 t& X2 F! O. C. I# Z4 U7 l0 @
#--------------------------------------------------------------------------! r; J2 [" @& L+ V9 T: o
alias xas_z_shoot_bullet shoot_bullet: Q3 c/ J3 T0 g: U
def shoot_bullet(action_id)
$ ]$ v# p+ \& w* B0 B! I* i bullet_token = xas_z_shoot_bullet(action_id)( a) z* Y8 P) ^4 `- S; }. i
return bullet_token
W- z, Z2 ^9 Q7 \ end& @5 s+ J% O+ @& B
end
0 ]$ N3 T" ^0 V7 U* T6 y: Y, V9 \% y* I+ g' C$ ~+ @+ [4 }6 J
#===============================================================================
1 H4 o& p4 S0 P# ■ Sprite_Battler Fix
5 j6 A$ f& w$ p/ O' { W# j0 }5 `#===============================================================================4 n! Y: b# s! G9 ~2 `: i: O, T0 [
class Sprite_Battler < RPG::Sprite
/ a* w6 |9 T: H, c2 t+ yalias xas_damage_update update. @! Y" ~. A& X" q" B5 r
4 l5 D) k% W' k5 `
#--------------------------------------------------------------------------) M; ^6 i/ ]6 u& C4 h, y R
# ● Update1 ^: L+ x0 K8 ~% Q, x, f
#--------------------------------------------------------------------------
2 g/ F$ A5 Y0 B$ I3 U( b def update
& q, I3 g1 }0 S- x- }* _ super
0 C+ {* u) [0 }& O4 ~ if @battler_visible! I+ t J/ ?- o; [+ P9 [
if @battler.damage_pop
- [$ I: \& c& d( J7 ~8 r damage(@battler.damage, @battler.critical,@battler.state,@battler.item)+ e" o: q3 h% W `
@battler.damage = nil
" n, H5 K0 q! y4 b/ o4 L @battler.critical = false& o8 i( Z! m: e8 c
@battler.damage_pop = false
2 t6 g! N' `# h' S4 k) F end
J2 W" b5 X7 Y, w( D S end
$ D& I, i5 G& r2 U& D- ]( z xas_damage_update
) c8 y. N; C4 K2 N2 _ end3 _* f0 t, j ?0 H5 y
end
, A5 C1 `- M* i: S8 e M[/pre]7 ~, j6 U! [, b1 }8 F _# T
应该没有问题的才对,替换XAS - Battler 1试下吧,
, T, a7 H: C- A# y" p% B. ^1 t我这里完全是正常的。 |
|