ayuda:rgss:biblioteca:batallaraisefield
no way to compare when less than two revisions
Diferencias
Muestra las diferencias entre dos versiones de la página.
— | ayuda:rgss:biblioteca:batallaraisefield [2019/09/23 04:01] (actual) – creado - editor externo 127.0.0.1 | ||
---|---|---|---|
Línea 1: | Línea 1: | ||
+ | ====== Sistema de Batalla de RaiseField ====== | ||
+ | ===== Ficha técnica ===== | ||
+ | * **Nombre original:** Desconocido | ||
+ | * **Nombre del autor:** RaiseField | ||
+ | * **Utilidad: | ||
+ | * **Dependencia de otros scripts:** No | ||
+ | * **Incompatibilidades: | ||
+ | |||
+ | |||
+ | ===== Instalación ===== | ||
+ | Crea un nuevo script encima de " | ||
+ | |||
+ | <code ruby> | ||
+ | # | ||
+ | # ™ƒTƒCƒhƒrƒ…[ ŠÈˆÕâ€Å | ||
+ | # | ||
+ | # (C) copyright by RaiseField | ||
+ | # | ||
+ | # ƒTƒCƒhƒrƒ…[퓬ƒXƒNƒŠƒvƒg•àsƒOƒ‰ƒtƒBƒbƒNâ€Å | ||
+ | # | ||
+ | |||
+ | # | ||
+ | # ƒOƒ‰ƒtƒBƒbƒNƒtƒ@ƒCƒ‹‚Ì‹KŠi | ||
+ | # | ||
+ | # ƒoƒgƒ‰[ƒOƒ‰ƒtƒBƒbƒN | ||
+ | # | ||
+ | # @•àsƒOƒ‰ƒtƒBƒbƒN‚ð‚»‚Ì‚Ü‚ÜŽg‚¢‚Ü‚·B | ||
+ | # @ | ||
+ | # •ŠíƒOƒ‰ƒtƒBƒbƒN | ||
+ | # | ||
+ | # @•Ší‚̃AƒCƒRƒâ€œƒOƒ‰ƒtƒBƒbƒN‚ð‚»‚Ì‚Ü‚ÜŽg‚¢‚Ü‚·B | ||
+ | # | ||
+ | |||
+ | | ||
+ | module Side_view | ||
+ | # | ||
+ | # œ RTAB•¹—pƒtƒ‰ƒbƒO@™Ž©â€œ®â€FŽ¯ | ||
+ | # Scene_Battle ‚É ƒƒ\ƒbƒh synthe? ‚ª‚ ‚é‚©‚Ç‚¤‚©‚Åâ€FŽ¯ | ||
+ | # Ž©â€œ®â€FŽ¯‚µ‚½‚‚È‚¢ê‡‚Í‘‚«Š·‚¦‚Ä‚‚¾‚³‚¢B | ||
+ | # | ||
+ | if Scene_Battle.method_defined? | ||
+ | RTAB = true | ||
+ | else | ||
+ | RTAB = false | ||
+ | end | ||
+ | # | ||
+ | # œ RTAB‚̃Jƒƒ‰ƒ[ƒN‚ðŽg‚¤ê‡‚Ì•`‰æˆÊ’u Œë·C³ ™Ž©â€œ®â€FŽ¯ | ||
+ | # Ž©â€œ®â€FŽ¯‚µ‚½‚‚È‚¢ê‡‚Í‘‚«Š·‚¦‚Ä‚‚¾‚³‚¢B | ||
+ | # | ||
+ | def camera_correctness | ||
+ | return false if !RTAB | ||
+ | begin | ||
+ | return $scene.drive | ||
+ | rescue | ||
+ | return false | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒp[ƒeƒB‚ÌÅ‘ål†i‚ ‚‚Ü‚Å‚àƒXƒvƒ‰ƒCƒg‚ð‘‚â‚·‚¾‚¯‚Ì‚à‚Ìj | ||
+ | # | ||
+ | Party_max = 4 | ||
+ | # | ||
+ | # œ ƒoƒgƒ‰[ƒOƒ‰ƒtƒBƒbƒN‚ÌŠg‘å—¦(ƒAƒNƒ^[ê—pj | ||
+ | # | ||
+ | CHAR_ZOOM = 1.0 | ||
+ | # | ||
+ | # œ ƒAƒ[ƒJ[ƒ\ƒ‹ˆÊ’u•â³ | ||
+ | # | ||
+ | ARROW_OX = -64 | ||
+ | ARROW_OY = 64 | ||
+ | # | ||
+ | # œ â€òs‚Æ‚µ‚Ĉµ‚¤ƒXƒe[ƒg–¼â€z—ñ | ||
+ | # | ||
+ | FLY_STATES = [" | ||
+ | # | ||
+ | # œ 퓬‰æ–ʃp[ƒeƒB‚̈ʒu | ||
+ | # | ||
+ | PARTY_X = 480 # ƒp[ƒeƒB‚Ì X ˆÊ’u | ||
+ | PARTY_Y = 120 # ƒp[ƒeƒB‚Ì Y ˆÊ’u | ||
+ | FORMATION_X = 32 # ŠeƒAƒNƒ^[“¯Žm‚ÌŠÔŠu X | ||
+ | FORMATION_Y = 48 # ŠeƒAƒNƒ^[“¯Žm‚ÌŠÔŠu Y | ||
+ | # | ||
+ | # œ ƒJƒXƒ^ƒ}ƒCƒY’è†| ||
+ | # | ||
+ | NORMAL | ||
+ | WALK_R | ||
+ | WALK_L | ||
+ | ATTACK | ||
+ | ATTACK_R = " | ||
+ | ATTACK_L = " | ||
+ | MAGIC = " | ||
+ | ITEM = " | ||
+ | # ƒAƒjƒ‚ÌÝ’è | ||
+ | ANIME = { | ||
+ | # [‰æ‘œID, | ||
+ | NORMAL | ||
+ | WALK_R | ||
+ | WALK_L | ||
+ | ATTACK_R | ||
+ | ATTACK_L | ||
+ | MAGIC => [1,false, 6,false, false,"" | ||
+ | ITEM => [1,false, 6,false, false,"" | ||
+ | } | ||
+ | | ||
+ | # ƒfƒtƒHƒ‹ƒg’l‚ÌÝ’è | ||
+ | ANIME.default = [1, | ||
+ | | ||
+ | # ƒAƒNƒVƒ‡ƒâ€œÝ’è‚ÌŠÖ˜A•t‚¯ | ||
+ | ACTION_LIB = { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ACTION_LIB.default = " | ||
+ | |||
+ | # ƒAƒNƒVƒ‡ƒâ€œÝ’è‚Ì‚Æ‚«‚É ‰EŽèUŒ‚ or ¶ŽèUŒ‚ ‚ð※•Ê‚·‚éANIME | ||
+ | # " | ||
+ | DUAL_WEAPONS_ANIME = [ATTACK] | ||
+ | | ||
+ | # | ||
+ | ANIME_PATARN = 3 | ||
+ | # | ||
+ | BLZ_X = { | ||
+ | # X À•W‚ÌÝ’è@•ŠíƒAƒjƒ => [1, 2, 3] © ANIME_PATARN‚Ì Ƈ‚킹‚é | ||
+ | 0=> | ||
+ | 1=> | ||
+ | 2=> | ||
+ | 3=> | ||
+ | 4=> | ||
+ | 5=> | ||
+ | 6=> | ||
+ | 7=> | ||
+ | 8=> | ||
+ | } | ||
+ | # | ||
+ | BLZ_Y = { | ||
+ | # Y À•W‚ÌÝ’è@•ŠíƒAƒjƒ => [1, 2, 3] © ANIME_PATARN‚Ì Ƈ‚킹‚é | ||
+ | 0=> | ||
+ | 1=> | ||
+ | 2=> | ||
+ | 3=> | ||
+ | 4=> | ||
+ | 5=> | ||
+ | 6=> | ||
+ | 7=> | ||
+ | 8=> | ||
+ | } | ||
+ | # | ||
+ | BLZ_ANGLE = { | ||
+ | # Y À•W‚ÌÝ’è@•ŠíƒAƒjƒ => [1, 2, 3] © ANIME_PATARN‚Ì Ƈ‚킹‚é | ||
+ | # •Ê‚É Ž® ‚ðŽg‚í‚È‚‚Ä’è łà‚æ‚¢‚ªŽg‚Á‚½‚Ù‚¤‚ª‚í‚©‚è‚â‚·‚¢‚©‚àH | ||
+ | 0=> | ||
+ | 1=> | ||
+ | 2=> | ||
+ | 3=> | ||
+ | 4=> | ||
+ | 5=> | ||
+ | 6=> | ||
+ | 7=> | ||
+ | 8=> | ||
+ | } | ||
+ | | ||
+ | # | ||
+ | # œ ƒVƒFƒCƒN‚ÌÝ’è | ||
+ | # | ||
+ | SHAKE_FILE = " | ||
+ | SHAKE_POWER = 5 # ‹‚³ | ||
+ | SHAKE_SPEED = 5 # ‘¬‚³ | ||
+ | SHAKE_DURATION = 5 # ŽžŠÔ | ||
+ | # | ||
+ | # œ ㉺‽“]‚ÌÝ’è | ||
+ | # | ||
+ | UPSIDE_DOWN_FILE = " | ||
+ | # | ||
+ | # œ ¶‰E‽“]‚ÌÝ’è | ||
+ | # | ||
+ | REVERSE_FILE = " | ||
+ | # | ||
+ | # œ ‰ñ“]‚ÌÝ’è | ||
+ | # | ||
+ | TURNING_FILE = " | ||
+ | TURNING_DIRECTION = 1 # •ûŒüi1.‽ŽžŒv‰ñ‚è, | ||
+ | TURNING_SPEED = 40 # ‘¬‚³ | ||
+ | TURNING_DURATION = 1 # ‰ñ“]†| ||
+ | # | ||
+ | # œ ˆÚ“®‚ÌÝ’è | ||
+ | # | ||
+ | MOVE_FILE = " | ||
+ | MOVE_RETURN = 1 # Œ³‚̈ʒu‚É–ß‚é‚©H | ||
+ | MOVE_SPEED = 32 # ‘¬‚³ | ||
+ | MOVE_COORDINATES = [0, | ||
+ | # | ||
+ | # œ ƒAƒjƒ’ljÁ‚ÌÝ’è | ||
+ | # | ||
+ | ADD_ANIME_FILE = " | ||
+ | ADD_ANIME_ID = 0 # ƒAƒjƒ[ƒVƒ‡ƒâ€œID | ||
+ | # | ||
+ | # œ ƒfƒtƒHƒ‹ƒg‚ÆRTAB‚̃f[ƒ^•ÏŠ· | ||
+ | # | ||
+ | def convert_battler | ||
+ | return RTAB ? @active_actor : @active_battler | ||
+ | end | ||
+ | # | ||
+ | # œ ƒfƒtƒHƒ‹ƒg‚ÆRTAB‚̃f[ƒ^•ÏŠ·2 | ||
+ | # | ||
+ | def convert_battler2(*arg) | ||
+ | return RTAB ? arg[0] : @active_battler | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | <code ruby> | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œÝ’è | ||
+ | # | ||
+ | module BattleActions | ||
+ | | ||
+ | # ‰º‚Ì‚à‚Ì‚Í‚ ‚‚Ü‚Å‚àˆê—á‚È‚Ì‚Å | ||
+ | # “Ǝ©‚Éì‚Á‚Ä‚‚¾‚³‚¢B | ||
+ | |||
+ | Actions = { | ||
+ | |||
+ | " | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | | ||
+ | " | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | | ||
+ | | ||
+ | " | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | |||
+ | " | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | | ||
+ | " | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | } # ‚±‚±‚ÅI‚í‚è@Á‚³‚È‚¢‚Å‚‚¾‚³‚¢ | ||
+ | |||
+ | end | ||
+ | | ||
+ | module RPG | ||
+ | class Weapon | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œÝ’è | ||
+ | # | ||
+ | def battle_actions | ||
+ | case @id | ||
+ | when 1 # ƒuƒƒâ€œƒYƒ\[ƒh | ||
+ | return BattleActions:: | ||
+ | end | ||
+ | return BattleActions:: | ||
+ | end | ||
+ | end | ||
+ | class Skill | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œÝ’è | ||
+ | # | ||
+ | def battle_actions | ||
+ | if self.magic? | ||
+ | return BattleActions:: | ||
+ | else | ||
+ | return BattleActions:: | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | class Item | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œÝ’è | ||
+ | # | ||
+ | def battle_actions | ||
+ | return BattleActions:: | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | class Game_Enemy < Game_Battler | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œÝ’è | ||
+ | # | ||
+ | def battle_actions | ||
+ | return BattleActions:: | ||
+ | end | ||
+ | end | ||
+ | module RPG | ||
+ | =begin | ||
+ | | ||
+ | @™ à–¾ | ||
+ | |||
+ | @ƒAƒCƒRƒâ€œ•Ší‚Ì“®‚«•û‚ÌÝ’è‚Å‚·B | ||
+ | @module Side_view ‚Ì BLZ_X, BLZ_Y, BLZ_ANGLE ‚ªŽQÆ‚³‚ê‚Ü‚·B | ||
+ | @‚ ‚‚Ü‚Å‚à“®‚«•û‚ÌÝ’è‚Ȃ̂ʼn摜‚̓AƒCƒRƒâ€œ‚ªŽg‚í‚ê‚Ü‚·B | ||
+ | |||
+ | œ ƒJƒXƒ^ƒ}ƒCƒY•û–@ | ||
+ | | ||
+ | ‚PAƒf[ƒ^ƒx[ƒX‚©‚ç‚ÌÝ’èi‰‹‰ŽÒŒü‚¯j | ||
+ | | ||
+ | •ŠíƒAƒjƒ‘®«‚ðì‚èA‚»‚ê‚ð•Ší‚ւ‚¯‚Ü‚·B | ||
+ | @@ | ||
+ | —á@•ŠíƒAƒjƒ1@‎š‚Í‼Šp‚ÅAƒXƒy[ƒX‚ÍŠJ‚¯‚È‚¢ | ||
+ | | ||
+ | ‚QAƒXƒNƒŠƒvƒg‚©‚ç‚ÌÝ’è(’†‹‰ŽÒŒü‚¯) | ||
+ | | ||
+ | case @id | ||
+ | when 1,2,3,4 | ||
+ | return 1 | ||
+ | when 5,6,7,8 | ||
+ | return 2 | ||
+ | end | ||
+ | return 0 | ||
+ | | ||
+ | ‚̂悤‚É•`‚‚ÆID•Ê‚ÉŽw’è‰Ââ€\‚Å‚·B | ||
+ | | ||
+ | ‚»‚Ì‘¼‚É‚àAðŒ•ªŠò‚È‚Ç‚ð‚¢‚ê‚Äݒ肵‚Ä‚à—Ç‚¢‚Å‚·B | ||
+ | —Ⴆ‚ÎA‘®«ID50‚ðŽ‚Á‚Ä‚¢‚é‚Æ‚«‚ÍAƒAƒjƒ‚P‚Æ‚µ‚½‚¢‚È‚ç | ||
+ | | ||
+ | if @element_set.include? | ||
+ | return 1 | ||
+ | end | ||
+ | | ||
+ | ‚Æ‚µ‚Ü‚·B | ||
+ | | ||
+ | ‚PA‚̃f[ƒ^ƒx[ƒX‚©‚ç‚ÌÝ’è‚ðŽg‚í‚È‚¢ê‡ | ||
+ | element_name = " | ||
+ | for i in @element_set | ||
+ | if $data_system.elements[i] =~ /# | ||
+ | return $1.to_i | ||
+ | end | ||
+ | end | ||
+ | ‚̕―ª‚Í휂µ‚Ä‚à‚©‚Ü‚¢‚Ü‚¹‚ñ | ||
+ | | ||
+ | | ||
+ | =end | ||
+ | class Weapon | ||
+ | # | ||
+ | # œ •ŠíƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | # | ||
+ | def anime | ||
+ | # ‘®«Žæ“¾—p | ||
+ | element_name = " | ||
+ | for i in @element_set | ||
+ | if $data_system.elements[i] =~ /# | ||
+ | return $1.to_i | ||
+ | end | ||
+ | end | ||
+ | # ƒJƒXƒ^ƒ}ƒCƒYÝ’è@ID Žw’è | ||
+ | case @id | ||
+ | when 1,2,3,4 | ||
+ | return 1 | ||
+ | when 5,6,7,8 | ||
+ | return 2 | ||
+ | end | ||
+ | return 1 # ƒfƒtƒHƒ‹ƒg’l | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | =begin | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | # | ||
+ | @™ à–¾ | ||
+ | | ||
+ | @ s“®ŽÒ‚©‚ç‘Îێ҂ɃAƒjƒ‚ðâ€ò‚΂µ‚Ü‚·B | ||
+ | @ â€ò‚΂·ƒAƒjƒ‚ð@ƒf[ƒ^ƒx[ƒX]ƒAƒjƒ[ƒVƒ‡ƒâ€œ@‚Åì‚è‚Ü‚·B | ||
+ | [ƒAƒjƒ[ƒVƒ‡ƒâ€œID, | ||
+ | |||
+ | |||
+ | œ ƒJƒXƒ^ƒ}ƒCƒY•û–@ | ||
+ | | ||
+ | case @id | ||
+ | when 17,18,19,20 | ||
+ | return [101, | ||
+ | when 21,22,23,24 | ||
+ | return [102, | ||
+ | end | ||
+ | return 0 | ||
+ | | ||
+ | ‚̂悤‚É•`‚‚ÆID•Ê‚ÉŽw’è‰Ââ€\‚Å‚·B | ||
+ | | ||
+ | | ||
+ | œ ƒAƒjƒ[ƒVƒ‡ƒâ€œID | ||
+ | | ||
+ | â€ò‚΂·ƒAƒjƒ[ƒVƒ‡ƒâ€œID‚Å‚·B’Z‚¢ê‡‚ÍŒJ‚è•Ô‚µ‚Å•\Ž¦‚³‚ê‚Ü‚·B | ||
+ | | ||
+ | | ||
+ | œ ƒXƒs[ƒh | ||
+ | | ||
+ | ‘å‚«‚¢‚Ù‚¤‚ª‘‚¢i‚O‚¾‚ƃAƒjƒ‚͈Ú“®‚µ‚Ü‚¹‚ñj | ||
+ | | ||
+ | 1 1ƒtƒŒ[ƒ€‚Å1ƒhƒbƒgi‚Þ‚Æl‚¦‚Ä‚‚¾‚³‚¢B | ||
+ | | ||
+ | œ ‰•œ‚·‚é‚©H | ||
+ | | ||
+ | true ‚Æ‚µ‚½ê‡Aƒu[ƒƒ‰ƒâ€œ‚̂悤‚ɃAƒjƒ‚ª–ß‚è‚Ü‚·B | ||
+ | | ||
+ | œ ’¼ü(false)or‹Èü(true) | ||
+ | | ||
+ | true = ‘ÎÛ‚ÉŒü‚©‚Á‚Ä‹Èü‚ÅAƒAƒjƒ‚ªâ€ò‚Ñ‚Ü‚·BiC³‚Ì—]’n‚ ‚è‚Å‚·‚ªEEEj | ||
+ | false = ‘ÎÛ‚ÉŒü‚©‚Á‚Ä’¼ü‚ÅAƒAƒjƒ‚ªâ€ò‚Ñ‚Ü‚·B | ||
+ | | ||
+ | =end | ||
+ | module RPG | ||
+ | class Weapon | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | # | ||
+ | def flying_anime | ||
+ | # ID Žw’è ‚Ì—á | ||
+ | #case @id | ||
+ | #when 34 # ƒu[ƒƒ‰ƒâ€œ‚Á‚Û‚¢‚â‚ | ||
+ | # return [103, | ||
+ | #when 17,18,19,20 | ||
+ | # return [101, | ||
+ | #when 21,22,23,24 | ||
+ | # return [102, | ||
+ | #end | ||
+ | return [0, | ||
+ | end | ||
+ | end | ||
+ | class Skill | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | # | ||
+ | def flying_anime | ||
+ | return [0, | ||
+ | end | ||
+ | end | ||
+ | class Item | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | # | ||
+ | def flying_anime | ||
+ | return [0, | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | class Game_Enemy < Game_Battler | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | # | ||
+ | def flying_anime | ||
+ | return [0, | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # ¡ Game_Battler | ||
+ | # | ||
+ | class Game_Battler | ||
+ | include Side_view | ||
+ | # | ||
+ | # œ ’ljÁEŒöŠJƒCƒâ€œƒXƒ^ƒâ€œƒX•Ï†| ||
+ | # | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_accessor : | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | # | ||
+ | # œ ƒfƒtƒHƒ‹ƒg‚̃Aƒjƒ[ƒVƒ‡ƒâ€œ‘Ò‚¿ŽžŠÔ‚ðŽæ“¾ | ||
+ | # | ||
+ | def animation_duration=(animation_duration) | ||
+ | @_animation_duration = animation_duration | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹ŠJŽnŽž‚̃ZƒbƒgƒAƒbƒv | ||
+ | # | ||
+ | def start_battle | ||
+ | @height = 0 | ||
+ | @real_x = 0 | ||
+ | @real_y = 0 | ||
+ | @real_zoom = 1.0 | ||
+ | @battler_condition = "" | ||
+ | @action = nil | ||
+ | @battle_actions = [] | ||
+ | @battler_action = false | ||
+ | @step = 0 | ||
+ | @anime_on = false | ||
+ | @wait_count = 0 | ||
+ | @wait_count2 = 0 | ||
+ | @ox = 0 | ||
+ | @oy = 0 | ||
+ | @pattern = 0 | ||
+ | @pattern_log = true | ||
+ | @pattern_freeze = false | ||
+ | @condition_freeze = false | ||
+ | @active = false | ||
+ | @move_distance = nil | ||
+ | @move_wait = 0 | ||
+ | @move_coordinates = [0,0,0,0] | ||
+ | @flying_distance = nil | ||
+ | @flying_wait = 0 | ||
+ | @flying_x = 0 | ||
+ | @flying_y = 0 | ||
+ | @flash_flag = {} | ||
+ | self.flying_clear | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“®’†â€»’è | ||
+ | # | ||
+ | def moving? | ||
+ | # XÀ•W•â³‚Ü‚½‚ÍAYÀ•W•â³‚ª0‚Å‚È‚¯‚ê‚ÎAˆÚ“®’† | ||
+ | return (@ox != 0 or @oy != 0) | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“®I—¹â€»’è | ||
+ | # | ||
+ | def move_end? | ||
+ | return (@ox == @move_coordinates[0] and @oy == @move_coordinates[1]) | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œŠJŽnÝ’è | ||
+ | # | ||
+ | def action(flag = true) | ||
+ | @battler_action = flag | ||
+ | @animation1_on = false | ||
+ | @animation2_on = false | ||
+ | @step = " | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œ’†â€»’è | ||
+ | # | ||
+ | def action? | ||
+ | return @battler_action | ||
+ | end | ||
+ | # | ||
+ | # œ ‘M‚«â€»’è | ||
+ | # | ||
+ | def flash? | ||
+ | return @flash_flg | ||
+ | end | ||
+ | # | ||
+ | # œ 퓬•sâ€\※’è | ||
+ | # | ||
+ | def anime_dead? | ||
+ | if $game_temp.in_battle and !RTAB | ||
+ | if [2, | ||
+ | return @last_dead | ||
+ | end | ||
+ | end | ||
+ | return @last_dead = self.dead? | ||
+ | end | ||
+ | # | ||
+ | # œ ƒsƒâ€œƒ`ó‘Ô※’è | ||
+ | # | ||
+ | def crisis? | ||
+ | if $game_temp.in_battle and !RTAB | ||
+ | if [2, | ||
+ | return @last_crisis | ||
+ | end | ||
+ | end | ||
+ | return @last_crisis = (self.hp <= self.maxhp / 4 or badstate?) | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒbƒhƒXƒe[ƒg※’è | ||
+ | # | ||
+ | def badstate? | ||
+ | for i in @states | ||
+ | unless $data_states[i].nonresistance | ||
+ | return true | ||
+ | end | ||
+ | end | ||
+ | return false | ||
+ | end | ||
+ | # | ||
+ | # œ â€òs | ||
+ | # | ||
+ | def fly | ||
+ | if @fly != nil | ||
+ | return @fly | ||
+ | end | ||
+ | for id in @states | ||
+ | if FLY_STATES.include? | ||
+ | return 60 | ||
+ | end | ||
+ | end | ||
+ | return 0 | ||
+ | end | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ–Ú•WÀ•W‚ÌŒvŽZ | ||
+ | # | ||
+ | def flying_setup | ||
+ | # “ñ“x–Ú‚ÍŽÀs‚µ‚È‚¢ | ||
+ | return if @flying_distance != nil && !camera_correctness | ||
+ | if RTAB | ||
+ | targets = @target | ||
+ | else | ||
+ | targets = $scene.target_battlers | ||
+ | end | ||
+ | # –Ú“IÀ•W‚ðŒvŽZ | ||
+ | @f_target_x = 0 | ||
+ | @f_target_y = 0 | ||
+ | for t in targets | ||
+ | @f_target_x += t.screen_x | ||
+ | @f_target_y += t.screen_y | ||
+ | end | ||
+ | if targets != [] | ||
+ | @f_target_x /= targets.size | ||
+ | @f_target_y /= targets.size | ||
+ | else | ||
+ | @flying_distance = 0 | ||
+ | return | ||
+ | end | ||
+ | # ‹——£‚ÌŒvŽZ | ||
+ | @flying_distance = (self.screen_x - @f_target_x).abs + (self.screen_y - @f_target_y).abs | ||
+ | @flying_end = false | ||
+ | end | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ | ||
+ | # | ||
+ | def flying_animation | ||
+ | # –ß‚é | ||
+ | if @step != " | ||
+ | return [false, | ||
+ | end | ||
+ | # ‚ ‚ç‚©‚¶‚ߌvŽZ | ||
+ | self_x = self.screen_x | ||
+ | self_y = self.screen_y | ||
+ | @flying_distance = @flying_distance == 0 ? 1 : @flying_distance | ||
+ | n1 = @flying_wait / @flying_distance.to_f | ||
+ | if @flying_distance - @flying_wait > @flying_distance / 2 | ||
+ | n2 = 1.0 + 10.0 * @flying_wait / @flying_distance.to_f | ||
+ | else | ||
+ | n2 = 1.0 + 10.0 * (@flying_distance - @flying_wait) / @flying_distance.to_f | ||
+ | end | ||
+ | if !@flying_anime[4] | ||
+ | # ’¼üˆÚ“® | ||
+ | x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i | ||
+ | y = (self_y + 1.0 * (@f_target_y - self_y) * n1).to_i | ||
+ | else | ||
+ | # ‹ÈüˆÚ“® | ||
+ | if !@flying_proceed_end | ||
+ | x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i | ||
+ | y = (self_y + 1.0 * (@f_target_y - self_y) * n1 - n2**2).to_i | ||
+ | else | ||
+ | x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i | ||
+ | y = (self_y + 1.0 * (@f_target_y - self_y) * n1 + n2**2).to_i | ||
+ | end | ||
+ | end | ||
+ | # À•W‘ã“ü | ||
+ | @flying_x = x | ||
+ | @flying_y = y | ||
+ | # ƒEƒGƒCƒg | ||
+ | if !@flying_proceed_end | ||
+ | # ŠJŽn | ||
+ | @flying_proceed_start = @flying_wait == 0 | ||
+ | @flying_wait += @flying_anime[1] | ||
+ | @flying_wait = [@flying_wait, | ||
+ | @flying_proceed_end = @flying_wait == @flying_distance | ||
+ | else | ||
+ | # ŠJŽn | ||
+ | @flying_return_start = @flying_wait == @flying_distance | ||
+ | @flying_wait -= @flying_anime[1] | ||
+ | @flying_wait = [@flying_wait, | ||
+ | @flying_return_end = @flying_wait == 0 | ||
+ | end | ||
+ | if @flying_anime[1] == 0 | ||
+ | @flying_end = true | ||
+ | elsif !@flying_anime[2] | ||
+ | @flying_end = @flying_proceed_end | ||
+ | else | ||
+ | @flying_end = @flying_return_end | ||
+ | end | ||
+ | # ’l‚ð•Ô‚·iƒAƒjƒŠJŽn, | ||
+ | return [@flying_proceed_start, | ||
+ | end | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ‰Šú‰» | ||
+ | # | ||
+ | def flying_clear | ||
+ | @flying_proceed_start = false | ||
+ | @flying_proceed_end = false | ||
+ | @flying_return_start = false | ||
+ | @flying_return_end = false | ||
+ | @flying_end = true | ||
+ | @flying_anime = [0, | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“® | ||
+ | # | ||
+ | def move | ||
+ | # ‹——£‚ÌŒvŽZ | ||
+ | @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs + | ||
+ | | ||
+ | if @move_distance > 0 | ||
+ | return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1] | ||
+ | array = @move_coordinates | ||
+ | # ƒWƒƒƒâ€œƒv•â³’l‚ÌŒvŽZ | ||
+ | n = 100.0 * @move_wait / @move_distance | ||
+ | jump = -@move_action[4] * n * (100 - n) / 100.0 | ||
+ | @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i | ||
+ | @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i | ||
+ | # ƒEƒGƒCƒg | ||
+ | @move_wait -= @move_action[3] | ||
+ | @move_wait = [@move_wait, | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“®ƒAƒNƒVƒ‡ƒâ€œ‚̎擾 | ||
+ | # | ||
+ | def get_move_action | ||
+ | string = @action.split(/#/ | ||
+ | string = string.split(/,/ | ||
+ | @move_action = [string[0], | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œ‚̎擾 | ||
+ | # | ||
+ | def get_step | ||
+ | if @action.nil? | ||
+ | @step = " | ||
+ | return | ||
+ | end | ||
+ | return ACTION_LIB[@action.split(/#/ | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ŽŸ‚̃AƒNƒVƒ‡ƒâ€œ‚Ö) | ||
+ | # | ||
+ | def update_next | ||
+ | @action = @battle_actions.shift | ||
+ | @step = get_step | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (“®ìŽæ“¾) | ||
+ | # | ||
+ | def update_setup | ||
+ | # ƒAƒNƒVƒ‡ƒâ€œ‚̎擾 | ||
+ | self.get_actions | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ˆÚ“®Žæ“¾) | ||
+ | # | ||
+ | def update_moving_setup | ||
+ | # ˆÚ“®ƒAƒNƒVƒ‡ƒâ€œ‚̎擾 | ||
+ | self.get_move_action | ||
+ | # ˆÚ“®–Ú•W‚ÌÝ’è | ||
+ | self.move_setup | ||
+ | @step = " | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ˆÚ“®) | ||
+ | # | ||
+ | def update_moving | ||
+ | # ˆÚ“® | ||
+ | self.move | ||
+ | self.condition = @battler_condition | ||
+ | # ˆÚ“®Š®—¹‚µ‚½‚玟‚̃Xƒeƒbƒv‚Ö | ||
+ | if move_end? | ||
+ | update_next | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒAƒjƒŽÀs) | ||
+ | # | ||
+ | def update_action | ||
+ | con = @action.split(/#/ | ||
+ | # ‰EŽèE¶Žè‚𕪂¯‚é | ||
+ | if DUAL_WEAPONS_ANIME.include? | ||
+ | if !@first_weapon and @second_weapon | ||
+ | con = con + " | ||
+ | else | ||
+ | con = con + " | ||
+ | end | ||
+ | end | ||
+ | # ƒAƒjƒ•ÏX | ||
+ | self.condition = con | ||
+ | # ƒ‹[ƒv‚©â€Û‚© | ||
+ | if !ANIME[@battler_condition][1] | ||
+ | self.anime_on | ||
+ | end | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (‰â€œ‹——£ƒAƒjƒ) | ||
+ | # | ||
+ | def update_flying | ||
+ | # –Ú•W‚ÌÝ’è | ||
+ | self.flying_setup | ||
+ | # ‰â€œ‹——£ƒAƒjƒI—¹ | ||
+ | if @flying_end or @flying_anime == [0, | ||
+ | self.flying_clear | ||
+ | update_next | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒAƒjƒ•ÏX) | ||
+ | # | ||
+ | def update_change | ||
+ | con = @action.split(/#/ | ||
+ | # ‰EŽèE¶Žè‚𕪂¯‚é | ||
+ | if DUAL_WEAPONS_ANIME.include? | ||
+ | if !@first_weapon and @second_weapon | ||
+ | con = con + " | ||
+ | else | ||
+ | con = con + " | ||
+ | end | ||
+ | end | ||
+ | # ƒAƒjƒ•ÏX | ||
+ | self.condition = con | ||
+ | # ƒ‹[ƒv‚©â€Û‚© | ||
+ | if !ANIME[@battler_condition][1] | ||
+ | self.anime_on | ||
+ | end | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (s“®ƒAƒjƒ) | ||
+ | # | ||
+ | def update_animation1 | ||
+ | @animation1_on = true | ||
+ | # s“®ƒAƒjƒ‚ÌŒã‚És“®‚ðŠJŽn‚·‚é | ||
+ | if $scene.phase4_step == 3 | ||
+ | id = RTAB ? @anime1 : $scene.animation1_id | ||
+ | animation = $data_animations[id] | ||
+ | frame_max = animation != nil ? animation.frame_max : 0 | ||
+ | @wait_count2 = frame_max * 2 | ||
+ | return | ||
+ | end | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (‘ÎÛƒAƒjƒ) | ||
+ | # | ||
+ | def update_animation2 | ||
+ | @animation2_on = true | ||
+ | # s“®ƒAƒjƒ‚ÌŒã‚És“®‚ðŠJŽn‚·‚é | ||
+ | if $scene.phase4_step == 4 | ||
+ | id = RTAB ? @anime2 : $scene.animation2_id | ||
+ | animation = $data_animations[id] | ||
+ | frame_max = animation != nil ? animation.frame_max : 0 | ||
+ | @wait_count2 = frame_max * 2 | ||
+ | return | ||
+ | end | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒEƒGƒCƒg) | ||
+ | # | ||
+ | def update_wait | ||
+ | @wait_count2 = @action.split(/#/ | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (Žc‘œ•\Ž¦) | ||
+ | # | ||
+ | def update_shadow_on | ||
+ | @shadow = true | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (Žc‘œÁ‹Ž) | ||
+ | # | ||
+ | def update_shadow_off | ||
+ | @shadow = false | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (¶‰E‽“]) | ||
+ | # | ||
+ | def update_reverse | ||
+ | @reverse = @reverse ? false : true | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (‘M‚«ƒAƒjƒ) | ||
+ | # | ||
+ | def update_flash | ||
+ | # ‘M‚«ƒAƒjƒ‚ÌŒã‚És“®‚ðŠJŽn‚·‚é | ||
+ | if @flash_flag[" | ||
+ | @wait_count = $scene.flash_duration | ||
+ | @flash_flag[" | ||
+ | return | ||
+ | end | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (SE‚̉‰‘t) | ||
+ | # | ||
+ | def update_play_se | ||
+ | data = @action.split(/#/ | ||
+ | data = data.split(/,/ | ||
+ | # SE ‚ð‰‰‘t | ||
+ | Audio.se_play(" | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒAƒjƒŒÅ’è) | ||
+ | # | ||
+ | def update_freeze | ||
+ | con = @action.split(/#/ | ||
+ | # ‰EŽèE¶Žè‚𕪂¯‚é | ||
+ | if DUAL_WEAPONS_ANIME.include? | ||
+ | if !@first_weapon and @second_weapon | ||
+ | con = con + " | ||
+ | else | ||
+ | con = con + " | ||
+ | end | ||
+ | end | ||
+ | # ƒAƒjƒ•ÏX | ||
+ | self.condition = con | ||
+ | @pattern = @action.split(/#/ | ||
+ | @pattern_freeze = true | ||
+ | @condition_freeze = true | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒAƒjƒŒÅ’è‰ðœ) | ||
+ | # | ||
+ | def update_freeze_lifting | ||
+ | @pattern_freeze = false | ||
+ | @condition_freeze = false | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒAƒjƒ[ƒVƒ‡ƒâ€œ‚Ì•\Ž¦) | ||
+ | # | ||
+ | def update_animation_start | ||
+ | data = @action.split(/#/ | ||
+ | data = data.split(/,/ | ||
+ | target = data[0] | ||
+ | animation_id = data[1].to_i | ||
+ | if RTAB | ||
+ | case target | ||
+ | when " | ||
+ | @animation.push([animation_id, | ||
+ | when " | ||
+ | for tar in @target | ||
+ | tar.animation.push([animation_id, | ||
+ | end | ||
+ | end | ||
+ | else | ||
+ | case target | ||
+ | when " | ||
+ | @animation_id = animation_id | ||
+ | @animation_hit = true | ||
+ | when " | ||
+ | for tar in $scene.target_battlers | ||
+ | tar.animation_id = animation_id | ||
+ | tar.animation_hit = true | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | update_next | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (“®ìI—¹) | ||
+ | # | ||
+ | def update_finish | ||
+ | # “®ìI—¹ | ||
+ | @battler_action = false | ||
+ | @step = " | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‰[‚Ìó‘Ôiƒoƒgƒ‰[ƒOƒ‰ƒtƒBƒbƒN‚̃^ƒCƒv) | ||
+ | # | ||
+ | def condition | ||
+ | return @battler_condition | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‰[‚Ìó‘Ô •ÏXiƒoƒgƒ‰[ƒOƒ‰ƒtƒBƒbƒN‚̃^ƒCƒv) | ||
+ | # | ||
+ | def condition=(condition) | ||
+ | return if @condition_freeze | ||
+ | if @battler_condition != condition | ||
+ | @wait_count = ANIME[condition][2] | ||
+ | @pattern = 0 | ||
+ | end | ||
+ | @battler_condition = condition | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV | ||
+ | # | ||
+ | def update | ||
+ | # ƒEƒFƒCƒg’†‚Ìê‡ | ||
+ | if @wait_count == 0 | ||
+ | # ƒpƒ^[ƒâ€œXV | ||
+ | self.char_animation | ||
+ | @wait_count = ANIME[@battler_condition][2] | ||
+ | end | ||
+ | # ƒpƒ^[ƒâ€œXV | ||
+ | self.char_animation | ||
+ | # ƒEƒFƒCƒg’†‚Ìê‡ | ||
+ | if @wait_count2 > 0 | ||
+ | return | ||
+ | end | ||
+ | | ||
+ | # s“®ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | if @battler_action | ||
+ | method(" | ||
+ | return | ||
+ | end | ||
+ | | ||
+ | # ƒf[ƒ^‰Šú‰» | ||
+ | @animation1_on = false | ||
+ | @animation2_on = false | ||
+ | @action = nil | ||
+ | @battle_actions = [] | ||
+ | @move_wait = 0 | ||
+ | @move_distance = nil | ||
+ | @flying_wait = 0 | ||
+ | @flying_distance = nil | ||
+ | @flash = false | ||
+ | |||
+ | # ’ÊíE‘Ò‹@ | ||
+ | return self.condition = NORMAL | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒNƒVƒ‡ƒâ€œ‚̎擾 | ||
+ | # | ||
+ | def get_actions | ||
+ | skill = $data_skills[self.current_action.skill_id] | ||
+ | item = $data_items[self.current_action.item_id] | ||
+ | kind = self.current_action.kind | ||
+ | # “®ìŽæ“¾ | ||
+ | @battle_actions = [] | ||
+ | # ƒXƒLƒ‹ | ||
+ | if skill != nil && kind == 1 | ||
+ | @battle_actions = skill.battle_actions.dup | ||
+ | @flying_anime = skill.flying_anime | ||
+ | # ƒAƒCƒeƒ€ | ||
+ | elsif item != nil && kind == 2 | ||
+ | @battle_actions = item.battle_actions.dup | ||
+ | @flying_anime = item.flying_anime | ||
+ | # ¶ŽèUŒ‚ | ||
+ | elsif !@first_weapon and @second_weapon and self.is_a? | ||
+ | @battle_actions = self.battle_actions2.dup | ||
+ | @flying_anime = self.flying_anime2 | ||
+ | # ‰EŽèUŒ‚ | ||
+ | elsif self.current_action.basic == 0 and | ||
+ | self.is_a? | ||
+ | @battle_actions = self.battle_actions1.dup | ||
+ | @flying_anime = self.flying_anime1 | ||
+ | # ’ÊíUŒ‚ | ||
+ | elsif self.current_action.basic == 0 and self.current_action.kind == 0 | ||
+ | @battle_actions = self.battle_actions.dup | ||
+ | @flying_anime = self.flying_anime | ||
+ | else | ||
+ | @battle_actions = [" | ||
+ | @flying_anime = [0, | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒ‹[ƒv‚µ‚È‚¢ƒAƒjƒ‚̃Zƒbƒg | ||
+ | # | ||
+ | def anime_on | ||
+ | @pattern = 0 | ||
+ | @pattern_log = true | ||
+ | return | ||
+ | end | ||
+ | # | ||
+ | # œ ƒpƒ^[ƒâ€œXV | ||
+ | # | ||
+ | def char_animation | ||
+ | # ƒpƒ^ƒâ€œŒÅ’è‚Ìꇂà‚Ç‚é | ||
+ | return if @pattern_freeze | ||
+ | # ƒ‹[ƒv‚µ‚È‚¢ƒAƒjƒ‚Ìê‡ 1234 ‚ÅŽ~‚Ü‚é | ||
+ | if !ANIME[@battler_condition][1] && @pattern == 3 | ||
+ | return | ||
+ | end | ||
+ | # ƒAƒjƒ‚³‚¹‚È‚¢ê‡ 1 ‚ÅŽ~‚Ü‚é | ||
+ | if ANIME[@battler_condition][4] | ||
+ | @pattern = 0 | ||
+ | return | ||
+ | end | ||
+ | @pattern = (@pattern + 1) % 4 | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒjƒƒ^ƒCƒv | ||
+ | # | ||
+ | def anime_type | ||
+ | return ANIME[@battler_condition] != nil ? ANIME[@battler_condition][0] : 0 | ||
+ | end | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | <code ruby> | ||
+ | # | ||
+ | # ¡ Game_Actor | ||
+ | # | ||
+ | class Game_Actor < Game_Battler | ||
+ | include Side_view | ||
+ | # | ||
+ | # œ ƒZƒbƒgƒAƒbƒv | ||
+ | # | ||
+ | alias side_view_setup setup | ||
+ | def setup(actor_id) | ||
+ | side_view_setup(actor_id) | ||
+ | start_battle | ||
+ | end | ||
+ | # | ||
+ | # œ “ñ“•Ší‚ÌIDŽæ“¾@¦ƒGƒ‰[‰ñâ€ð—p | ||
+ | # | ||
+ | def weapon2_id | ||
+ | return @weapon2_id != nil ? @weapon2_id : 0 | ||
+ | end | ||
+ | # | ||
+ | # œ X•ûŒü ƒ|ƒWƒVƒ‡ƒâ€œ Žæ“¾ | ||
+ | # | ||
+ | def position | ||
+ | return $data_classes[@class_id].position | ||
+ | end | ||
+ | # | ||
+ | # œ Y•ûŒü ƒ|ƒWƒVƒ‡ƒâ€œ Žæ“¾ | ||
+ | # | ||
+ | def position2 | ||
+ | return self.index | ||
+ | end | ||
+ | # | ||
+ | # œ •ŠíƒAƒjƒƒ^ƒCƒv | ||
+ | # | ||
+ | def weapon_anime_type(type = @battler_condition) | ||
+ | file_name | ||
+ | visible | ||
+ | z = weapon_anime_type2(type) | ||
+ | motion | ||
+ | return [file_name, | ||
+ | end | ||
+ | # •ŠíƒAƒCƒRƒâ€œŽæ“¾ | ||
+ | def weapon_anime_type0(type = @battler_condition) | ||
+ | type = ANIME[type][5] | ||
+ | return weapon_anime1 if type == " | ||
+ | return weapon_anime2 if type == " | ||
+ | return nil | ||
+ | end | ||
+ | # •\Ž¦Eâ€ñ•\Ž¦‚̎擾 | ||
+ | def weapon_anime_type1(type = @battler_condition) | ||
+ | return ANIME[type][3] | ||
+ | end | ||
+ | # ƒoƒgƒ‰[‚æ‚èã‚É•\Ž¦‚·‚é‚©‚Ç‚¤‚© | ||
+ | def weapon_anime_type2(type = @battler_condition) | ||
+ | type = ANIME[type][5] | ||
+ | return true if type == " | ||
+ | return false | ||
+ | end | ||
+ | # •Ší‚Ì“®ìNoDŽæ“¾ | ||
+ | def weapon_anime_type3(type = @battler_condition) | ||
+ | type = ANIME[type][5] | ||
+ | return extend_weapon_anime1 if type == " | ||
+ | return extend_weapon_anime2 if type == " | ||
+ | return 0 | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾(ƒJƒƒ‰•â³–³‚µ) | ||
+ | # | ||
+ | def true_x | ||
+ | return PARTY_X + position * FORMATION_X + @ox | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾(ƒJƒƒ‰•â³–³‚µ) | ||
+ | # | ||
+ | def true_y | ||
+ | # ƒp[ƒeƒB“à‚Ì•À‚ч‚©‚ç Y À•W‚ðŒvŽZ‚µ‚Ä•Ô‚· | ||
+ | if self.index != nil | ||
+ | y = position2 * FORMATION_Y + PARTY_Y + @oy - @height / 2 | ||
+ | return y | ||
+ | else | ||
+ | return 0 | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾 | ||
+ | # | ||
+ | def screen_x(true_x = self.true_x) | ||
+ | return 320 + (true_x - 320) * @real_zoom + @real_x | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾 | ||
+ | # | ||
+ | def screen_y(true_y = self.true_y) | ||
+ | return true_y * @real_zoom + @real_y | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê Z À•W‚̎擾 | ||
+ | # | ||
+ | def screen_z | ||
+ | return screen_y + 1000 | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾(ˆÚ“®‚È‚Ç‚µ‚Ä‚¢‚È‚¢ê‡) | ||
+ | # | ||
+ | def base_x | ||
+ | return 320 + (true_x - @ox - 320) * @real_zoom + @real_x | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾 | ||
+ | # | ||
+ | def base_y | ||
+ | return (true_y - @oy) * @real_zoom + @real_y | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê Šg‘å—¦‚̎擾 | ||
+ | # | ||
+ | def zoom | ||
+ | return ($scene.zoom_rate[1] - $scene.zoom_rate[0]) * | ||
+ | (true_x + @fly) / 480 + $scene.zoom_rate[0] | ||
+ | end | ||
+ | # | ||
+ | # œ UŒ‚—pAƒoƒgƒ‹‰æ–Ê X À•W‚̎擾 | ||
+ | # | ||
+ | def attack_x(z) | ||
+ | return (320 - true_x) * z * 0.75 | ||
+ | end | ||
+ | # | ||
+ | # œ UŒ‚—pAƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾 | ||
+ | # | ||
+ | def attack_y(z) | ||
+ | return (160 - (true_y + fly / 4) * z + @height * zoom * z / 2) * 0.75 | ||
+ | end | ||
+ | # | ||
+ | # œ ‘M‚«‘Ò‚¿ŽžŠÔ | ||
+ | # | ||
+ | def flash_duration | ||
+ | return $scene.flash_duration | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒjƒ[ƒVƒ‡ƒâ€œŽæ“¾ | ||
+ | # | ||
+ | def battle_actions1 | ||
+ | weapon = $data_weapons[@weapon_id] | ||
+ | return weapon != nil ? weapon.battle_actions : BattleActions:: | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒjƒ[ƒVƒ‡ƒâ€œŽæ“¾ | ||
+ | # | ||
+ | def battle_actions2 | ||
+ | weapon = $data_weapons[@weapon2_id] | ||
+ | return weapon != nil ? weapon.battle_actions : BattleActions:: | ||
+ | end | ||
+ | # | ||
+ | # œ •ŠíƒAƒjƒ[ƒVƒ‡ƒâ€œ “®‚«•û Žæ“¾ | ||
+ | # | ||
+ | def extend_weapon_anime1 | ||
+ | weapon = $data_weapons[@weapon_id] | ||
+ | return weapon != nil ? weapon.anime : 0 | ||
+ | end | ||
+ | # | ||
+ | # œ •ŠíƒAƒjƒ[ƒVƒ‡ƒâ€œ “®‚«•û Žæ“¾ | ||
+ | # | ||
+ | def extend_weapon_anime2 | ||
+ | weapon = $data_weapons[@weapon2_id] | ||
+ | return weapon != nil ? weapon.anime : 0 | ||
+ | end | ||
+ | # | ||
+ | # œ •ŠíƒAƒjƒ[ƒVƒ‡ƒâ€œŽæ“¾ | ||
+ | # | ||
+ | def weapon_anime1 | ||
+ | weapon = $data_weapons[@weapon_id] | ||
+ | return weapon != nil ? weapon.icon_name : "" | ||
+ | end | ||
+ | # | ||
+ | # œ •ŠíƒAƒjƒ[ƒVƒ‡ƒâ€œŽæ“¾ | ||
+ | # | ||
+ | def weapon_anime2 | ||
+ | weapon = $data_weapons[@weapon2_id] | ||
+ | return weapon != nil ? weapon.icon_name : "" | ||
+ | end | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ[ƒVƒ‡ƒâ€œŽæ“¾ | ||
+ | # | ||
+ | def flying_anime1 | ||
+ | weapon = $data_weapons[@weapon_id] | ||
+ | return weapon != nil ? weapon.flying_anime : [0, | ||
+ | end | ||
+ | # | ||
+ | # œ ‰â€œ‹——£ƒAƒjƒ[ƒVƒ‡ƒâ€œŽæ“¾ | ||
+ | # | ||
+ | def flying_anime2 | ||
+ | weapon = $data_weapons[@weapon2_id] | ||
+ | return weapon != nil ? weapon.flying_anime : [0, | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“®–Ú•WÀ•W‚ÌŒvŽZ | ||
+ | # | ||
+ | def move_setup | ||
+ | if RTAB | ||
+ | targets = @target | ||
+ | else | ||
+ | targets = $scene.target_battlers | ||
+ | end | ||
+ | case @move_action[0] | ||
+ | when " | ||
+ | @target_x = self.base_x | ||
+ | @target_y = self.base_y | ||
+ | when " | ||
+ | targets.sort!{|a, | ||
+ | targets.reverse! | ||
+ | if targets != [] | ||
+ | @target_x = targets[0].screen_x | ||
+ | @target_y = targets[0].screen_y | ||
+ | else | ||
+ | @target_x = self.base_x | ||
+ | @target_y = self.base_y | ||
+ | end | ||
+ | when " | ||
+ | targets.sort!{|a, | ||
+ | if targets != [] | ||
+ | @target_x = targets[0].screen_x | ||
+ | @target_y = targets[0].screen_y | ||
+ | else | ||
+ | @target_x = self.base_x | ||
+ | @target_y = self.base_y | ||
+ | end | ||
+ | when " | ||
+ | @target_x = 0 | ||
+ | @target_y = 0 | ||
+ | for t in targets | ||
+ | @target_x += t.screen_x | ||
+ | @target_y += t.screen_y | ||
+ | end | ||
+ | if targets != [] | ||
+ | @target_x /= targets.size | ||
+ | @target_y /= targets.size | ||
+ | end | ||
+ | when " | ||
+ | @target_x = 0 | ||
+ | @target_y = 0 | ||
+ | for t in $game_troop.enemies | ||
+ | @target_x += t.screen_x | ||
+ | @target_y += t.screen_y | ||
+ | end | ||
+ | if $game_troop.enemies != [] | ||
+ | @target_x /= $game_troop.enemies.size | ||
+ | @target_y /= $game_troop.enemies.size | ||
+ | end | ||
+ | when " | ||
+ | @target_x = 0 | ||
+ | @target_y = 0 | ||
+ | for t in $game_party.actors | ||
+ | @target_x += t.screen_x | ||
+ | @target_y += t.screen_y | ||
+ | end | ||
+ | if $game_party.actors != [] | ||
+ | @target_x /= $game_party.actors.size | ||
+ | @target_y /= $game_party.actors.size | ||
+ | end | ||
+ | when " | ||
+ | @target_x = self.base_x | ||
+ | @target_y = self.base_y | ||
+ | end | ||
+ | # •â³ | ||
+ | @target_x += @move_action[1] - self.base_x | ||
+ | @target_y += @move_action[2] - self.base_y | ||
+ | # ˆÚ“®–Ú•W‚ÌÀ•W‚ðƒZƒbƒg | ||
+ | @move_coordinates = [@target_x.to_i, | ||
+ | # ‹——£‚ÌŒvŽZ(ƒEƒGƒCƒg‚ÌÝ’è) | ||
+ | @move_wait | ||
+ | | ||
+ | end | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | <code ruby> | ||
+ | # | ||
+ | # ¡ Game_Enemy | ||
+ | # | ||
+ | class Game_Enemy < Game_Battler | ||
+ | # | ||
+ | # œ ƒZƒbƒgƒAƒbƒv | ||
+ | # | ||
+ | alias side_view_initialize initialize | ||
+ | def initialize(troop_id, | ||
+ | side_view_initialize(troop_id, | ||
+ | start_battle | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“® | ||
+ | # | ||
+ | def move | ||
+ | # ‹——£‚ÌŒvŽZ | ||
+ | @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs + | ||
+ | | ||
+ | if @move_distance > 0 | ||
+ | return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1] | ||
+ | array = @move_coordinates | ||
+ | # ƒWƒƒƒâ€œƒv•â³’l‚ÌŒvŽZ | ||
+ | n = 100.0 * @move_wait / @move_distance | ||
+ | jump = -@move_action[4] * n * (100 - n) / 100.0 | ||
+ | @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i | ||
+ | @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i | ||
+ | # ƒEƒGƒCƒg | ||
+ | @move_wait -= @move_action[3] | ||
+ | @move_wait = [@move_wait, | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“®–Ú•WÀ•W‚ÌŒvŽZ | ||
+ | # | ||
+ | def move_setup | ||
+ | if RTAB | ||
+ | targets = @target | ||
+ | else | ||
+ | targets = $scene.target_battlers | ||
+ | end | ||
+ | case @move_action[0] | ||
+ | when " | ||
+ | @target_x = self.base_x | ||
+ | @target_y = self.base_y | ||
+ | when " | ||
+ | targets.sort!{|a, | ||
+ | if targets != [] | ||
+ | @target_x = targets[0].screen_x | ||
+ | @target_y = targets[0].screen_y | ||
+ | else | ||
+ | @target_x = self.base_x | ||
+ | @target_y = self.base_y | ||
+ | end | ||
+ | when " | ||
+ | targets.sort!{|a, | ||
+ | targets.reverse! | ||
+ | if targets != [] | ||
+ | @target_x = targets[0].screen_x | ||
+ | @target_y = targets[0].screen_y | ||
+ | else | ||
+ | @target_x = self.base_x | ||
+ | @target_y = self.base_y | ||
+ | end | ||
+ | when " | ||
+ | @target_x = 0 | ||
+ | @target_y = 0 | ||
+ | for t in targets | ||
+ | @target_x += t.screen_x | ||
+ | @target_y += t.screen_y | ||
+ | end | ||
+ | if targets != [] | ||
+ | @target_x /= targets.size | ||
+ | @target_y /= targets.size | ||
+ | end | ||
+ | when " | ||
+ | @target_x = 0 | ||
+ | @target_y = 0 | ||
+ | for t in $game_troop.enemies | ||
+ | @target_x += t.screen_x | ||
+ | @target_y += t.screen_y | ||
+ | end | ||
+ | if $game_troop.enemies != [] | ||
+ | @target_x /= $game_troop.enemies.size | ||
+ | @target_y /= $game_troop.enemies.size | ||
+ | end | ||
+ | when " | ||
+ | @target_x = 0 | ||
+ | @target_y = 0 | ||
+ | for t in $game_party.actors | ||
+ | @target_x += t.screen_x | ||
+ | @target_y += t.screen_y | ||
+ | end | ||
+ | if $game_party.actors != [] | ||
+ | @target_x /= $game_party.actors.size | ||
+ | @target_y /= $game_party.actors.size | ||
+ | end | ||
+ | when " | ||
+ | @target_x = self.base_x | ||
+ | @target_y = self.base_y | ||
+ | end | ||
+ | # •â³ | ||
+ | @target_x -= @move_action[1] + self.base_x | ||
+ | @target_y -= @move_action[2] + self.base_y | ||
+ | # ˆÚ“®–Ú•W‚ÌÀ•W‚ðƒZƒbƒg | ||
+ | @move_coordinates = [@target_x.to_i, | ||
+ | # ‹——£‚ÌŒvŽZ(ƒEƒGƒCƒg‚ÌÝ’è) | ||
+ | @move_wait | ||
+ | | ||
+ | end | ||
+ | if RTAB | ||
+ | alias original_x true_x | ||
+ | alias original_y true_y | ||
+ | else | ||
+ | alias original_x screen_x | ||
+ | alias original_y screen_y | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾(ƒJƒƒ‰•â³–³‚µ) | ||
+ | # | ||
+ | def true_x | ||
+ | return original_x + @ox | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾(ƒJƒƒ‰•â³–³‚µ) | ||
+ | # | ||
+ | def true_y | ||
+ | return original_y - @height / 2 + @oy | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾 | ||
+ | # | ||
+ | def screen_x(true_x = self.true_x) | ||
+ | return true_x * @real_zoom + @real_x | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾 | ||
+ | # | ||
+ | def screen_y(true_y = self.true_y) | ||
+ | return true_y * @real_zoom + @real_y | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾(ˆÚ“®‚È‚Ç‚µ‚Ä‚¢‚È‚¢ê‡) | ||
+ | # | ||
+ | def base_x(true_x = self.true_x) | ||
+ | return (true_x - @ox) * @real_zoom + @real_x | ||
+ | end | ||
+ | # | ||
+ | # œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾(ˆÚ“®‚È‚Ç‚µ‚Ä‚¢‚È‚¢ê‡) | ||
+ | # | ||
+ | def base_y(true_y = self.true_y) | ||
+ | return (true_y - @oy) * @real_zoom + @real_y | ||
+ | end | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | <code ruby> | ||
+ | # | ||
+ | # ¡ Game_Party | ||
+ | # | ||
+ | class Game_Party | ||
+ | # | ||
+ | # œ ƒAƒNƒ^[‚ð‰Á‚¦‚é | ||
+ | # | ||
+ | # | ||
+ | alias side_view_add_actor add_actor | ||
+ | def add_actor(actor_id) | ||
+ | # ƒAƒNƒ^[‚ðŽæ“¾ | ||
+ | actor = $game_actors[actor_id] | ||
+ | # ƒTƒCƒhƒrƒ…[ƒf[ƒ^‚̉Šú‰» | ||
+ | actor.start_battle | ||
+ | # –ß‚· | ||
+ | side_view_add_actor(actor_id) | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # ¡ Scene_Battle | ||
+ | # | ||
+ | class Scene_Battle | ||
+ | include Side_view | ||
+ | # | ||
+ | # œ ŒöŠJƒCƒâ€œƒXƒ^ƒâ€œƒX•Ï†| ||
+ | # | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | # | ||
+ | # œ ƒƒCƒâ€œˆ— | ||
+ | # | ||
+ | alias side_view_main main | ||
+ | def main | ||
+ | # ƒoƒgƒ‰[‰Šú‰» | ||
+ | for battler in $game_party.actors + $game_troop.enemies | ||
+ | battler.start_battle | ||
+ | end | ||
+ | # –ß‚· | ||
+ | side_view_main | ||
+ | end | ||
+ | # | ||
+ | # œ ‘M‚«â€»’è | ||
+ | # | ||
+ | def flash? | ||
+ | return @flash_flag ? true : false | ||
+ | end | ||
+ | # | ||
+ | # œ ‘M‚«ƒAƒjƒ‘Ò‚¿ŽžŠÔŽæ“¾ | ||
+ | # | ||
+ | def flash_duration | ||
+ | animation = nil | ||
+ | if FLASH_ANIME | ||
+ | animation = $data_animations[FLASH_ANIMATION_ID] | ||
+ | end | ||
+ | return animation != nil ? animation.frame_max * 2 + 2 : 0 | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒƒCƒâ€œƒtƒF[ƒY ƒXƒeƒbƒv 2 : ƒAƒNƒVƒ‡ƒâ€œŠJŽn) | ||
+ | # | ||
+ | alias side_view_update_phase4_step2 update_phase4_step2 | ||
+ | def update_phase4_step2(*arg) | ||
+ | battler = convert_battler2(*arg) | ||
+ | battler.action | ||
+ | side_view_update_phase4_step2(*arg) | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒƒCƒâ€œƒtƒF[ƒY ƒXƒeƒbƒv 3 : s“®‘¤ƒAƒjƒ[ƒVƒ‡ƒâ€œ) | ||
+ | # | ||
+ | alias side_view_update_phase4_step3 update_phase4_step3 | ||
+ | def update_phase4_step3(*arg) | ||
+ | battler = convert_battler2(*arg) | ||
+ | return if !battler.animation1_on and battler.action? | ||
+ | if battler.flash? | ||
+ | battler.flash_flag[" | ||
+ | end | ||
+ | side_view_update_phase4_step3(*arg) | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV (ƒƒCƒâ€œƒtƒF[ƒY ƒXƒeƒbƒv 4 : ‘ÎÛ‘¤ƒAƒjƒ[ƒVƒ‡ƒâ€œ) | ||
+ | # | ||
+ | alias side_view_update_phase4_step4 update_phase4_step4 | ||
+ | def update_phase4_step4(*arg) | ||
+ | battler = convert_battler2(*arg) | ||
+ | targets = RTAB ? battler.target : @target_battlers | ||
+ | return if !battler.animation2_on and battler.action? | ||
+ | side_view_update_phase4_step4(*arg) | ||
+ | for target in targets | ||
+ | if RTAB | ||
+ | value = nil | ||
+ | if target.damage_sp.include? | ||
+ | value = target.damage_sp[battler] | ||
+ | end | ||
+ | if target.damage.include? | ||
+ | if value == nil or value == " | ||
+ | value = target.damage[battler] | ||
+ | elsif value.is_a? | ||
+ | value = target.damage[battler] == " | ||
+ | end | ||
+ | end | ||
+ | else | ||
+ | value = target.damage | ||
+ | end | ||
+ | if target.is_a? | ||
+ | # ƒ_ƒ[ƒW‚Ìê‡ | ||
+ | if value.is_a? | ||
+ | # ƒVƒFƒCƒN‚ðŠJŽn | ||
+ | target.shake = true | ||
+ | end | ||
+ | elsif target.is_a? | ||
+ | # ƒ_ƒ[ƒW‚Ìê‡ | ||
+ | if value.is_a? | ||
+ | # ƒVƒFƒCƒN‚ðŠJŽn | ||
+ | target.shake = true | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒvƒŒƒoƒgƒ‹ƒtƒF[ƒYŠJŽn | ||
+ | # | ||
+ | alias start_phase1_correct start_phase1 | ||
+ | def start_phase1 | ||
+ | # ƒJƒƒ‰‚ÌÝ’è | ||
+ | # Œ³Xƒtƒƒâ€œƒgƒrƒ…[Œü‚¯‚Ì‒l‚É‚È‚Á‚Ä‚¢‚邽‚ß | ||
+ | @zoom_rate = [1.0, 1.0] | ||
+ | start_phase1_correct | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒNƒ^[ƒRƒ}ƒâ€œƒhƒtƒF[ƒYŠJŽn | ||
+ | # | ||
+ | alias start_phase3_correct start_phase3 | ||
+ | def start_phase3 | ||
+ | battler = convert_battler | ||
+ | start_phase3_correct | ||
+ | if RTAB | ||
+ | # ƒJƒƒ‰‚ÌÝ’è | ||
+ | # Œ³Xƒtƒƒâ€œƒgƒrƒ…[Œü‚¯‚Ì‒l‚É‚È‚Á‚Ä‚¢‚邽‚ß | ||
+ | @camera = " | ||
+ | @spriteset.screen_target(0, | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | <code ruby> | ||
+ | class Spriteset_Battle | ||
+ | include Side_view | ||
+ | # | ||
+ | # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» | ||
+ | # | ||
+ | alias side_veiw_initialize initialize | ||
+ | def initialize | ||
+ | side_veiw_initialize | ||
+ | # ƒAƒNƒ^[ƒXƒvƒ‰ƒCƒg‚ð‰ð•ú | ||
+ | for sprite in @actor_sprites | ||
+ | sprite.dispose | ||
+ | end | ||
+ | # ƒAƒNƒ^[ƒXƒvƒ‰ƒCƒg‚ðì¬ | ||
+ | @actor_sprites = [] | ||
+ | for i in 1..Party_max | ||
+ | @actor_sprites.push(Sprite_Battler.new(@viewport1)) | ||
+ | end | ||
+ | update | ||
+ | end | ||
+ | # | ||
+ | # œ ‰æ–ʂ̃XƒNƒ[ƒ‹ | ||
+ | # | ||
+ | if method_defined? | ||
+ | alias side_view_screen_scroll screen_scroll | ||
+ | def screen_scroll | ||
+ | side_view_screen_scroll | ||
+ | # ƒAƒNƒ^[‚̈ʒu•â³ | ||
+ | for actor in $game_party.actors | ||
+ | actor.real_x = @real_x | ||
+ | actor.real_y = @real_y | ||
+ | actor.real_zoom = @real_zoom | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | class Sprite_Battler < RPG::Sprite | ||
+ | include Side_view | ||
+ | # | ||
+ | # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | def initialize(viewport, | ||
+ | super(viewport) | ||
+ | @battler = battler | ||
+ | @battler_visible = false | ||
+ | @weapon = Sprite_Weapon.new(viewport, | ||
+ | @flying = Sprite_Flying.new(viewport, | ||
+ | @shadow = [] | ||
+ | @fly = 0 | ||
+ | @fly_direction = 1 | ||
+ | @rand = rand(10) | ||
+ | @bitmaps = {} | ||
+ | self.effect_clear | ||
+ | end | ||
+ | # | ||
+ | # œ ‰ð•ú | ||
+ | # | ||
+ | alias side_view_dispose dispose | ||
+ | def dispose | ||
+ | side_view_dispose | ||
+ | @weapon.dispose if @weapon != nil | ||
+ | @flying.dispose if @flying != nil | ||
+ | if @_target_sprite != nil | ||
+ | @_target_sprite.bitmap.dispose | ||
+ | @_target_sprite.dispose | ||
+ | @_target_sprite = nil | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV | ||
+ | # | ||
+ | def update | ||
+ | super | ||
+ | # ƒoƒgƒ‰[‚ª nil ‚Ìê‡ | ||
+ | if @battler == nil | ||
+ | self.bitmap = nil | ||
+ | @weapon.bitmap = nil | ||
+ | loop_animation(nil) | ||
+ | return | ||
+ | end | ||
+ | # ƒoƒgƒ‰[XV | ||
+ | @battler.update | ||
+ | # ƒoƒgƒ‰[ƒAƒjƒ‚̃f[ƒ^Žæ“¾ | ||
+ | @anime_type = @battler.anime_type | ||
+ | # bitmap ‚ðƒLƒƒƒbƒVƒ…‰» | ||
+ | path = @anime_type[0].to_s + "#" | ||
+ | if not @bitmaps.include? | ||
+ | # ƒtƒ@ƒCƒ‹–¼‚©F‘Š‚ªŒ»Ý‚Ì‚à‚̂ƈقȂéê‡ | ||
+ | if @battler.is_a? | ||
+ | change = (@battler.character_name != @battler_name or @battler.character_hue != @battler_hue) | ||
+ | elsif @battler.is_a? | ||
+ | change = (@battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue) | ||
+ | end | ||
+ | if change | ||
+ | # ƒrƒbƒgƒ}ƒbƒv‚ðŽæ“¾AÝ’è | ||
+ | if @battler.is_a? | ||
+ | @battler_name = @battler.character_name | ||
+ | @battler_hue = @battler.character_hue | ||
+ | @bitmap = RPG:: | ||
+ | @width = @bitmap.width / 4 | ||
+ | @height = @bitmap.height / 4 | ||
+ | else | ||
+ | @battler_name = @battler.battler_name | ||
+ | @battler_hue = @battler.battler_hue | ||
+ | @bitmap = RPG:: | ||
+ | @width = @bitmap.width | ||
+ | @height = @bitmap.height | ||
+ | @bitmaps[" | ||
+ | end | ||
+ | self.ox = @width / 2 | ||
+ | self.oy = @height / 2 | ||
+ | @battler.height = @height | ||
+ | @flag = true | ||
+ | # 퓬•sâ€\‚Ü‚½‚͉B‚êó‘Ô‚È‚ç•s“§–¾â€œx‚ð 0 ‚É‚·‚é | ||
+ | if @battler.dead? | ||
+ | self.opacity = 0 | ||
+ | end | ||
+ | end | ||
+ | if @battler.is_a? | ||
+ | | ||
+ | # ƒrƒbƒgƒ}ƒbƒv‚ðŽæ“¾AÝ’è | ||
+ | @battler_condition = @anime_type[0] | ||
+ | @battler_pattern = @battler.pattern | ||
+ | @sx = @battler.pattern * @width | ||
+ | @sy = @anime_type[0] % 4 * @height | ||
+ | self.bitmap = Bitmap.new(@width, | ||
+ | self.bitmap.blt(0, | ||
+ | @bitmaps[path] = self.bitmap | ||
+ | flag = false | ||
+ | end | ||
+ | end | ||
+ | if @battler.is_a? | ||
+ | self.bitmap = @bitmaps[path] | ||
+ | else | ||
+ | self.bitmap = @bitmaps[" | ||
+ | end | ||
+ | # â€òs | ||
+ | update_fly | ||
+ | # ƒVƒFƒCƒN | ||
+ | update_shake | ||
+ | # ‰ñ“] | ||
+ | update_turning | ||
+ | # ‽“] | ||
+ | update_reverse | ||
+ | # ˆÚ“® | ||
+ | update_moving | ||
+ | # ’ljÁƒAƒjƒ | ||
+ | update_add_anime | ||
+ | # ƒGƒtƒFƒNƒgŒø‰Ê‚Ì“K—p | ||
+ | update_effect | ||
+ | # ƒAƒjƒ[ƒVƒ‡ƒâ€œ ID ‚ªŒ»Ý‚Ì‚à‚̂ƈقȂéê‡ | ||
+ | flag = RTAB ? true : @battler.damage == nil | ||
+ | if flag and @battler.state_animation_id != @state_animation_id | ||
+ | @state_animation_id = @battler.state_animation_id | ||
+ | loop_animation($data_animations[@state_animation_id]) | ||
+ | end | ||
+ | # ƒVƒFƒCƒN | ||
+ | if @battler.shake | ||
+ | self.start_shake(5, | ||
+ | @battler.shake = false | ||
+ | end | ||
+ | # –¾–Å | ||
+ | if @battler.blink | ||
+ | blink_on | ||
+ | else | ||
+ | blink_off | ||
+ | end | ||
+ | # •s‰ÂŽ‹‚Ìê‡ | ||
+ | unless @battler_visible | ||
+ | flag = RTAB ? (@battler.damage.size < 2 or @battler.damage_pop.size < 2) : | ||
+ | (@battler.damage == nil or @battler.damage_pop) | ||
+ | # oŒ» | ||
+ | if not @battler.hidden and not @battler.dead? | ||
+ | appear | ||
+ | @battler_visible = true | ||
+ | end | ||
+ | end | ||
+ | if RTAB | ||
+ | # ƒ_ƒ[ƒW | ||
+ | for battler in @battler.damage_pop | ||
+ | if battler[0].class == Array | ||
+ | if battler[0][1] >= 0 | ||
+ | $scene.skill_se | ||
+ | else | ||
+ | $scene.levelup_se | ||
+ | end | ||
+ | damage(@battler.damage[battler[0]], | ||
+ | else | ||
+ | damage(@battler.damage[battler[0]], | ||
+ | end | ||
+ | if @battler.damage_sp.include? | ||
+ | damage(@battler.damage_sp[battler[0]], | ||
+ | @battler.critical[battler[0]], | ||
+ | @battler.damage_sp.delete(battler[0]) | ||
+ | end | ||
+ | @battler.damage_pop.delete(battler[0]) | ||
+ | @battler.damage.delete(battler[0]) | ||
+ | @battler.critical.delete(battler[0]) | ||
+ | end | ||
+ | end | ||
+ | # ‰ÂŽ‹‚Ìê‡ | ||
+ | if @battler_visible | ||
+ | # “¦‘– | ||
+ | if @battler.hidden | ||
+ | $game_system.se_play($data_system.escape_se) | ||
+ | escape | ||
+ | @battler_visible = false | ||
+ | end | ||
+ | # ‒ƒtƒ‰ƒbƒVƒ… | ||
+ | if @battler.white_flash | ||
+ | whiten | ||
+ | @battler.white_flash = false | ||
+ | end | ||
+ | if RTAB | ||
+ | # ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | if !@battler.animation.empty? | ||
+ | for animation in @battler.animation.reverse | ||
+ | if animation[2] | ||
+ | animation($data_animations[animation[0]], | ||
+ | else | ||
+ | animation($data_animations[animation[0]], | ||
+ | end | ||
+ | @battler.animation.delete(animation) | ||
+ | end | ||
+ | end | ||
+ | else | ||
+ | # ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | if @battler.animation_id != 0 | ||
+ | animation = $data_animations[@battler.animation_id] | ||
+ | animation(animation, | ||
+ | @battler.animation_id = 0 | ||
+ | end | ||
+ | end | ||
+ | # ƒ_ƒ[ƒW | ||
+ | if !RTAB and @battler.damage_pop | ||
+ | damage(@battler.damage, | ||
+ | @battler.damage = nil | ||
+ | @battler.critical = false | ||
+ | @battler.damage_pop = false | ||
+ | end | ||
+ | flag = RTAB ? (@battler.damage.empty? | ||
+ | | ||
+ | # ƒRƒ‰ƒvƒX | ||
+ | if flag and @battler.dead? | ||
+ | if @battler.is_a? | ||
+ | $game_system.se_play($data_system.actor_collapse_se) | ||
+ | elsif @battler.is_a? | ||
+ | $game_system.se_play($data_system.enemy_collapse_se) | ||
+ | end | ||
+ | collapse | ||
+ | @battler_visible = false | ||
+ | end | ||
+ | end | ||
+ | # ƒXƒvƒ‰ƒCƒg‚ÌÀ•W‚ðÝ’è | ||
+ | self.x = @battler.screen_x + @effect_ox | ||
+ | self.y = @battler.screen_y + @effect_oy | ||
+ | self.z = @battler.screen_z | ||
+ | self.zoom_x = @battler.real_zoom | ||
+ | self.zoom_y = @battler.real_zoom | ||
+ | # ƒEƒFƒCƒgƒJƒEƒâ€œƒg‚ðŒ¸‚ç‚· | ||
+ | @battler.wait_count -= 1 | ||
+ | @battler.wait_count2 -= 1 | ||
+ | # ƒAƒjƒ[ƒVƒ‡ƒâ€œ‘Ò‚¿ŽžŠÔŽæ“¾ | ||
+ | @battler.animation_duration = @_animation_duration | ||
+ | if @battler.is_a? | ||
+ | self.zoom_x *= CHAR_ZOOM | ||
+ | self.zoom_y *= CHAR_ZOOM | ||
+ | end | ||
+ | # ‰â€œ‹——£ƒAƒjƒ | ||
+ | if @battler.flying_anime != [0, | ||
+ | @flying = Sprite_Flying.new(self.viewport, | ||
+ | elsif @battler.flying_anime == [0, | ||
+ | @flying.dispose | ||
+ | @flying = nil | ||
+ | end | ||
+ | if @flying != nil | ||
+ | @flying.battler = @battler | ||
+ | @flying.update | ||
+ | end | ||
+ | if @battler.is_a? | ||
+ | # •ŠíƒAƒjƒ | ||
+ | if @battler.weapon_anime_type1 and @weapon.nil? | ||
+ | @weapon = Sprite_Weapon.new(self.viewport, | ||
+ | elsif !@battler.weapon_anime_type1 and !@weapon.nil? | ||
+ | @weapon.dispose | ||
+ | @weapon = nil | ||
+ | end | ||
+ | if @weapon != nil | ||
+ | @weapon.battler = @battler | ||
+ | @weapon.update | ||
+ | @weapon.opacity = self.opacity | ||
+ | @weapon.x = self.x + BLZ_X[@battler.weapon_anime_type3][@battler.pattern] | ||
+ | @weapon.y = self.y + BLZ_Y[@battler.weapon_anime_type3][@battler.pattern] | ||
+ | @weapon.angle = BLZ_ANGLE[@battler.weapon_anime_type3][@battler.pattern] | ||
+ | if self.mirror | ||
+ | @weapon.angle += @weapon.angle - 180 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | # Žc‘œ | ||
+ | if @battler.shadow | ||
+ | if Graphics.frame_count % 2 == 0 | ||
+ | shadow = :: | ||
+ | shadow.bitmap = self.bitmap.dup | ||
+ | shadow.x = self.x | ||
+ | shadow.y = self.y | ||
+ | shadow.ox = self.ox | ||
+ | shadow.oy = self.oy | ||
+ | shadow.mirror = self.mirror | ||
+ | shadow.angle = self.angle | ||
+ | shadow.opacity = 160 | ||
+ | shadow.zoom_x = self.zoom_x | ||
+ | shadow.zoom_y = self.zoom_y | ||
+ | if @battler.is_a? | ||
+ | shadow.src_rect.set(@sx, | ||
+ | else | ||
+ | shadow.src_rect.set(0, | ||
+ | end | ||
+ | @shadow.push([shadow, | ||
+ | end | ||
+ | end | ||
+ | for s in @shadow | ||
+ | if !s[0].disposed? | ||
+ | s[0].update | ||
+ | s[1] -= 1 | ||
+ | if s[1] < 1 | ||
+ | if s[0].bitmap != nil | ||
+ | s[0].bitmap.dispose | ||
+ | end | ||
+ | s[0].dispose | ||
+ | else | ||
+ | s[0].x = @battler.screen_x(s[2]) | ||
+ | s[0].y = @battler.screen_y(s[3]) | ||
+ | end | ||
+ | else | ||
+ | s = nil | ||
+ | end | ||
+ | end | ||
+ | @shadow.compact! | ||
+ | end | ||
+ | # | ||
+ | # œ ƒGƒtƒFƒNƒg‚É‚æ‚éÀ•WŒn‚ÌXV | ||
+ | # | ||
+ | def update_effect | ||
+ | # Šp“x‚ÌC³ | ||
+ | if @_upside_down | ||
+ | self.angle = (@_turning + 180) % 360 | ||
+ | else | ||
+ | self.angle = @_turning | ||
+ | end | ||
+ | # X À•W‚ÌC³’l | ||
+ | @effect_ox = @_shake + @_moving[0] | ||
+ | # Y À•W‚ÌC³’l | ||
+ | @effect_oy = -@fly + @_moving[1] | ||
+ | if @_animation == nil or (RTAB and @_animation.empty? | ||
+ | self.effect_clear | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒVƒFƒCƒNXV | ||
+ | # | ||
+ | def update_shake | ||
+ | if @_shake_duration >= 1 or @_shake != 0 | ||
+ | delta = (@_shake_power * @_shake_speed * @_shake_direction) / 10.0 | ||
+ | if @_shake_duration <= 1 and @_shake * (@_shake + delta) < 0 | ||
+ | @_shake = 0 | ||
+ | else | ||
+ | @_shake += delta | ||
+ | end | ||
+ | if @_shake > @_shake_power * 2 | ||
+ | @_shake_direction = -1 | ||
+ | end | ||
+ | if @_shake < - @_shake_power * 2 | ||
+ | @_shake_direction = 1 | ||
+ | end | ||
+ | if @_shake_duration >= 1 | ||
+ | @_shake_duration -= 1 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ â€òsXV | ||
+ | # | ||
+ | def update_fly | ||
+ | if @rand > 0 | ||
+ | @rand -= 1 | ||
+ | return | ||
+ | end | ||
+ | if @battler.fly != 0 | ||
+ | if @fly < @battler.fly / 4 | ||
+ | @fly_direction = 1 | ||
+ | elsif @fly > @battler.fly / 2 | ||
+ | @fly_direction = -1 | ||
+ | end | ||
+ | @fly += 0.5 * @fly_direction | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ‰ñ“]XV | ||
+ | # | ||
+ | def update_turning | ||
+ | if @_turning_duration > 0 or @_turning != 0 | ||
+ | @_turning += @_turning_direction * @_turning_speed / 2.0 | ||
+ | # Žc‚è‰ñ“]â€‚ðŒ¸‚ç‚· | ||
+ | if @_turning_direction == -1 | ||
+ | if @_turning_duration > 0 and @_turning < 0 | ||
+ | @_turning_duration -= 1 | ||
+ | end | ||
+ | elsif @_turning_direction == 1 | ||
+ | if @_turning_duration > 0 and @_turning >= 360 | ||
+ | @_turning_duration -= 1 | ||
+ | end | ||
+ | end | ||
+ | # ˆÈ‰º•â³ | ||
+ | while @_turning < 0 | ||
+ | @_turning += 360 | ||
+ | end | ||
+ | if @_turning_duration <= 0 | ||
+ | @_turning = 0 | ||
+ | end | ||
+ | @_turning %= 360 | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ¶‰E‽“]XV | ||
+ | # | ||
+ | def update_reverse | ||
+ | if @last_reverse != (@_reverse or @battler.reverse) | ||
+ | self.mirror = (@_reverse or @battler.reverse) | ||
+ | @last_reverse = (@_reverse or @battler.reverse) | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“®XV | ||
+ | # | ||
+ | def update_moving | ||
+ | @move_distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs + | ||
+ | | ||
+ | if @move_distance > 0 | ||
+ | return if @_moving[0] == @_move_coordinates[0] and @_moving[1] == @_move_coordinates[1] | ||
+ | array = @_move_coordinates | ||
+ | x = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i | ||
+ | y = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i | ||
+ | @_moving = [x, y] | ||
+ | if @_move_quick_return and @_move_duration == 0 | ||
+ | @_move_coordinates = [0, | ||
+ | @_move_duration = @move_distance | ||
+ | end | ||
+ | @_move_duration -= @_move_speed | ||
+ | @_move_duration = [@_move_duration, | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ’ljÁƒAƒjƒXV (RTABŒÀ’è‹@â€\) | ||
+ | # | ||
+ | def update_add_anime | ||
+ | if RTAB | ||
+ | # ƒAƒjƒ[ƒVƒ‡ƒâ€œ | ||
+ | if @_add_anime_id != 0 | ||
+ | animation = $data_animations[@_add_anime_id] | ||
+ | animation(animation, | ||
+ | @_add_anime_id = 0 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | # œ ƒGƒtƒFƒNƒg‰Šú‰» | ||
+ | # | ||
+ | def effect_clear | ||
+ | @_effect_ox = 0 | ||
+ | @_effect_oy = 0 | ||
+ | @_shake_power = 0 | ||
+ | @_shake_speed = 0 | ||
+ | @_shake_duration = 0 | ||
+ | @_shake_direction = 1 | ||
+ | @_shake = 0 | ||
+ | @_upside_down = false | ||
+ | @_reverse = false | ||
+ | @_turning_direction = 1 | ||
+ | @_turning_speed = 0 | ||
+ | @_turning_duration = 0 | ||
+ | @_turning = 0 | ||
+ | @_move_quick_return = true | ||
+ | @_move_speed = 0 | ||
+ | @_move_coordinates = [0,0,0,0] | ||
+ | @_move_jump = false | ||
+ | @_move_duration = 0 | ||
+ | @_moving = [0,0] | ||
+ | @_add_anime_id = 0 | ||
+ | end | ||
+ | # | ||
+ | # œ ƒVƒFƒCƒN‚ÌŠJŽn | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | def start_shake(power, | ||
+ | @_shake_power = power | ||
+ | @_shake_speed = speed | ||
+ | @_shake_duration = duration | ||
+ | end | ||
+ | # | ||
+ | # œ ㉺‽“]‚ðŠJŽn | ||
+ | # | ||
+ | def start_upside_down | ||
+ | @_upside_down = @_upside_down ? false : true | ||
+ | end | ||
+ | # | ||
+ | # œ ¶‰E‽“]‚ðŠJŽn | ||
+ | # | ||
+ | def start_reverse | ||
+ | @_reverse = @_reverse ? false : true | ||
+ | end | ||
+ | # | ||
+ | # œ ‰ñ“]‚ðŠJŽn | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | def start_turning(direction, | ||
+ | @_turning_direction = direction | ||
+ | @_turning_speed = speed | ||
+ | @_turning_duration = duration | ||
+ | @_turning = @_turning_direction == 1 ? 0 : 360 | ||
+ | end | ||
+ | # | ||
+ | # œ ˆÚ“®‚ðŠJŽn | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | def start_moving(quick_return, | ||
+ | @_move_quick_return = quick_return == 0 ? false : true | ||
+ | @_move_speed = speed | ||
+ | @_move_coordinates = [x, | ||
+ | distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs + | ||
+ | | ||
+ | @_move_duration = distance | ||
+ | end | ||
+ | # | ||
+ | # œ ƒAƒjƒ’ljÁ‚ðŠJŽn | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | def start_add_anime(id) | ||
+ | @_add_anime_id = id | ||
+ | end | ||
+ | # | ||
+ | # œ ŠeŽíƒGƒtƒFƒNƒg‚ÌŠJŽn※’è | ||
+ | # | ||
+ | if !method_defined? | ||
+ | alias side_view_animation_process_timing animation_process_timing | ||
+ | end | ||
+ | def animation_process_timing(timing, | ||
+ | side_view_animation_process_timing(timing, | ||
+ | if (timing.condition == 0) or | ||
+ | | ||
+ | | ||
+ | if timing.se.name =~ SHAKE_FILE | ||
+ | names = timing.se.name.split(/#/ | ||
+ | power = names[1].nil? | ||
+ | speed = names[2].nil? | ||
+ | duration = names[3].nil? | ||
+ | # ƒVƒFƒCƒN‚ðŠJŽn | ||
+ | self.start_shake(power, | ||
+ | end | ||
+ | if timing.se.name == UPSIDE_DOWN_FILE | ||
+ | # ㉺‽“]‚ðŠJŽn | ||
+ | self.start_upside_down | ||
+ | end | ||
+ | if timing.se.name == REVERSE_FILE | ||
+ | # ¶‰E‽“]‚ðŠJŽn | ||
+ | self.start_reverse | ||
+ | end | ||
+ | if timing.se.name =~ TURNING_FILE | ||
+ | names = timing.se.name.split(/#/ | ||
+ | direction = names[1].nil? | ||
+ | speed = names[2].nil? | ||
+ | duration | ||
+ | # ‰ñ“]‚ðŠJŽn | ||
+ | self.start_turning(direction, | ||
+ | end | ||
+ | if timing.se.name =~ MOVE_FILE | ||
+ | names = timing.se.name.split(/#/ | ||
+ | quick_return= names[1].nil? | ||
+ | speed = names[2].nil? | ||
+ | x = names[3].nil? | ||
+ | y = names[3].nil? | ||
+ | # ˆÚ“®‚ðŠJŽn | ||
+ | self.start_moving(quick_return, | ||
+ | end | ||
+ | if timing.se.name =~ ADD_ANIME_FILE | ||
+ | names = timing.se.name.split(/#/ | ||
+ | id = names[1].nil? | ||
+ | # ƒAƒjƒ’ljÁ‚ðŠJŽn | ||
+ | self.start_add_anime(id) | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | <code ruby> | ||
+ | # | ||
+ | # ¡ Sprite_Weapon | ||
+ | # | ||
+ | # @ƒoƒgƒ‰[•\Ž¦—p‚̃Xƒvƒ‰ƒCƒg‚Å‚·BGame_Battler ƒNƒ‰ƒX‚̃Cƒâ€œƒXƒ^ƒâ€œƒX‚ðŠÄŽ‹‚µA | ||
+ | # ƒXƒvƒ‰ƒCƒg‚Ìó‘Ô‚ðŽ©â€œ®â€œI‚ɕω»‚³‚¹‚Ü‚·B | ||
+ | # | ||
+ | |||
+ | class Sprite_Weapon < ::Sprite | ||
+ | include Side_view | ||
+ | # | ||
+ | # œ ŒöŠJƒCƒâ€œƒXƒ^ƒâ€œƒX•Ï†| ||
+ | # | ||
+ | attr_accessor : | ||
+ | attr_reader | ||
+ | attr_reader | ||
+ | # | ||
+ | # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | def initialize(viewport, | ||
+ | super(viewport) | ||
+ | @battler = battler | ||
+ | @battler_visible = false | ||
+ | end | ||
+ | # | ||
+ | # œ ‰ð•ú | ||
+ | # | ||
+ | def dispose | ||
+ | if self.bitmap != nil | ||
+ | self.bitmap.dispose | ||
+ | end | ||
+ | super | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV | ||
+ | # | ||
+ | def update | ||
+ | super | ||
+ | # ƒoƒgƒ‰[‚ª nil ‚Ìê‡ | ||
+ | if @battler == nil or !@battler.is_a? | ||
+ | self.bitmap = nil | ||
+ | return | ||
+ | end | ||
+ | # ƒEƒGƒ|ƒâ€œƒAƒjƒ‚̃f[ƒ^Žæ“¾ | ||
+ | @weapon_anime_type = @battler.weapon_anime_type | ||
+ | # ݒ肪uâ€ñ•\Ž¦v‚Ìê‡ | ||
+ | if !@weapon_anime_type[1] or @weapon_anime_type[0].nil? | ||
+ | self.visible = false | ||
+ | return | ||
+ | else | ||
+ | self.visible = true | ||
+ | end | ||
+ | # ƒtƒ@ƒCƒ‹–¼‚ªŒ»Ý‚Ì‚à‚̂ƈقȂéê‡ | ||
+ | if @weapon_anime_type[0] != @weapon_name | ||
+ | @weapon_name = @weapon_anime_type[0] | ||
+ | # ƒrƒbƒgƒ}ƒbƒv‚ðŽæ“¾AÝ’è | ||
+ | self.bitmap = RPG:: | ||
+ | @width = bitmap.width | ||
+ | @height = bitmap.height | ||
+ | @flag = true | ||
+ | end | ||
+ | # Œ»ÝƒAƒjƒƒpƒ^[ƒâ€œ‚ªŒ»Ý‚Ì‚à‚̂ƈقȂéê‡ | ||
+ | if @pattern != @battler.pattern or @flag or @condition != @battler.condition | ||
+ | @pattern = @battler.pattern | ||
+ | @condition = @battler.condition | ||
+ | self.ox = @width | ||
+ | self.oy = @height | ||
+ | self.z = battler.screen_z | ||
+ | self.zoom_x = @battler.real_zoom * CHAR_ZOOM | ||
+ | self.zoom_y = @battler.real_zoom * CHAR_ZOOM | ||
+ | self.src_rect.set(0, | ||
+ | self.opacity = 255 | ||
+ | # ƒoƒgƒ‰[‚æ‚èŽè‘O‚É•\Ž¦ | ||
+ | if @weapon_anime_type[2] | ||
+ | self.z += 10 | ||
+ | # ƒoƒgƒ‰[‚æ‚艜‚É•\Ž¦ | ||
+ | else | ||
+ | self.z -= 10 | ||
+ | end | ||
+ | @flag = false | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | <code ruby> | ||
+ | # | ||
+ | # ¡ Sprite_Flying | ||
+ | # | ||
+ | # @ƒoƒgƒ‰[•\Ž¦—p‚̃Xƒvƒ‰ƒCƒg‚Å‚·BGame_Battler ƒNƒ‰ƒX‚̃Cƒâ€œƒXƒ^ƒâ€œƒX‚ðŠÄŽ‹‚µA | ||
+ | # ƒXƒvƒ‰ƒCƒg‚Ìó‘Ô‚ðŽ©â€œ®â€œI‚ɕω»‚³‚¹‚Ü‚·B | ||
+ | # | ||
+ | |||
+ | class Sprite_Flying < RPG::Sprite | ||
+ | include Side_view | ||
+ | LATE_COUNT = 20 | ||
+ | # | ||
+ | # œ ŒöŠJƒCƒâ€œƒXƒ^ƒâ€œƒX•Ï†| ||
+ | # | ||
+ | attr_accessor : | ||
+ | # | ||
+ | # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | def initialize(viewport, | ||
+ | super(viewport) | ||
+ | @battler = battler | ||
+ | @battler_visible = false | ||
+ | @later = LATE_COUNT | ||
+ | end | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV | ||
+ | # | ||
+ | def update | ||
+ | super | ||
+ | # ƒoƒgƒ‰[‚ª nil ‚Ìê‡ | ||
+ | if @battler == nil | ||
+ | self.bitmap = nil | ||
+ | loop_animation(nil) | ||
+ | return | ||
+ | end | ||
+ | # ‰â€œ‹——£ƒAƒjƒ | ||
+ | flying_animation = @battler.flying_animation | ||
+ | flying_start = flying_animation[0] | ||
+ | flying_end | ||
+ | # ƒAƒjƒ[ƒVƒ‡ƒâ€œ ID ‚ªŒ»Ý‚Ì‚à‚̂ƈقȂéê‡ | ||
+ | if @anime_id != @battler.flying_anime[0] | ||
+ | @anime_id = @battler.flying_anime[0] | ||
+ | @animation = $data_animations[@anime_id] | ||
+ | end | ||
+ | # ƒAƒjƒ[ƒVƒ‡ƒâ€œ ŠJŽn | ||
+ | if flying_start | ||
+ | animation(@animation, | ||
+ | elsif flying_end | ||
+ | # Á‹Ž‚ð’x‚点‚Ä‚Ý‚½‚è‚·‚é | ||
+ | @later -= 1 | ||
+ | if @later < 0 | ||
+ | animation(nil, | ||
+ | @later = LATE_COUNT | ||
+ | end | ||
+ | end | ||
+ | self.x = @battler.flying_x | ||
+ | self.y = @battler.flying_y | ||
+ | self.z = @battler.screen_z + 1000 | ||
+ | end | ||
+ | end | ||
+ | module RPG | ||
+ | class Skill | ||
+ | # | ||
+ | # œ –‚–@‚©‚Ç‚¤‚©‚Ì※’f | ||
+ | # | ||
+ | def magic? | ||
+ | if @atk_f == 0 | ||
+ | return true | ||
+ | else | ||
+ | return false | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | # ƒAƒ[ƒJ[ƒ\ƒ‹‚̈ʒuC³ | ||
+ | |||
+ | class Arrow_Actor < Arrow_Base | ||
+ | include Side_view | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV | ||
+ | # | ||
+ | alias side_view_update update | ||
+ | def update | ||
+ | side_view_update | ||
+ | # ƒXƒvƒ‰ƒCƒg‚ÌÀ•W‚ðÝ’è | ||
+ | if self.actor != nil && (self.x != self.actor.screen_x + ARROW_OX or self.y != self.actor.screen_y + ARROW_OY) | ||
+ | self.x = self.actor.screen_x + ARROW_OX | ||
+ | self.y = self.actor.screen_y + ARROW_OY | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | class Arrow_Enemy < Arrow_Base | ||
+ | include Side_view | ||
+ | # | ||
+ | # œ ƒtƒŒ[ƒ€XV | ||
+ | # | ||
+ | alias side_view_update update | ||
+ | def update | ||
+ | side_view_update | ||
+ | # ƒXƒvƒ‰ƒCƒg‚ÌÀ•W‚ðÝ’è | ||
+ | if self.enemy != nil && self.y != self.enemy.screen_y + self.enemy.height/ | ||
+ | self.x = self.enemy.screen_x | ||
+ | self.y = self.enemy.screen_y + self.enemy.height/ | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Utilización ===== | ||
+ | Este script convierte el sistema de batalla frontal del RPG Maker en uno lateral. Los gráficos de los héroes serán los mismos charas, y el arma al atacar será el icono del arma que tengan equipada. Los enemigos, en cambio, siguen siendo estáticos. | ||
ayuda/rgss/biblioteca/batallaraisefield.txt · Última modificación: 2019/09/23 04:01 por 127.0.0.1