| 赞 | 68  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 65 | 
 
| 经验 | 0 | 
 
| 最后登录 | 2023-7-2 | 
 
| 在线时间 | 119 小时 | 
 
 
 
 
 
Lv4.逐梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 6483 
 
        - 在线时间
 - 119 小时
 
        - 注册时间
 - 2020-1-8
 
        - 帖子
 - 234
 
 
 
 | 
	
基本都是RMXP的脚本 
没考虑技能的持续伤害问题 
- class Window_Base
 
 -   def draw_actor_cp(actor, x, y, width = 144)
 
 -     self.contents.font.color = system_color
 
 -     self.contents.draw_text(x, y, 32, 32, "CP")
 
 -     if width - 32 >= 108
 
 -       cp_x = x + width - 108
 
 -       flag = true
 
 -     elsif width - 32 >= 48
 
 -       cp_x = x + width - 48
 
 -       flag = false
 
 -     end
 
 -     self.contents.draw_text(cp_x, y, 48, 32, actor.cp.to_s, 2)
 
 -     if flag
 
 -       self.contents.font.color = normal_color
 
 -       self.contents.draw_text(cp_x + 48, y, 12, 32, "/", 1)
 
 -       self.contents.draw_text(cp_x + 60, y, 48, 32, "100")
 
 -     end
 
 -   end
 
 - end
 
  
- class Window_BattleStatus
 
 -   def refresh
 
 -     self.contents.clear
 
 -     @item_max = $game_party.actors.size
 
 -     for i in 0...$game_party.actors.size
 
 -       actor = $game_party.actors[i]
 
 -       actor_x = i * 160 + 4
 
 -       draw_actor_name(actor, actor_x, 0)
 
 -       draw_actor_hp(actor, actor_x, 24, 120)
 
 -       draw_actor_sp(actor, actor_x, 48, 120)
 
 -       draw_actor_cp(actor, actor_x, 72, 120)
 
 -       if @level_up_flags[i]
 
 -         self.contents.font.color = normal_color
 
 -         self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
 
 -       else
 
 -         draw_actor_state(actor, actor_x, 96)
 
 -       end
 
 -     end
 
 -   end
 
 - end
 
  
- class Game_Battler
 
 -   attr_accessor :cp #怒气值
 
 -   
 
 -   alias ori_initialize initialize
 
 -   def initialize
 
 -     ori_initialize
 
 -     @cp = 0
 
 -   end
 
 -   
 
 -   def skill_effect(user, skill)
 
 -     # 清除会心一击标志
 
 -     self.critical = false
 
 -     # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、
 
 -     # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下
 
 -     if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
 
 -        ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
 
 -       # 过程结束
 
 -       return false
 
 -     end
 
 -     # 清除有效标志
 
 -     effective = false
 
 -     # 公共事件 ID 是有效的情况下,设置为有效标志
 
 -     effective |= skill.common_event_id > 0
 
 -     # 第一命中判定
 
 -     hit = skill.hit
 
 -     if skill.atk_f > 0
 
 -       hit *= user.hit / 100
 
 -     end
 
 -     hit_result = (rand(100) < hit)
 
 -     # 不确定的特技的情况下设置为有效标志
 
 -     effective |= hit < 100
 
 -     # 命中的情况下
 
 -     if hit_result == true
 
 -       # 计算威力
 
 -       power = skill.power + user.atk * skill.atk_f / 100
 
 -       if power > 0
 
 -         power -= self.pdef * skill.pdef_f / 200
 
 -         power -= self.mdef * skill.mdef_f / 200
 
 -         power = [power, 0].max
 
 -       end
 
 -       # 计算倍率
 
 -       rate = 20
 
 -       rate += (user.str * skill.str_f / 100)
 
 -       rate += (user.dex * skill.dex_f / 100)
 
 -       rate += (user.agi * skill.agi_f / 100)
 
 -       rate += (user.int * skill.int_f / 100)
 
 -       # 计算基本伤害
 
 -       self.damage = power * rate / 20
 
 -       # 属性修正
 
 -       self.damage *= elements_correct(skill.element_set)
 
 -       self.damage /= 100
 
 -       # 伤害符号正确的情况下
 
 -       if self.damage > 0
 
 -         # 防御修正
 
 -         if self.guarding?
 
 -           self.damage /= 2
 
 -         end
 
 -       end
 
 -       # 分散
 
 -       if skill.variance > 0 and self.damage.abs > 0
 
 -         amp = [self.damage.abs * skill.variance / 100, 1].max
 
 -         self.damage += rand(amp+1) + rand(amp+1) - amp
 
 -       end
 
 -       # 第二命中判定
 
 -       eva = 8 * self.agi / user.dex + self.eva
 
 -       hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
 
 -       hit = self.cant_evade? ? 100 : hit
 
 -       hit_result = (rand(100) < hit)
 
 -       # 不确定的特技的情况下设置为有效标志
 
 -       effective |= hit < 100
 
 -     end
 
 -     # 命中的情况下
 
 -     if hit_result == true
 
 -       # 威力 0 以外的物理攻击的情况下
 
 -       if skill.power != 0 and skill.atk_f > 0
 
 -         # 状态冲击解除
 
 -         remove_states_shock
 
 -         # 设置有效标志
 
 -         effective = true
 
 -       end
 
 -       # HP 的伤害减法运算
 
 -       last_hp = self.hp
 
 -       self.hp -= self.damage
 
 - #——————————————————————————————————————————      
 
 -       if self.damage > 0
 
 -         self.cp += 250.0 * (last_hp - self.hp) / self.maxhp
 
 -         self.cp = [self.cp.floor, 100].min
 
 -       end
 
 -       if self.cp == 100
 
 -         self.add_state(2)
 
 -         self.cp = 0
 
 -       end
 
 - #——————————————————————————————————————————      
 
 -       effective |= self.hp != last_hp
 
 -       # 状态变化
 
 -       @state_changed = false
 
 -       effective |= states_plus(skill.plus_state_set)
 
 -       effective |= states_minus(skill.minus_state_set)
 
 -       # 威力为 0 的场合
 
 -       if skill.power == 0
 
 -         # 伤害设置为空的字串
 
 -         self.damage = ""
 
 -         # 状态没有变化的情况下
 
 -         unless @state_changed
 
 -           # 伤害设置为 "Miss"
 
 -           self.damage = "Miss"
 
 -         end
 
 -       end
 
 -     # Miss 的情况下
 
 -     else
 
 -       # 伤害设置为 "Miss"
 
 -       self.damage = "Miss"
 
 -     end
 
 -     # 不在战斗中的情况下
 
 -     unless $game_temp.in_battle
 
 -       # 伤害设置为 nil
 
 -       self.damage = nil
 
 -     end
 
 -     # 过程结束
 
 -     return effective
 
 -   end
 
 - end
 
  
-   
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |