赞 | 293 |
VIP | 11 |
好人卡 | 74 |
积分 | 224 |
经验 | 281171 |
最后登录 | 2025-2-22 |
在线时间 | 9386 小时 |
Lv5.捕梦者 (暗夜天使) 只有笨蛋才会看到
- 梦石
- 1
- 星屑
- 21437
- 在线时间
- 9386 小时
- 注册时间
- 2012-6-19
- 帖子
- 7114
 
|
- =begin
- ===============================================================================
- 能够遗忘技能的道具 By喵呜喵5
- ===============================================================================
- 【说明】
- 在道具的备注中加入:
-
- “遗忘技能 = 技能的ID”
-
- (不包括双引号),
- 使用这个道具时道具的使用者就能遗忘指定的技能
-
- 这个脚本需要搭配
- 《读取备注栏脚本》(http://rpg.blue/thread-99474-1-1.html)一起共同使用
-
- =end
- $m5script = {} if $m5script.nil?
- $m5script["M5ForgetSkill"] = true
- module M5ForgetSkill
- #==============================================================================
- # 设定部分
- #==============================================================================
-
- LIMIT = true # true / false
-
- #设置为false的情况下,只有物品的使用者掌握有需要遗忘技能的时候遗忘道具才有用
- #(否则如果遗忘道具没有其他效果(恢复HP、执行公共事件……)时无法使用)
-
- #==============================================================================
- # 设定结束
- #==============================================================================
- #==============================================================================
- # 脚本部分
- #==============================================================================
- end
- class Game_Battler
- alias m5_20140329_valid? item_has_any_valid_effects?
- def item_has_any_valid_effects?(user, item)
- m5_20140329_valid?(user, item) || m5_forget_skill?(user,item)
- end
- def m5_forget_skill?(user,item)
- for_skill = $data_items[item.id].read_note('遗忘技能')
- return false if !for_skill || !actor?
- return true if M5ForgetSkill::LIMIT
- return true if skills.include?($data_skills[for_skill])
- false
- end
- def m5_item_effect_forget_skill(user, skill_id)
- forget_skill(skill_id) if actor?
- @result.success = true
- end
- alias m5_20140329_item_user_effect item_user_effect
- def item_user_effect(user, item)
- if (skill_id = $data_items[item.id].read_note('遗忘技能'))
- m5_item_effect_forget_skill(user, skill_id)
- end
- m5_20140329_item_user_effect(user, item)
- end
- end
复制代码 |
评分
-
查看全部评分
|