作者: 契约师Vi 时间: 2024-7-14 00:16
武器添加状态,添加等多个状态,然后添加负增益状态、抵消状态就可以。理论上是这样,实际我没有操作过作者: BCJT 时间: 2025-2-4 22:23
=begin
#===============================================================================
Title: 状态充能
Author: Hime
Date: Jun 14, 2015
--------------------------------------------------------------------------------
** Change log
Jun 14, 2015
- only reset state counts if state is still applied
Mar 22, 2014
- fixed bug where states with charges are not removed after battle
Feb 28, 2014
- state is correctly removed when charges drop to zero
Nov 16, 2013
- is it possible to have the state but no state charge recorded?
Sep 14, 2013
- added some methods for adding/removing state charges
Jun 23, 2013
- Initial release
--------------------------------------------------------------------------------
** Terms of Use
* Free to use in non-commercial projects
* Contact me for commercial use
* No real support. The script is provided as-is
* Will do bug fixes, but no compatibility patches
* Features may be requested but no guarantees, especially if it is non-trivial
* Credits to Hime Works in your project
* Preserve this header
--------------------------------------------------------------------------------
** 说明
Regex = /<state[-_ ]charges: (\d+)>/i
end
end
#===============================================================================
# ** Rest of the script
#===============================================================================
module RPG
class State
def state_charges
return @state_charges unless @state_charges.nil?
load_notetag_state_charges
return @state_charges
end
def load_notetag_state_charges
res = self.note.match(TH::State_Charges::Regex)
@state_charges = res ? res[1].to_i : 1
end
end
end
class Game_BattlerBase
alias :th_state_charges_clear_states :clear_states
def clear_states
th_state_charges_clear_states
@state_charges = {}
end
alias :th_state_charges_erase_state :erase_state
def erase_state(state_id)
th_state_charges_erase_state(state_id)
@state_charges.delete(state_id)
end
end
class Game_Battler < Game_BattlerBase
alias :th_state_charges_remove_state :remove_state
def remove_state(state_id)
if has_state_charges?(state_id)
remove_state_charges(state_id, 1)
reset_state_counts(state_id) if state?(state_id)
else
th_state_charges_remove_state(state_id)
end
end
alias :th_state_charges_add_new_state :add_new_state
def add_new_state(state_id)
set_state_charges(state_id, $data_states[state_id].state_charges)
th_state_charges_add_new_state(state_id)
end
def state_charges(state_id)
return @state_charges[state_id]
end
def set_state_charges(state_id, amount)
@state_charges[state_id] = amount
end
def add_state_charges(state_id, amount)
@state_charges[state_id] += amount
end
def remove_state_charges(state_id, amount)
@state_charges[state_id] = [@state_charges[state_id]-amount, 0].max
th_state_charges_remove_state(state_id) if @state_charges[state_id] == 0
end
alias :th_state_charges_remove_battle_states :remove_battle_states
def remove_battle_states
remove_battle_state_charges
th_state_charges_remove_battle_states
end
#-----------------------------------------------------------------------------
# New.
#-----------------------------------------------------------------------------
def remove_battle_state_charges
states.each do |state|
@state_charges[state.id] = 0 if state.remove_at_battle_end
end
end
end作者: ACRI 时间: 2025-3-20 03:26
总之呢,自己回复一下吧
依靠http://artificialprovidence.web. ... SS3ST_END_STATE.txt
星潟的这个脚本,再通过帖子第一个脚本,消失一个状态自动添加另一个状态的方式,就能够做出弱多段攻击的boos了。