赞 | 3 |
VIP | 0 |
好人卡 | 0 |
积分 | 22 |
经验 | 46374 |
最后登录 | 2024-11-12 |
在线时间 | 1011 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 2180
- 在线时间
- 1011 小时
- 注册时间
- 2015-10-17
- 帖子
- 1285
|
3楼
楼主 |
发表于 2017-2-11 21:39:04
|
只看该作者
我是用这个被动技能加HP上限,使用效果里填上HP回复多少,战斗时当前HP没有回复,只增加了HP上限
- #------------------------------------------------------------------------------#
- # 光环技能
- #------------------------------------------------------------------------------#
- # 适用: RPGMAKER VX ACE
- # 版本: 1.1
- # 作者:66RPG的tan12345
- #-------------------------------------------------------------------------------
- # 玩过魔兽争霸的都知道光环吧,本脚本就是实现学会某一技能后进入战斗时自动为自己或者
- # 我方全体或者敌方全体附加上某一状态这个功能的。
- # 使用方法:将脚本插入至main以上
- # 在光环技能的备注栏里,填写以下信息,并将光环技能id填入module GUANGHUAN的GHID数组里
- # <westate = i>进入战斗界面我方全体自动附加i号状态
- # <yostate = i>进入战斗界面敌方全体自动附加i号状态
- # 注意:
- # 这里的我方、敌方是相对而言的,例如,80号技能是一个光环技能:
- # 如果,玩家角色1学会了80号技能,
- # 那么westate是玩家方全体附加的状态,yostate是敌人方全体附加的状态;
- # 如果,敌人的行动列表里有80号技能,
- # 那么westate是敌人方全体附加的状态,yostate是玩家方全体附加的状态;
- #
- # 1.1版本修复:拥有光环的角色(敌人)死亡或复活的当前回合结束后光环状态刷新
- # (注意,并非死亡或复活瞬间光环刷新,因为VA里判定死亡和复活也是附加和移除状态的
- # 处理机制,所以只能在当前回合结束时刷新光环)
- #-------------------------------------------------------------------------------
- module GUANGHUAN
- #光环技能列表,例如,80号和81号技能是光环
- GHID = [436,437,438,439,440,441,442]
- end
- class Game_Enemy < Game_Battler
- #--------------------------------------------------------------------------
- # 判定行动列表是否有skill技能
- #--------------------------------------------------------------------------
- def skill_learn?(skill)
- enemy.actions.each {|action| return true if action.skill_id == skill.id }
- return false
- end
- end
- class Game_Unit
- attr_accessor :weallst
- attr_accessor :enemyst
-
- def get_weallst;@weallst;end
- def get_enemyst;@enemyst;end
- def members_add_gh_st(st1,st2 = [])
- alive_members.each {|member|
- (st1 + st2).each {|i| member.add_state(i)}
- }
- end
- def members_remove_gh_st(st1,st2 = [])
- alive_members.each {|member|
- (st1 + st2).each {|i| member.remove_state(i)}
- member.result.clear
- }
- end
-
- def init_gh_state
- @weallst = []
- @enemyst = []
- alive_members.each {|member|
- GUANGHUAN::GHID.each {|ghsid|
- if member.skill_learn?($data_skills[ghsid])
- st1 = ($data_skills[ghsid].note =~ /<westate = (\d+?)>/i ? @weallst.push($1.to_i) : nil)
- st2 = ($data_skills[ghsid].note =~ /<yostate = (\d+?)>/i ? @enemyst.push($1.to_i) : nil)
- end
- }
- }
- end
- end
- module BattleManager
- #--------------------------------------------------------------------------
- # ● 战斗开始
- #--------------------------------------------------------------------------
- def self.battle_start
- $game_system.battle_count += 1
- $game_party.on_battle_start
- $game_troop.on_battle_start
- $game_party.init_gh_state
- $game_troop.init_gh_state
- $game_party.members_add_gh_st($game_party.get_weallst,$game_troop.get_enemyst)
- $game_troop.members_add_gh_st($game_troop.get_weallst,$game_party.get_enemyst)
- $game_troop.enemy_names.each do |name|
- $game_message.add(sprintf(Vocab::Emerge, name))
- end
- if @preemptive
- $game_message.add(sprintf(Vocab::Preemptive, $game_party.name))
- elsif @surprise
- $game_message.add(sprintf(Vocab::Surprise, $game_party.name))
- end
- wait_for_message
- end
- end
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● 回合结束
- #--------------------------------------------------------------------------
- def turn_end
- all_battle_members.each do |battler|
- battler.on_turn_end
- refresh_status
- @log_window.display_auto_affected_status(battler)
- @log_window.wait_and_clear
- end
- BattleManager.turn_end
- $game_party.members_remove_gh_st($game_party.get_weallst,$game_troop.get_enemyst)
- $game_troop.members_remove_gh_st($game_troop.get_weallst,$game_party.get_enemyst)
- $game_party.init_gh_state
- $game_troop.init_gh_state
- $game_party.members_add_gh_st($game_party.get_weallst,$game_troop.get_enemyst)
- $game_troop.members_add_gh_st($game_troop.get_weallst,$game_party.get_enemyst)
- process_event
- start_party_command_selection
- end
- end
- #$game_party.members_remove_gh_st($game_party.get_weallst,$game_troop.get_enemyst)
- #$game_troop.members_remove_gh_st($game_troop.get_weallst,$game_party.get_enemyst)
- #$game_party.init_gh_state
- #$game_troop.init_gh_state
- #$game_party.members_add_gh_st($game_party.get_weallst,$game_troop.get_enemyst)
- #$game_troop.members_add_gh_st($game_troop.get_weallst,$game_party.get_enemyst)
复制代码 |
|