设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1565|回复: 2
打印 上一主题 下一主题

[已经过期] 怎么将上次使用的技能放到第一位?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
794
在线时间
1 小时
注册时间
2015-10-30
帖子
2
跳转到指定楼层
1
发表于 2015-10-31 14:50:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
例如OZ大乱斗NS,上次使用过的技能会自动排序到第一位。

Lv2.观梦者

梦石
0
星屑
451
在线时间
228 小时
注册时间
2015-2-23
帖子
241
2
发表于 2015-10-31 17:16:16 | 只看该作者
  1. class Game_System ; attr_accessor :skill_data ; end
  2. #==============================================================================
  3. class Window_Skill < Window_Selectable
  4.   #--------------------------------------------------------------------------
  5.   def refresh
  6.     if self.contents != nil
  7.       self.contents.dispose
  8.       self.contents = nil
  9.     end
  10.     if $game_system.skill_data and @actor.skill_learn?($game_system.skill_data[@actor.id])
  11.       @data = [$data_skills[$game_system.skill_data[@actor.id]]]
  12.     else
  13.       @data = []
  14.     end
  15.     for i in [email protected]
  16.       skill = $data_skills[@actor.skills[i]]
  17.       if skill != nil
  18.         @data.push(skill) unless @data.include?(skill)
  19.       end
  20.     end
  21.     # 如果项目数不是 0 就生成位图、重新描绘全部项目
  22.     @item_max = @data.size
  23.     if @item_max > 0
  24.       self.contents = Bitmap.new(width - 32, row_max * 32)
  25.       for i in 0...@item_max
  26.         draw_item(i)
  27.       end
  28.     end
  29.   end
  30. end
  31. class Scene_Battle
  32.   alias fy_phase3_next_actor phase3_next_actor
  33.   def phase3_next_actor
  34.     if @active_battler != nil and @active_battler.current_action.kind == 1
  35.       $game_system.skill_data = Hash.new unless $game_system.skill_data
  36.       $game_system.skill_data[@active_battler.id] = @active_battler.current_action.skill_id
  37.     end
  38.     fy_phase3_next_actor
  39.   end
  40. end
复制代码

评分

参与人数 1星屑 +200 收起 理由
hys111111 + 200 认可答案

查看全部评分

制作XP特效,找我。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
794
在线时间
1 小时
注册时间
2015-10-30
帖子
2
3
 楼主| 发表于 2015-11-1 12:02:30 | 只看该作者
枫の叶 发表于 2015-10-31 17:16

多谢!!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-23 01:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表