전투관련
2007.12.05 23:37

콤보 스크립트

조회 수 3699 추천 수 4 댓글 10
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
# Originally released by: momomo?
# Removal of comments and fix: Matte
#
# Look at line 221 for more info
module Combo_Skill_Config
COMBO_BONUS = 25
ALL_ATTCK_SKILL_MAX = 1
COMBO_ANIME_ID = 5
BASE_BEFORE_REVISION = 15
BASE_AFTER_REVISION = 15
SHOW_DAMAGE_LUMP = true
COMBO_NAME_SHOW = true
COMBO_NAME_SPLIT = 3
end

class Scene_Battle
include Combo_Skill_Config
#--------------------------------------------------------------------------
alias scene_battle_skill_combo_start_phase4 start_phase4
def start_phase4
@combo_on = false
@combo_bese_target = nil
@combo_finish = false
@combo_count = 0
@combo_name = ""
scene_battle_skill_combo_start_phase4
end
#--------------------------------------------------------------------------
alias scene_battle_skill_combo_update_phase4 update_phase4
def update_phase4
if @combo_effect_start
update_phase4_combo_effect
return
end
scene_battle_skill_combo_update_phase4
end
#--------------------------------------------------------------------------
alias scene_battle_skill_combo_update_phase4_step2 update_phase4_step2
def update_phase4_step2
unless @active_battler.current_action.forcing
if @active_battler.restriction == 2 or @active_battler.restriction == 3
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
if @active_battler.restriction == 4
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
end
if @action_battlers.size != 0 and @combo_on == false
if combo_ok?(@active_battler)
@combo_skill = []
@combo_skill.push(@active_battler.current_action.skill_id)
@combo_member = []
@combo_member.push(@active_battler)
last_battler = @active_battler
for i in 0...@action_battlers.size
next_battler = @action_battlers[i]
break if combo_ok?(next_battler) == false
break if combo_probability(last_battler, next_battler) == false
next_battler.combo_number = i + 2
@combo_skill.push(next_battler.current_action.skill_id)
@combo_member.push(next_battler)
last_battler = @action_battlers[i]
end
@combo_max = @combo_member.size
if @combo_max > 1
@combo_count = 0
@active_battler.combo_number = 1
@combo_on = true
@combo_effect = true
else
@combo_bese_target = nil
@combo_all_target_count = 0
@combo_on = false
end
end
end
if @combo_effect
@combo_effect_start = true
end
scene_battle_skill_combo_update_phase4_step2
end
#--------------------------------------------------------------------------
alias scene_battle_skill_combo_make_skill_action_result make_skill_action_result
def make_skill_action_result
scene_battle_skill_combo_make_skill_action_result
if @combo_on
@active_battler.combo_number = nil
@combo_count += 1
if @combo_count >= @combo_max
@combo_finish = true
end
if COMBO_NAME_SHOW
c_name = get_combo_skill_name(@skill)
if @combo_finish
@combo_name += c_name[1]
@help_window.set_text(@combo_name, 1)
@help_window.visible = true
else
@combo_name += c_name[0]
@help_window.visible = false
end
end
end
end
#--------------------------------------------------------------------------
def update_phase4_combo_effect
@active_battler.animation_id = COMBO_ANIME_ID
@active_battler.animation_hit = true
@wait_count = 8
@combo_effect_start = false
@phase4_step = 3
end
#--------------------------------------------------------------------------
alias scene_battle_skill_combo_update_phase4_step5 update_phase4_step5
def update_phase4_step5
scene_battle_skill_combo_update_phase4_step5
if @combo_finish
battler = []
battler += $game_troop.enemies
battler += $game_party.actors
for target in battler
if target.exist?
if SHOW_DAMAGE_LUMP
if target.combo_total_damage != nil
target.damage = target.combo_total_damage
target.damage_pop = true
target.combo_total_damage = nil
end
end
if target.combo_dead
target.hp = 0
target.combo_dead = false
end
end
end
end
end
#--------------------------------------------------------------------------
alias scene_battle_skill_combo_update_phase4_step6 update_phase4_step6
def update_phase4_step6
scene_battle_skill_combo_update_phase4_step6
if @combo_finish
@combo_on = false
@combo_bese_target = nil
@combo_count = 0
@combo_finish = false
@combo_effect = false
@combo_name = ""
end
end
#--------------------------------------------------------------------------
def combo_ok?(actor)
all_attck_skill_max = ALL_ATTCK_SKILL_MAX
if actor.is_a?(Game_Enemy)
return false
end
if actor.current_action.kind != 1
return false
end
unless actor.skill_can_use?(actor.current_action.skill_id)
return false
end
skill = $data_skills[actor.current_action.skill_id]
for i in skill.element_set
if $data_system.elements[i] != nil
if $data_system.elements[i] =~ /combo/
return false
end
end
end
if @combo_bese_target == nil
@combo_all_target_count = 0
if skill.scope == 2
if @combo_all_target_count >= all_attck_skill_max
return false
end
@combo_bese_target = -1
@combo_all_target_count += 1
else
@combo_bese_target = actor.current_action.target_index
end
elsif @combo_bese_target == -1
if skill.scope == 2
if @combo_all_target_count >= all_attck_skill_max
return false
end
@combo_all_target_count += 1
else
@combo_bese_target = actor.current_action.target_index
end
else
if skill.scope == 2
if @combo_all_target_count >= all_attck_skill_max
return false
end
@combo_all_target_count += 1
else
if actor.current_action.target_index != @combo_bese_target
return false
end
end
end
return true
end
#--------------------------------------------------------------------------
def combo_probability(last_battler, next_battler)
s_num = $data_system.switches.index("1")
if s_num != nil
return true
end
last_skill = $data_skills[last_battler.current_action.skill_id]
next_skill = $data_skills[next_battler.current_action.skill_id]
last_n = skill_combo_after_revision(last_skill)
last_n += actor_combo_after_revision(last_battler)
next_n = skill_combo_before_revision(next_skill)
next_n += actor_combo_before_revision(next_battler)
n = last_n + next_n
# Change this next line to whatever you want the propability to be.
# If the number is lower there is a bigger chance for a combo attack.
# And if it's higher there is less chance for a combo
if (rand(100) < n)
return true
end
return false
end
#--------------------------------------------------------------------------
def actor_combo_base_revision(actor)
return 0
end
#--------------------------------------------------------------------------
def actor_combo_before_revision(actor)
n = actor_combo_base_revision(actor)
n += BASE_BEFORE_REVISION
return n
end
#--------------------------------------------------------------------------
def actor_combo_after_revision(actor)
n = actor_combo_base_revision(actor)
n += BASE_AFTER_REVISION
return n
end
#--------------------------------------------------------------------------
def skill_combo_before_revision(skill)
rate = 0
for i in skill.element_set
if $data_system.elements[i] != nil
if $data_system.elements[i] =~ /combo([+-]?[0-9]+)(%|%)/
rate += $1.to_i
end
end
end
return rate
end
#--------------------------------------------------------------------------
def skill_combo_after_revision(skill)
rate = 0
for i in skill.element_set
if $data_system.elements[i] != nil
if $data_system.elements[i] =~ /combo([+-]?[0-9]+)(%|%)/
rate += $1.to_i
end
end
end
return rate
end
#--------------------------------------------------------------------------
def get_combo_skill_name(skill)
name = skill.name.split('')
if name.size == 1
return [name[0], name[0]]
elsif name.size <= COMBO_NAME_SPLIT
tempname = name.join
return [tempname, tempname]
end
num = name.size / 2
name1 = ""
name2 = ""
for i in 0...num
name1 += name[i]
end
for i in num...name.size
name2 += name[i]
end
return [name1, name2]
end
end

