❤ 0 Ce script permet d'ajouter le choix "auto" en combat pour que les héros combattent automatiquement.
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
| class Game_Actor
alias :eds_pre_auto_initialize :initialize
def initialize(id)
eds_pre_auto_initialize(id)
@default_autobattle = actor.auto_battle
end
def default_autobattle?
return @default_autobattle
end
def auto_battle=(value)
actor.auto_battle = value
end
end
class Window_PartyCommand < Window_Command
def initialize
s1 = Vocab::fight
s2 = Vocab::escape
s3 = "Auto"
super(128, [s1, s2, s3], 1, 4)
draw_item(0, true)
draw_item(1, $game_troop.can_escape)
draw_item(2, true)
self.active = false
end
end
class Scene_Battle
alias :eds_pre_auto_update_party_command_selection :update_party_command_selection
def update_party_command_selection
if Input.trigger?(Input::C)
if @party_command_window.index == 2
$game_party.members.each { |actor| actor.auto_battle = true }
next_actor
end
end
eds_pre_auto_update_party_command_selection
end
alias :eds_pre_auto_start_party_command_selection :start_party_command_selection
def start_party_command_selection
for actor in $game_party.members
actor.auto_battle = false unless actor.default_autobattle?
end
eds_pre_auto_start_party_command_selection
end
end |
|