赞 | 1 |
VIP | 38 |
好人卡 | 7 |
积分 | 3 |
经验 | 52355 |
最后登录 | 2024-11-24 |
在线时间 | 853 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 310
- 在线时间
- 853 小时
- 注册时间
- 2014-5-5
- 帖子
- 948
|
- #【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】
- =begin
- ===============================================================================
- ★【战斗力】★
- -------------------------------------------------------------------------------
- by -> 芯☆淡茹水
- ===============================================================================
- ◎ 使用方法:复制该脚本,插入到 main 前。
- -------------------------------------------------------------------------------
- 该脚本在状态窗口增加描绘角色战斗力,在帮助栏增加描绘角色和敌人的战斗力。
- 要在其他地方描绘角色战斗力,在欲描绘的地方写入:draw_actor_ce(actor, x, y)
- 敌人:draw_enemy_ce(enemy, x, y)
- 欲调用战斗力数值,先指定角色/敌人,然后:actor.ce / enemy.ce
- ===============================================================================
- ◆ 角色战斗力的构成:
- -------------------------------------------------------------------------------
- 1.角色:力量 + 敏捷 + 速度 + 魔力
- -------------------------------------------------------------------------------
- 2.武器:攻击力 + 物防 + 魔防 + 力量↑ + 敏捷↑ + 速度↑ + 魔力↑
- + 属性攻击数 X 100 + 附加状态数 X 100 + 解除状态数 X 50
- -------------------------------------------------------------------------------
- 3.防具:物防 + 魔防 + 力量↑ + 敏捷↑ + 速度↑ + 魔力↑
- + 属性防御数 X 100 + 状态防御数 X 100 + 自动状态 X 100
- -------------------------------------------------------------------------------
- 总战斗力 = 1(角色)+ 2(武器)+ 3(防具)
- ===============================================================================
- ◆ 敌人战斗力的构成:
- --------------------------------------------------------------------------------
- 敌人战斗力 = 力量 + 敏捷 + 速度 + 魔力 + 攻击力 + 物防 + 魔防 + 回避
- ===============================================================================
- =end #【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】【】
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # ● 武器品质
- #--------------------------------------------------------------------------
- def weapon_quality(id)
- weapon = $data_weapons[id]
- n = weapon.atk + weapon.pdef + weapon.mdef + weapon.str_plus +
- weapon.dex_plus + weapon.agi_plus + weapon.int_plus
- if weapon.element_set != nil
- n += weapon.element_set.size * 100
- end
- if weapon.plus_state_set != nil
- n += weapon.plus_state_set.size * 100
- end
- if weapon.minus_state_set != nil
- n += weapon.minus_state_set.size * 50
- end
- return n
- end
- #---------------------------------------------------------------------------
- #● 防具品质
- #---------------------------------------------------------------------------
- def armor_quality(id)
- armor = $data_armors[id]
- n = armor.pdef + armor.mdef + armor.str_plus + armor.dex_plus +
- armor.agi_plus + armor.int_plus
- if armor.guard_element_set != nil
- n += armor.guard_element_set.size * 100
- end
- if armor.guard_state_set != nil
- n += armor.guard_state_set.size * 100
- end
- if armor.auto_state_id > 0
- n += 100
- end
- return n
- end
- #---------------------------------------------------------------------------
- #● 角色战斗力
- #---------------------------------------------------------------------------
- def ce
- weapon = $data_weapons[@weapon_id]
- armor1 = $data_armors[@armor1_id]
- armor2 = $data_armors[@armor2_id]
- armor3 = $data_armors[@armor3_id]
- armor4 = $data_armors[@armor4_id]
- n = str + dex + agi + int
- n += weapon != nil ? weapon_quality(@weapon_id) : 0
- n += armor1 != nil ? armor_quality(@armor1_id) : 0
- n += armor2 != nil ? armor_quality(@armor2_id) : 0
- n += armor3 != nil ? armor_quality(@armor3_id) : 0
- n += armor4 != nil ? armor_quality(@armor4_id) : 0
- return n
- end
- end
- #==============================================================================
- class Window_Base < Window
- #---------------------------------------------------------------------------
- #● 战斗力描绘
- #---------------------------------------------------------------------------
- def draw_actor_ce(actor, x, y)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 96, 32, "战斗力:")
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 94, y, 164, 32, actor.ce.to_s)
- end
- #---------------------------------------------------------------------------
- #● 敌人战斗力描绘
- #---------------------------------------------------------------------------
- def draw_enemy_ce(enemy, x, y)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 96, 32, "战斗力:")
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 94, y, 164, 32, enemy.ce.to_s)
- end
- end
- #==============================================================================
- class Window_Status < Window_Base
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_actor_graphic(@actor, 40, 112)
- draw_actor_name(@actor, 4, 0)
- draw_actor_class(@actor, 4 + 144, 0)
- draw_actor_level(@actor, 96, 32)
- draw_actor_state(@actor, 96, 64)
- draw_actor_hp(@actor, 96, 112, 172)
- draw_actor_sp(@actor, 96, 144, 172)
- draw_actor_parameter(@actor, 96, 192, 0)
- draw_actor_parameter(@actor, 96, 224, 1)
- draw_actor_parameter(@actor, 96, 256, 2)
- draw_actor_parameter(@actor, 96, 304, 3)
- draw_actor_parameter(@actor, 96, 336, 4)
- draw_actor_parameter(@actor, 96, 368, 5)
- draw_actor_parameter(@actor, 96, 400, 6)
- self.contents.font.color = system_color
- self.contents.draw_text(320, 48, 80, 32, "EXP")
- self.contents.draw_text(320, 80, 80, 32, "NEXT")
- draw_actor_ce(@actor, 319, 120)
- self.contents.font.color = normal_color
- self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
- self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
- self.contents.font.color = system_color
- self.contents.draw_text(320, 160, 96, 32, "装备")
- draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
- draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
- draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
- draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
- draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
- end
- def dummy
- self.contents.font.color = system_color
- self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
- self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
- self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
- self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
- self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
- draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
- draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
- draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
- draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
- draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
- end
- end
- class Game_Enemy < Game_Battler
- #============================================================================
- def ce
- n = base_str + base_dex + base_agi + base_int + base_atk + base_pdef +
- base_mdef + base_eva
- return n
- end
- end
- #==============================================================================
- class Window_Help < Window_Base
- def set_actor(actor)
- if actor != @actor
- self.contents.clear
- draw_actor_name(actor, 4, 0)
- draw_actor_ce(actor, 460, 0)
- draw_actor_state(actor, 102, 0)
- draw_actor_hp(actor, 184, 0)
- draw_actor_sp(actor, 320, 0)
- [url=home.php?mod=space&uid=95897]@actor[/url] = actor
- @text = nil
- self.visible = true
- end
- end
- #--------------------------------------------------------------------------
- # ● 设置敌人
- # enemy : 要显示名字和状态的敌人
- #--------------------------------------------------------------------------
- def set_enemy(enemy)
- text = enemy.name
- draw_enemy_ce(enemy, 460, 0)
- state_text = make_battler_state_text(enemy, 112, false)
- if state_text != ""
- text += " " + state_text
- end
- set_text(text, 1)
- end
- end
- #==============================================================================
-
复制代码 |
评分
-
查看全部评分
|