class Game_Battler
include Combo_Skill_Config
attr_accessor :combo_number
attr_accessor :combo_dead
attr_accessor :combo_total_damage
#--------------------------------------------------------------------------
alias game_battler_skill_combo_initialize initialize
def initialize
game_battler_skill_combo_initialize
@combo_number = nil
@combo_dead = false
@combo_total_damage = nil
end
#--------------------------------------------------------------------------
alias game_battler_skill_combo_skill_effect skill_effect
def skill_effect(user, skill)
result = game_battler_skill_combo_skill_effect(user, skill)
if user.combo_number != nil
if self.damage.is_a?(Numeric)
combo_rate = user.combo_number * COMBO_BONUS
damage = self.damage * combo_rate / 100
self.damage += damage
self.hp -= damage
if SHOW_DAMAGE_LUMP
@combo_total_damage = 0 if @combo_total_damage == nil
@combo_total_damage += self.damage
self.damage = nil
end
end
if self.dead?
self.combo_dead = true
self.hp = 1
end
end
return result
end
end



써봐야겠는데요..

출처는 창조도시 전 2004년에 가입햇는데 글 처음써봄..ㅎ2;

-----------------------------------------------------



-----------------------------------------------------

다행히사용방법이적혀있지않으..ㅁ... (그냥쓰면되겠져뭐
  • ?
    아하하 2007.12.06 11:11
    ㅎ거 2일쨰 조회수0을 기록중
  • ?
    루비 2007.12.11 21:37
    사용방법..... 좋은 자료에 감사드립니다
  • ?
    이준영 2008.08.05 16:50
    이거 어디다 쓰나요?
  • ?
    lhm9205 2008.08.16 14:22
    저안되여
  • ?
    권태성 2008.08.16 15:37
    턴알 인가요 아님 액알용인가요???
  • ?
    미니장 2010.02.16 12:22

    나두~

  • ?
    XP 팬 2010.03.13 20:05

    # Originally released by: momomo?
    # Removal of comments and fix: Matte
    #
    # Look at line 221 for more info
    module Combo_Skill_Config
    COMBO_BONUS = 25
    ALL_ATTCK_SKILL_MAX = 1
    COMBO_ANIME_ID = 5
    BASE_BEFORE_REVISION = 15
    BASE_AFTER_REVISION = 15
    SHOW_DAMAGE_LUMP = true
    COMBO_NAME_SHOW = true
    COMBO_NAME_SPLIT = 3
    end

    class Scene_Battle
    include Combo_Skill_Config
    #--------------------------------------------------------------------------
    alias scene_battle_skill_combo_start_phase4 start_phase4
    def start_phase4
    @combo_on = false
    @combo_bese_target = nil
    @combo_finish = false
    @combo_count = 0
    @combo_name = ""
    scene_battle_skill_combo_start_phase4
    end
    #--------------------------------------------------------------------------
    alias scene_battle_skill_combo_update_phase4 update_phase4
    def update_phase4
    if @combo_effect_start
    update_phase4_combo_effect
    return
    end
    scene_battle_skill_combo_update_phase4
    end
    #--------------------------------------------------------------------------
    alias scene_battle_skill_combo_update_phase4_step2 update_phase4_step2
    def update_phase4_step2
    unless @active_battler.current_action.forcing
    if @active_battler.restriction == 2 or @active_battler.restriction == 3
    @active_battler.current_action.kind = 0
    @active_battler.current_action.basic = 0
    end
    if @active_battler.restriction == 4
    $game_temp.forcing_battler = nil
    @phase4_step = 1
    return
    end
    end
    if @action_battlers.size != 0 and @combo_on == false
    if combo_ok?(@active_battler)
    @combo_skill = []
    @combo_skill.push(@active_battler.current_action.skill_id)
    @combo_member = []
    @combo_member.push(@active_battler)
    last_battler = @active_battler
    for i in 0...@action_battlers.size
    next_battler = @action_battlers[i]
    break if combo_ok?(next_battler) == false
    break if combo_probability(last_battler, next_battler) == false
    next_battler.combo_number = i + 2
    @combo_skill.push(next_battler.current_action.skill_id)
    @combo_member.push(next_battler)
    last_battler = @action_battlers[i]
    end
    @combo_max = @combo_member.size
    if @combo_max > 1
    @combo_count = 0
    @active_battler.combo_number = 1
    @combo_on = true
    @combo_effect = true
    else
    @combo_bese_target = nil
    @combo_all_target_count = 0
    @combo_on = false
    end
    end
    end
    if @combo_effect
    @combo_effect_start = true
    end
    scene_battle_skill_combo_update_phase4_step2
    end
    #--------------------------------------------------------------------------
    alias scene_battle_skill_combo_make_skill_action_result make_skill_action_result
    def make_skill_action_result
    scene_battle_skill_combo_make_skill_action_result
    if @combo_on
    @active_battler.combo_number = nil
    @combo_count += 1
    if @combo_count >= @combo_max
    @combo_finish = true
    end
    if COMBO_NAME_SHOW
    c_name = get_combo_skill_name(@skill)
    if @combo_finish
    @combo_name += c_name[1]
    @help_window.set_text(@combo_name, 1)
    @help_window.visible = true
    else
    @combo_name += c_name[0]
    @help_window.visible = false
    end
    end
    end
    end
    #--------------------------------------------------------------------------
    def update_phase4_combo_effect
    @active_battler.animation_id = COMBO_ANIME_ID
    @active_battler.animation_hit = true
    @wait_count = 8
    @combo_effect_start = false
    @phase4_step = 3
    end
    #--------------------------------------------------------------------------
    alias scene_battle_skill_combo_update_phase4_step5 update_phase4_step5
    def update_phase4_step5
    scene_battle_skill_combo_update_phase4_step5
    if @combo_finish
    battler = []
    battler += $game_troop.enemies
    battler += $game_party.actors
    for target in battler
    if target.exist?
    if SHOW_DAMAGE_LUMP
    if target.combo_total_damage != nil
    target.damage = target.combo_total_damage
    target.damage_pop = true
    target.combo_total_damage = nil
    end
    end
    if target.combo_dead
    target.hp = 0
    target.combo_dead = false
    end
    end
    end
    end
    end
    #--------------------------------------------------------------------------
    alias scene_battle_skill_combo_update_phase4_step6 update_phase4_step6
    def update_phase4_step6
    scene_battle_skill_combo_update_phase4_step6
    if @combo_finish
    @combo_on = false
    @combo_bese_target = nil
    @combo_count = 0
    @combo_finish = false
    @combo_effect = false
    @combo_name = ""
    end
    end
    #--------------------------------------------------------------------------
    def combo_ok?(actor)
    all_attck_skill_max = ALL_ATTCK_SKILL_MAX
    if actor.is_a?(Game_Enemy)
    return false
    end
    if actor.current_action.kind != 1
    return false
    end
    unless actor.skill_can_use?(actor.current_action.skill_id)
    return false
    end
    skill = $data_skills[actor.current_action.skill_id]
    for i in skill.element_set
    if $data_system.elements[i] != nil
    if $data_system.elements[i] =~ /combo/
    return false
    end
    end
    end
    if @combo_bese_target == nil
    @combo_all_target_count = 0
    if skill.scope == 2
    if @combo_all_target_count >= all_attck_skill_max
    return false
    end
    @combo_bese_target = -1
    @combo_all_target_count += 1
    else
    @combo_bese_target = actor.current_action.target_index
    end
    elsif @combo_bese_target == -1
    if skill.scope == 2
    if @combo_all_target_count >= all_attck_skill_max
    return false
    end
    @combo_all_target_count += 1
    else
    @combo_bese_target = actor.current_action.target_index
    end
    else
    if skill.scope == 2
    if @combo_all_target_count >= all_attck_skill_max
    return false
    end
    @combo_all_target_count += 1
    else
    if actor.current_action.target_index != @combo_bese_target
    return false
    end
    end
    end
    return true
    end
    #--------------------------------------------------------------------------
    def combo_probability(last_battler, next_battler)
    s_num = $data_system.switches.index("1")
    if s_num != nil
    return true
    end
    last_skill = $data_skills[last_battler.current_action.skill_id]
    next_skill = $data_skills[next_battler.current_action.skill_id]
    last_n = skill_combo_after_revision(last_skill)
    last_n += actor_combo_after_revision(last_battler)
    next_n = skill_combo_before_revision(next_skill)
    next_n += actor_combo_before_revision(next_battler)
    n = last_n + next_n
    # Change this next line to whatever you want the propability to be.
    # If the number is lower there is a bigger chance for a combo attack.
    # And if it's higher there is less chance for a combo
    if (rand(100) < n)
    return true
    end
    return false
    end
    #--------------------------------------------------------------------------
    def actor_combo_base_revision(actor)
    return 0
    end
    #--------------------------------------------------------------------------
    def actor_combo_before_revision(actor)
    n = actor_combo_base_revision(actor)
    n += BASE_BEFORE_REVISION
    return n
    end
    #--------------------------------------------------------------------------
    def actor_combo_after_revision(actor)
    n = actor_combo_base_revision(actor)
    n += BASE_AFTER_REVISION
    return n
    end
    #--------------------------------------------------------------------------
    def skill_combo_before_revision(skill)
    rate = 0
    for i in skill.element_set
    if $data_system.elements[i] != nil
    if $data_system.elements[i] =~ /combo([+-]?[0-9]+)(%|%)/
    rate += $1.to_i
    end
    end
    end
    return rate
    end
    #--------------------------------------------------------------------------
    def skill_combo_after_revision(skill)
    rate = 0
    for i in skill.element_set
    if $data_system.elements[i] != nil
    if $data_system.elements[i] =~ /combo([+-]?[0-9]+)(%|%)/
    rate += $1.to_i
    end
    end
    end
    return rate
    end
    #--------------------------------------------------------------------------
    def get_combo_skill_name(skill)
    name = skill.name.split('')
    if name.size == 1
    return [name[0], name[0]]
    elsif name.size <= COMBO_NAME_SPLIT
    tempname = name.join
    return [tempname, tempname]
    end
    num = name.size / 2
    name1 = ""
    name2 = ""
    for i in 0...num
    name1 += name[i]
    end
    for i in num...name.size
    name2 += name[i]
    end
    return [name1, name2]
    end
    end

    class Game_Battler
    include Combo_Skill_Config
    attr_accessor :combo_number
    attr_accessor :combo_dead
    attr_accessor :combo_total_damage
    #--------------------------------------------------------------------------
    alias game_battler_skill_combo_initialize initialize
    def initialize
    game_battler_skill_combo_initialize
    @combo_number = nil
    @combo_dead = false
    @combo_total_damage = nil
    end
    #--------------------------------------------------------------------------
    alias game_battler_skill_combo_skill_effect skill_effect
    def skill_effect(user, skill)
    result = game_battler_skill_combo_skill_effect(user, skill)
    if user.combo_number != nil
    if self.damage.is_a?(Numeric)
    combo_rate = user.combo_number * COMBO_BONUS
    damage = self.damage * combo_rate / 100
    self.damage += damage
    self.hp -= damage
    if SHOW_DAMAGE_LUMP
    @combo_total_damage = 0 if @combo_total_damage == nil
    @combo_total_damage += self.damage
    self.damage = nil
    end
    end
    if self.dead?
    self.combo_dead = true
    self.hp = 1
    end
    end
    return result
    end
    end

    복사도 오래걸림

    ㅋㅋ 장난

    죄송합니다

  • ?
    XP 팬 2010.04.30 21:44

    아! 캐릭터폴더에서 놀좌표랑 놀죽음이라는 그림을 넣어줘야지 실행이 되요

    저는 실력이 없어서 강좌를 적어드릴수가 없네요

  • ?
    XP 팬 2010.04.30 21:44

    아! 캐릭터폴더에서 놀좌표랑 놀죽음이라는 그림을 넣어줘야지 실행이 되요

    저는 실력이 없어서 강좌를 적어드릴수가 없네요

  • ?
    RPG군 2011.01.28 17:14

    감사


List of Articles
분류 제목 글쓴이 날짜 조회 수 추천 수
공지사항 일본어 스크립트를 번역하기 좋은 번역사이트 두곳입니다 ruby 2010.01.09 22074 0
공지사항 스크립트 게시판 관리자' ruby ' 입니다 ruby 2010.01.09 20725 0
공지사항 일본 스크립트/소스 공유 포럼 4 니오티 2010.01.05 22249 0
전투관련 누구나 쉽게 만드는 액션알피지 6 펜릴 2012.11.25 4344 0
전투관련 초간단 XAS 오리지널. 1 file 호호리터엉 2011.08.04 2614 0
전투관련 ZTBS 10 file 강현문 2010.06.05 3533 0
전투관련 턴제 전투방식 스크립트!!!!!!! 7 file XP 팬 2010.04.30 3329 0
전투관련 간단한 액션알피지용 스크립트 Ver.1.01 (게임오버 추가) 38 file 펜릴 2010.04.11 8730 0
전투관련 ABP 액알 예제 4 file ruby 2010.02.10 3531 1
전투관련 어떤 한 몬스터를 공격지정할때 그 몬스터가 줌되는 스크립트 9 windshy 2010.01.13 2182 0
전투관련 리얼타임을 이용한 딜레이 구현 1 펜릴 2010.01.10 4197 0
전투관련 레벨업시 체력 회복 스크립트 4 루시아스 2010.01.05 2112 0
전투관련 파괴효과 스크립트 이벤트적용 <사용법> 11 file 아하하 2007.12.06 2691 3
전투관련 파괴효과 추천스크립트 7 file 아하하 2007.12.06 3588 1
전투관련 콤보 스크립트 10 아하하 2007.12.05 3699 4
전투관련 턴알 게이지바 변경 스크립트 (HP/SP) 3 file 니오티 2007.02.20 3984 2
전투관련 게이지 확인창 스크립트 (HP/SP/EXP) 4 file 니오티 2007.02.20 3540 5
Board Pagination Prev 1 Next
/ 1

Copyright ⓒ Nioting All Rights Reserved. (since 1999)    개인정보
        

Fatal error: Cannot access property sessionController::$lifetime in /web/old/xe/modules/session/session.controller.php on line 45