lbq 发表于 2013-9-23 03:24:14

更高级的毒 [Advanced State]

Advanced State
只是一个渣脚本罢了=-=




于是乎在RM里面一般都要给Boss免疫毒0A0。毕竟每回合10%的伤害不是好受的。。
于是乎这个脚本的目的就是在于,能让你制造出比如说 这个毒的伤害是使用者的攻击力的两倍之类的=-=


所以说我还是废话少说直接扔脚本=-=


http://pastebin.com/bbBq9Jnz #毕竟这里都是海外党如果有国内的请自行翻墙吧._.


English Version => http://lbqscripts.wordpress.com/rgss3/advanced-state/



#encoding:utf-8
#==============================================================================
# ■ Advanced State - LBQ Scripts 9/22/2013 v0.5
#------------------------------------------------------------------------------
#  This script provides basic features for advanced slip damage.
#==============================================================================


#==============================================================================
# ● How to Use it
#------------------------------------------------------------------------------
#   In the config part, use state_id => formula for the states.
#==============================================================================



#----------------------------------------------------------------------------
$imported||={}
$imported[:LBQ_Advanced_State] = true
#----------------------------------------------------------------------------
module LBQ
module AD_STATE
    CONFIG = {
      2   =>'0.5*b.hp'         ,
      26=>'-(0.3*a.hp)'   ,
    }
end
end
#----------------------------------------------------------------------------
class Game_BattlerBase
#--------------------------------------------------------------------------
# ● Clear States
#--------------------------------------------------------------------------
alias lbq_adst_clear_states clear_states
def clear_states
    lbq_adst_clear_states
    @state_user = {}
end


#--------------------------------------------------------------------------
# ● Erase A State
#--------------------------------------------------------------------------
alias lbq_adst_erase_state erase_state
def erase_state(state_id)
    lbq_adst_erase_state(state_id)
    @state_user.delete(state_id)
end

end
#----------------------------------------------------------------------------
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# ● Add States
#--------------------------------------------------------------------------
def add_state(state_id, user = nil)
    if state_addable?(state_id)
      add_new_state(state_id) unless state?(state_id)
      reset_state_counts(state_id)
      @result.added_states.push(state_id).uniq!
      @state_user = user if user
    end
end


#--------------------------------------------------------------------------
# ● A Special State
#--------------------------------------------------------------------------
def judge_special_state(id)
    if LBQ::AD_STATE::CONFIG
      return true
    else
      return false
    end
end

#--------------------------------------------------------------------------
# ● Get a Formula
#--------------------------------------------------------------------------
def get_formula(id)
    raise unless judge_special_state(id)
   
    return LBQ::AD_STATE::CONFIG
end

#--------------------------------------------------------------------------
# ● Get Damage
#--------------------------------------------------------------------------
def get_damage(id,user)
    a = user
    b = self
    return eval(get_formula(id))
end

#--------------------------------------------------------------------------
# ● Get Overall Damage
#--------------------------------------------------------------------------
def get_overall_damage
    damage = 0
    @states.each do |s|
      if judge_special_state(s)
      damage += get_damage(s,@state_user)
      end
    end
   
    return damage.to_i
end

#--------------------------------------------------------------------------
# ● Effects => Attack
#--------------------------------------------------------------------------
def item_effect_add_state_attack(user, item, effect)
    user.atk_states.each do |state_id|
      chance = effect.value1
      chance *= state_rate(state_id)
      chance *= user.atk_states_rate(state_id)
      chance *= luk_effect_rate(user)
      if rand < chance
      add_state(state_id, user)
      @result.success = true
      end
    end
end
#--------------------------------------------------------------------------
# ● Effects => Normal
#--------------------------------------------------------------------------
def item_effect_add_state_normal(user, item, effect)
    chance = effect.value1
    chance *= state_rate(effect.data_id) if opposite?(user)
    chance *= luk_effect_rate(user)      if opposite?(user)
    if rand < chance
      add_state(effect.data_id, user)
      @result.success = true
    end
end
#--------------------------------------------------------------------------
# ● Regenerate HP
#--------------------------------------------------------------------------
def regenerate_hp
   
    # Calc Damage
    damage = -(mhp * hrg).to_i
   
    damage+=get_overall_damage
   
    # Map Damage
    perform_map_damage_effect if $game_party.in_battle && damage > 0
   
    # Do not die over
    @result.hp_damage = .min
   
    # HP Setter
    self.hp -= @result.hp_damage
end



end

Sonic1997 发表于 2013-9-23 08:54:12

厚颜无耻地将脚本搬过来了. .

satgo1546 发表于 2013-10-2 12:15:10

不考虑我和草莓君吗. .
页: [1]
查看完整版本: 更高级的毒 [Advanced State]