Descrizione
Script che permette di cambiare i target delle magie all'interno della battaglia (come i vecchi FF). Ad esempio passare da un nemico a tutti i nemici e viceversa oppure da un alleato a tutti e viceversa.
Solo le magie contrassegnate come multiscope avranno questa caratteristica. Il danno o la guarigione verranno dimezzati se bersaglieranno tutti i nemici/alleati.
Per le magie di status invece ce un apposito sistema che permette lo stesso il multiscope per queste magie, ma a un costo di punti magia raddoppiato. Una descrizione completa č contenuta nello script.
Autore
Avon Valentino (Io)
Allegati
Demo Link
http://www.mediafire...5uqpbtgy7ntijyk
Script Link
http://www.mediafire...c4444vc81y7shsw
Script:
CODE -> ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 | #-------------------------------MULTISCOPE SYSTEM---------------------------- # # #----------------------------------SPIEGAZIONE------------------------------- # # #Questo script permette il cambio di target durante la battaglia come ad esempio #passare da un nemico a tutti i nemici o viceversa. Stessa cosa per gli alleati. #L'id delle skill che hanno questa caratteristica vanno inseriti nell'insieme #sottostante : SKILL_MULTISCOPE. #Č importante che le skill inserite abbiano come target iniziale un solo #obbiettivo (One enemy, One ally, One Ally hp = 0) #Il danno o la guarigione ricevuta saranno dimezzati se applicati a tutti i target. #Il tasto da premere per variare target di default č Y (S sulla tastiera) #Per cambiare tasto da premere, cambiare l'input in SWITCH (la Y di default) #Per controllare a quale tasto corrisponde, premere F1 durante il test del gioco #e andare su Keyboard dove si trovano i corrispondenti tasti che riceve il gioco. #Esempio S: Y č uguale a dire che premere sulla tastiera il tasto S equivale #a dare un input Y al sistema. #Se si vuole creare una magia che cambia solamente lo status del target, e che #possa cambiare tra uno e tutti i target inserirlo in STATUS_MULTISCOPE #La magia colpirā tutti i bersagli ma comporterā un consumo doppo di SP. # # #---------------------------------SPIEGAZIONE-------------------------------- # # #----------------------------------CREDITI----------------------------------- # Se usate questo script per favore creditatemi ;) # # Script creato da Valentino Avon. # #----------------------------------CREDITI----------------------------------- #--------------------------------CONFIGURAZIONE------------------------------ SKILL_MULTISCOPE = [1,2,7] # abilitā che hanno la possibilitā di cambio target. STATUS_MULTISCOPE = [33,54] #Abilitā che cambiano solamente lo stato del target. #In questo caso, lo selezionare tutti i nemici/alleati comporta un consumo #doppio di Punti Magia. (SP) ICONA_MULTISCOPE = "M_S" #icona che verrā visualizzata su una magia se sarā possibile il multiscope. #da inserire in Graphics/Icons #Se non si vuole avere icona semplicemente inserire: #ICONA_MULTISCOPE = nil SWITCH = (Input::Y) #Tasto per cambiare da tutti a un nemico. #--------------------------------CONFIGURAZIONE------------------------------ class Game_Battler attr_accessor :multiscope def initialize @battler_name = "" @battler_hue = 0 @hp = 0 @sp = 0 @states = [] @states_turn = {} @maxhp_plus = 0 @maxsp_plus = 0 @str_plus = 0 @dex_plus = 0 @agi_plus = 0 @int_plus = 0 @hidden = false @immortal = false @damage_pop = false @damage = nil @critical = false @animation_id = 0 @animation_hit = false @white_flash = false @blink = false @current_action = Game_BattleAction.new @multiscope = false end def skill_effect(user, skill) # Clear critical flag self.critical = false # If skill scope is for ally with 1 or more HP, and your own HP = 0, # or skill scope is for ally with 0, and your own HP = 1 or more if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1) # End Method return false end # Clear effective flag effective = false # Set effective flag if common ID is effective effective |= skill.common_event_id > 0 # First hit detection hit = skill.hit if skill.atk_f > 0 hit *= user.hit / 100 end hit_result = (rand(100) < hit) # Set effective flag if skill is uncertain effective |= hit < 100 # If hit occurs if hit_result == true # Calculate power power = skill.power + user.atk * skill.atk_f / 100 if power > 0 power -= self.pdef * skill.pdef_f / 200 power -= self.mdef * skill.mdef_f / 200 power = [power, 0].max end # Calculate rate rate = 20 rate += (user.str * skill.str_f / 100) rate += (user.dex * skill.dex_f / 100) rate += (user.agi * skill.agi_f / 100) rate += (user.int * skill.int_f / 100) # Calculate basic damage self.damage = power * rate / 20 # Element correction self.damage *= elements_correct(skill.element_set) self.damage /= 100 # If damage value is strictly positive if self.damage > 0 # Guard correction if self.guarding? self.damage /= 2 end end # Dispersion if skill.variance > 0 and self.damage.abs > 0 amp = [self.damage.abs * skill.variance / 100, 1].max self.damage += rand(amp+1) + rand(amp+1) - amp end # Second hit detection eva = 8 * self.agi / user.dex + self.eva hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100 hit = self.cant_evade? ? 100 : hit hit_result = (rand(100) < hit) # Set effective flag if skill is uncertain effective |= hit < 100 end # If hit occurs if hit_result == true # If physical attack has power other than 0 if skill.power != 0 and skill.atk_f > 0 # State Removed by Shock remove_states_shock # Set to effective flag effective = true end # Substract damage from HP last_hp = self.hp self.hp -= self.damage effective |= self.hp != last_hp # State change @state_changed = false effective |= states_plus(skill.plus_state_set) effective |= states_minus(skill.minus_state_set) # If power is 0 if user.multiscope unless @state_changed self.damage /= 2 end end if skill.power == 0 # Set damage to an empty string self.damage = "" # If state is unchanged unless @state_changed # Set damage to "Miss" self.damage = "Mancato!" end end # If miss occurs else # Set damage to "Miss" self.damage = "Mancato!" end # If not in battle unless $game_temp.in_battle # Set damage to nil self.damage = nil end # End Method return effective end end class Scene_Battle def main $premuto = false # Initialize each kind of temporary battle data $game_temp.in_battle = true $game_temp.battle_turn = 0 $game_temp.battle_event_flags.clear $game_temp.battle_abort = false $game_temp.battle_main_phase = false $game_temp.battleback_name = $game_map.battleback_name $game_temp.forcing_battler = nil # Initialize battle event interpreter $game_system.battle_interpreter.setup(nil, 0) # Prepare troop @troop_id = $game_temp.battle_troop_id $game_troop.setup(@troop_id) # Make actor command window s1 = $data_system.words.attack s2 = $data_system.words.skill s3 = $data_system.words.guard s4 = $data_system.words.item @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4]) @actor_command_window.y = 160 @actor_command_window.back_opacity = 160 @actor_command_window.active = false @actor_command_window.visible = false # Make other windows @party_command_window = Window_PartyCommand.new @help_window = Window_Help.new @help_window.back_opacity = 160 @help_window.visible = false @scope_window = Window_Help.new @scope_window.back_opacity = 160 @scope_window.y = 0 @scope_window.visible = false @status_window = Window_BattleStatus.new @message_window = Window_Message.new # Make sprite set @spriteset = Spriteset_Battle.new # Initialize wait count @wait_count = 0 # Execute transition if $data_system.battle_transition == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition) end # Start pre-battle phase start_phase1 # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Refresh map $game_map.refresh # Prepare for transition Graphics.freeze # Dispose of windows @actor_command_window.dispose @party_command_window.dispose @help_window.dispose @scope_window.dispose @status_window.dispose @message_window.dispose if @skill_window != nil @skill_window.dispose end if @item_window != nil @item_window.dispose end if @result_window != nil @result_window.dispose end # Dispose of sprite set @spriteset.dispose # If switching to title screen if $scene.is_a?(Scene_Title) # Fade out screen Graphics.transition Graphics.freeze end # If switching from battle test to any screen other than game over screen if $BTEST and not $scene.is_a?(Scene_Gameover) $scene = nil end end def phase3_prior_actor # Loop begin # Actor blink effect OFF if @active_battler != nil @active_battler.blink = false end # If first actor if @actor_index == 0 # Start party command phase start_phase2 return end # Return to actor index @actor_index -= 1 @active_battler = $game_party.actors[@actor_index] @active_battler.blink = true # Once more if actor refuses command input end until @active_battler.inputable? @active_battler.multiscope = false if @active_battler.is_a?(Game_Actor) # Branch by effect scope if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) if @skill.scope == 2 # all enemies if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2 @skill.scope = 1 end end end if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) if @skill.scope == 4 if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2 @skill.scope = 3 end end end end # Set up actor command window phase3_setup_command_window end #------------------------------------ def phase3_next_actor # Loop begin # Actor blink effect OFF if @active_battler != nil @active_battler.blink = false end # If last actor if @actor_index == $game_party.actors.size-1 # Start main phase start_phase4 return end # Advance actor index @actor_index += 1 @active_battler = $game_party.actors[@actor_index] @active_battler.blink = true # Once more if actor refuses command input end until @active_battler.inputable? @active_battler.multiscope = false $premuto = false # Set up actor command window phase3_setup_command_window end #-------------------------------- def update # If battle event is running if $game_system.battle_interpreter.running? # Update interpreter $game_system.battle_interpreter.update # If a battler which is forcing actions doesn't exist if $game_temp.forcing_battler == nil # If battle event has finished running unless $game_system.battle_interpreter.running? # Rerun battle event set up if battle continues unless judge setup_battle_event end end # If not after battle phase if @phase != 5 # Refresh status window @status_window.refresh end end end # Update system (timer) and screen $game_system.update $game_screen.update # If timer has reached 0 if $game_system.timer_working and $game_system.timer == 0 # Abort battle $game_temp.battle_abort = true end # Update windows @help_window.update @party_command_window.update @actor_command_window.update @scope_window.update @status_window.update @message_window.update # Update sprite set @spriteset.update # If transition is processing if $game_temp.transition_processing # Clear transition processing flag $game_temp.transition_processing = false # Execute transition if $game_temp.transition_name == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $game_temp.transition_name) end end # If message window is showing if $game_temp.message_window_showing return end # If effect is showing if @spriteset.effect? return end # If game over if $game_temp.gameover # Switch to game over screen $scene = Scene_Gameover.new return end # If returning to title screen if $game_temp.to_title # Switch to title screen $scene = Scene_Title.new return end # If battle is aborted if $game_temp.battle_abort # Return to BGM used before battle started $game_system.bgm_play($game_temp.map_bgm) # Battle ends battle_end(1) return end # If waiting if @wait_count > 0 # Decrease wait count @wait_count -= 1 return end # If battler forcing an action doesn't exist, # and battle event is running if $game_temp.forcing_battler == nil and $game_system.battle_interpreter.running? return end # Branch according to phase case @phase when 1 # pre-battle phase update_phase1 when 2 # party command phase update_phase2 when 3 # actor command phase update_phase3 when 4 # main phase update_phase4 when 5 # after battle phase update_phase5 end end #-------------------------------- def update_phase3 # If enemy arrow is enabled if @enemy_arrow != nil update_phase3_enemy_select_plus if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) update_phase3_enemy_select unless SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) # If actor arrow is enabled elsif @actor_arrow != nil update_phase3_actor_select_plus if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) update_phase3_actor_select unless SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) # If skill window is enabled elsif @skill_window != nil update_phase3_skill_select # If item window is enabled elsif @item_window != nil update_phase3_item_select # If actor command window is enabled elsif @actor_command_window.active update_phase3_basic_command end end #--------------------------------------- def update_phase3_enemy_select_plus # Update enemy arrow @enemy_arrow.update # If B button was pressed if Input.trigger?(Input::B) $premuto = false @active_battler.multiscope = false @scope_window.visible = false @scope_window.set_text("",1) if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2 if @skill.scope == 2 @skill.scope = 1 end end end @scope_window.visible = false @help_window.visible = false # Play cancel SE $game_system.se_play($data_system.cancel_se) # End enemy selection end_enemy_select return end if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2 if Input.trigger?(SWITCH) if $premuto == false #if @skill.scope == 1 @active_battler.multiscope = true $premuto = true @enemy_arrow.visible = false $game_system.se_play($data_system.decision_se) #@skill.scope = 2 @help_window.visible = false @scope_window.set_text("Tutti i nemici. (Danno Dimezzato).", 1) if SKILL_MULTISCOPE.include?(@skill.id) @scope_window.set_text("Tutti i nemici. (Consumo MP raddoppiato).", 1) if STATUS_MULTISCOPE.include?(@skill.id) else#elsif #@skill.scope == 2 $premuto = false @active_battler.multiscope = false @enemy_arrow.visible = true @help_window.visible = true #@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1) $game_system.se_play($data_system.decision_se) #@skill.scope = 1 @scope_window.set_text("", 1) @scope_window.visible = false end end end end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.target_index = @enemy_arrow.index $premuto = false # End enemy selection @scope_window.visible = false end_enemy_select # If skill window is showing if @skill_window != nil # End skill selection end_skill_select end # If item window is showing if @item_window != nil # End item selection end_item_select end # Go to command input for next actor phase3_next_actor end end #--------------------------------------- def update_phase3_actor_select_plus # Update actor arrow @actor_arrow.update # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $premuto = false @active_battler.multiscope = false @scope_window.set_text("",1) @scope_window.visible = false $game_system.se_play($data_system.cancel_se) if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2 if @skill.scope == 4 @skill.scope = 3 end end end @scope_window.visible = false # End actor selection end_actor_select return end if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2 if Input.trigger?(SWITCH) if $premuto == false#if @skill.scope == 3 @active_battler.multiscope = true $premuto = true @actor_arrow.visible = false @help_window.visible = false $game_system.se_play($data_system.decision_se) #@skill.scope = 4 @scope_window.set_text("Tutti gli alleati. (Effetto Dimezzato).", 1) if SKILL_MULTISCOPE.include?(@skill.id) @scope_window.set_text("Tutti gli alleati. (Consumo MP raddoppiato).", 1) if STATUS_MULTISCOPE.include?(@skill.id) else # elsif @skill.scope == 4 $premuto = false @active_battler.multiscope = false @actor_arrow.visible = true @help_window.visible = true #@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1) $game_system.se_play($data_system.decision_se) #@skill.scope = 3 @scope_window.set_text("", 1) @scope_window.visible = false end end end end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $premuto = false $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.target_index = @actor_arrow.index # End actor selection @scope_window.visible = false end_actor_select # If skill window is showing if @skill_window != nil # End skill selection end_skill_select end # If item window is showing if @item_window != nil # End item selection end_item_select end # Go to command input for next actor phase3_next_actor end end #------------------------------------ def set_target_battlers(scope) # If battler performing action is enemy if @active_battler.is_a?(Game_Enemy) # Branch by effect scope case scope when 1 # single enemy index = @active_battler.current_action.target_index @target_battlers.push($game_party.smooth_target_actor(index)) when 2 # all enemies for actor in $game_party.actors if actor.exist? @target_battlers.push(actor) end end when 3 # single ally index = @active_battler.current_action.target_index @target_battlers.push($game_troop.smooth_target_enemy(index)) when 4 # all allies for enemy in $game_troop.enemies if enemy.exist? @target_battlers.push(enemy) end end when 5 # single ally (HP 0) index = @active_battler.current_action.target_index enemy = $game_troop.enemies[index] if enemy != nil and enemy.hp0? @target_battlers.push(enemy) end when 6 # all allies (HP 0) for enemy in $game_troop.enemies if enemy != nil and enemy.hp0? @target_battlers.push(enemy) end end when 7 # user @target_battlers.push(@active_battler) end end # If battler performing action is actor if @active_battler.is_a?(Game_Actor) # Branch by effect scope case scope when 1 # single enemy index = @active_battler.current_action.target_index @target_battlers.push($game_troop.smooth_target_enemy(index)) when 2 # all enemies if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2 @skill.scope = 1 end end for enemy in $game_troop.enemies if enemy.exist? @target_battlers.push(enemy) end end when 3 # single ally index = @active_battler.current_action.target_index @target_battlers.push($game_party.smooth_target_actor(index)) when 4 # all allies if SKILL_MULTISCOPE.include?(@skill.id) or STATUS_MULTISCOPE.include?(@skill.id) if @active_battler.current_action.kind != 0 and @active_battler.current_action.kind != 2 @skill.scope = 3 end end for actor in $game_party.actors if actor.exist? @target_battlers.push(actor) end end when 5 # single ally (HP 0) index = @active_battler.current_action.target_index actor = $game_party.actors[index] if actor != nil and actor.hp0? @target_battlers.push(actor) end when 6 # all allies (HP 0) for actor in $game_party.actors if actor != nil and actor.hp0? @target_battlers.push(actor) end end when 7 # user @target_battlers.push(@active_battler) end end end def make_skill_action_result # Get skill @skill = $data_skills[@active_battler.current_action.skill_id] # If not a forcing action unless @active_battler.current_action.forcing # If unable to use due to SP running out unless @active_battler.skill_can_use?(@skill.id) # Clear battler being forced into action $game_temp.forcing_battler = nil # Shift to step 1 @phase4_step = 1 return end end # Use up SP if STATUS_MULTISCOPE.include?(@skill.id) or SKILL_MULTISCOPE.include?(@skill.id) if @active_battler.multiscope @skill.scope = 2 if @skill.scope == 1 @skill.scope = 4 if @skill.scope == 3 else @skill.scope = 1 if @skill.scope == 2 @skill.scope = 3 if @skill.scope == 4 end end if STATUS_MULTISCOPE.include?(@skill.id) if @skill.scope == 2 or @skill.scope == 4 @active_battler.sp -= @skill.sp_cost*2 else @active_battler.sp -= @skill.sp_cost end end # Refresh status window @status_window.refresh # Show skill name on help window @help_window.set_text(@skill.name, 1) # Set animation ID @animation1_id = @skill.animation1_id @animation2_id = @skill.animation2_id # Set command event ID @common_event_id = @skill.common_event_id # Set target battlers set_target_battlers(@skill.scope) # Apply skill effect for target in @target_battlers target.skill_effect(@active_battler, @skill) end end end #============================================================================== # ** Arrow_Actor #------------------------------------------------------------------------------ # This arrow cursor is used to choose an actor. This class inherits from the # Arrow_Base class. #============================================================================== class Arrow_Actor < Arrow_Base #-------------------------------------------------------------------------- # * Get Actor Indicated by Cursor #-------------------------------------------------------------------------- def actor return $game_party.actors[@index] end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super unless $premuto # Cursor right if Input.repeat?(Input::RIGHT) $game_system.se_play($data_system.cursor_se) @index += 1 @index %= $game_party.actors.size end # Cursor left if Input.repeat?(Input::LEFT) $game_system.se_play($data_system.cursor_se) @index += $game_party.actors.size - 1 @index %= $game_party.actors.size end # Set sprite coordinates if self.actor != nil self.x = self.actor.screen_x self.y = self.actor.screen_y end end end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help # Display actor status in help window @help_window.set_actor(self.actor) unless $premuto end end #============================================================================== # ** Arrow_Enemy #------------------------------------------------------------------------------ # This arrow cursor is used to choose enemies. This class inherits from the # Arrow_Base class. #============================================================================== class Arrow_Enemy < Arrow_Base #-------------------------------------------------------------------------- # * Get Enemy Indicated by Cursor #-------------------------------------------------------------------------- def enemy return $game_troop.enemies[@index] end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super unless $premuto # Skip if indicating a nonexistant enemy $game_troop.enemies.size.times do break if self.enemy.exist? @index += 1 @index %= $game_troop.enemies.size end # Cursor right if Input.repeat?(Input::RIGHT) $game_system.se_play($data_system.cursor_se) $game_troop.enemies.size.times do @index += 1 @index %= $game_troop.enemies.size break if self.enemy.exist? end end # Cursor left if Input.repeat?(Input::LEFT) $game_system.se_play($data_system.cursor_se) $game_troop.enemies.size.times do @index += $game_troop.enemies.size - 1 @index %= $game_troop.enemies.size break if self.enemy.exist? end end # Set sprite coordinates if self.enemy != nil self.x = self.enemy.screen_x self.y = self.enemy.screen_y end end end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help # Display enemy name and state in the help window @help_window.set_enemy(self.enemy) unless $premuto end end #============================================================================== # ** Window_Skill #------------------------------------------------------------------------------ # This window displays usable skills on the skill and battle screens. #============================================================================== class Window_Skill < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 128, 640, 352) @actor = actor @column_max = 2 refresh self.index = 0 # If in battle, move window to center of screen # and make it semi-transparent if $game_temp.in_battle self.y = 64 self.height = 256 self.back_opacity = 160 end end #-------------------------------------------------------------------------- # * Acquiring Skill #-------------------------------------------------------------------------- def skill return @data[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 0...@actor.skills.size skill = $data_skills[@actor.skills[i]] if skill != nil @data.push(skill) end end # If item count is not 0, make a bit map and draw all items @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end end #-------------------------------------------------------------------------- # * Draw Item # index : item number #-------------------------------------------------------------------------- def draw_item(index) skill = @data[index] if @actor.skill_can_use?(skill.id) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(skill.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0) self.contents.draw_text(x + 190, y, 48, 32, skill.sp_cost.to_s, 2) unless ICONA_MULTISCOPE == nil self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2) if ICONA_MULTISCOPE == nil if SKILL_MULTISCOPE.include?(skill.id) or STATUS_MULTISCOPE.include?(skill.id) bitmap = Bitmap.new("Graphics/Icons/"+ICONA_MULTISCOPE) unless ICONA_MULTISCOPE == nil bmp_rect = Rect.new(0, 0, bitmap.width, bitmap.height) unless ICONA_MULTISCOPE == nil self.contents.blt(x + 240, y, bitmap, bmp_rect) unless ICONA_MULTISCOPE == nil end end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.skill == nil ? "" : self.skill.description) end end |
Istruzioni per l'uso
Le istruzioni sono all'interno dello script. Per configurarlo č presente la configurazione nello script.
Se usate questo script, per favore creditatemi!
Bugs e Conflitti Noti
N\A
Altri Dettagli
Se volete modificare qualcosa o adattare il systema a un battle system chiedetemi pure, cercherō di aiutarvi!
Modificato da Valentino, 06 September 2010 - 17:19 PM.