Welcome to Necromantic Visions. This website is here to enhance the fun and enjoyment you have while playing our games. Please feel free to send us any comments and talk in our forums.
HAHAHAHA beating the odds
i did a double and triple attack in my game, but my battle system is a highly edited version of the default. here's what i changed in the script.
* note that there's a lot of stuff in here that aren't in the default and i think there are some in the default that aren't in here. also, don't script the way that i do, this is highly disorganized, as of now.
the lines with many # are the important lines
in Scene_Battle_4
def start_phase4
@phase = 4
$game_temp.battle_turn += 1
@double_attack = 2 ####################
@triple_attack = 3 #################
for index in 0...$data_troops[@troop_id].pages.size
page = $data_troops[@troop_id].pages[index]
if page.span == 1
$game_temp.battle_event_flags[index] = false
end
end
@actor_command_window.active = false
@actor_command_window.visible = false
$game_temp.battle_main_phase = true
@phase4_step = 1
end
* the @double_attack and @triple_attack variables count how many attacks are left to do so if @double_attack is equal to 2 it means there's still two attacks needed to be executed.
def make_skill_action_result
@skill = $data_skills[@active_battler.current_action.skill_id]
unless @active_battler.current_action.forcing
unless @active_battler.skill_can_use?(@skill.id) or @skill.element_set.include?(45)
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
end
if @double_attack != 1 and @triple_attack >=3
@active_battler.sp -= @skill.sp_cost
end
@status_window.refresh
@help_window.set_text(@skill.name, 1)
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# コモンイベント ID を設定
@common_event_id = @skill.common_event_id
# 対象側バトラーを設定
set_target_battlers(@skill.scope)
# スキルの効果を適用
for target in @target_battlers
if @skill.id == 81
player = $scene.active_battler
charge = player.str * 0.05
if player.str_buff <= player.base_str / 2
player.str_buff += charge.to_i
player.estring = "STR UP!"
end
heal = [Integer(rand (player.maxhp * 0.1)),1].max * -1
player.damage = heal
player.charge_pop = true
player.hp -= heal
elsif @skill.id == 82
player = $scene.active_battler
guard = player.vit * 0.05
if player.vit_buff <= player.base_vit / 2
player.vit_buff += guard.to_i
player.estring = "VIT UP!"
end
heal = [Integer(rand (player.maxhp * 0.1)),1].max * -1
player.damage = heal
player.charge_pop = true
player.hp -= heal
elsif @skill.id == 6 and @double_attack != 0 ####################
@double_attack -= 1 #####################
if target != nil #######################
target.skill_effect(@active_battler,@skill) ####################
end #################
elsif @skill.id == 7 and @triple_attack != 0
@triple_attack -= 1
if target != nil
target.skill_effect(@active_battler,@skill)
end
elsif @skill.id == 10 # cheer skill
hp_heal = [Integer((target.maxhp * 0.1)+rand(10)),1].max * -1
sp_heal = [Integer((target.maxsp * 0.1)+rand(5)),1].max * -1
target.damage = hp_heal
target.sp_damage = sp_heal
target.hp -= hp_heal
target.sp -= sp_heal
else
target.skill_effect(@active_battler, @skill)
end
end
end
* the skill id of the double attack is 6, you have to change that line to reflect what skill id your double attack is, as you'll see, the line next to the elsif checks whether double attack is still more than zero, if it's still more than 0, it will make execute its effect on the target
def update_phase4_step5
# ヘルプウィンドウを隠す
@help_window.visible = false
# ステータスウィンドウをリフレッシュ
@status_window.refresh
# ダメージ表示
for target in @target_battlers
if target.damage != nil
if @skill.id == 13 and target.damage != "Miss" # boost skill
target.damage = ""
target.estring = "BOOST!"
target.charge_pop = true
elsif @skill.id == 10 # cheer skill
target.hpsp_pop = true
else
target.damage_pop = true
end
end
end
# ステップ 6 に移行
if @skill.id == 6 and @double_attack != 0 and not target.dead? #########
@phase4_step = 2 ###################
elsif @skill.id == 7 and @triple_attack != 0 and not target.dead?
@phase4_step = 2
else #####################
@skill = nil #####################
@phase4_step = 6 #################
end
end
* this part determines whether to finish the character's turn or restart the whole round if @double_attack is not zero or the target already died.
BIG NOTE: you definitely have to edit some stuff if you're using the default, this is just to give you an idea what you have to do to implement it.
|