ATB2 Fehlermeldung
Hi,
ich habe mir im skript explorer ein battle menu geholt und nachdem ich ein monster besiege kommt eine fehler meldung:
das ist das ATB2 battlemenu
fehler:
line 30 NameError
undefined local variable
'actor' for #Scene_Battle:0x4206028
das ist die line 30: if recovery_rate != 0 and not actor.dead?
was is daran falsch?
ich habe mir im skript explorer ein battle menu geholt und nachdem ich ein monster besiege kommt eine fehler meldung:
das ist das ATB2 battlemenu
fehler:
line 30 NameError
undefined local variable
'actor' for #Scene_Battle:0x4206028
das ist die line 30: if recovery_rate != 0 and not actor.dead?
was is daran falsch?
|
|
Quellcode |
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 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 |
#==============================================================================
# New_Battle
# Compiled By : MakirouAru for RPG Maker XP : Postality Knights Edition
#==============================================================================
#
# URL: http://www4.big.or.jp/~fukuyama/rgss/Battle_End_Recovery.txt
#
module Battle_End_Recovery
module Scene_Battle_Module
# 䖥Å"â€"¦•ÃÂâ€â€šÃŒID
@@recovery_rate_variable_id = nil
# 䖥Å"â€"¦‚̎擾
def battle_end_recovery_rate
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id = $data_system.variables.index ''
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id = false
end
end
return 0 unless @@recovery_rate_variable_id
return $game_variables[@@recovery_rate_variable_id]
end
def battle_end_recovery
recovery_rate = battle_end_recovery_rate
if recovery_rate != 0 and not actor.dead?
$game_party.actors.each do |actor|
recovery_hp = (actor.maxhp / 100.0 * recovery_rate).truncate
recovery_sp = (actor.maxsp / 100.0 * recovery_rate).truncate
actor.hp += recovery_hp
actor.sp += recovery_sp
actor.damage = - recovery_hp
actor.damage_pop = true
end
# Æ'XÆ'eÂ[Æ'^Æ'XÆ'EÆ'BÆ'“Æ'hÆ'E‚ðÂXÂV
@status_window.refresh
end
end
end # module Scene_Battle_Module
end # module Battle_End_Recovery
#------------------------------
# ÂÓ¬Æ'VÂ[Æ'“‚ÌÂÄ’è‹`
#------------------------------
class Scene_Battle
# Scene_Battleâ€"pÆ'‚Æ'WÆ'…Â[Æ'‹‚ðÆ'CÆ'“Æ'NÆ'‹Â[Æ'h
include Battle_End_Recovery::Scene_Battle_Module
# Å'³‚ÌÆ'tÆ'FÂ[Æ'Y‚TÅ JŽn‚É•Êâ€"¼‚ð‚‚¯‚é
alias battle_end_recovery_original_start_phase5 start_phase5
# Æ'tÆ'FÂ[Æ'Y‚TÅ JŽn‚ðÂÄ’è‹`
def start_phase5
battle_end_recovery
battle_end_recovery_original_start_phase5
end
end
$data_system_level_up_se = ""
$data_system_level_up_me = "Audio/ME/007-Fanfare01"
#==============================================================================
# Window_LevelUpWindow
#==============================================================================
class Window_LevelUpWindow < Window_Base
#--------------------------------------------------------------------------
def initialize(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
super(0, 128, 160, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
end
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
self.contents.clear
self.contents.font.color = system_color
self.contents.font.name = $defaultfonttype
self.contents.font.size = 14
self.contents.draw_text( 0, 0, 160, 24, "LEVEL UP!!")
self.contents.font.size = 18
self.contents.draw_text( 0, 28, 160, 24, $data_system.words.hp)
self.contents.draw_text( 0, 50, 160, 24, $data_system.words.sp)
self.contents.font.size = 14
self.contents.draw_text( 0, 72, 80, 24, $data_system.words.str)
self.contents.draw_text( 0, 94, 80, 24, $data_system.words.dex)
self.contents.draw_text( 0, 116, 80, 24, $data_system.words.agi)
self.contents.draw_text( 0, 138, 80, 24, $data_system.words.int)
self.contents.draw_text(92, 0, 128, 24, "¨")
self.contents.draw_text(76, 28, 128, 24, "=")
self.contents.draw_text(76, 50, 128, 24, "=")
self.contents.draw_text(76, 72, 128, 24, "=")
self.contents.draw_text(76, 94, 128, 24, "=")
self.contents.draw_text(76, 116, 128, 24, "=")
self.contents.draw_text(76, 138, 128, 24, "=")
self.contents.font.color = normal_color
self.contents.draw_text( 0, 0, 88, 24, last_lv.to_s, 2)
self.contents.draw_text( 0, 28, 72, 24, "+" + up_hp.to_s, 2)
self.contents.draw_text( 0, 50, 72, 24, "+" + up_sp.to_s, 2)
self.contents.draw_text( 0, 72, 72, 24, "+" + up_str.to_s, 2)
self.contents.draw_text( 0, 94, 72, 24, "+" + up_dex.to_s, 2)
self.contents.draw_text( 0, 116, 72, 24, "+" + up_agi.to_s, 2)
self.contents.draw_text( 0, 138, 72, 24, "+" + up_int.to_s, 2)
self.contents.font.size = 20
self.contents.draw_text( 0, 0, 128, 24, actor.level.to_s, 2)
self.contents.draw_text( 0, 26, 128, 24, actor.maxhp.to_s, 2)
self.contents.draw_text( 0, 48, 128, 24, actor.maxsp.to_s, 2)
self.contents.draw_text( 0, 70, 128, 24, actor.str.to_s, 2)
self.contents.draw_text( 0, 92, 128, 24, actor.dex.to_s, 2)
self.contents.draw_text( 0, 114, 128, 24, actor.agi.to_s, 2)
self.contents.draw_text( 0, 136, 128, 24, actor.int.to_s, 2)
end
end
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
attr_accessor :level_up_flags # LEVEL UP!•\ަ
end
#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
attr_accessor :exp_gain_ban
#--------------------------------------------------------------------------
alias xrxs_bp10_initialize initialize
def initialize
@exp_gain_ban = false
xrxs_bp10_initialize
end
#--------------------------------------------------------------------------
alias xrxs_bp10_cant_get_exp? cant_get_exp?
def cant_get_exp?
if @exp_gain_ban == true
return true
else
return xrxs_bp10_cant_get_exp?
end
end
end
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ÂÅ" Æ'AÆ'tÆ'^Â[Æ'oÆ'gÆ'‹Æ'tÆ'FÂ[Æ'YÅ JŽn
#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
# EXP Šl“¾‹ÖŽ~
for i in 0...$game_party.actors.size
$game_party.actors[i].exp_gain_ban = true
end
xrxs_bp10_start_phase5
# EXP Å l“¾‹ÖŽ~‚̉ðÂÅ"
for i in 0...$game_party.actors.size
$game_party.actors[i].exp_gain_ban = false
end
# EXP‚ð‰Šú‰»
@exp_gained = 0
for enemy in $game_troop.enemies
@exp_gained += enemy.exp if not enemy.hidden
end
# ÂÃ’è
@phase5_step = 0
@exp_gain_actor = -1
# Æ'Å Æ'UÆ'‹Æ'gÆ'EÆ'BÆ'“Æ'hÆ'E‚ð•\ަ
@result_window.y -= 64
@result_window.visible = true
# Æ'Å'Æ'xÆ'‹Æ'AÆ'bÆ'vâ€Â»â€™Ã¨â€šÃ–
phase5_next_levelup
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'tÆ'Å'Â[Æ'€ÂXÂV (Æ'AÆ'tÆ'^Â[Æ'oÆ'gÆ'‹Æ'tÆ'FÂ[Æ'Y)
#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
case @phase5_step
when 1
update_phase5_step1
else
xrxs_bp10_update_phase5
# Æ'Å'Æ'xÆ'‹Æ'AÆ'bÆ'v‚µ‚Ä‚¢‚éÂꇂ˧Æ'oÆ'gÆ'‹ÂIâ€"¹
battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
end
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'tÆ'Å'Â[Æ'€ÂXÂV (Æ'AÆ'tÆ'^Â[Æ'oÆ'gÆ'‹Æ'tÆ'FÂ[Æ'Y 1 : Æ'Å'Æ'xÆ'‹Æ'AÆ'bÆ'v)
#--------------------------------------------------------------------------
def update_phase5_step1
# C Æ'{Æ'^Æ'“‚ª‰Ÿ‚³‚ꂽÂê‡
if Input.trigger?(Input::C)
# Æ'EÆ'BÆ'“Æ'hÆ'E‚ð•‚¶‚ÄŽŸ‚ÌÆ'AÆ'NÆ'^Â[‚Ö
@levelup_window.visible = false if @levelup_window != nil
@status_window.level_up_flags[@exp_gain_actor] = false
phase5_next_levelup
end
end
#--------------------------------------------------------------------------
# ÂÅ" ŽŸ‚ÌÆ'AÆ'NÆ'^Â[‚ÌÆ'Å'Æ'xÆ'‹Æ'AÆ'bÆ'v•\ަ‚Ö
#--------------------------------------------------------------------------
def phase5_next_levelup
begin
# ŽŸ‚ÌÆ'AÆ'NÆ'^Â[‚Ö
@exp_gain_actor += 1
# ÂÃ…Å'ã‚ÌÆ'AÆ'NÆ'^Â[‚ÌÂê‡
if @exp_gain_actor >= $game_party.actors.size
# Æ'AÆ'tÆ'^Â[Æ'oÆ'gÆ'‹Æ'tÆ'FÂ[Æ'YÅ JŽn
@phase5_step = 0
return
end
actor = $game_party.actors[@exp_gain_actor]
if actor.cant_get_exp? == false
# Å'»ÂÂÌâ€\â€"Ã’l‚ð•ÛŽÂ
last_level = actor.level
last_maxhp = actor.maxhp
last_maxsp = actor.maxsp
last_str = actor.str
last_dex = actor.dex
last_agi = actor.agi
last_int = actor.int
# Å'oÅ'±’lŽæ“¾‚ÌÅ'ˆ’è“IÂuÅ Ã"(“ä
actor.exp += @exp_gained
# â€Â»â€™Ã¨
if actor.level > last_level
# Æ'Å'Æ'xÆ'‹Æ'AÆ'bÆ'v‚µ‚½Âê‡
@status_window.level_up(@exp_gain_actor)
if $data_system_level_up_se != ""
Audio.se_stop
Audio.se_play($data_system_level_up_se)
end
if $data_system_level_up_me != ""
Audio.me_stop
Audio.me_play($data_system_level_up_me)
end
@levelup_window = Window_LevelUpWindow.new(actor, last_level,
actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str - last_str,
actor.dex - last_dex, actor.agi - last_agi, actor.int - last_int)
@levelup_window.x = 160 * @exp_gain_actor
@levelup_window.visible = true
@phase5_wait_count = 40
@phase5_step = 1
# Æ'XÆ'eÂ[Æ'^Æ'XÆ'EÆ'BÆ'“Æ'hÆ'E‚ðÆ'Å Æ'tÆ'Å'Æ'bÆ'VÆ'…
@status_window.refresh
return
end
end
end until false
end
end
# Â¥£ÂÂ¥ XRXS_17. Æ'XÆ'Å Æ'bÆ'vÆ'_Æ'ÂÂ[Æ'Wâ€"hÅ'äÂ^Å'ø‰Êâ€"ÊÂÚÂ׉» ver.1.51 Â¥£ÂÂ¥
# by Â÷‰ë ÂÓy, fukuyama
#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# ÂÅ" Æ'XÆ'Å Æ'bÆ'vÆ'_Æ'ÂÂ[Æ'W‚ÌÅ'ø‰Ê“Kâ€"p
#--------------------------------------------------------------------------
alias xrxs_bp7_slip_damage_effect slip_damage_effect
def slip_damage_effect
# Ââ€â€™l‚̉Šú‰»
slip_damage_percent = 0
slip_damage_plus = 0
# Å'»ÂÕt‰Ã‚³‚ê‚Ä‚¢‚éÆ'XÆ'eÂ[Æ'g‚Ì’†‚©‚çÆ'XÆ'Å Æ'bÆ'vÆ'_Æ'ÂÂ[Æ'Wâ€"L‚è‚ÌÆ'‚Æ'm‚ð’T‚·
for i in @states
if $data_states[i].slip_damage
# ‚»‚ÌÆ'XÆ'eÂ[Æ'g‚ªŽÂ‚ÂĂ¢‚éÆ'XÆ'Å Æ'bÆ'vÆ'_Æ'ÂÂ[Æ'W‚Ì
# LvÆ'vÆ'‰Æ'XÆ'XÆ'eÂ[Æ'g‚Ü‚½‚ÃLvÆ'}Æ'CÆ'iÆ'XÆ'XÆ'eÂ[Æ'g‚ðâ€Â»â€™Ã¨ÂB
for j in $data_states[i].plus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^Æ'XÆ'Å Æ'bÆ'v([0-9]+)(%|“)/
slip_damage_percent += $1.to_i
elsif $data_states[j].name =~ /^Æ'XÆ'Å Æ'bÆ'v([0-9]+)$/
slip_damage_plus += $1.to_i
end
end
end
for j in $data_states[i].minus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^Æ'XÆ'Å Æ'bÆ'v([0-9]+)(%|“)/
slip_damage_percent -= $1.to_i
elsif $data_states[j].name =~ /^Æ'XÆ'Å Æ'bÆ'v([0-9]+)$/
slip_damage_plus -= $1.to_i
end
end
end
end
end
if slip_damage_percent == 0 and slip_damage_plus == 0
xrxs_bp7_slip_damage_effect
else
# â€"h‹ï‚ªÆ'XÆ'Å Æ'bÆ'vâ€"hÅ'䂪‚ ‚éÂꇂðâ€Â»â€™Ã¨
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
next if armor == nil
for j in armor.guard_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^Æ'XÆ'Å Æ'bÆ'v([0-9]+)(%|“)/
if slip_damage_percent > 0
slip_damage_percent = [slip_damage_percent - $1.to_i, 0].max
end
end
if $data_states[j].name =~ /^Æ'XÆ'Å Æ'bÆ'v([0-9]+)$/
if slip_damage_percent > 0
slip_damage_plus = [slip_damage_plus - $1.to_i, 0].max
end
end
end
end
end
# Æ'_Æ'ÂÂ[Æ'W‚ðÂÃ’è
self.damage = self.maxhp * slip_damage_percent / 100 + slip_damage_plus
# •ªŽU
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# HP ‚©‚çÆ'_Æ'ÂÂ[Æ'W‚ðÅ'¸ŽZ
self.hp -= self.damage
# Æ'ÂÆ'\Æ'bÆ'hÂIâ€"¹
return true
end
end
end
# Â¥£ÂÂ¥ XRXS_BP 1. CP§“±“ü ver.15 Â¥£ÂÂ¥
# by Â÷‰ë ÂÓy, ËœaŠó, Jack-R
#==============================================================================
# ¡ Scene_Battle_CP
#==============================================================================
class Scene_Battle_CP
#--------------------------------------------------------------------------
# ÂÅ" Å'öŠJÆ'CÆ'“Æ'XÆ'^Æ'“Æ'X•ÃÂâ€
#--------------------------------------------------------------------------
attr_accessor :stop # CP‰ÃŽZÆ'XÆ'gÆ'bÆ'v
#----------------------------------------------------------------------------
# ÂÅ" Æ'IÆ'uÆ'WÆ'FÆ'NÆ'g‚̉Šú‰»
#----------------------------------------------------------------------------
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# â€zâ€"ñ @count_battlers ‚ð‰Šú‰»
@count_battlers = []
# Æ'GÆ'lÆ'~Â[‚ðâ€zâ€"ñ @count_battlers ‚ɒljÃ
for enemy in $game_troop.enemies
@count_battlers.push(enemy)
end
# Æ'AÆ'NÆ'^Â[‚ðâ€zâ€"ñ @count_battlers ‚ɒljÃ
for actor in $game_party.actors
@count_battlers.push(actor)
end
for battler in @count_battlers
@agi_total += battler.agi
end
for battler in @count_battlers
battler.cp = [[65535 * (rand(15) + 85) / 100 * battler.agi / @agi_total * 4, 0].max, 65535].min
end
end
#----------------------------------------------------------------------------
# ÂÅ" CPÆ'JÆ'EÆ'“Æ'g‚ÌŠJŽn
#----------------------------------------------------------------------------
def start
if @cp_thread != nil then
return
end
@cancel = false
@stop = false
# ‚±‚±‚©‚çÆ'XÆ'Å'Æ'bÆ'h
@cp_thread = Thread.new do
while @cancel != true
if @stop != true
self.update # ÂXÂV
sleep(0.05)
end
end
end
# ‚±‚±‚܂ů'XÆ'Å'Æ'bÆ'h
end
#----------------------------------------------------------------------------
# ÂÅ" CPÆ'JÆ'EÆ'“Æ'gÆ'AÆ'bÆ'v
#----------------------------------------------------------------------------
def update
if @count_battlers != nil then
for battler in @count_battlers
# Âs“®Âoâ€"ˆ‚È‚¯‚ê‚Îâ€"³Ž‹
if battler.dead? == true #or battler.movable? == false then
battler.cp = 0
next
end
# ‚±‚±‚Ì 1.3‚𕦂邱‚ƂūÆ'XÆ'sÂ[Æ'h‚ð•ÃÂX‰Ââ€\ÂB‚½‚¾‚µÂ¬Ââ€â€œ_‚ÃŽgâ€"p‚·‚邱‚ÆÂB
battler.cp = [[battler.cp + 1.3 * 4096 * battler.agi / @agi_total, 0].max, 65535].min
end
end
end
#----------------------------------------------------------------------------
# ÂÅ" CPÆ'JÆ'EÆ'“Æ'g‚ÌŠJŽn
#----------------------------------------------------------------------------
def stop
@cancel = true
if @cp_thread != nil then
@cp_thread.join
@cp_thread = nil
end
end
end
#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
attr_accessor :now_guarding # Å'»ÂÃâ€"hÅ'ä’†Æ'tÆ'‰Æ'O
attr_accessor :cp # Å'»ÂÃCP
attr_accessor :slip_state_update_ban # Æ'XÆ'Å Æ'bÆ'vÂEÆ'XÆ'eÂ[Æ'gŽ©“®Âˆâ€"‚̋֎~
#--------------------------------------------------------------------------
# ÂÅ" Æ'RÆ'}Æ'“Æ'h“üâ€"ÉÂâ€\â€Â»â€™Ã¨
#--------------------------------------------------------------------------
def inputable?
return (not @hidden and restriction <= 1 and @cp >=65535)
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'XÆ'eÂ[Æ'g [Æ'XÆ'Å Æ'bÆ'vÆ'_Æ'ÂÂ[Æ'W] â€Â»â€™Ã¨
#--------------------------------------------------------------------------
alias xrxs_bp1_slip_damage? slip_damage?
def slip_damage?
return false if @slip_state_update_ban
return xrxs_bp1_slip_damage?
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'XÆ'eÂ[Æ'gŽ©‘R‰ðÂÅ" (Æ'^Â[Æ'“‚²‚Æ‚ÉÅ'Ä‚Ã'Âo‚µ)
#--------------------------------------------------------------------------
alias xrxs_bp1_remove_states_auto remove_states_auto
def remove_states_auto
return if @slip_state_update_ban
xrxs_bp1_remove_states_auto
end
end
#==============================================================================
# ¡ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ÂÅ" Æ'ZÆ'bÆ'gÆ'AÆ'bÆ'v
#--------------------------------------------------------------------------
alias xrxs_bp1_setup setup
def setup(actor_id)
xrxs_bp1_setup(actor_id)
@hate = 100 # init-value is 100
@cp = 0
@now_guarding = false
@slip_state_update_ban = false
end
end
#==============================================================================
# ¡ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ÂÅ" Æ'IÆ'uÆ'WÆ'FÆ'NÆ'g‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize(troop_id, member_index)
xrxs_bp1_initialize(troop_id, member_index)
@hate = 100 # init-value is 100
@cp = 0
@now_guarding = false
@slip_state_update_ban = false
end
end
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ÂÅ" Å'öŠJÆ'CÆ'“Æ'XÆ'^Æ'“Æ'X•ÃÂâ€
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CPÆ'ÂÂ[Æ'^Â[‚̂ÂÌÂXÂV
#--------------------------------------------------------------------------
# ÂÅ" Æ'IÆ'uÆ'WÆ'FÆ'NÆ'g‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize
@update_cp_only = false
xrxs_bp1_initialize
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'Å Æ'tÆ'Å'Æ'bÆ'VÆ'…
#--------------------------------------------------------------------------
alias xrxs_bp1_refresh refresh
def refresh
if @update_cp_only == false
xrxs_bp1_refresh
end
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
end
end
#--------------------------------------------------------------------------
# ÂÅ" CPÆ'ÂÂ[Æ'^Â[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
if actor.cp == nil
actor.cp = 0
end
w = width * [actor.cp,65535].min / 65535
self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
end
end
#==============================================================================
# Scene_Battle
#==============================================================================
class Scene_Battle
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# ÂÅ" Æ'oÆ'gÆ'‹ÂIâ€"¹
# result : Å'‹‰Ê (0:Ÿâ€"Ëœ 1:â€sâ€"k 2:“¦‘â€")
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# CPÆ'JÆ'EÆ'“Æ'g’âŽ~
@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'vÆ'Å'Æ'oÆ'gÆ'‹Æ'tÆ'FÂ[Æ'YÅ JŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
@agi_total = 0
@cp_thread = Scene_Battle_CP.new
# Æ'AÆ'NÆ'^Â[Æ'RÆ'}Æ'“Æ'hÆ'EÆ'BÆ'“Æ'hÆ'E‚ðÂÄÂì¬
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, "Run"])
@actor_command_window.y = 128
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@actor_command_window.draw_item(4, $game_temp.battle_can_escape ? @actor_command_window.normal_color : @actor_command_window.disabled_color)
xrxs_bp1_start_phase1
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'pÂ[Æ'eÆ'BÆ'RÆ'}Æ'“Æ'hÆ'tÆ'FÂ[Æ'YÅ JŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase2 start_phase2
def start_phase2
xrxs_bp1_start_phase2
@party_command_window.active = false
@party_command_window.visible = false
# ŽŸ‚Ö
start_phase3
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'tÆ'Å'Â[Æ'€ÂXÂV (Æ'pÂ[Æ'eÆ'BÆ'RÆ'}Æ'“Æ'hÆ'tÆ'FÂ[Æ'Y)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase2 update_phase2
def update_phase2
# C Æ'{Æ'^Æ'“‚ª‰Ÿ‚³‚ꂽÂê‡
if Input.trigger?(Input::C)
# Æ'pÂ[Æ'eÆ'BÆ'RÆ'}Æ'“Æ'hÆ'EÆ'BÆ'“Æ'hÆ'E‚ÌÆ'JÂ[Æ'\Æ'‹ˆÊ’u‚Å•ªŠò
case @party_command_window.index
when 0 # ¤
# Å'ˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
@cp_thread.start
# Æ'AÆ'NÆ'^Â[Æ'RÆ'}Æ'“Æ'hÆ'tÆ'FÂ[Æ'YÅ JŽn
start_phase3
end
return
end
xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# ÂÅ" ŽŸ‚ÌÆ'AÆ'NÆ'^Â[‚ÌÆ'RÆ'}Æ'“Æ'h“üâ€"ÂÖ
#--------------------------------------------------------------------------
def phase3_next_actor
# Æ'‹Â[Æ'v
begin
# Æ'AÆ'NÆ'^Â[‚Ìâ€"¾â€"Ã…Æ'GÆ'tÆ'FÆ'NÆ'g OFF
if @active_battler != nil
@active_battler.blink = false
end
# ÂÃ…Å'ã‚ÌÆ'AÆ'NÆ'^Â[‚ÌÂê‡
if @actor_index == $game_party.actors.size-1
# Æ'ÂÆ'CÆ'“Æ'tÆ'FÂ[Æ'YÅ JŽn
@cp_thread.start
start_phase4
return
end
# Æ'AÆ'NÆ'^Â[‚ÌÆ'CÆ'“Æ'fÆ'bÆ'NÆ'X‚ðÂi‚ß‚é
@actor_index += 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
if @active_battler.inputable? == false
@active_battler.current_action.kind = -1
end
# Æ'AÆ'NÆ'^Â[‚ªÆ'RÆ'}Æ'“Æ'h“üâ€"ÂðŽó‚¯•t‚¯‚È‚¢Âó‘Ã"‚È‚ç‚à ‚¤ˆê“x
end until @active_battler.inputable?
@cp_thread.stop
# Æ'AÆ'NÆ'^Â[Æ'RÆ'}Æ'“Æ'hÆ'EÆ'BÆ'“Æ'hÆ'E‚ðÆ'ZÆ'bÆ'gÆ'AÆ'bÆ'v
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ÂÅ" ‘O‚ÌÆ'AÆ'NÆ'^Â[‚ÌÆ'RÆ'}Æ'“Æ'h“üâ€"ÂÖ
#--------------------------------------------------------------------------
def phase3_prior_actor
# Æ'‹Â[Æ'v
begin
# Æ'AÆ'NÆ'^Â[‚Ìâ€"¾â€"Ã…Æ'GÆ'tÆ'FÆ'NÆ'g OFF
if @active_battler != nil
@active_battler.blink = false
end
# Âʼn‚ÌÆ'AÆ'NÆ'^Â[‚ÌÂê‡
if @actor_index == 0
# Âʼn‚Öâ€"ß‚é
start_phase3
return
end
# Æ'AÆ'NÆ'^Â[‚ÌÆ'CÆ'“Æ'fÆ'bÆ'NÆ'X‚ðâ€"ß‚·
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
end until @active_battler.inputable?
@cp_thread.stop
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
# Å'ø‰Ê‰¹‚ÌÂĶ
Audio.se_play($data_system_command_up_se) if $data_system_command_up_se != ""
# â€"ß‚·
xrxs_bp1_phase3_setup_command_window
end
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
if Input.trigger?(Input::C)
case @actor_command_window.index
when 4 # “¦‚°‚é
if $game_temp.battle_can_escape
# Å'ˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# Æ'AÆ'NÆ'VÆ'‡Æ'“‚ðÂÃ’è
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 4
# ŽŸ‚ÌÆ'AÆ'NÆ'^Â[‚ÌÆ'RÆ'}Æ'“Æ'h“üâ€"ÂÖ
phase3_next_actor
else
# Æ'uÆ'UÂ[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'ÂÆ'CÆ'“Æ'tÆ'FÂ[Æ'YÅ JŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
xrxs_bp1_start_phase4
# Æ'GÆ'lÆ'~Â[Æ'AÆ'NÆ'VÆ'‡Æ'“Âì¬
for enemy in $game_troop.enemies
if enemy.cp < 65535
enemy.current_action.clear
enemy.current_action.kind = -1
next
end
enemy.make_action
end
# Âs“®Â‡ÂËœÂì¬
make_action_orders
end
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
# ‰Šú‰»
@phase4_act_continuation = 0
# Ÿâ€sâ€Â»â€™Ã¨
if judge
@cp_thread.stop
# Ÿâ€"˜‚Ü‚½‚Ãâ€sâ€"k‚ÌÂê‡ : Æ'ÂÆ'\Æ'bÆ'hÂIâ€"¹
return
end
# â€"¢Âs“®Æ'oÆ'gÆ'‰Â[â€zâ€"ñ‚ÌÂ擪‚©‚çŽæ“¾
@active_battler = @action_battlers[0]
# Æ'XÆ'eÂ[Æ'^Æ'XÂXÂV‚ðCP‚¾‚¯‚ÉÅ'À’èÂB
@status_window.update_cp_only = true
# Æ'XÆ'eÂ[Æ'gÂXÂV‚ð‹ÖŽ~ÂB
@active_battler.slip_state_update_ban = true if @active_battler != nil
# â€"ß‚·
xrxs_bp1_update_phase4_step1
# ‹ÖŽ~‚ð‰ðÂÅ"
@status_window.update_cp_only = false
@active_battler.slip_state_update_ban = false if @active_battler != nil
end
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# ‹Â§Æ'AÆ'NÆ'VÆ'‡Æ'“‚łȂ¯‚ê‚Î
unless @active_battler.current_action.forcing
# CP‚ª‘«‚è‚Ä‚¢‚È‚¢Âê‡
if @phase4_act_continuation == 0 and @active_battler.cp < 65535
@phase4_step = 6
return
end
if @active_battler.restriction == 2 or @active_battler.restriction == 3
# Æ'AÆ'NÆ'VÆ'‡Æ'“‚ÉÂUÅ'‚‚ðÂÃ’è
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
# §â€"ñ‚ª [Âs“®‚Å‚«‚È‚¢] ‚ÌÂê‡
if @active_battler.restriction == 4
# Æ'AÆ'NÆ'VÆ'‡Æ'“‹Â§‘ÎÂÛ‚ÌÆ'oÆ'gÆ'‰Â[‚ðÆ'NÆ'Å Æ'A
$game_temp.forcing_battler = nil
if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
# Æ'XÆ'eÂ[Æ'gŽ©‘R‰ðÂÅ"
@active_battler.remove_states_auto
# CPÂÃâ€Ã¯
@active_battler.cp = [(@active_battler.cp - 65535),0].max
# Æ'XÆ'eÂ[Æ'^Æ'XÆ'EÆ'BÆ'“Æ'hÆ'E‚ðÆ'Å Æ'tÆ'Å'Æ'bÆ'VÆ'…
@status_window.refresh
end
# Æ'XÆ'eÆ'bÆ'v 1 ‚ɈÚÂs
@phase4_step = 1
return
end
end
# Æ'AÆ'NÆ'VÆ'‡Æ'“‚̎ÕʂŕªŠò
case @active_battler.current_action.kind
when 0
# ÂUÅ'‚¥â€"hÅ'äÂE“¦‚°‚éÂE‰½‚à ‚µ‚È‚¢Žž‚Ì‹¤’ÊÂÃâ€Ã¯CP
@active_battler.cp -= 0 if @phase4_act_continuation == 0
when 1
# Æ'XÆ'LÆ'‹Žgâ€"pŽž‚ÌÂÃâ€Ã¯CP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when 2
# Æ'AÆ'CÆ'eÆ'€Žgâ€"pŽž‚ÌÂÃâ€Ã¯CP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when -1
# CP‚ªâ€"‚܂ÂĂ¢‚È‚¢
@phase4_step = 6
return
end
# CP‰ÃŽZ‚ðˆêŽž’âŽ~‚·‚é
@cp_thread.stop = true
# Æ'XÆ'eÂ[Æ'gŽ©‘R‰ðÂÅ"
@active_battler.remove_states_auto
xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# ÂÅ" Šîâ€"{Æ'AÆ'NÆ'VÆ'‡Æ'“ Å'‹‰ÊÂì¬
#--------------------------------------------------------------------------
alias xrxs_bp1_make_basic_action_result make_basic_action_result
def make_basic_action_result
# ÂUÅ'‚‚ÌÂê‡
if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # ÂUÅ'‚Žž‚ÌCPÂÃâ€Ã¯
end
# â€"hÅ'ä‚ÌÂê‡
if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
@active_battler.cp -= 32767 # â€"hÅ'䎞‚ÌCPÂÃâ€Ã¯
end
# “G‚Ì“¦‚°‚é‚ÌÂê‡
if @active_battler.is_a?(Game_Enemy) and
@active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # “¦‘â€"Žž‚ÌCPÂÃâ€Ã¯
end
# ‰½‚à ‚µ‚È‚¢‚ÌÂê‡
if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
@active_battler.cp -= 32767 # ‰½‚à ‚µ‚È‚¢Žž‚ÌCPÂÃâ€Ã¯
end
# “¦‚°‚é‚ÌÂê‡
if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # “¦‘â€"Žž‚ÌCPÂÃâ€Ã¯
# “¦‘â€"‰Ââ€\‚łÂȂ¢Âê‡
if $game_temp.battle_can_escape == false
# Æ'uÆ'UÂ[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Å'ˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# “¦‘â€"ˆâ€"Â
update_phase2_escape
return
end
xrxs_bp1_make_basic_action_result
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'tÆ'Å'Â[Æ'€ÂXÂV (Æ'ÂÆ'CÆ'“Æ'tÆ'FÂ[Æ'Y Æ'XÆ'eÆ'bÆ'v 5 : Æ'_Æ'ÂÂ[Æ'W•\ަ)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
# Æ'XÆ'Å Æ'bÆ'vÆ'_Æ'ÂÂ[Æ'W
if @active_battler.hp > 0 and @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end
xrxs_bp1_update_phase4_step5
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'tÆ'Å'Â[Æ'€ÂXÂV (Æ'ÂÆ'CÆ'“Æ'tÆ'FÂ[Æ'Y Æ'XÆ'eÆ'bÆ'v 6 : Æ'Å Æ'tÆ'Å'Æ'bÆ'VÆ'…)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
# CP‰ÃŽZ‚ðÂÄŠJ‚·‚é
@cp_thread.stop = false
# Æ'wÆ'‹Æ'vÆ'EÆ'BÆ'“Æ'hÆ'E‚ð‰B‚·
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end
end
# Â¥£ÂÂ¥ XRXS_BP 7. Æ'oÆ'gÆ'‹Æ'XÆ'eÂ[Æ'^Æ'XÂEÆ'NÆ'Å Æ'AÆ'fÆ'UÆ'CÆ'“ ver.1.02 Â¥£ÂÂ¥
# by Â÷‰ë ÂÓy, TOMY
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ÂÅ" Å'öŠJÆ'CÆ'“Æ'XÆ'^Æ'“Æ'X•ÃÂâ€
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CPÆ'ÂÂ[Æ'^Â[‚̂ÂÌÂXÂV
#--------------------------------------------------------------------------
# ÂÅ" Æ'IÆ'uÆ'WÆ'FÆ'NÆ'g‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
xrxs_bp7_initialize
# «Full-View‚ÌÂꇂɺ“ñÂs‚Ì # ‚𵂾‚³‚¢ÂB
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'Å Æ'tÆ'Å'Æ'bÆ'VÆ'…
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
if @update_cp_only
xrxs_bp7_refresh
return
end
# •`ŽÊ‚ð‹ÖŽ~‚µ‚È‚ª‚çâ€"ß‚·
@draw_ban = true
xrxs_bp7_refresh
# •`ŽÊ‚̋֎~‚ð‰ðÂÅ"
@draw_ban = false
# •`ŽÊ‚ðŠJŽn
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# •à ÂsÆ'LÆ'Æ'Æ'‰Æ'OÆ'‰Æ'tÆ'BÆ'bÆ'N‚Ì•`ŽÊ
draw_actor_graphic(actor, actor_x - 9, 116)
# HP/SPÆ'ÂÂ[Æ'^Â[‚Ì•`ŽÊ
draw_actor_hp_meter_line(actor, actor_x, 72, 96, 12)
draw_actor_sp_meter_line(actor, actor_x, 104, 96, 12)
self.contents.font.size = 24
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 58, 96, 24, actor.hp.to_s, 2)
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 90, 96, 24, actor.sp.to_s, 2)
self.contents.font.size = 12
self.contents.font.color = system_color
draw_shadow_text(actor_x, 60, 96, 12, $data_system.words.hp)
draw_shadow_text(actor_x, 92, 96, 12, $data_system.words.sp)
draw_actor_state(actor, actor_x, 100)
end
end
end
#==============================================================================
# ¡ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ÂÅ" HPÆ'ÂÂ[Æ'^Â[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.hp / actor.maxhp
hp_color_1 = Color.new(255, 0, 0, 192)
hp_color_2 = Color.new(255, 255, 0, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# ÂÅ" SPÆ'ÂÂ[Æ'^Â[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.sp / actor.maxsp
hp_color_1 = Color.new( 0, 0, 255, 192)
hp_color_2 = Color.new( 0, 255, 255, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# ÂÅ" â€"¼‘O‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_name draw_actor_name
def draw_actor_name(actor, x, y)
xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ÂÅ" Æ'XÆ'eÂ[Æ'g‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_state draw_actor_state
def draw_actor_state(actor, x, y, width = 120)
xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ÂÅ" HP ‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_hp draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ÂÅ" SP ‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_sp draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
end
end
#==============================================================================
# ž Å Oâ€¢â€Æ'‰Æ'CÆ'uÆ'‰Æ'Å
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# ÂÅ" Æ'‰Æ'CÆ'“•`‰æ by Â÷‰ë ÂÓy
#--------------------------------------------------------------------------
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
distance = (start_x - end_x).abs + (start_y - end_y).abs
# •`ŽÊŠJŽn
if end_color == start_color
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
self.contents.fill_rect(x, y, width, width, start_color)
end
else
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
r = start_color.red * (distance-i)/distance + end_color.red * i/distance
g = start_color.green * (distance-i)/distance + end_color.green * i/distance
b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
end
end
end
#--------------------------------------------------------------------------
def draw_shadow_text(x, y, width, height, string, align = 0)
color = self.contents.font.color.dup
# Â•Žš‚ʼne•`‰æ
self.contents.font.color = Color.new(0, 0, 0)
self.contents.draw_text(x + 2, y + 2, width, height, string, align)
# Å'³‚ÌÂF‚Éâ€"ß‚µ‚Ä•`‰æ
self.contents.font.color = color
self.contents.draw_text(x, y, width, height, string, align)
end
end |
-
Dragonball Multiverse
-
Ressourcen
-
Tutorials
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Nerbert« (5. August 2009, 16:04)
Der Fehler liegt anscheinend, daran das hier 2 Zeilen vertauscht wurden.
So müsste es aussehen:
In deinem geposteten Beispiel sind die Zeilen 29 und 30 vertauscht. Wie die Zeilennummern im Original liegen weiß ich nicht genau, hier scheinen sie etwas verschoben. Oritentier dich einfach am Inhalt.
Kurz gesagt: vertausche die fehlerhafte Zeile mit der darunterliegenden und es sollte gehen.
So müsste es aussehen:
|
|
Ruby Quellcode |
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
def battle_end_recovery recovery_rate = battle_end_recovery_rate $game_party.actors.each do |actor| if recovery_rate != 0 and not actor.dead? recovery_hp = (actor.maxhp / 100.0 * recovery_rate).truncate recovery_sp = (actor.maxsp / 100.0 * recovery_rate).truncate actor.hp += recovery_hp actor.sp += recovery_sp actor.damage = - recovery_hp actor.damage_pop = true end # Æ'XÆ'eÂ[Æ'^Æ'XÆ'EÆ'BÆ'“Æ'hÆ'E‚ðÂXÂV @status_window.refresh end end |
In deinem geposteten Beispiel sind die Zeilen 29 und 30 vertauscht. Wie die Zeilennummern im Original liegen weiß ich nicht genau, hier scheinen sie etwas verschoben. Oritentier dich einfach am Inhalt.
Kurz gesagt: vertausche die fehlerhafte Zeile mit der darunterliegenden und es sollte gehen.
Das große Scientia Wiki zur Spielentwicklung 
Was ist das RGSS ? RGSS-Dokumentation auf Sc
Kyoshiros Makerkurs
Musik von Shabraxxx für euch
Guide zu den Audioformaten
Skripte von mir (Auswahl):
Atmungssystem
| Streichholzsystem
| Animiert durch Bücher blättern
Random : Marktsystem für Kardor
| Staterelated Battlergraphic
| Hinweis auf mögliche Aktionen
SelfSwitchExpirationtimer Skript - Gameplayerweiterung für Pilzesammler und Farmspiele
Meine Skripte werden gerade hier gesammelt.

Was ist das RGSS ? RGSS-Dokumentation auf Sc
Kyoshiros Makerkurs

Musik von Shabraxxx für euch
Guide zu den Audioformaten

Skripte von mir (Auswahl):
Atmungssystem
| Streichholzsystem
| Animiert durch Bücher blättern
Random : Marktsystem für Kardor
| Staterelated Battlergraphic
| Hinweis auf mögliche Aktionen
SelfSwitchExpirationtimer Skript - Gameplayerweiterung für Pilzesammler und Farmspiele
Meine Skripte werden gerade hier gesammelt.
man ey super dankeschön
-
Dragonball Multiverse
-
Ressourcen
-
Tutorials
Ähnliche Themen
-
RGSS 1 Probleme & Talk »-
ZTBS Skript
(6. Juni 2009, 10:53)
-
Menüs »-
Battle Report V1.6
(30. August 2006, 04:16)
-
RGSS 1 Probleme & Talk »-
wieder proplem mit skript...
(9. Juli 2007, 19:23)
-
RGSS 1 Probleme & Talk »-
MOG
(3. Juli 2007, 21:45)
-
RGSS 1 Probleme & Talk »-
Battle_Graphic im Menü
(9. April 2007, 02:16)


