赞 | 6 |
VIP | 0 |
好人卡 | 0 |
积分 | 23 |
经验 | 0 |
最后登录 | 2024-5-25 |
在线时间 | 176 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 2263
- 在线时间
- 176 小时
- 注册时间
- 2018-5-11
- 帖子
- 144
|
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# ■ 单项属性攻击熟练度 Ver. 4.1.1 by Claimh
#------------------------------------------------------------------------------
# 自制窗口时用到的内容:
# 水平的表示:draw_actor_attribute_level
# 图标的表示:draw_attribute_icon
# 图标(+)の表示:draw_attribute_icon_p
# 图标(-)の表示:draw_attribute_icon_m
# 熟練度Nextの表示(使用回数/NEXT):draw_attribute_next
# 使用方法:建立属性,给武器带上属性,会使角色对这一属性的攻击能够升级,比如对剑
# 属性的熟练度越来越高。具体设置参考下面。
#==============================================================================
module Sys_Update
INIT_LEVEL = []
LV_LIMIT = []
UP_INTERVAL = []
UP_SLOPE = []
ATK_RATE = []
SKILL_RATE = []
#==============================================================================
# 自定义开始
#==============================================================================
#——以下这几个是为了解决一些冲突而设置的
# 与闪耀系统并用着?
FLASH_PLUS = false
# 与尾随攻击并用着?
ADD_ATK_PLUS = false
# 与技艺连击并用着?
SKILL_CHASE_PLUS = false
# 与一人联击并用着?
SKILL_LINK_PLUS = false
# 与空手攻防能力并用着?
ARM_SETTING = false
# 显示等级提升
SHOW_LV_UP = true
# 等级提升的声效
SHOW_LV_SE = "056-Right02"
# 攻撃属性(武器附带的属性,注意设置!!给所有剑带上20号属性,所有枪带上21号)
SWORD = 20 # 剣
LANCE = 21 # 槍
AX = 22 # 斧
BOW = 23 # 弓
GUN = 24 # 銃
WAND = 25 # 杖
FIRE = 1 # 炎
ICE = 2 # 水
THUNDER = 3 # 雷
WATER = 4 # 水
GROUND = 5 # 土
WIND = 6 # 風
LIGHT = 7 # 光
DARK = 8 # 闇
# 上面属性的矩阵
UPDATE = [SWORD, LANCE, AX, BOW, GUN, WAND,
FIRE, ICE, THUNDER, WATER, GROUND, WIND, LIGHT, DARK]
# 对应图标,用在制作的菜单,提示升级等时候
UPDATE_I = {SWORD=>"001-Weapon01", LANCE=>"002-Weapon02", AX=>"003-Weapon03",
BOW=>"005-Weapon05", GUN=>"006-Weapon06", WAND=>"007-Weapon07",
FIRE=>"044-Skill01", ICE=>"044-Skill01", THUNDER=>"044-Skill01",
WATER=>"044-Skill01", GROUND=>"044-Skill01", WIND=>"044-Skill01",
LIGHT=>"044-Skill01", DARK=>"044-Skill01"}
#--------------------------------------------------------------------------
# 熟練度設定
#--------------------------------------------------------------------------
# 按actor设置熟练度初始值
# INIT_LEVEL[actorID]={SWORD=>?, LANCE=>?…}
INIT_LEVEL[1] = {SWORD=>5, LANCE=>1, AX=>0, BOW=>0, GUN=>0, WAND=>0,
FIRE=>0, ICE=>0, THUNDER=>0, WATER=>0, GROUND=>0,
WIND=>0, LIGHT=>0, DARK=>0}
INIT_LEVEL[2] = {SWORD=>2, LANCE=>5, AX=>0, BOW=>0, GUN=>0, WAND=>0,
FIRE=>0, ICE=>1, THUNDER=>0, WATER=>0, GROUND=>0,
WIND=>0, LIGHT=>0, DARK=>0}
INIT_LEVEL[7] = {SWORD=>0, LANCE=>0, AX=>0, BOW=>0, GUN=>0, WAND=>2,
FIRE=>0, ICE=>1, THUNDER=>0, WATER=>0, GROUND=>0,
WIND=>0, LIGHT=>3, DARK=>0}
INIT_LEVEL[8] = {SWORD=>0, LANCE=>0, AX=>0, BOW=>0, GUN=>0, WAND=>1,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>1, DARK=>1}
# 按actor设置熟练度最大水平
# LV_LIMIT[actorID]={SWORD=>?, LANCE=>?…}
LV_LIMIT[1] = {SWORD=>20, LANCE=>20, AX=>20, BOW=>20, GUN=>20, WAND=>20,
FIRE=>20, ICE=>20, THUNDER=>20, WATER=>20, GROUND=>20,
WIND=>20, LIGHT=>20, DARK=>20}
LV_LIMIT[2] = {SWORD=>20, LANCE=>20, AX=>20, BOW=>20, GUN=>20, WAND=>20,
FIRE=>20, ICE=>20, THUNDER=>20, WATER=>20, GROUND=>20,
WIND=>20, LIGHT=>20, DARK=>20}
LV_LIMIT[7] = {SWORD=>20, LANCE=>20, AX=>20, BOW=>20, GUN=>20, WAND=>20,
FIRE=>20, ICE=>20, THUNDER=>20, WATER=>20, GROUND=>20,
WIND=>20, LIGHT=>60, DARK=>20}
LV_LIMIT[8] = {SWORD=>20, LANCE=>20, AX=>20, BOW=>20, GUN=>20, WAND=>20,
FIRE=>20, ICE=>20, THUNDER=>20, WATER=>20, GROUND=>20,
WIND=>20, LIGHT=>20, DARK=>20}
#--------------------------------------------------------------------------
# 熟練度上昇設定
#--------------------------------------------------------------------------
# 熟練度上昇間隔的设定
# 0:每一定值上升 -> NEXT = 基本値
# 1:直線状态上昇 -> NEXT = 斜率* 下次的等级Lv + 基本値
# 2:曲線状态上昇 -> NEXT = 斜率* 下次的等级Lv * 下次的等级Lv + 基本値
LEVEL_UP_PATTERN = 0 # 注:就是常数、一阶和二阶函数,还好不是复杂函数
# 基本値
# UP_INTERVAL[アクターID] = {SWORD=>?, LANCE=>?…}
UP_INTERVAL[1] = {SWORD=>2, LANCE=>18, AX=>20, BOW=>20, GUN=>20, WAND=>20,
FIRE=>21, ICE=>20, THUNDER=>20, WATER=>20, GROUND=>20,
WIND=>20, LIGHT=>20, DARK=>20}
UP_INTERVAL[2] = {SWORD=>17, LANCE=>2, AX=>20, BOW=>20, GUN=>20, WAND=>20,
FIRE=>30, ICE=>17, THUNDER=>20, WATER=>20, GROUND=>20,
WIND=>20, LIGHT=>20, DARK=>20}
UP_INTERVAL[7] = {SWORD=>25, LANCE=>25, AX=>25, BOW=>25, GUN=>25, WAND=>20,
FIRE=>20, ICE=>20, THUNDER=>20, WATER=>20, GROUND=>20,
WIND=>20, LIGHT=>10, DARK=>20}
UP_INTERVAL[8] = {SWORD=>30, LANCE=>30, AX=>30, BOW=>30, GUN=>30, WAND=>30,
FIRE=>10, ICE=>10, THUNDER=>10, WATER=>10, GROUND=>10,
WIND=>10, LIGHT=>10, DARK=>10}
# 斜率
# UP_SLOPE[アクターID] = {SWORD=>?, LANCE=>?…}
UP_SLOPE[1] = {SWORD=>1, LANCE=>5, AX=>2, BOW=>2, GUN=>2, WAND=>2,
FIRE=>2, ICE=>2, THUNDER=>2, WATER=>2, GROUND=>2,
WIND=>2, LIGHT=>2, DARK=>2}
UP_SLOPE[2] = {SWORD=>5, LANCE=>1, AX=>2, BOW=>2, GUN=>2, WAND=>2,
FIRE=>3, ICE=>5, THUNDER=>2, WATER=>2, GROUND=>2,
WIND=>2, LIGHT=>2, DARK=>2}
UP_SLOPE[7] = {SWORD=>5, LANCE=>2, AX=>5, BOW=>2, GUN=>5, WAND=>2,
FIRE=>2, ICE=>2, THUNDER=>2, WATER=>2, GROUND=>2,
WIND=>2, LIGHT=>5, DARK=>2}
UP_SLOPE[8] = {SWORD=>3, LANCE=>3, AX=>3, BOW=>3, GUN=>3, WAND=>3,
FIRE=>5, ICE=>5, THUNDER=>5, WATER=>5, GROUND=>5,
WIND=>5, LIGHT=>5, DARK=>5}
#--------------------------------------------------------------------------
# 威力上昇設定
#--------------------------------------------------------------------------
# 通常攻撃的威力上昇率(%)
# ATK_RATE[actorID] = {SWORD=>?, LANCE=>?…}
ATK_RATE[1] = {SWORD=>83, LANCE=>1, AX=>3, BOW=>5, GUN=>1, WAND=>1,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>1, DARK=>1}
ATK_RATE[2] = {SWORD=>1, LANCE=>83, AX=>1, BOW=>1, GUN=>1, WAND=>1,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>1, DARK=>1}
ATK_RATE[7] = {SWORD=>1, LANCE=>1, AX=>1, BOW=>1, GUN=>1, WAND=>2,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>3, DARK=>1}
ATK_RATE[8] = {SWORD=>1, LANCE=>1, AX=>1, BOW=>1, GUN=>1, WAND=>1,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>1, DARK=>1}
# 特技攻撃的威力上昇率(%)
# SKILL_RATE[actorID] = {SWORD=>?, LANCE=>?…}
SKILL_RATE[1] = {SWORD=>3, LANCE=>1, AX=>3, BOW=>5, GUN=>1, WAND=>1,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>1, DARK=>1}
SKILL_RATE[2] = {SWORD=>1, LANCE=>3, AX=>1, BOW=>1, GUN=>1, WAND=>1,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>1, DARK=>1}
SKILL_RATE[7] = {SWORD=>1, LANCE=>1, AX=>1, BOW=>1, GUN=>1, WAND=>2,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>3, DARK=>1}
SKILL_RATE[8] = {SWORD=>1, LANCE=>1, AX=>1, BOW=>1, GUN=>1, WAND=>1,
FIRE=>1, ICE=>1, THUNDER=>1, WATER=>1, GROUND=>1,
WIND=>1, LIGHT=>1, DARK=>1}
#==============================================================================
# □ 自定义内容结束
#==============================================================================
end
class Game_Actor
include Sys_Update
attr_accessor :attr_use # 属性攻撃使用回数
attr_accessor :attr_level # 属性レベル
attr_accessor :attr_lv_limit # レベル最大値
attr_accessor :attr_level_up # レベルアップフラグ
attr_accessor :attr_list # レベルアップテーブル
alias setup_attribute setup
def setup(actor_id)
setup_attribute(actor_id)
@attr_use = []
@attr_level = []
@attr_lv_limit = []
@attr_level_up = []
@attr_list = []
init_level = INIT_LEVEL[@actor_id]
lv_limit = LV_LIMIT[@actor_id]
for i in 0..UPDATE.max
if UPDATE.include?(i)
@attr_level = init_level
@attr_lv_limit = lv_limit
make_attr_list(i)
list = @attr_list
@attr_use = list[@attr_level]
end
end
end
#--------------------------------------------------------------------------
# ● 熟練度EXP 計算
#--------------------------------------------------------------------------
def make_attr_list(element)
up_interval = UP_INTERVAL[@actor_id]
up_slope = UP_SLOPE[@actor_id]
list = []
list[0] = 0
for lv in 1...@attr_lv_limit[element]
case LEVEL_UP_PATTERN
when 0
exp = up_interval[element] * lv
when 1
exp = list[lv-1] + up_slope[element] * lv + up_interval[element]
when 2
exp = list[lv-1] + up_slope[element] * lv * lv + up_interval[element]
end
list[lv] = exp.truncate
end
@attr_list[element] = list
end
end
#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler
include Sys_Update
#--------------------------------------------------------------------------
# ● 通常攻撃の効果適用
# attacker : 攻撃者 (バトラー)
#--------------------------------------------------------------------------
def attack_effect(attacker)
# クリティカルフラグをクリア
self.critical = false
# 第一命中判定
hit_result = (rand(100) < attacker.hit)
# 命中の場合
if hit_result == true
# 基本ダメージを計算
#--修正------------
if attacker.is_a?(Game_Actor) and (attacker.weapon_id != 0 or ARM_SETTING)
level = 0
best_element = nil
attacker.attr_level_up = []
weapon_element = attacker.element_set
for i in 0...UPDATE.size
if weapon_element.include?(UPDATE)
element = UPDATE
# 使用回数のカウント
element_use_count(attacker, element)
# 多重に属性を付与している場合は最もレベルの高いものを優先
if level < attacker.attr_level[element]
level = attacker.attr_level[element]
best_element = element
end
end
end
if best_element != nil
# 補正値の算出
atk_rate = ATK_RATE[attacker.id]
temp_atk = (attacker.atk * atk_rate[best_element]/100) * level
atk = [attacker.atk + temp_atk - self.pdef / 2, 0].max
else
atk = [attacker.atk - self.pdef / 2, 0].max
end
else
atk = [attacker.atk - self.pdef / 2, 0].max
end
#------------------
self.damage = atk * (20 + attacker.str) / 20
# 属性修正
self.damage *= elements_correct(attacker.element_set)
self.damage /= 100
# ダメージの符号が正の場合
if self.damage > 0
# クリティカル修正
if rand(100) < 4 * attacker.dex / self.agi
self.damage *= 2
self.critical = true
end
# 防御修正
if self.guarding?
self.damage /= 2
end
end
# 分散
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# 第二命中判定
eva = 8 * self.agi / attacker.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
end
# 命中の場合
if hit_result == true
# ステート衝撃解除
remove_states_shock
# HP からダメージを減算
self.hp -= self.damage
# ステート変化
@state_changed = false
states_plus(attacker.plus_state_set)
states_minus(attacker.minus_state_set)
# ミスの場合
else
# ダメージに "Miss" を設定
self.damage = "Miss"
# クリティカルフラグをクリア
self.critical = false
end
#--追加-------
# Miss時には後戻し
if attacker.is_a?(Game_Actor) and self.damage == "Miss" and (attacker.weapon_id != 0 or ARM_SETTING)
for i in 0..UPDATE.size-1
weapon_element = attacker.element_set
if weapon_element.include?(UPDATE)
element = UPDATE
element_use_recount(attacker, element)
end
end
end
#-------------
# メソッド終了
return true
end
#--------------------------------------------------------------------------
# ● スキルの効果適用
# user : スキルの使用者 (バトラー)
# skill : スキル
#--------------------------------------------------------------------------
alias skill_effect_sys_update skill_effect
def skill_effect(user, skill)
level = 0
if user.is_a?(Game_Actor)
best_element = nil
user.attr_level_up = []
skill_element = skill.element_set
for i in 0..UPDATE.size-1
if skill_element.include?(UPDATE)
element = UPDATE
# 使用回数のカウント
element_use_count(user, element)
# 多重に属性を付与している場合は最もレベルの高いものを優先
if level < user.attr_level[element]
level = user.attr_level[element]
end
end
end
if best_element != nil
skill_power_base = skill.dup
# 威力上昇
skill_rate = SKILL_RATE[attacker.id]
skill.power += skill.power * skill_rate[best_element]/100 * level
end
end
ret = skill_effect_sys_update(user, skill) # 原物
if user.is_a?(Game_Actor) and level != 0
skill = skill_power_base
for i in 0..UPDATE.size-1
if skill_element.include?(UPDATE)
element = UPDATE
# Miss時には後戻し
if self.damage == "Miss"
element_use_recount(user, element)
end
end
end
end
return ret
end
#--------------------------------------------------------------------------
# ● スキル使用回数更新
#--------------------------------------------------------------------------
def element_use_count(actor, element)
# 追尾系との併用
if ADD_ATK_PLUS
if $add_atk_exercise
return
end
end
if SKILL_CHASE_PLUS
if $skill_chase_exercise
return
end
end
if SKILL_LINK_PLUS
if $skill_linked
return
end
end
# 使用回数のカウント
actor.attr_use[element] += 1
# レベル上限を超えてない
if actor.attr_level[element] < actor.attr_lv_limit[element]
list = actor.attr_list[element]
next_exp = list[actor.attr_level[element]+1]
# レベル上昇判定
if actor.attr_use[element] == next_exp
# レベル上昇
actor.attr_level[element] += 1
actor.attr_level_up.push(element)
end
end
end
#--------------------------------------------------------------------------
# ● スキル使用回数再更新
#--------------------------------------------------------------------------
def element_use_recount(actor, element)
# 追尾系との併用
if ADD_ATK_PLUS
if $add_atk_exercise
return
end
end
if SKILL_CHASE_PLUS
if $skill_chase_exercise
return
end
end
if SKILL_LINK_PLUS
if $skill_linked
return
end
end
# レベル上昇済み判定
if actor.attr_level_up.include?(element)
# レベル上昇
actor.attr_level[element] -= 1
actor.attr_level_up.delete(element)
end
# 使用回数の再カウント
actor.attr_use[element] -= 1
end
end
#==============================================================================
# ■ Window_Attribute
#==============================================================================
class Window_Attribute < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor, element_set)
super(10, 50, 250, 64*element_set.size)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@actor = actor
@element = element_set
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
for i in [email protected]
self.contents.font.color = normal_color
draw_attribute_icon(@element, 10, 10 + i*32)
self.contents.draw_text(50, 0 + i*32, 48, 32, @actor.attr_level[@element].to_s)
self.contents.font.color = Color.new(255, 64, 0)
self.contents.draw_text(80, 0 + i*32, 150, 32, "LEVEL UP!")
end
end
end
class Scene_Battle
include Sys_Update
if SHOW_LV_UP
#--------------------------------------------------------------------------
# ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
#--------------------------------------------------------------------------
alias update_phase4_step2_attribute update_phase4_step2
def update_phase4_step2
if @active_battler.is_a?(Game_Actor)
@active_battler.attr_level_up = []
end
@attr_lvup = false
update_phase4_step2_attribute # 原物
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
#--------------------------------------------------------------------------
alias update_phase4_step3_attribute update_phase4_step3
def update_phase4_step3
if @active_battler.is_a?(Game_Actor) and @active_battler.attr_level_up != []
if FLASH_PLUS
if !@flash_flag
@attr_lvup = true
@attr_lv_up_window = Window_Attribute.new(@active_battler, @active_battler.attr_level_up)
if SHOW_LV_SE != nil
Audio.se_play("Audio/SE/" + SHOW_LV_SE)
sleep(0.1)
end
end
else
@attr_lvup = true
@attr_lv_up_window = Window_Attribute.new(@active_battler, @active_battler.attr_level_up)
if SHOW_LV_SE != nil
Audio.se_play("Audio/SE/" + SHOW_LV_SE)
sleep(0.1)
end
end
end
update_phase4_step3_attribute
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインフェーズ ステップ 5 : ダメージ表示)
#--------------------------------------------------------------------------
alias update_phase4_step5_attribute update_phase4_step5
def update_phase4_step5
if @active_battler.is_a?(Game_Actor) and @attr_lvup
@attr_lv_up_window.dispose
@active_battler.attr_level_up = []
end
update_phase4_step5_attribute # 原物
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias update_attribute update
def update
if @active_battler.is_a?(Game_Actor) and @active_battler.attr_level_up != [] and @attr_lvup
@attr_lv_up_window.contents_opacity -= 4
end
update_attribute # 原物
end
end # if SHOW_LV_UP
end
class Interpreter
include Sys_Update
#--------------------------------------------------------------------------
# ● 熟練度設定(レベルセット)
# actor_id : アクターID
# element : 属性ID
# level : 設定レベル
#--------------------------------------------------------------------------
def set_element_level(actor_id, element, level)
actor = $game_actors[actor_id]
if level > actor.attr_lv_limit[element]
level = actor.attr_lv_limit[element]
end
actor.attr_level[element] = level
list = actor.attr_list[element]
actor.attr_use = list[level]
end
#--------------------------------------------------------------------------
# ● 熟練度設定(レベルアップ)
# actor_id : アクターID
# element : 属性ID
#--------------------------------------------------------------------------
def element_level_up(actor_id, element)
actor = $game_actors[actor_id]
if actor.attr_level[element] < actor.attr_lv_limit[element]
actor.attr_level[element] += 1
list = actor.attr_list[element]
actor.attr_use = list[actor.attr_level[element]]
end
end
#--------------------------------------------------------------------------
# ● 熟練度設定(レベルダウン)
# actor_id : アクターID
# element : 属性ID
#--------------------------------------------------------------------------
def element_level_down(actor_id, element)
actor = $game_actors[actor_id]
if actor.attr_level[element] > 0
actor.attr_level[element] -= 1
list = actor.attr_list[element]
actor.attr_use = list[actor.attr_level[element]]
end
end
#--------------------------------------------------------------------------
# ● 熟練度設定(熟練度上限操作)
# actor_id : アクターID
# element : 属性ID
# limit : 熟練度上限値
#--------------------------------------------------------------------------
def set_element_limit(actor_id, element, limit)
actor = $game_actors[actor_id]
actor.attr_lv_limit[element] = limit
if actor.attr_level[element] > limit
set_element_level(actor_id, element, limit)
end
end
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
include Sys_Update
#--------------------------------------------------------------------------
# ● レベルの描画
# actor : アクター
# attribute_id: レベルを表示させる属性
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_attribute_level(actor, attribute_id, x, y)
level = actor.attr_level[attribute_id]
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, level.to_s, 2)
end
#--------------------------------------------------------------------------
# ● アイコンの描画
# attribute_id : アイコンを表示する属性
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_attribute_icon(attribute_id, x, y)
bitmap = RPG::Cache.icon(UPDATE_I[attribute_id])
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw/2+20, y - ch + 15, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● アイコン(+)の描画
# attribute_id : アイコンを表示する属性
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_attribute_icon_p(attribute_id, x, y)
bitmap = RPG::Cache.icon(UPDATE_I[attribute_id])
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw/2+20, y - ch+15, bitmap, src_rect)
self.contents.draw_text(x+25, y-18, 24, 24, "+")
end
#--------------------------------------------------------------------------
# ● アイコン(-)の描画
# attribute_id : アイコンを表示する属性
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_attribute_icon_m(attribute_id, x, y)
bitmap = RPG::Cache.icon(UPDATE_I[attribute_id])
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw/2+20, y - ch+15, bitmap, src_rect)
self.contents.draw_text(x+25, y-18, 24, 24, "-")
end
#--------------------------------------------------------------------------
# ● 熟練度Nextの表示(使用回数/NEXT)
# actor_id : アクターID
# attribute_id : アイコンを表示する属性
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_attribute_next(actor, attribute_id, x, y)
list = actor.attr_list[attribute_id]
if actor.attr_level[attribute_id] == actor.attr_lv_limit[attribute_id]
next_exp = "-"
else
next_exp = list[actor.attr_level[attribute_id]+1].to_s
end
use = actor.attr_use[attribute_id]
attr_exp = use.to_s + "/" + next_exp
self.contents.draw_text(x, y, 100, 32, attr_exp)
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
|
|