From 3e13029e5e036eab1bb8906d200b626a46bb188d Mon Sep 17 00:00:00 2001 From: lzr <1838979562@qq.com> Date: Wed, 10 May 2023 18:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=89=E4=B8=AA=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/plugins/LiuYue_EventCorona.js | 2369 +++++++++++++++ js/plugins/LiuYue_FieldBless.js | 4117 +++++++++++++++++++++++++++ js/plugins/LiuYue_SimpleFunction.js | 3095 ++++++++++++++++++++ 3 files changed, 9581 insertions(+) create mode 100644 js/plugins/LiuYue_EventCorona.js create mode 100644 js/plugins/LiuYue_FieldBless.js create mode 100644 js/plugins/LiuYue_SimpleFunction.js diff --git a/js/plugins/LiuYue_EventCorona.js b/js/plugins/LiuYue_EventCorona.js new file mode 100644 index 0000000..13b2ca1 --- /dev/null +++ b/js/plugins/LiuYue_EventCorona.js @@ -0,0 +1,2369 @@ +/*: + * @plugindesc v1.05 LiuYue_EventCorona 事件光环 + * @author 流逝的岁月 + * + * @help + * ============================================================================ + * 介绍 + * ============================================================================ * + * + * 为地图中的事件提供光环,使角色靠近时触发效果 + * + * + * + * + * + *------------------------------------------------------------------- + * + *使用条例:本插件完全免费,随意魔改 + * + *------------------------------------------------------------------- + * + * + * + * + * + * + *--------------------------------------------------------------------------- + *以下是可以使用的插件指令 + *-----------------------PluginCommand------------------------- + * + * + * + * ZzyECF IsShowCorona x(true/false) //这会修改是否显示光环范围 + * ZzyECF CoronaMode x(circle/rect) //这会修改显示的光环模式 + * ZzyECF CoronaRange x //这会修改显示的光环的半径范围,x为正整数,对应1范围为地图中的一格距离 + * ZzyECF EffectFrame x //这会修改光环的执行时间间隔,x为帧数 + * ZzyECF EffectCommand x //这会修改调用公共事件的ID值 + * ZzyECF RangePic x //这会修改显示光环范围的位图 + * ZzyECF OffsetX x //这会修改显示光环的位置偏移X,x可以是一个正负整数 + * ZzyECF OffsetY x //这会修改显示光环的位置偏移Y,x可以是一个正负整数 + * ZzyECF BlendMode x(normal/add/multiply/screen) //这会修改图像的叠加模式 ,normal正常 add相加 multiply相乘 screen屏幕 + * ZzyECF ValueBlend x(normal/add/multiply/screen) //这会修改数值的叠加模式 ,normal正常 add相加 multiply相乘 screen屏幕 + * ZzyECF DefaultColor x //这会修改图像默认颜色 + * ZzyECF PictureHue x //这会修改图像默认色相 + * ZzyECF InCommand x //这会修改进入时的公共事件 + * ZzyECF OutCommand x //这会修改离开时的公共事件 + * + * ZzyECF IsShowValue x(true/false) //这会设置是否显示增减数值 + * ZzyECF ValueSize x //这会设置显示增减数值的尺寸 + * + * + * + *--------------------------------------------------------------------------- + *以下是可以使用的脚本函数 + *-----------------------Script Function------------------------- + * + * + * + * Zzy.ECF.IsShowCorona(enable) //这会修改是否显示光环范围 + * Zzy.ECF.CoronaMode(str) //这会修改显示的光环模式 + * Zzy.ECF.CoronaRange(range) //这会修改显示的光环的半径范围,x为正整数,对应1范围为地图中的一格距离 + * Zzy.ECF.EffectFrame(frame) //这会修改光环的执行时间间隔,x为帧数 + * Zzy.ECF.EffectCommand(commonId) //这会修改调用公共事件的ID值 + * Zzy.ECF.InCommand(commonId) //这会修改进入时的公共事件 + * Zzy.ECF.OutCommand(commonId) //这会修改离开时的公共事件 + * Zzy.ECF.RangePic(picStr) //这会修改显示光环范围的位图 + * Zzy.ECF.OffsetX(offsetX) //这会修改显示光环的位置偏移X,x可以是一个正负整数 + * Zzy.ECF.OffsetY(offsetY) //这会修改显示光环的位置偏移Y,x可以是一个正负整数 + * Zzy.ECF.BlendMode(modeStr) //这会修改图像的叠加模式 ,normal正常 add相加 multiply相乘 screen屏幕 + * Zzy.ECF.ValueBlend(modeStr) //这会修改图像的叠加模式 ,normal正常 add相加 multiply相乘 screen屏幕 + * Zzy.ECF.DefaultColor(color) //这会修改图像默认颜色 + * Zzy.ECF.PictureHue(hue) //这会修改图像默认色相 + * Zzy.ECF.IsShowValue(enable) //这会设置是否显示增减数值 + * Zzy.ECF.ValueSize(size) //这会设置显示增减数值的尺寸 + * + * Zzy.ECF.ShowValue(value,color,pIndex,evId) //这会在地图中指定玩家角色显示文本信息,以下是对于参数的介绍 + * -value:需要显示的文本,这可以是一个数值,可以是一段字符串 + * -color:显示文本的颜色,可使用#000000~#ffffff rgba(0~255,0~255,0~5255,0~1) 这两种颜色码格式 + * -pIndex:当前角色位于对于下标的数值,注意从0开始计数 例如领头者那么下标值是0 如有三位跟随者下标则分别是1,2,3 + * -evId:将采用本地图事件ID的注释指令配置显示文本,如不填写则使用插件参数中的配置 + * + * + * 例:Zzy.ECF.ShowValue(50,'#ffff22',0) 领头者会显示数字50,淡黄色的文本 + * + * + * + * + * *以下是一些数据库中使用到的便签,请将他们写在 数据库->角色/职业->注释 之中 + *---------------------DataBase Note-------------------- + * + * //这会使这个角色或是职业之下不会受到任何增益光环的效果 + * + * + * + * + * + *以下是一些地图中事件用到的便签信息,请将他们写在 地图->事件->事件指令->注释 之中 + *---------------------Note Case-------------------- + * + * + * //将事件识别为光环事件,将会监视玩家是否进入光环之中,执行光环效果,此标签必须添加才会被视为光环 + * + * //将会设置是否显示光环范围,此设置优先级大于参数中的设置 + * //将会设置光环范围的显示模式,此设置优先级大于参数中的设置 + * //将会设置光环半径,此设置优先级大于参数中的设置 + * //将会设置执行效果的间隔期,此设置优先级大于参数中的设置 + * //将会设置持续光环期间调用公共事件,此设置优先级大于参数中的设置 + * //将会设置进入光环时调用公共事件,此设置优先级大于参数中的设置 + * //将会设置离开光环时调用公共事件,此设置优先级大于参数中的设置 + * //将会设置修改显示光环的位图,此设置优先级大于参数中的设置 + * //将会设置位图的x偏移 + * //将会设置位图的y偏移 + * //将会修改图像的叠加模式,此设置优先级大于参数中的设置 + * //将会修改数值图像的叠加模式,此设置优先级大于参数中的设置 + * //将会设置图像默认颜色,此设置优先级大于参数中的设置 + * //将会设置图像默认色相,此设置优先级大于参数中的设置 + * + * //将会设置是否有可视化数值显示,此设置优先级大于参数中的设置 + * + * + * //将会在光环内容执行生命值增减,x可以是一个公式 + * //将会在光环内容执行生命值增减百分比,数值1代表1%,x可以是一个公式 + * //将会在光环内容执行魔法值增减,x可以是一个公式 + * //将会在光环内容执行魔法值增减百分比,数值1代表1%,x可以是一个公式 + * //将会在光环内容执行TP增减,x可以是一个公式 + * //将会在光环内容执行TP增减百分比,数值1代表1%,x可以是一个公式 + * + * //将会设置光环能够响应的次数 + * //将会设置光环次数的恢复时长 + * //将会设置光环每次的恢复数量 + * //每次进入地图是否会重置次数 + * + * + * +------------------------------------------------------------ + + + + 我叫坂本: v1.05 拓展函数脚本,增加数值叠加模式 + 我叫坂本:v1.04 修复了使用某些事件时导致崩溃的bug + 我叫坂本:v1.03 添加与旧存档兼容,修复一个在多个光环同时存在时显示数据不正确的bug + 我叫坂本:v1.02 添加更多数字文本显示的插件参数控制 + 我叫坂本:v1.01 修复再切换地图时,导致的光环贴图错误的问题,更新光环响应次数相关的操作 + 我叫坂本:v1.00 完成插件 + + + +------------------------------------------------------------ + + + * + * + * @param ---设置--- + * @default + * + * @param CoronaMode + * @text 光环模式 + * @parent ---设置--- + * @type combo + * @option circle + * @option rect + * @desc 光环控制范围的模式,选择circle为圆形范围,选择rect为方形范围 + * @default circle + * + * + * @param CoronaRange + * @text 光环半径 + * @parent ---设置--- + * @type Number + * @desc 设置光环的效果范围的半径值 + * @default 3 + * + * + * @param EffectFrame + * @text 执行效果的间隔期 + * @parent ---设置--- + * @type Number + * @desc 这是在光环效果下,经过多少帧会执行一次光环的效果,默认为30帧 + * @default 30 + * + * + * @param EffectCommand + * @text 执行效果时公共事件 + * @parent ---设置--- + * @type Number + * @desc 执行光环时执行的公共事件,填写公共事件ID值,0不会执行任何公共事件,默认值为0 + * @default 0 + * + * + * @param EffectScript + * @text 执行效果时脚本 + * @parent ---设置--- + * @type note + * @desc 执行光环时执行的脚本 + * @default "" + * + * + * @param InCommand + * @text 进入光环时公共事件 + * @parent ---设置--- + * @type Number + * @desc 刚刚接触到光环时,会执行的公共事件,填写公共事件ID值,0不会执行任何公共事件,默认值为0 + * @default 0 + * + * @param OutCommand + * @text 离开光环时公共事件 + * @parent ---设置--- + * @type Number + * @desc 刚刚离开光环时,会执行的公共事件,填写公共事件ID值,0不会执行任何公共事件,默认值为0 + * @default 0 + * + * @param CoronaCount + * @text 光环使用次数 + * @parent ---设置--- + * @type Number + * @desc 这是触碰光环能使用的次数,当次数使用结束后,光环就会消失,如果设置次数为0,则代表光环有无限次,默认值为0 + * @default 0 + * + * @param RecoverFrame + * @text 光环恢复时长 + * @parent ---设置--- + * @type Number + * @desc 光环会经过多少帧的时长进行恢复,如果设为0,则代表不会进行恢复,默认值为0 + * @default 0 + * + * @param RecoverNum + * @text 光环恢复次数 + * @parent ---设置--- + * @type Number + * @desc 每次光环记性恢复时,会恢复多少次,默认值为0 + * @default 0 + * + * @param IsReMapCount + * @text 重进地图恢复次数 + * @parent ---设置--- + * @type boolean + * @on YES + * @off NO + * @desc 每次从重进地图时,是否会重置光环的次数信息 + * YES - true NO - false + * @default true + * + * + * + * + * @param ---显示--- + * @default + * + * + * @param IsShowCorona + * @text 是否显示光环范围 + * @parent ---显示--- + * @type boolean + * @on YES + * @off NO + * @desc 光环的图片是否显示 + * YES - true NO - false + * @default true + * + * + * @param RangePic + * @text 光环范围图片 + * @parent ---显示--- + * @dir img/pictures + * @type file + * @desc 可以填写显示光环图片名称,图片放在img/pictures文件夹中,如果没有添写名称,那么会使用系统默认的绘制图片 + * @default + * + * @param OffsetX + * @text 图片偏移X + * @parent ---显示--- + * @type Text + * @desc 显示图片的偏移X,用于微调,x可以是一个正负整数,默认值为0 + * @default 0 + * + * @param OffsetY + * @text 图片偏移Y + * @parent ---显示--- + * @type Text + * @desc 显示图片的偏移Y,用于微调,x可以是一个正负整数,默认值为0 + * @default 0 + * + * @param BlendMode + * @text 图形叠加模式 + * @parent ---显示--- + * @type combo + * @option normal + * @option add + * @option multiply + * @option screen + * @desc 图像在地图中的叠层模式,normal正常 add相加 multiply相乘 screen屏幕,默认值normal + * @default normal + * + * @param DefaultColor + * @text 默认光环颜色 + * @parent ---显示--- + * @type Text + * @desc 显示默认的光环的颜色,这是在没有添加图片时才会显示,可以用#000000 和rgba(0,0,0,0)两种格式 + * @default rgba(40,255,40,0.6) + * + * @param PictureHue + * @text 图像光环色相 + * @parent ---显示--- + * @type Number + * @desc 显示光环位图的色相偏移,这是在添加图片时才会显示,范围0~360,用来做不同颜色的变化,默认值0 + * @default 0 + * + * @param ListShowFrame + * @text 文本显示间隔 + * @parent ---显示--- + * @type Number + * @desc 在显示文本队列堆的间隔时长,单位为帧数,默认值为20帧 + * @default 20 + * + * + * + * @param ---视化数值--- + * @default + * + * + * @param IsShowValue + * @text 是否显示增减数值 + * @parent ---视化数值--- + * @type boolean + * @on YES + * @off NO + * @desc 处于光环效果时,是否可以看到每次交互所产生的数值效果 + * YES - true NO - false + * @default true + * + * @param ValueSize + * @text 数值字体大小 + * @parent ---视化数值--- + * @type Number + * @desc 显示在画面上数值字体的大小 + * @default 24 + * + * + * @param ValueBlend + * @text 数值叠加模式 + * @parent ---视化数值--- + * @type combo + * @option normal + * @option add + * @option multiply + * @option screen + * @desc 数值在地图中的叠层模式,normal正常 add相加 multiply相乘 screen屏幕,默认值normal + * @default normal + * + * + * @param HPColor + * @text 数值生命颜色 + * @parent ---视化数值--- + * @type Text + * @desc 生命光环时显示的数值颜色,可以用#000000 和rgba(0,0,0,0)两种格式 + * @default rgba(40,255,40,0.8) + * + * + * @param MPColor + * @text 数值魔法颜色 + * @parent ---视化数值--- + * @type Text + * @desc 魔法光环时显示的数值颜色,可以用#000000 和rgba(0,0,0,0)两种格式 + * @default rgba(40,40,255,0.8) + * + * @param TPColor + * @text 数值TP颜色 + * @parent ---视化数值--- + * @type Text + * @desc TP光环时显示的数值颜色,可以用#000000 和rgba(0,0,0,0)两种格式 + * @default rgba(255,40,255,0.8) + * + * + * @param HPPerColor + * @text 数值百分比生命颜色 + * @parent ---视化数值--- + * @type Text + * @desc 生命百分比光环时显示的数值颜色,可以用#000000 和rgba(0,0,0,0)两种格式 + * @default rgba(40,255,40,0.8) + * + * + * @param MPPerColor + * @text 数值百分比魔法颜色 + * @parent ---视化数值--- + * @type Text + * @desc 魔法百分比光环时显示的数值颜色,可以用#000000 和rgba(0,0,0,0)两种格式 + * @default rgba(40,40,255,0.8) + * + * @param TPPerColor + * @text 数值百分比TP颜色 + * @parent ---视化数值--- + * @type Text + * @desc TP百分比光环时显示的数值颜色,可以用#000000 和rgba(0,0,0,0)两种格式 + * @default rgba(255,40,255,0.8) + * + * + * @param TextShowFrame + * @text 文本存在时长 + * @parent ---视化数值--- + * @type Number + * @desc 出现的文字存在的时长,单位为帧数,默认值为40 + * @default 40 + * + * @param TextAngle + * @text 文本角度 + * @parent ---视化数值--- + * @type Text + * @desc 出现的文字的方向,范围0~360,默认值为0 + * @default 0 + * + * @param AngleArea + * @text 角度区域 + * @parent ---视化数值--- + * @type Text + * @desc 这是文字角度偏移的随机区域范围0~180,请输入小数正数,默认值为0 + * @default 0 + * + * @param TextSpeed + * @text 文本速度 + * @parent ---视化数值--- + * @type Text + * @desc 出现的文字的移动速度,默认值为1 + * @default 1 + * + * @param SpeedRandPer + * @text 速度随机百分比 + * @parent ---视化数值--- + * @type Text + * @desc 出现的文字的移动速度的随机百分比差异,范围0~100,请输入小数正数,默认值为0 + * @default 0 + * + * @param TextGravity + * @text 文本重力 + * @parent ---视化数值--- + * @type Text + * @desc 文本的重力值,默认值为9.8 + * @default 9.8 + * + * @param GravityRandPer + * @text 重力随机百分比 + * @parent ---视化数值--- + * @type Text + * @desc 出现的文字的移动重力的随机百分比差异,范围0~100,请输入小数正数,默认值为0 + * @default 0 + * + * @param GravityMaxSpeed + * @text 重力下落最大速度 + * @parent ---视化数值--- + * @type Text + * @desc 限制重力计算下落的最大速度值,默认值为10 + * @default 10 + * + * @param TextFadeIn + * @text 文本渐入时长 + * @parent ---视化数值--- + * @type Number + * @desc 出现的文字渐入完全透明度的时长,单位为帧数,默认值为5 + * @default 5 + * + * @param FadeInRandPer + * @text 文本渐入百分比 + * @parent ---视化数值--- + * @type Text + * @desc 出现的文字渐入完全透明度的百分比差异,范围0~100,请输入小数正数,默认值为0 + * @default 0 + * + * @param TextFadeOut + * @text 文本淡出时长 + * @parent ---视化数值--- + * @type Number + * @desc 出现的文字渐入完全透明的时长,单位为帧数,默认值为5 + * @default 5 + * + * @param FadeOutRandPer + * @text 文本淡出百分比 + * @parent ---视化数值--- + * @type Text + * @desc 出现的文字渐入完全透明度的百分比差异,范围0~100,请输入小数正数,默认值为0 + * @default 0 + * + * + * + * + * + */ + + +var LiuYue = LiuYue || {}; +LiuYue.LiuYue_EventCorona = true;//插件启动 + +var Zzy = Zzy || {}; +Zzy.ECF = Zzy.ECF || {}; +Zzy.ECF.version = 1.05; +Zzy.Parameters = PluginManager.parameters('LiuYue_EventCorona'); +Zzy.Param = Zzy.Param || {}; + + +Zzy.Param.ECFIsShowCorona = eval(String(Zzy.Parameters['IsShowCorona']));//是否显示光环范围 +Zzy.Param.ECFCoronaMode = String(Zzy.Parameters['CoronaMode']);//光环模式 +Zzy.Param.ECFCoronaRange = Number(Zzy.Parameters['CoronaRange']);//光环半径 +Zzy.Param.ECFEffectFrame = parseInt(Zzy.Parameters['EffectFrame']);//光环内执行效果的间隔期 +Zzy.Param.ECFEffectCommand = parseInt(Zzy.Parameters['EffectCommand']);//公共事件 +Zzy.Param.ECFEffectScript = new Function(JSON.parse(Zzy.Parameters['EffectScript']));//执行效果时脚本 +Zzy.Param.ECFRangePic = String(Zzy.Parameters['RangePic']);//光环范围图片 +Zzy.Param.ECFOffsetX = Number(Zzy.Parameters['OffsetX']);//图片偏移X +Zzy.Param.ECFOffsetY = Number(Zzy.Parameters['OffsetY']);//图片偏移Y +Zzy.Param.ECFBlendMode = String(Zzy.Parameters['BlendMode']);//图形叠加模式 +Zzy.Param.ECFListShowFrame = parseInt(Zzy.Parameters['ListShowFrame']);//显示间隔 + +Zzy.Param.ECFInCommand = parseInt(Zzy.Parameters['InCommand']); +Zzy.Param.ECFOutCommand = parseInt(Zzy.Parameters['OutCommand']); + +Zzy.Param.ECFDefaultColor = String(Zzy.Parameters['DefaultColor']);//默认光环颜色 +Zzy.Param.ECFPictureHue = Number(Zzy.Parameters['PictureHue']);//图像光环色相 + +Zzy.Param.ECFIsShowValue = eval(String(Zzy.Parameters['IsShowValue']));//是否显示增减数值 +Zzy.Param.ECFValueSize = parseInt(Zzy.Parameters['ValueSize']);//数值字体大小 +Zzy.Param.ECFValueBlend = String(Zzy.Parameters['ValueBlend']);//数值叠加模式 + +Zzy.Param.ECFHPColor = String(Zzy.Parameters['HPColor']);//数值生命颜色 +Zzy.Param.ECFMPColor = String(Zzy.Parameters['MPColor']);//数值魔法颜色 +Zzy.Param.ECFTPColor = String(Zzy.Parameters['TPColor']);//数值TP颜色 +Zzy.Param.ECFHPPerColor = String(Zzy.Parameters['HPPerColor']);//数值百分比生命颜色 +Zzy.Param.ECFMPPerColor = String(Zzy.Parameters['MPPerColor']);//数值百分比魔法颜色 +Zzy.Param.ECFTPPerColor = String(Zzy.Parameters['TPPerColor']);//数值百分比TP颜色 + +Zzy.Param.ECFCoronaCount = parseInt(Zzy.Parameters['CoronaCount']);//光环使用次数 +Zzy.Param.ECFRecoverFrame = parseInt(Zzy.Parameters['RecoverFrame']);//光环恢复时长 +Zzy.Param.ECFRecoverNum = parseInt(Zzy.Parameters['RecoverNum']);//光环恢复次数 +Zzy.Param.ECFIsReMapCount = eval(String(Zzy.Parameters['IsReMapCount']));//是否重置次数 + +Zzy.Param.ECFTextShowFrame = parseInt(Zzy.Parameters['TextShowFrame']);//文本存在的时长 + +Zzy.Param.ECFTextAngle = Number(Zzy.Parameters['TextAngle']);//文本角度 +Zzy.Param.ECFAngleArea = Number(Zzy.Parameters['AngleArea']);//角度区域 +Zzy.Param.ECFTextSpeed = Number(Zzy.Parameters['TextSpeed']);//文本速度 +Zzy.Param.ECFSpeedRandPer = Number(Zzy.Parameters['SpeedRandPer']);//随机随机百分比 +Zzy.Param.ECFTextGravity = Number(Zzy.Parameters['TextGravity']);//文本重力 +Zzy.Param.ECFGravityRandPer = Number(Zzy.Parameters['GravityRandPer']);//重力随机百分比 +Zzy.Param.ECFGravityMaxSpeed = Number(Zzy.Parameters['GravityMaxSpeed']);//重力最大速度值 + +Zzy.Param.ECFTextFadeIn = parseInt(Zzy.Parameters['TextFadeIn']);//文本渐入时长 +Zzy.Param.ECFFadeInRandPer = Number(Zzy.Parameters['FadeInRandPer']);//文本渐入百分比 +Zzy.Param.ECFTextFadeOut = parseInt(Zzy.Parameters['TextFadeOut']);//文本淡出时长 +Zzy.Param.ECFFadeOutRandPer = Number(Zzy.Parameters['FadeOutRandPer']);//文本淡出百分比 + + +Zzy.ECF.TempMapId = 0;//地图标记 +Zzy.ECF.TempEvIdArr = []; +Zzy.ECF.TempColorArr = [Zzy.Param.ECFHPColor,Zzy.Param.ECFMPColor,Zzy.Param.ECFTPColor,Zzy.Param.ECFHPPerColor,Zzy.Param.ECFMPPerColor,Zzy.Param.ECFTPPerColor]; + + +//================================================================= +//DataManager +//================================================================= +Zzy.ECF.DataManager_loadGame = DataManager.loadGame; +DataManager.loadGame = function(savefileId) //旧存档兼容 +{ + var result = Zzy.ECF.DataManager_loadGame.call(this,savefileId); + + this.ZzyECFInitData(); + + return result; +} + +DataManager.ZzyECFInitData = function()//初始化参数 +{ + if(!$gameSystem.GetIsZzyECFLoaded()) + { + //初始化 + $gameSystem.ZzyECFInitData();//初始化数据 + $gameSystem.SetIsZzyECFLoaded(true); + } +} + +//================================================================= +//Game_System +//================================================================= + +Zzy.ECF.Game_System_initialize = Game_System.prototype.initialize; +Game_System.prototype.initialize = function() +{ + Zzy.ECF.Game_System_initialize.call(this); + this.ZzyECFInitData();//初始化数据 + + this._IsZzyECFLoaded = true;//是否载入完成 + +}; + +Game_System.prototype.GetIsZzyECFLoaded = function() +{ + if(this._IsZzyECFLoaded === undefined) + {this._IsZzyECFLoaded = false;} + return this._IsZzyECFLoaded; +} + +Game_System.prototype.SetIsZzyECFLoaded = function(enable) +{ + this._IsZzyECFLoaded = enable; +} + +Game_System.prototype.ZzyECFInitData = function() +{ + this._ZzyECFIsShowCorona = Zzy.Param.ECFIsShowCorona; + this._ZzyECFCoronaMode = Zzy.ECF.CoronaModeToInt(Zzy.Param.ECFCoronaMode); + this._ZzyECFCoronaRange = Zzy.Param.ECFCoronaRange; + this._ZzyECFEffectFrame = Zzy.Param.ECFEffectFrame; + this._ZzyECFEffectCommand = Zzy.Param.ECFEffectCommand; + this._ZzyECFRangePic = Zzy.Param.ECFRangePic; + this._ZzyECFOffsetX = Zzy.Param.ECFOffsetX; + this._ZzyECFOffsetY = Zzy.Param.ECFOffsetY; + + this._ZzyECFBlendMode = Zzy.ECF.BlendModeToInt(Zzy.Param.ECFBlendMode); + this._ZzyECFInCommand = Zzy.Param.ECFInCommand; + this._ZzyECFOutCommand = Zzy.Param.ECFOutCommand; + + this._ZzyECFDefaultColor = Zzy.Param.ECFDefaultColor; + this._ZzyECFPictureHue = Zzy.Param.ECFPictureHue; + + this._ZzyECFIsShowValue = Zzy.Param.ECFIsShowValue; + this._ZzyECFValueSize = Zzy.Param.ECFValueSize; + this._ZzyECFValueBlend = Zzy.ECF.BlendModeToInt(Zzy.Param.ECFValueBlend); + + + this._ZzyECFCoronaArr = [];//记录接触光圈 + this._ZzyECFCommonArr = [];//事件队列 + + this._ZzyECFEventCountInfo = [];//次数记录 +} + +Game_System.prototype.setZzyECFRecover = function(ev)//设置恢复配置 +{ + var mapId = $gameMap.mapId(); + if(!this._ZzyECFEventCountInfo[mapId]) + {this._ZzyECFEventCountInfo[mapId] = [];} + + var evId = ev.eventId(); + var zzyECF = ev.zzyECF; + + + var info = {}; + info.useCount = zzyECF.useCount; + info.recoverFrame = zzyECF.recoverFrame; + info.recoverNum = zzyECF.recoverNum; + info.maxCount = info.useCount; + info.cFrame = 0; + + + if(!zzyECF.isReMapCount)//不可以重置时 + { + //判断是否没有进行过赋值 + if(this._ZzyECFEventCountInfo[mapId][evId]) + { + if(!this._ZzyECFEventCountInfo[mapId][evId].maxCount) + { + this._ZzyECFEventCountInfo[mapId][evId] = info; + } + } + else + { + this._ZzyECFEventCountInfo[mapId][evId] = info; + } + + } + else + { + this._ZzyECFEventCountInfo[mapId][evId] = info; + } + + + +} + +Game_System.prototype.getZzyECFRecoverInfo = function(evId) +{ + var mapId = $gameMap.mapId(); + return this._ZzyECFEventCountInfo[mapId][evId]; +} + + + +Game_System.prototype.RecordZzyECFCorona = function(ev)//压入ev +{ + var info = {}; + info.mapId = $gameMap.mapId(); + info.evId = ev.eventId(); + info.inCom = ev.zzyECF.inCommand; + info.outCom = ev.zzyECF.outCommand; + + if(info.inCom){this._ZzyECFCommonArr.push(info.inCom);}//压入到执行队列中 + + + for(var i=0;i/i)) + { + obj.zzyECF.isCorona = false;//不开启 + } + } + } +} + + + + +//============================================================================================ +//Game_Event +//============================================================================================ + +Zzy.ECF.Game_Event_setupPage = Game_Event.prototype.setupPage; +Game_Event.prototype.setupPage = function() //加载事件信息 +{ + Zzy.ECF.Game_Event_setupPage.call(this); + this.ZzyECFInitData();//调用初始化数据 + + this.CreateZzyECFSprite();//创造对象 +} + +Game_Event.prototype.CreateZzyECFSprite = function() +{ + if(this.zzyECF && this.zzyECF.isCorona) + { + SceneManager._scene.CreateZzyECFSprite(this);//延迟调用 + } + +} + + + +Game_Event.prototype.ZzyECFInitData = function() +{ + if (!this.page()) return; + + var list = this.list(); + var len = list.length; + + this.zzyECF = {};//清空 + + this.ZzyECFInitZzyECF(); + + + for (var i = 0; i < len; ++i) + { + var ev = list[i]; + + if ([108, 408].contains(ev.code)) + { + if(ev.parameters[0].match(//i))//设置为光环 + { + this.zzyECF.isCorona = true; + } + else if(ev.parameters[0].match(//i))//设置为光环 + { + this.zzyECF.isShowCorona = eval(String(RegExp.$1)); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.modeCorona = Zzy.ECF.CoronaModeToInt(String(RegExp.$1)); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.range = parseInt(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.effectFrame = parseInt(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.commonId = parseInt(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.sprPic = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.ofx = Number(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.ofy = Number(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.modeBlend = Zzy.ECF.BlendModeToInt(String(RegExp.$1)); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.valueBlend = Zzy.ECF.BlendModeToInt(String(RegExp.$1)); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.inCommand = parseInt(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.outCommand = parseInt(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.defaultColor = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.pictureHue = Number(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.param[0] = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.paramPer[0] = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.param[1] = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.paramPer[1] = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.param[2] = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.paramPer[2] = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.isShowValue = String(RegExp.$1); + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.useCount = parseInt(RegExp.$1);//使用次数 + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.recoverFrame = parseInt(RegExp.$1);//恢复时长 + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.recoverNum = parseInt(RegExp.$1);//恢复数量 + } + else if(ev.parameters[0].match(//i)) + { + this.zzyECF.isReMapCount = eval(String(RegExp.$1));//重置次数 + } + } + } + $gameSystem.setZzyECFRecover(this);//设置内容 +} + + + + +Game_Event.prototype.ZzyECFInitZzyECF = function() +{ + this.zzyECF.isCorona = false; + this.zzyECF.isShowCorona = $gameSystem.getZzyECFIsShowCorona(); + this.zzyECF.modeCorona = $gameSystem.getZzyECFCoronaMode(); + this.zzyECF.range = $gameSystem.getZzyECFCoronaRange(); + this.zzyECF.effectFrame = $gameSystem.getZzyECFEffectFrame(); + this.zzyECF.cEffectFrame = 0; + this.zzyECF.commonId = $gameSystem.getZzyECFEffectCommand(); + this.zzyECF.sprPic = $gameSystem.getZzyECFRangePic(); + this.zzyECF.ofx = $gameSystem._ZzyECFOffsetX; + this.zzyECF.ofy = $gameSystem._ZzyECFOffsetY; + this.zzyECF.modeBlend = $gameSystem.getZzyECFBlendMode(); + this.zzyECF.valueBlend = $gameSystem.getZzyECFValueBlend(); + + this.zzyECF.inCommand = $gameSystem.getZzyECFInCommand(); + this.zzyECF.outCommand = $gameSystem.getZzyECFOutCommand(); + this.zzyECF.defaultColor = $gameSystem._ZzyECFDefaultColor; + this.zzyECF.pictureHue = $gameSystem._ZzyECFPictureHue; + + this.zzyECF.isShowValue = $gameSystem._ZzyECFIsShowValue; + + this.zzyECF.useCount = Zzy.Param.ECFCoronaCount; + this.zzyECF.recoverFrame = Zzy.Param.ECFRecoverFrame; + this.zzyECF.recoverNum = Zzy.Param.ECFRecoverNum; + this.zzyECF.isReMapCount = Zzy.Param.ECFIsReMapCount; + + this.zzyECF['param'] = []; + this.zzyECF['paramPer'] = []; + + +} + + +Zzy.ECF.Game_Event_update = Game_Event.prototype.update; +Game_Event.prototype.update = function() +{ + Zzy.ECF.Game_Event_update.call(this); + this.updateZzyECFCorona(); +} + +Game_Event.prototype.updateZzyECFCorona = function() +{ + if(!this.zzyECF)return; + if(!this.zzyECF.isCorona)return;//不满足光环 + + if(this.zzyECF.cEffectFrame > 0) + {this.zzyECF.cEffectFrame--;return;} + + var info = $gameSystem.getZzyECFRecoverInfo(this.eventId()); + + if(info.maxCount)//存在次数 + { + if(info.recoverFrame)//存在恢复 + { + if(info.useCount < info.maxCount) + { + if(info.cFrame < info.recoverFrame) + {info.cFrame++;} + else + {//对次数进行增加 + info.cFrame = 0; + info.useCount += info.recoverNum; + info.useCount = Math.min(info.useCount,info.maxCount); + } + } + } + if(info.useCount <= 0)return;//不存在次数 + } + + + + if(this.CheckZzyECFInRange($gamePlayer))//判断是否在范围中 + { + this.zzyECF.cEffectFrame = this.zzyECF.effectFrame; + this.ExeZzyECFCoronaEffect();//执行效果 + + //减少使用次数 + if(info.useCount > 0) + {info.useCount--;} + + //检测光环中是否拥有 + if(this.zzyECF.inCommand || this.zzyECF.outCommand)//存在时间需处理光环 + { + if(!$gameSystem.CheckBeingZzyECFCorona(this)) + { + $gameSystem.RecordZzyECFCorona(this);//压入到光环中 + } + } + + } +} + + +Game_Event.prototype.CheckZzyECFInRange = function(obj) +{ + var disX = Math.abs(obj.x - this.x); + var disY = Math.abs(obj.y - this.y); + + switch(this.zzyECF.modeCorona) + { + case 1: + if(Math.sqrt(disX*disX+disY*disY) <= this.zzyECF.range) + { + + return true; + } + break; + + case 2: + if(disX <= this.zzyECF.range && disY <= this.zzyECF.range) + { + + return true; + } + break; + } + return false; +} + + +Game_Event.prototype.ExeZzyECFCoronaEffect = function() +{ + if(this.zzyECF.param[0]) + { + var valueArr = this.EvalZzyECFCoronaEffect(this.zzyECF.param[0],0); + this.ChangeZzyECFValue(valueArr,0); + this.ShowZzyECFValue(valueArr,0); + } + if(this.zzyECF.param[1]) + { + var valueArr = this.EvalZzyECFCoronaEffect(this.zzyECF.param[1],1); + this.ChangeZzyECFValue(valueArr,1); + this.ShowZzyECFValue(valueArr,1); + } + if(this.zzyECF.param[2]) + { + var valueArr = this.EvalZzyECFCoronaEffect(this.zzyECF.param[2],2); + this.ChangeZzyECFValue(valueArr,2); + this.ShowZzyECFValue(valueArr,2); + } + if(this.zzyECF.paramPer[0]) + { + var valueArr = this.EvalZzyECFCoronaEffect(this.zzyECF.paramPer[0],0,true); + this.ChangeZzyECFValue(valueArr,3); + this.ShowZzyECFValue(valueArr,3); + } + if(this.zzyECF.paramPer[1]) + { + var valueArr = this.EvalZzyECFCoronaEffect(this.zzyECF.paramPer[1],1,true); + this.ChangeZzyECFValue(valueArr,4); + this.ShowZzyECFValue(valueArr,4); + } + if(this.zzyECF.paramPer[2]) + { + var valueArr = this.EvalZzyECFCoronaEffect(this.zzyECF.paramPer[2],2,true); + this.ChangeZzyECFValue(valueArr,5); + this.ShowZzyECFValue(valueArr,5); + } + + //执行公共事件,脚本 + if(!$gameTemp.isCommonEventReserved() && this.zzyECF.commonId) + {$gameTemp.reserveCommonEvent(this.zzyECF.commonId);} + + //执行脚本 + Zzy.Param.ECFEffectScript(); + +} + +Game_Event.prototype.ShowZzyECFValue = function(valueArr,colorIndex) +{ + for(var i=0;i= tArr.length)//是否越界 + { + //代表无法取出数据信息 + this._zzyECFCheckList[i] = undefined; + } + else//检测时间 + { + if(tInfo.cFrame > 0) + {tInfo.cFrame--;} + else + { + //取出内容 + var cInfo = tArr[tInfo.cIndex];//增加下标 + tInfo.cIndex++; + tInfo.cFrame = Zzy.Param.ECFListShowFrame; + this._zzyECFVWindow.CreateSprite(cInfo); + } + } + } + } + } + } + if(isNoCheck) + { + this._zzyECFCheckList = []; + } +} + + +//============================================================================================ +//Window_ZzyECFCorona +//============================================================================================ +function Window_ZzyECFCorona() +{ + this.initialize.apply(this, arguments); +} + +Window_ZzyECFCorona.prototype = Object.create(Window_Base.prototype); +Window_ZzyECFCorona.prototype.constructor = Window_ZzyECFCorona; + +Window_ZzyECFCorona.prototype.initialize = function() +{ + var width = Graphics.boxWidth; + var height = Graphics.boxHeight; + Window_Base.prototype.initialize.call(this, 0, 0, width, height); + + this.InitWindow(); + this.sprInfo = [];//图像管理信息组 + +}; + +Window_ZzyECFCorona.prototype.InitWindow = function()//初始化 +{ + this.opacity = 0; + +} + +Window_ZzyECFCorona.prototype.standardPadding = function() +{ + return 0; +}; + +Window_ZzyECFCorona.prototype.textPadding = function() +{ + return 0; +}; + + +Window_ZzyECFCorona.prototype.CreateSprite = function(ev)//创造事件光环图片 +{ + //通过EV来指定图片 + var info = {}; + //申请位图大小 + info.spr = new Sprite_ZzyECFCorona(ev); + info.evId = ev.eventId(); + //判断ID是否重复 + + var isInstall = false; + + for(var i=0;i this.maxSpeed ? this.maxSpeed : gy; + this.gOffY += gy; + ty += this.gOffY; + //位置 + this.x = tx; + this.y = ty; +} + + + + +Sprite_ZzyECFValue.prototype.updateBeing = function()//刷新存在 +{ + if(this.cFadeIn < this.fadeIn)//渐入 + { + this.cFadeIn++; + this.opacity = 255 * this.cFadeIn / this.fadeIn; + return; + } + + if(this.cbFrame < this.bFrame) + { + this.cbFrame++; + this.opacity = 255; + return; + } + + + if(this.cFadeOut < this.fadeOut) + { + this.cFadeOut++; + this.opacity = 255 * (1 - this.cFadeOut / this.fadeOut); + } + else + { + this.visible = false; + } + +} + + +//------------------------------Zzy.ECF.Function------------------------------- + + +Zzy.ECF.CoronaModeToInt = function(str) +{ + switch(str) + { + case 'circle':return 1; + case 'rect':return 2; + } + console.log('Error:来自LiuYue_EventCorona,检查光环模式填写是否正确');return 0; + return 1; +} + +Zzy.ECF.BlendModeToInt = function(str) +{ + switch(str) + { + case 'normal':return Graphics.BLEND_NORMAL; + case 'add':return Graphics.BLEND_ADD; + case 'multiply':return Graphics.BLEND_MULTIPLY; + case 'screen':return Graphics.BLEND_SCREEN; + } + console.log('Error:来自LiuYue_EventCorona,检查图像叠加模式填写是否正确');return 0; + return Graphics.BLEND_NORMAL; +} + +Zzy.ECF.ShowValue = function(value,color,pIndex,evId)//显示数值--这会让玩家队伍头顶出现数值,pIndex如果沒有写入,默认会是第一名角色 +{ + pIndex = pIndex ? pIndex : 0; + evId = evId ? evId : 0; + if(SceneManager._scene instanceof Scene_Map) + { + SceneManager._scene.PuchZzyECFValue(String(value),color,pIndex,evId);//压入数值 + } +} + + +Zzy.ECF.GetPosOfParty = function(pIndex)//基于队伍下标中获取角色的位置 +{ + var info = {}; + if(pIndex === 0) + { + info.x = $gamePlayer.screenX(); + info.y = $gamePlayer.screenY(); + } + else + { + var tIndex = pIndex-1; + //判断是否越界 + var tp = $gamePlayer.followers().follower(tIndex); + + if(!tp) + { + console.log('Error:来自LiuYue_EventCorona,填写队伍下标值异常'); + info.x = undefined; + info.y = undefined; + } + else + { + info.x = tp.screenX(); + info.y = tp.screenY(); + } + } + return info; +} + +Zzy.ECF.ReturnRandom = function(value,offVal) +{ + if(!offVal)return value; + + var tOff = (Math.random() * offVal); + if(Math.random()*2<=1) + {tOff = -tOff;} + return value + tOff; +} + + +Zzy.ECF.ReturnRandomOfPer = function(value,offPer) +{ + if(!offPer)return value; + + var tOff = value * (Math.random() * offPer*0.01); + if(Math.random()*2<=1) + {tOff = -tOff;} + return value + tOff; +} + + + + + + +Zzy.ECF.IsShowCorona = function(enable) +{ + $gameSystem.setZzyECFIsShowCorona(enable); +} + +Zzy.ECF.CoronaMode = function(str) +{ + $gameSystem.setZzyECFCoronaMode(str); +} + +Zzy.ECF.CoronaRange = function(range) +{ + $gameSystem.setZzyECFCoronaRange(range); +} + +Zzy.ECF.EffectFrame = function(frame) +{ + $gameSystem.setZzyECFEffectFrame(frame); +} + +Zzy.ECF.EffectCommand = function(commonId) +{ + $gameSystem.setZzyECFEffectCommand(commonId); +} + +Zzy.ECF.RangePic = function(picStr) +{ + $gameSystem.setZzyECFRangePic(picStr); +} + +Zzy.ECF.OffsetX = function(offsetX) +{ + $gameSystem._ZzyECFOffsetX = offsetX; +} + +Zzy.ECF.OffsetY = function(offsetY) +{ + $gameSystem._ZzyECFOffsetY = offsetY; +} + +Zzy.ECF.BlendMode = function(modeStr) +{ + var modeId = Zzy.ECF.BlendModeToInt(modeStr); + $gameSystem.setZzyECFBlendMode(modeId); +} + +Zzy.ECF.ValueBlend = function(modeStr) +{ + var modeId = Zzy.ECF.BlendModeToInt(modeStr); + $gameSystem.setZzyECFValueBlend(modeId); +} + +Zzy.ECF.InCommand = function(commonId) +{ + $gameSystem.setZzyECFInCommand(commonId); +} + +Zzy.ECF.OutCommand = function(commonId) +{ + $gameSystem.setZzyECFOutCommand(commonId); +} + +Zzy.ECF.DefaultColor = function(color) +{ + $gameSystem._ZzyECFDefaultColor = color; +} + +Zzy.ECF.PictureHue = function(hue) +{ + $gameSystem._ZzyECFPictureHue = hue; +} + +Zzy.ECF.IsShowValue = function(enable) +{ + $gameSystem._ZzyECFIsShowValue = enable; +} + +Zzy.ECF.ValueSize = function(size) +{ + $gameSystem._ZzyECFValueSize = size; +} + + diff --git a/js/plugins/LiuYue_FieldBless.js b/js/plugins/LiuYue_FieldBless.js new file mode 100644 index 0000000..1722290 --- /dev/null +++ b/js/plugins/LiuYue_FieldBless.js @@ -0,0 +1,4117 @@ +/*: + * @plugindesc v1.08 FieldBless 领域加护 + * @author 流逝的岁月 + * + * @help + * ============================================================================ + * 介绍 + * ============================================================================ * + * + * + * 这个插件赋予一个额外的卡槽,可以用于添加'加护'效果,可以在这个'加护'卡槽中,添加你想拥有的增益效果 + * + * + * + * + *------------------------------------------------------------------- + * + *使用条例:本插件完全免费,随意魔改 + * + *------------------------------------------------------------------- + * + * + * + * + * + * 注意:关于公式,可用以下的内容信息,当然如果对js不熟悉,也可以直接输入数字 + * + * actor //角色 + * a //角色,与actor相同 + * target //目标(如果有,则可以使用) + * b //目标,与target相同 + * variables[ID] //全局变量 + * v[ID] //全局变量,与variables相同 + * V[ID] //全局变量,与variables相同 + * switchs[ID] //全局开关 + * s[ID] //全局开关,与switchs相同 + * S[ID] //全局开关,与switchs相同 + * level //角色等级 + * usecount //角色所使用的加护容量(并非加护数量) + * nullcount //角色剩余加护容量 + * + * + * + * + * + * + * + * 比如想要实现HP通过人物等级*100点的效果,做出'成长形'的加护,那么可以在物品备注中这样写: + * + * + * + * + * + * + * + *以下是一些插件用到的插件指令 + *---------------------Plugin Command-------------------- + * + * + * ZzyFBF EnableMenu x(true/false) //是否激活菜单'加护'选项 + * ZzyFBF InsertMenu x(true/false) //是否隐藏菜单'加护'选项 + * ZzyFBF CommandName x //这会改变命令的文本内容 + * + * ZzyFBF EnableSMenu x(true/false) //是否激活角色技能菜单'加护'选项 + * ZzyFBF InsertSMenu x(true/false) //是否隐藏角色技能菜单'加护'选项 + * ZzyFBF SCommandName x //这会改变角色技能命令的文本内容 + * + * + * ZzyFBF OpenActor x //这将会打开数据库x号角色的守护窗口界面 + * ZzyFBF OpenParty x //这将会打开队伍中x号角色的守护窗口面板,请注意队长代表0号 + * + * + * + * ZzyFBF EnableActorFB x(true/false) //则会开启或是关闭角色拥有的领域效果,注意这不包含自定义设定 + * ZzyFBF MaxCount x //角色默认的最大加护槽数量,角色的加护槽不会超过这个值,这可以是一个公式,也可以输入Infinite代表无上限 + * ZzyFBF CurrentCount x //角色目前的加护槽数量,这个值可通过角色的属性进行调整,这可以是一个公式 + * ZzyFBF MemoryCount x //这会设置道具的默认占用格子量 + * + * ZzyFBF ForceUnInstallAll x //这会强制卸载一位角色所有的加护 + * x:输入角色的ID值 + * + * + * + * + *以下是一些插件用到的脚本函数 + *---------------------Script Function-------------------- + * + * + * Zzy.FBF.EnableMenu(enable) //是否激活菜单'加护'选项 + * Zzy.FBF.InsertMenu(enable) //是否隐藏菜单'加护'选项 + * Zzy.FBF.CommandName(commandText) //这会改变命令的文本内容 + * Zzy.FBF.EnableSMenu(enable) //是否激活角色技能菜单'加护'选项 + * Zzy.FBF.InsertSMenu(enable) //是否隐藏角色技能菜单'加护'选项 + * Zzy.FBF.SCommandName(commandText) //这会改变角色技能命令的文本内容 + * Zzy.FBF.OpenActor(actorId) //这将会打开数据库x号角色的守护窗口界面 + * Zzy.FBF.OpenParty(index) //这将会打开队伍中x号角色的守护窗口面板,请注意队长代表0号 + * Zzy.FBF.EnableActorFB(enable) //则会开启或是关闭角色拥有的领域效果,注意这不包含自定义设定 + * Zzy.FBF.MaxCount(formula) //角色默认的最大加护槽数量,角色的加护槽不会超过这个值,这可以是一个公式,也可以输入Infinite代表无上限 + * Zzy.FBF.CurrentCount(formula) //角色目前的加护槽数量,这个值可通过角色的属性进行调整,这可以是一个公式 + * Zzy.FBF.MemoryCount(count) //这会设置道具的默认占用格子量 + * Zzy.FBF.ForceUnInstallAll(actorId) //这会强制卸载一位角色所有的加护 + * + * + * + * + *以下是一些插件用到的便签信息 + *---------------------Data Case-------------------- + *可以在 数据库 物品 备注 中添加以下内容: + * //将此道具视为拥有'加护'效果,使用以下指令必须先为物品添加这条备注信息 + * --文字颜色-- //这将会修改显示加护文字的色彩,填写#000000~#ffffff 或是 rpga(0~255,0~255,0~255,0~1) + * --文字边框宽度-- //这将会修改显示文字边框的宽度,请填写整数 + * --文字边框颜色-- //这将会修改显示文字边框的颜色,填写#000000~#ffffff 或是 rpga(0~255,0~255,0~255,0~1) + * --文字字体大小-- //这将会修改显示文字的字体大小,请填写整数 + * + * + * //注意标签中公式不可以存在空格 + * + * + * ----生命---- //装备加护时增加HP,这可以是一个公式 + * //装备加护时增加HP百分比,这可以是一个公式 + * + * ----魔法---- //装备加护时增加MP,这可以是一个公式 + * //装备加护时增加MP百分比,这可以是一个公式 + * + * ----攻击---- //装备加护时增加ATK,这可以是一个公式 + * //装备加护时增加ATK百分比,这可以是一个公式 + * + * ----防御---- //装备加护时增加DEF,这可以是一个公式 + * //装备加护时增加DEF百分比,这可以是一个公式 + * + * ----魔攻---- //装备加护时增加MAT,这可以是一个公式 + * //装备加护时增加MAT百分比,这可以是一个公式 + * + * ----魔抗---- //装备加护时增加MDF,这可以是一个公式 + * //装备加护时增加MDF百分比,这可以是一个公式 + * + * ----速度---- //装备加护时增加AGI,这可以是一个公式 + * //装备加护时增加AGI百分比,这可以是一个公式 + * + * ----幸运---- //装备加护时增加LUK,这可以是一个公式 + * //装备加护时增加LUK百分比,这可以是一个公式 + * + * --命中-- //装备加护时增加HIT,这可以是一个公式 + * --命中-- //装备加护时增加HIT百分比,这可以是一个公式 + * + * --闪避-- //装备加护时增加EVA,这可以是一个公式 + * --闪避-- //装备加护时增加EVA百分比,这可以是一个公式 + * + * --暴击-- //装备加护时增加CRI,这可以是一个公式 + * --暴击-- //装备加护时增加CRI百分比,这可以是一个公式 + * + * --暴击回避-- //装备加护时增加CEV,这可以是一个公式 + * --暴击回避-- //装备加护时增加CEV百分比,这可以是一个公式 + * + * --魔法回避-- //装备加护时增加MEV,这可以是一个公式 + * --魔法回避-- //装备加护时增加MEV百分比,这可以是一个公式 + * + * --魔法反射-- //装备加护时增加MRF,这可以是一个公式 + * --魔法反射-- //装备加护时增加MRF百分比,这可以是一个公式 + * + * --反击-- //装备加护时增加CNT,这可以是一个公式 + * --反击-- //装备加护时增加CNT百分比,这可以是一个公式 + * + * --HP自动恢复-- //装备加护时增加HRG,这可以是一个公式 + * --HP自动恢复-- //装备加护时增加HRG百分比,这可以是一个公式 + * + * --MP自动恢复-- //装备加护时增加MRG,这可以是一个公式 + * --MP自动恢复-- //装备加护时增加MRG百分比,这可以是一个公式 + * + * --TP自动恢复-- //装备加护时增加TRG,这可以是一个公式 + * --TP自动恢复-- //装备加护时增加TRG百分比,这可以是一个公式 + * + * --受到攻击几率-- //装备加护时增加TGR,这可以是一个公式 + * --受到攻击几率-- //装备加护时增加TGR百分比,这可以是一个公式 + * + * --防御效果-- //装备加护时增加GRD,这可以是一个公式 + * --防御效果-- //装备加护时增加GRD百分比,这可以是一个公式 + * + * --恢复效果-- //装备加护时增加REC,这可以是一个公式 + * --恢复效果-- //装备加护时增加REC百分比,这可以是一个公式 + * + * --药理知识-- //装备加护时增加PHA,这可以是一个公式 + * --药理知识-- //装备加护时增加PHA百分比,这可以是一个公式 + * + * --MP消耗率-- //装备加护时增加MCR,这可以是一个公式 + * --MP消耗率-- //装备加护时增加MCR百分比,这可以是一个公式 + * + * --TP消耗率-- //装备加护时增加TCR,这可以是一个公式 + * --TP消耗率-- //装备加护时增加TCR百分比,这可以是一个公式 + * + * --物理伤害-- //装备加护时增加PDR,这可以是一个公式 + * --物理伤害-- //装备加护时增加PDR百分比,这可以是一个公式 + * + * --魔法伤害-- //装备加护时增加MDR,这可以是一个公式 + * --魔法伤害-- //装备加护时增加MDR百分比,这可以是一个公式 + * + * + * --地板伤害-- //装备加护时增加FDR,这可以是一个公式 + * --地板伤害-- //装备加护时增加FDR百分比,这可以是一个公式 + * + * --经验值-- //装备加护时增加战斗结算EXP,这可以是一个公式 + * --经验值-- //装备加护时增加战斗结算EXP百分比,这可以是一个公式 + * + * --金币-- //装备加护时增加战斗结算GOLD,这可以是一个公式 + * --金币-- //装备加护时增加战斗结算GOLD百分比,这可以是一个公式 + * + * --伤害减免-- //装备加护时战斗受到伤害DAR,这可以是一个公式 + * --伤害减免-- //装备加护时战斗受到伤害DAR百分比,这可以是一个公式 + * + * --元素伤害-- //拥有战斗时技能元素造成伤害额外值,x1是元素ID,x2是伤害值,这可以是一个公式 + * --元素伤害-- //增加元素的百分比,x1是元素ID,x2是伤害值,这可以是一个公式 + * + * --逃跑概率-- //装备加护时增加或者减少逃跑的概率,x填写20就代表增加20%,这可以是一个公式 + * --偷袭概率-- //装备加护时遭遇战斗增加或减少先发制人的概率,x填写20就代表增加20%,这可以是一个公式 + * --被偷袭概率-- //装备加护时遭遇战斗增加或减少被偷袭的的概率,x填写20就代表增加20%,这可以是一个公式 + * + * + * --遇敌步数-- //装备加护时遭遇敌人所需要的倍数增加或减少,x填写10就代表额外10步后才有概率遭遇敌人 + * --遇敌步数-- //装备加护时遭遇敌人所需要的倍数增加或减少,x填写10就代表额外10%步后才有概率遭遇敌人 + * + * + * //修改加护的占用量 + * //这会使安装的加护无法通过界面方式进行拆卸 + * + * //限定可以使用这个加护的职业ID,设置后则会限制在这个范围中 + * //限定可以使用这个加护的职业ID,可输入多个ID值 + * //限定可以使用这个加护的角色ID,设置后则会限制在这个范围中,此优先级高于职业设置 + * //限定可以使用这个加护的角色ID,可输入多个ID值 + * //限定不可以使用这个加护的职业ID + * //限定不可以使用这个加护的职业ID,可输入多个ID值 + * //限定不可以使用这个加护的角色ID,此优先级高于职业设置 + * //限定不可以使用这个加护的角色ID,可输入多个ID值 + * + * //限定是否可以使用这个加护的公式,返回值为true代表可以使用,返回值为false不可使用,此优先级最高 + * + * + * + * + * + *可以在 数据库 角色 备注 中添加以下内容: + * //这将控制这个角色是否拥有加护的能力,优先级高于插件参数设置 + * //这将设置角色的加护槽最多为x,x可以是一个公式,也可以输入Infinite代表无上限 + * //通过目前的角色属性,来获得当前的加护槽,这可以是一个公式 + * + * + * + * + *可以在 数据库 护甲 武器 技能 职业 角色 添加以下内容: + * //这将对相关这个角色的当前加护槽开放更多,注意x可以是一个公式 + * //这将对相关这个角色的最大加护槽开放的上限,注意x可以是一个公式 + * + * + * + * + *---------------------------------------------------------- + * + * + * 我叫坂本:v1.08 拓展脚本函数 + * 我叫坂本:v1.07 修复一个bug,导致了与YEP独立物品以及部分插件无法兼容的问题 + * 我叫坂本:v1.06 添加与旧存档兼容 + * 我叫坂本:v1.05 优化,减少不必要的指令 + * 我叫坂本:v1.04 添加呼叫界面的插件指令,添加技能界面出现加护选项 + * 我叫坂本:v1.03 修复读档时,拆卸领域异常的bug,添加额外便签设置 + * 我叫坂本:v1.02 修复无法增加经验值bug,添加额外便签设置 + * 我叫坂本:v1.01 更新了元素相关的便签信息,更新了对于公式中更多的变量 + * 我叫坂本:v1.00 完成插件功能 + * + *---------------------------------------------------------- + * + * + + * @param ---菜单--- + * @default + + * @param EnableMenu + * @text 激活菜单项 + * @parent ---菜单--- + * @type boolean + * @on YES + * @off NO + * @desc 在菜单栏中'加护'是否是激活状态 + * YES - true NO - false + * @default true + + * @param InsertMenu + * @text 添加菜单项 + * @parent ---菜单--- + * @type boolean + * @on YES + * @off NO + * @desc 在菜单栏中是否添加'加护' + * YES - true NO - false + * @default true + + * @param MenuCommandName + * @text 主菜单显示名称 + * @parent ---菜单--- + * @type text + * @desc 在主菜单上显示选项的名称,默认名称'加护' + * @default 加护 + * + * + * @param ---技能菜单--- + * @default + * + * @param EnableSMenu + * @text 激活角色技能菜单项 + * @parent ---技能菜单--- + * @type boolean + * @on YES + * @off NO + * @desc 在技能菜单栏中'加护'是否是激活状态 + * YES - true NO - false + * @default false + + * @param InsertSMenu + * @text 添加角色技能菜单项 + * @parent ---技能菜单--- + * @type boolean + * @on YES + * @off NO + * @desc 在角色技能菜单栏中是否添加'加护'选项 + * YES - true NO - false + * @default false + + * @param SMenuCommandName + * @text 角色技能菜单显示名称 + * @parent ---技能菜单--- + * @type text + * @desc 在角色技能菜单上显示选项的名称,默认名称'加护' + * @default 加护 + * + * @param ---帮助窗口--- + * @default + * + * + * @param HelpWindowX + * @text 帮助窗口x位置 + * @parent ---帮助窗口--- + * @type text + * @desc 出现帮助窗口x的位置,这可以是一段代码 + * @default 0 + * + * @param HelpWindowY + * @text 帮助窗口y位置 + * @parent ---帮助窗口--- + * @type text + * @desc 出现帮助窗口y的位置,这可以是一段代码 + * @default 0 + * + * @param HelpWindowW + * @text 帮助窗口宽度 + * @parent ---帮助窗口--- + * @type text + * @desc 出现帮助窗口宽度,这可以是一段代码 + * @default Graphics.boxWidth + * + * @param HelpWindowH + * @text 帮助窗口行数 + * @parent ---帮助窗口--- + * @type number + * @desc 出现帮助窗口行数,这决定出现帮助窗口的高度 + * @default 2 + * + * + * + * @param ---加护窗口--- + * @default + * + * + * @param FieldWindowX + * @text 加护窗口x位置 + * @parent ---加护窗口--- + * @type text + * @desc 出现加护窗口x的位置,这可以是一段代码 + * @default 0 + * + * @param FieldWindowY + * @text 加护窗口y位置 + * @parent ---加护窗口--- + * @type text + * @desc 出现加护窗口y的位置,这可以是一段代码 + * @default this._helpWindow.height + * + * @param FieldWindowW + * @text 加护窗口宽度 + * @parent ---加护窗口--- + * @type text + * @desc 出现加护窗口宽度,这可以是一段代码 + * @default Graphics.boxWidth / 3 + * + * @param FieldWindowH + * @text 加护窗口高度 + * @parent ---加护窗口--- + * @type text + * @desc 出现加护窗口行数,这决定出现加护窗口的高度 + * @default Graphics.boxHeight - this._helpWindow.height + * + * + * @param UnlockText + * @text 未解锁文字 + * @parent ---加护窗口--- + * @type text + * @desc 未解锁是出现的文字内容 + * @default ---未解锁--- + * + * + * @param MemoryText + * @text 占用文字 + * @parent ---加护窗口--- + * @type text + * @desc 未解锁是出现的文字内容 + * @default ---占用--- + * + * + * + * @param UnlockTextColor + * @text 未解锁文字颜色 + * @parent ---加护窗口--- + * @type text + * @desc 未解锁是出现的文字颜色 + * @default #cc2222 + * + * + * @param MemoryTextColor + * @text 占用文字颜色 + * @parent ---加护窗口--- + * @type text + * @desc 加护占用超过1格时,显示的占用文字的颜色 + * @default #888888 + * + * + * + * @param NoUnInstallColor + * @text 不可拆卸顔色 + * @parent ---加护窗口--- + * @type text + * @desc 不可拆卸的领域的文字颜色 + * @default #999999 + * + * @param UnlockHelpText + * @text 未解锁帮助文字 + * @parent ---加护窗口--- + * @type text + * @desc 选中未解锁文字时出现的帮助文本 + * @default 封印中暂未解锁 + * + * @param LockHelpText + * @text 解锁帮助文字 + * @parent ---加护窗口--- + * @type text + * @desc 选中解锁文字时出现的帮助文本 + * @default 可添加加护 + * + * @param FieldRectColor + * @text 底矩形框颜色 + * @parent ---加护窗口--- + * @type text + * @desc 底色框的颜色可以用rgba(x,x,x,x)或是#xxxxxx的方式来设置颜色 + * @default rgba(30,30,90,0.4) + * + * + * + * + * + * + * + * @param ---加护道具窗口--- + * @default + * + * + * @param FieldItemWindowX + * @text 加护道具窗口x位置 + * @parent ---加护道具窗口--- + * @type text + * @desc 出现加护道具窗口x的位置,这可以是一段代码 + * @default Graphics.boxWidth / 3 + * + * @param FieldItemWindowY + * @text 加护道具窗口y位置 + * @parent ---加护道具窗口--- + * @type text + * @desc 出现加护道具窗口y的位置,这可以是一段代码 + * @default this._helpWindow.height + * + * @param FieldItemWindowW + * @text 加护道具窗口宽度 + * @parent ---加护道具窗口--- + * @type text + * @desc 出现加护道具窗口宽度,这可以是一段代码 + * @default Graphics.boxWidth * 2 / 3 + * + * @param FieldItemWindowH + * @text 加护道具窗口高度 + * @parent ---加护道具窗口--- + * @type text + * @desc 出现加护道具窗口行数,这决定出现加护道具窗口的高度 + * @default Graphics.boxHeight - this._helpWindow.height + * + * + * + * + * @param ---数据信息--- + * @default + * + * + * @param EnableActorFB + * @text 角色是否具备加护 + * @parent ---数据信息--- + * @type boolean + * @on YES + * @off NO + * @desc 设置角色是否默认具有加护能力 + * YES - true NO - false + * @default true + * + * + * @param MaxFieldCount + * @text 最大加护槽数量 + * @parent ---数据信息--- + * @type text + * @desc 默认拥有的最大槽数量,请输入公式或是Infinite(无限),默认值为Infinite + * @default Infinite + * + * @param CurrentFieldCount + * @text 目前加护槽数量 + * @parent ---数据信息--- + * @type text + * @desc 角色通过自身属性,获取的目前加护槽的数量,这可以是一个公式 + * @default Math.max(1,Math.min(Math.round(level/2),30)); + * + * @param MemoryCount + * @text 占用量 + * @parent ---数据信息--- + * @type number + * @desc 这是加护道具占用的卡槽数量,输入整数,默认值为1 + * @default 1 + * + * + * + * + * + * + * @param ---音效--- + * @default + * + * + * @param NoFieldSound + * @text 不存在加护音效 + * @parent ---音效--- + * @dir audio/se + * @type file + * @desc 不存在加护产生的声音,请填写audio/se文件夹中的文件名,不包含m4a.ogg的后缀名 + * @default Cancel2 + * + * @param NoFieldVolume + * @text 不存在加护音量 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 不存在加护产生的音量,默认值100 + * @default 100 + * + * @param NoFieldPitch + * @text 不存在加护音调 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 不存在加护产生的音调,默认值100 + * @default 100 + * + * @param NoFieldPan + * @text 不存在加护声道 + * @parent ---音效--- + * @type number + * @desc 不存在加护产生的声道,默认值0 + * @default 0 + * + * + * @param UnableSound + * @text 无法卸载加护音效 + * @parent ---音效--- + * @dir audio/se + * @type file + * @desc 无法卸载加护产生的声音,请填写audio/se文件夹中的文件名,不包含m4a.ogg的后缀名 + * @default Knock + * + * @param UnableVolume + * @text 无法卸载加护音量 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 无法卸载加护产生的音量,默认值100 + * @default 100 + * + * @param UnablePitch + * @text 无法卸载加护音调 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 无法卸载加护产生的音调,默认值100 + * @default 100 + * + * @param UnablePan + * @text 无法卸载加护声道 + * @parent ---音效--- + * @type number + * @desc 无法卸载加护产生的声道,默认值0 + * @default 0 + * + * + * + * @param NoInstallSound + * @text 无法安装加护音效 + * @parent ---音效--- + * @dir audio/se + * @type file + * @desc 无法安装加护产生的声音,请填写audio/se文件夹中的文件名,不包含m4a.ogg的后缀名 + * @default Buzzer1 + * + * @param NoInstallVolume + * @text 无法安装加护音量 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 无法安装加护产生的音量,默认值100 + * @default 100 + * + * @param NoInstallPitch + * @text 无法安装加护音调 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 无法安装加护产生的音调,默认值100 + * @default 100 + * + * @param NoInstallPan + * @text 无法安装加护声道 + * @parent ---音效--- + * @type number + * @desc 无法安装加护产生的声道,默认值0 + * @default 0 + * + * + * @param InSuccessSound + * @text 安装成功加护音效 + * @parent ---音效--- + * @dir audio/se + * @type file + * @desc 安装成功加护产生的声音,请填写audio/se文件夹中的文件名,不包含m4a.ogg的后缀名 + * @default Equip1 + * + * @param InSuccessVolume + * @text 安装成功加护音量 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 安装成功加护产生的音量,默认值100 + * @default 100 + * + * @param InSuccessPitch + * @text 安装成功加护音调 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 安装成功加护产生的音调,默认值100 + * @default 100 + * + * @param InSuccessPan + * @text 安装成功加护声道 + * @parent ---音效--- + * @type number + * @desc 安装成功加护产生的声道,默认值0 + * @default 0 + * + * + * @param UnSuccessSound + * @text 卸载成功加护音效 + * @parent ---音效--- + * @dir audio/se + * @type file + * @desc 卸载成功加护产生的声音,请填写audio/se文件夹中的文件名,不包含m4a.ogg的后缀名 + * @default Equip2 + * + * @param UnSuccessVolume + * @text 卸载成功加护音量 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 卸载成功加护产生的音量,默认值100 + * @default 100 + * + * @param UnSuccessPitch + * @text 卸载成功加护音调 + * @parent ---音效--- + * @type number + * @min 0 + * @desc 卸载成功加护产生的音调,默认值100 + * @default 100 + * + * @param UnSuccessPan + * @text 卸载成功加护声道 + * @parent ---音效--- + * @type number + * @desc 卸载成功加护产生的声道,默认值0 + * @default 0 + * + */ + + + +var LiuYue = LiuYue || {}; +LiuYue.LiuYue_FieldBless = true;//插件启动 + +var Zzy = Zzy || {}; +Zzy.FBF = Zzy.FBF || {}; +Zzy.FBF.version = 1.08; +Zzy.Parameters = PluginManager.parameters('LiuYue_FieldBless'); +Zzy.Param = Zzy.Param || {}; + + +Zzy.Param.FBFEnableMenu = eval(String(Zzy.Parameters['EnableMenu'])); +Zzy.Param.FBFInsertMenu = eval(String(Zzy.Parameters['InsertMenu'])); +Zzy.Param.FBFMenuCommandName = String(Zzy.Parameters['MenuCommandName']); + +Zzy.Param.FBFEnableSMenu = eval(String(Zzy.Parameters['EnableSMenu'])); +Zzy.Param.FBFInsertSMenu = eval(String(Zzy.Parameters['InsertSMenu'])); +Zzy.Param.FBFSMenuCommandName = String(Zzy.Parameters['SMenuCommandName']); + + + +Zzy.Param.FBFHelpWindowX = String(Zzy.Parameters['HelpWindowX']);//帮助窗口x位置 +Zzy.Param.FBFHelpWindowY = String(Zzy.Parameters['HelpWindowY']);//帮助窗口y位置 +Zzy.Param.FBFHelpWindowW = String(Zzy.Parameters['HelpWindowW']);//帮助窗口宽度 +Zzy.Param.FBFHelpWindowH = parseInt(Zzy.Parameters['HelpWindowH']);//帮助窗口行数 + +Zzy.Param.FBFFieldWindowX = String(Zzy.Parameters['FieldWindowX']);//加护窗口x位置 +Zzy.Param.FBFFieldWindowY = String(Zzy.Parameters['FieldWindowY']);//加护窗口y位置 +Zzy.Param.FBFFieldWindowW = String(Zzy.Parameters['FieldWindowW']);//加护窗口宽度 +Zzy.Param.FBFFieldWindowH = String(Zzy.Parameters['FieldWindowH']);//加护窗口高度 + +Zzy.Param.FBFFieldItemWindowX = String(Zzy.Parameters['FieldItemWindowX']);//加护道具窗口x位置 +Zzy.Param.FBFFieldItemWindowY = String(Zzy.Parameters['FieldItemWindowY']);//加护道具窗口y位置 +Zzy.Param.FBFFieldItemWindowW = String(Zzy.Parameters['FieldItemWindowW']);//加护道具窗口宽度 +Zzy.Param.FBFFieldItemWindowH = String(Zzy.Parameters['FieldItemWindowH']);//加护道具窗口高度 + +Zzy.Param.FBFUnlockText = String(Zzy.Parameters['UnlockText']);//未解锁文字 +Zzy.Param.FBFUnlockTextColor = String(Zzy.Parameters['UnlockTextColor']);//未解锁文字颜色 +Zzy.Param.FBFMemoryText = String(Zzy.Parameters['MemoryText']);//占用文字 +Zzy.Param.FBFMemoryTextColor = String(Zzy.Parameters['MemoryTextColor']);//占用文字颜色 +Zzy.Param.FBFNoUnInstallColor = String(Zzy.Parameters['NoUnInstallColor']);//不可拆卸的领域的文字颜色 + + +Zzy.Param.FBFUnlockHelpText = String(Zzy.Parameters['UnlockHelpText']);//未解锁帮助文字 +Zzy.Param.FBFLockHelpText = String(Zzy.Parameters['LockHelpText']);//解锁帮助文字 +Zzy.Param.FBFFieldRectColor = String(Zzy.Parameters['FieldRectColor']);//底矩形框颜色 + + +Zzy.Param.FBFEnableActorFB = eval(String((Zzy.Parameters['EnableActorFB'])));//角色是否具备加护 +Zzy.Param.FBFMaxFieldCount = String(Zzy.Parameters['MaxFieldCount']);//最大加护槽数量 +Zzy.Param.FBFCurrentFieldCount = String(Zzy.Parameters['CurrentFieldCount']);//目前加护槽数量 + +Zzy.Param.FBFMemoryCount = parseInt(Zzy.Parameters['MemoryCount']);//帮助窗口行数 + + +//----------------------------------------------------声音---------------------------------------------------------- + +Zzy.FBF.MakeSE = function(seName,seVolume,sePitch,sePan) +{ + if(!seName)return undefined; + var se = { + name:seName, + volume:(seVolume ? seVolume : 100), + pitch:(sePitch ? sePitch : 100), + pan:(sePan ? sePan : 0) + }; + return se; +} + + +//SE +Zzy.Param.FBFNoFieldSound = String(Zzy.Parameters['NoFieldSound']);//FBF音效 +Zzy.Param.FBFNoFieldVolume = parseInt(Zzy.Parameters['NoFieldVolume']);//FBF音量 +Zzy.Param.FBFNoFieldPitch = parseInt(Zzy.Parameters['NoFieldPitch']);//FBF音调 +Zzy.Param.FBFNoFieldPan = parseInt(Zzy.Parameters['NoFieldPan']);//FBF声道 +Zzy.Param.FBFNoFieldSE = Zzy.FBF.MakeSE(Zzy.Param.FBFNoFieldSound,Zzy.Param.FBFNoFieldVolume,Zzy.Param.FBFNoFieldPitch,Zzy.Param.FBFNoFieldPan); + +Zzy.Param.FBFUnableSound = String(Zzy.Parameters['UnableSound']);//FBF音效 +Zzy.Param.FBFUnableVolume = parseInt(Zzy.Parameters['UnableVolume']);//FBF音量 +Zzy.Param.FBFUnablePitch = parseInt(Zzy.Parameters['UnablePitch']);//FBF音调 +Zzy.Param.FBFUnablePan = parseInt(Zzy.Parameters['UnablePan']);//FBF声道 +Zzy.Param.FBFUnableSE = Zzy.FBF.MakeSE(Zzy.Param.FBFUnableSound,Zzy.Param.FBFUnableVolume,Zzy.Param.FBFUnablePitch,Zzy.Param.FBFUnablePan); + +Zzy.Param.FBFNoInstallSound = String(Zzy.Parameters['NoInstallSound']);//FBF音效 +Zzy.Param.FBFNoInstallVolume = parseInt(Zzy.Parameters['NoInstallVolume']);//FBF音量 +Zzy.Param.FBFNoInstallPitch = parseInt(Zzy.Parameters['NoInstallPitch']);//FBF音调 +Zzy.Param.FBFNoInstallPan = parseInt(Zzy.Parameters['NoInstallPan']);//FBF声道 +Zzy.Param.FBFNoInstallSE = Zzy.FBF.MakeSE(Zzy.Param.FBFNoInstallSound,Zzy.Param.FBFNoInstallVolume,Zzy.Param.FBFNoInstallPitch,Zzy.Param.FBFNoInstallPan); + +Zzy.Param.FBFInSuccessSound = String(Zzy.Parameters['InSuccessSound']);//FBF音效 +Zzy.Param.FBFInSuccessVolume = parseInt(Zzy.Parameters['InSuccessVolume']);//FBF音量 +Zzy.Param.FBFInSuccessPitch = parseInt(Zzy.Parameters['InSuccessPitch']);//FBF音调 +Zzy.Param.FBFInSuccessPan = parseInt(Zzy.Parameters['InSuccessPan']);//FBF声道 +Zzy.Param.FBFInSuccessSE = Zzy.FBF.MakeSE(Zzy.Param.FBFInSuccessSound,Zzy.Param.FBFInSuccessVolume,Zzy.Param.FBFInSuccessPitch,Zzy.Param.FBFInSuccessPan); + +Zzy.Param.FBFUnSuccessSound = String(Zzy.Parameters['UnSuccessSound']);//FBF音效 +Zzy.Param.FBFUnSuccessVolume = parseInt(Zzy.Parameters['UnSuccessVolume']);//FBF音量 +Zzy.Param.FBFUnSuccessPitch = parseInt(Zzy.Parameters['UnSuccessPitch']);//FBF音调 +Zzy.Param.FBFUnSuccessPan = parseInt(Zzy.Parameters['UnSuccessPan']);//FBF声道 +Zzy.Param.FBFUnSuccessSE = Zzy.FBF.MakeSE(Zzy.Param.FBFUnSuccessSound,Zzy.Param.FBFUnSuccessVolume,Zzy.Param.FBFUnSuccessPitch,Zzy.Param.FBFUnSuccessPan); + + + + +Zzy.Param.FBFAllSE = []; +Zzy.Param.FBFAllSE = [undefined, +Zzy.Param.FBFNoFieldSE,Zzy.Param.FBFUnableSE,Zzy.Param.FBFNoInstallSE, +Zzy.Param.FBFInSuccessSE,Zzy.Param.FBFUnSuccessSE +]; + + + + +//============================================================================= +//Game_System_initialize +//============================================================================= + +Zzy.FBF.Game_System_initialize = Game_System.prototype.initialize; +Game_System.prototype.initialize = function() +{ + Zzy.FBF.Game_System_initialize.call(this); + this.ZzyFBFInitData();//初始化数据 + this.ZzyFBFSetData();//设置数据 +}; + +Game_System.prototype.ZzyFBFInitData = function() +{ + this._ZzyFBFEnableMenu = Zzy.Param.FBFEnableMenu; + this._ZzyFBFInsertMenu = Zzy.Param.FBFInsertMenu; + this._ZzyFBFMenuCommandName = Zzy.Param.FBFMenuCommandName; + + this._ZzyFBFEnableSMenu = Zzy.Param.FBFEnableSMenu; + this._ZzyFBFInsertSMenu = Zzy.Param.FBFInsertSMenu; + this._ZzyFBFSMenuCommandName = Zzy.Param.FBFSMenuCommandName; + + this._ZzyFBFEnableActorFB = Zzy.Param.FBFEnableActorFB; //角色是否具备加护 + this._ZzyFBFMaxFieldCount = Zzy.Param.FBFMaxFieldCount;//最大加护槽数量 + this._ZzyFBFCurrentFieldCount = Zzy.Param.FBFCurrentFieldCount;//目前加护槽数量 + this._ZzyFBFMemoryCount = Zzy.Param.FBFMemoryCount;//占用量 + + this._ZzyFBFFieldItemIdArr = [];//存在的加护 + this._ZzyFBFActorsUseArr = [];//使用中的加护 + this._ZzyFBFSelectActorIndex = 0;//选择角色的下标 + this._ZzyFBFActorsMaxCountArr = [];//角色未使用容量计数 + +} + +Game_System.prototype.GetZzyFBFEnableMenu = function() +{ + if(this._ZzyFBFEnableMenu === undefined) + {this._ZzyFBFEnableMenu = Zzy.Param.FBFEnableMenu;} + return this._ZzyFBFEnableMenu; +} + +Game_System.prototype.SetZzyFBFEnableMenu = function(value) +{ + this._ZzyFBFEnableMenu = value; +} + +Game_System.prototype.GetZzyFBFInsertMenu = function() +{ + if(this._ZzyFBFInsertMenu === undefined) + {this._ZzyFBFInsertMenu = Zzy.Param.FBFInsertMenu;} + return this._ZzyFBFInsertMenu; +} + +Game_System.prototype.SetZzyFBFInsertMenu = function(value) +{ + this._ZzyFBFInsertMenu = value; +} + +Game_System.prototype.GetZzyFBFMenuCommandName = function() +{ + if(this._ZzyFBFMenuCommandName === undefined) + {this._ZzyFBFMenuCommandName = Zzy.Param.FBFMenuCommandName;} + return this._ZzyFBFMenuCommandName; +} + +Game_System.prototype.SetZzyFBFMenuCommandName = function(value) +{ + this._ZzyFBFMenuCommandName = value; +} + + +Game_System.prototype.GetZzyFBFEnableSMenu = function() +{ + if(this._ZzyFBFEnableSMenu === undefined) + {this._ZzyFBFEnableSMenu = Zzy.Param.FBFEnableSMenu;} + return this._ZzyFBFEnableSMenu; +} + +Game_System.prototype.SetZzyFBFEnableSMenu = function(value) +{ + this._ZzyFBFEnableSMenu = value; +} + +Game_System.prototype.GetZzyFBFInsertSMenu = function() +{ + if(this._ZzyFBFInsertSMenu === undefined) + {this._ZzyFBFInsertSMenu = Zzy.Param.FBFInsertSMenu;} + return this._ZzyFBFInsertSMenu; +} + +Game_System.prototype.SetZzyFBFInsertSMenu = function(value) +{ + this._ZzyFBFInsertSMenu = value; +} + +Game_System.prototype.GetZzyFBFSMenuCommandName = function() +{ + if(this._ZzyFBFSMenuCommandName === undefined) + {this._ZzyFBFSMenuCommandName = Zzy.Param.FBFSMenuCommandName;} + return this._ZzyFBFSMenuCommandName; +} + +Game_System.prototype.SetZzyFBFSMenuCommandName = function(value) +{ + this._ZzyFBFSMenuCommandName = value; +} + +Game_System.prototype.GetZzyFBFEnableActorFB = function() +{ + if(this._ZzyFBFEnableActorFB === undefined) + {this._ZzyFBFEnableActorFB = Zzy.Param.FBFEnableActorFB;} + return this._ZzyFBFEnableActorFB; +} + +Game_System.prototype.SetZzyFBFEnableActorFB = function(value) +{ + this._ZzyFBFEnableActorFB = value; +} + +Game_System.prototype.GetZzyFBFMaxFieldCount = function() +{ + if(this._ZzyFBFMaxFieldCount === undefined) + {this._ZzyFBFMaxFieldCount = Zzy.Param.FBFMaxFieldCount;} + return this._ZzyFBFMaxFieldCount; +} + +Game_System.prototype.SetZzyFBFMaxFieldCount = function(value) +{ + this._ZzyFBFMaxFieldCount = value; +} + +Game_System.prototype.GetZzyFBFCurrentFieldCount = function() +{ + if(this._ZzyFBFCurrentFieldCount === undefined) + {this._ZzyFBFCurrentFieldCount = Zzy.Param.FBFCurrentFieldCount;} + return this._ZzyFBFCurrentFieldCount; +} + +Game_System.prototype.SetZzyFBFCurrentFieldCount = function(value) +{ + this._ZzyFBFCurrentFieldCount = value; +} + + +Game_System.prototype.GetZzyFBFMemoryCount = function() +{ + if(this._ZzyFBFMemoryCount === undefined) + {this._ZzyFBFMemoryCount = Zzy.Param.FBFMemoryCount;} + return this._ZzyFBFMemoryCount; +} + +Game_System.prototype.SetZzyFBFMemoryCount = function(value) +{ + this._ZzyFBFMemoryCount = value; +} + +Game_System.prototype.GetZzyFBFFieldItemIdArr = function() +{ + if(this._ZzyFBFFieldItemIdArr === undefined) + { + this._ZzyFBFFieldItemIdArr = []; + this.ZzyFBFSetData();//设置初始化的数据信息 + } + return this._ZzyFBFFieldItemIdArr; +} + +Game_System.prototype.GetZzyFBFActorsUseArr = function() +{ + if(this._ZzyFBFActorsUseArr === undefined) + {this._ZzyFBFActorsUseArr = [];} + return this._ZzyFBFActorsUseArr; +} + + +Game_System.prototype.GetZzyFBFSelectActorIndex = function() +{ + if(this._ZzyFBFSelectActorIndex === undefined) + {this._ZzyFBFSelectActorIndex = 0;} + return this._ZzyFBFSelectActorIndex; +} + + +Game_System.prototype.SetZzyFBFSelectActorIndex = function(value) +{ + this._ZzyFBFSelectActorIndex = value; +} + + +Game_System.prototype.GetZzyFBFActorsMaxCountArr = function() +{ + if(this._ZzyFBFActorsMaxCountArr === undefined) + {this._ZzyFBFActorsMaxCountArr = [];} + return this._ZzyFBFActorsMaxCountArr; +} + + +Game_System.prototype.SetZzyFBFActorsMaxCountArr = function(actorId,count) +{ + this.GetZzyFBFActorsMaxCountArr()[actorId] = count; +} + +Game_System.prototype.getZzyFBFActorsMaxCountArr = function(actorId) +{ + var arr = this.GetZzyFBFActorsMaxCountArr(); + return arr[actorId]; +} + + + +Game_System.prototype.GetZzyFBFActorUseArr = function(actorId)//角色的加护 +{ + if(!this.GetZzyFBFActorsUseArr()[actorId]) + {this._ZzyFBFActorsUseArr[actorId] = [];} + return this._ZzyFBFActorsUseArr[actorId]; +} + +Game_System.prototype.GetZzyFBFActorFieldUseArr = function(actorId)//返回包括卡牌在内的存在值 +{ + var arr = this.GetZzyFBFActorUseArr(actorId); + var reArr = []; + for(var i=0;i tMax)//超过位数 + { + //在位数位置向前遍历并t掉内容 + var len2 = tMax-1; + + for(var i=len2;i>=0;i--) + { + if(fArr[i])//并非undefined null false + { + var item = $dataItems[fArr[i]]; + var count = this.GetZzyFBFFieldBlessMemory(item);//获取占用量 + if(count > tMax - i)//超过了占用量 + { + surplusArr.push(this.UninstallZzyFBFField(fArr,i))//卸载 + } + } + } + } + + for(var i=tMax;i<=len-1;i++) + { + if(fArr[i]) + { + surplusArr.push(this.UninstallZzyFBFField(fArr,i))//卸载 + } + } + return surplusArr; +} + +Game_System.prototype.UninstallZzyFBFField = function(arr,index)//卸载指定下标 +{ + if(arr[index] === undefined || arr[index] === null || arr[index] === false || arr[index] === 0){return;} + + var item = $dataItems[arr[index]]; + var count = this.GetZzyFBFFieldBlessMemory(item); + + for(var i=0;i maxCount ? maxCount : count;} + return count; + } + } + + count = this.EvalZzyFBFFormula1(this.GetZzyFBFCurrentFieldCount(),actor); + count = Zzy.FBF.KeepNumber(count); + if(maxCount !== -1) + {count = count > maxCount ? maxCount : count;} + return count; +} + + + +Game_System.prototype.EvalZzyFBFFormula1 = function(formula,infor,infor2)//转换 +{ + var actor = infor;//角色 + var a = actor; + var target = infor2 ? infor2 : undefined;//目标 + var b = target; + var variables = $gameVariables._data;//全局变量 + var switchs = $gameSwitches._data;//全局开关 + + var v = variables; + var V = variables; + var s = switchs; + var S = switchs; + + var level = actor ? actor.level : undefined;//等级 + var usecount = actor ? this.ZzyFBFUseFieldCount(actor.actorId()) : undefined; + var nullcount = actor ? this.ZzyFBFNullFieldCount(actor.actorId()) : undefined; + return eval(formula); +} + +Game_System.prototype.GetZzyFBFFieldBlessMemory = function(item)//返回对应的占用量 +{ + if(item && item.zzyFBF) + { + if(item.zzyFBF.memory !== undefined) + { + return item.zzyFBF.memory; + } + } + return this.GetZzyFBFMemoryCount(); +} + +Game_System.prototype.GetZzyFBFFieldBlessNoInstall = function(item) +{ + if(item && item.zzyFBF) + { + if(item.zzyFBF.noInstall) + {return true;} + } + return false; +} + + +Game_System.prototype.EnableZzyFBFFieldOfActor = function(actorId,item)//判断是否对这个角色有效 +{ + if(item && item.zzyFBF) + { + var actor = $gameActors.actor(actorId); + var classId = actor._classId + if(item.zzyFBF.canUseEval) + { + return this.EvalZzyFBFFormula1(item.zzyFBF.canUseEval,actor); + } + + //判断角色包含名单 + if(item.zzyFBF.canUseA) + { + if(item.zzyFBF.canUseA.contains(actorId)){return true;} + else{return false;} + } + + if(item.zzyFBF.noCanUseA) + { + if(item.zzyFBF.noCanUseA.contains(actorId)){return false;} + else{return true;} + } + + //判断职业包含名单 + if(item.zzyFBF.canUseC) + { + if(item.zzyFBF.canUseC.contains(classId)){return true;} + else{return false;} + } + + if(item.zzyFBF.noCanUseC) + { + if(item.zzyFBF.noCanUseC.contains(classId)){return false;} + else{return true;} + } + + return true; + } + return false; +} + + +Game_System.prototype.InstallZzyFBFField = function(actorId,index,item)//安装加护 +{ + var actArr = this.GetZzyFBFActorUseArr(actorId); + var memory = this.GetZzyFBFFieldBlessMemory(item); + + actArr[index] = item.id; + if(memory > 1) + { + for(var i=1;i 1) + { + for(var i=1;i 0 ? count : 0; + return count; +} + +//============================================================================= +//Game_Interpreter +//============================================================================= +Zzy.FBF.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; +Game_Interpreter.prototype.pluginCommand = function(command, args)//插件命令 +{ + Zzy.FBF.Game_Interpreter_pluginCommand.call(this,command,args); + + if(command === 'ZzyFBF') + { + this.ZzyFBFCommand(args); + } +} + +Game_Interpreter.prototype.ZzyFBFCommand = function(args)//命令大全 +{ + var command = String(args[0]); + + switch(command) + { + + case 'EnableMenu': + var enable = eval(String(args[1])); + Zzy.FBF.EnableMenu(enable); + + //$gameSystem.SetZzyFBFEnableMenu(enable); + break; + + case 'InsertMenu': + var enable = eval(String(args[1])); + Zzy.FBF.InsertMenu(enable); + + //$gameSystem.SetZzyFBFInsertMenu(enable); + break; + + case 'CommandName': + var commandText = String(args[1]); + Zzy.FBF.CommandName(commandText); + + //$gameSystem.SetZzyFBFMenuCommandName(commandText); + break; + + case 'EnableSMenu': + var enable = eval(String(args[1])); + Zzy.FBF.EnableSMenu(enable); + + //$gameSystem.SetZzyFBFEnableSMenu(enable); + break; + + case 'InsertSMenu': + var enable = eval(String(args[1])); + Zzy.FBF.InsertSMenu(enable); + + //$gameSystem.SetZzyFBFInsertSMenu(enable); + break; + + case 'SCommandName': + var commandText = String(args[1]); + Zzy.FBF.SCommandName(commandText); + + //$gameSystem.SetZzyFBFSMenuCommandName(commandText); + break; + + case 'OpenActor': + var actorId = parseInt(args[1]); + Zzy.FBF.OpenActor(actorId); + + //Zzy.FBF.OpenFieldOfActor(actorId); + break; + + case 'OpenParty': + var index = parseInt(args[1]); + Zzy.FBF.OpenParty(index); + + //Zzy.FBF.OpenFieldOfParty(index); + break; + + case 'EnableActorFB': + var enable = eval(String(args[1])); + Zzy.FBF.EnableActorFB(enable); + + //$gameSystem.SetZzyFBFEnableActorFB(enable); + break; + + case 'MaxCount': + var formula = String(args[1]); + Zzy.FBF.MaxCount(formula); + + //$gameSystem.SetZzyFBFMaxFieldCount(formula); + break; + + case 'CurrentCount': + var formula = String(args[1]); + Zzy.FBF.CurrentCount(formula); + + //$gameSystem.SetZzyFBFCurrentFieldCount(formula); + break; + + case 'MemoryCount': + var count = parseInt(args[1]); + Zzy.FBF.MemoryCount(count); + + //$gameSystem.SetZzyFBFMemoryCount(count); + break; + + case 'ForceUnInstallAll': + var actorId = parseInt(args[1]); + Zzy.FBF.ForceUnInstallAll(actorId); + + //$gameSystem.ZzyFBFForceUnInstallAll(actorId); + break; + + } +} + + + + + +//================================================================= +//Window_MenuCommand +//================================================================= +Zzy.FBF.Window_MenuCommand_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands; +Window_MenuCommand.prototype.addOriginalCommands = function() +{ + Zzy.FBF.Window_MenuCommand_addOriginalCommands.call(this); + var isEnable = $gameSystem.GetZzyFBFEnableMenu(); + var isInsert = $gameSystem.GetZzyFBFInsertMenu(); + if(isInsert) + { + this.addCommand($gameSystem.GetZzyFBFMenuCommandName(), 'ZzyFBFBless', isEnable); + } +}; + + +//================================================================= +//Window_SkillType +//================================================================= +Zzy.FBF.Window_SkillType_makeCommandList = Window_SkillType.prototype.makeCommandList; +Window_SkillType.prototype.makeCommandList = function() +{ + Zzy.FBF.Window_SkillType_makeCommandList.call(this); + if(this._actor) + { + if(!!$gameSystem.GetZzyFBFInsertSMenu()) + { + var isEnable = $gameSystem.GetZzyFBFEnableSMenu(); + this.addCommand($gameSystem.GetZzyFBFSMenuCommandName(), 'ZzyFBFBless',isEnable); + } + + } +}; + + +//================================================================= +//Scene_Skill +//================================================================= +Zzy.FBF.Scene_Skill_createSkillTypeWindow = Scene_Skill.prototype.createSkillTypeWindow; +Scene_Skill.prototype.createSkillTypeWindow = function() +{ + Zzy.FBF.Scene_Skill_createSkillTypeWindow.call(this); + this._skillTypeWindow.setHandler('ZzyFBFBless', this.ZzyFBFCallField.bind(this)); + +}; + +Scene_Skill.prototype.ZzyFBFCallField = function() +{ + if(this.JudgZzyFBFHaveFieldBless())//判断角色是否具备领域 + { + this.setZzyFBFSelectActorId();//选择中ID + SceneManager.push(Scene_ZzyFBF);return;//压入场景 + } + else + { + this.ReturnZzyFBFSkillWindow();//返回技能场景 + } +} + +Scene_Skill.prototype.JudgZzyFBFHaveFieldBless = function() +{ + return $gameSystem.IsZzyFBFActorHaveFieldBless(this._actor.actorId()); +} + +Scene_Skill.prototype.ReturnZzyFBFSkillWindow = function() +{ + this._skillTypeWindow.activate(); +} +Scene_Skill.prototype.setZzyFBFSelectActorId = function() +{ + $gameSystem.SetZzyFBFSelectActorIndex(this._actor.actorId()); +} + + +//================================================================= +//Scene_Menu +//================================================================= +Zzy.FBF.Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow; +Scene_Menu.prototype.createCommandWindow = function() +{ + Zzy.FBF.Scene_Menu_createCommandWindow.call(this); + this._commandWindow.setHandler('ZzyFBFBless', this.commandPersonal.bind(this)); + +}; + + +Zzy.FBF.Scene_Menu_onPersonalOk = Scene_Menu.prototype.onPersonalOk; +Scene_Menu.prototype.onPersonalOk = function() +{ + if(this._commandWindow.currentSymbol() === 'ZzyFBFBless') + { + if(this.JudgZzyFBFHaveFieldBless()) + { + this.setZzyFBFSelectIndex(); + SceneManager.push(Scene_ZzyFBF);return;//压入场景 + } + else + { + this.ReturnZzyFBFStatusWindow(); + } + } + Zzy.FBF.Scene_Menu_onPersonalOk.call(this); +}; + + +Scene_Menu.prototype.setZzyFBFSelectIndex = function() +{ + var index = this._statusWindow.index(); + $gameSystem.SetZzyFBFSelectActorIndex($gameParty._actors[index]); +} + +Scene_Menu.prototype.JudgZzyFBFHaveFieldBless = function() +{ + var index = this._statusWindow.index(); + var actorId = $gameParty._actors[index]; + return $gameSystem.IsZzyFBFActorHaveFieldBless(actorId); +} + + +Scene_Menu.prototype.ReturnZzyFBFStatusWindow = function() +{ + this._statusWindow.activate(); +} + + + + + +//================================================================= +//Window_MenuStatus +//================================================================= +Zzy.FBF.Window_MenuStatus_processOk = Window_MenuStatus.prototype.processOk; +Window_MenuStatus.prototype.processOk = function() +{ + if (this.isCurrentItemEnabled()) + { + if(SceneManager._scene instanceof Scene_Menu) + { + var pointer = SceneManager._scene._commandWindow; + var index = SceneManager._scene._commandWindow._index; + if(pointer.commandName(index) === $gameSystem.GetZzyFBFMenuCommandName())//处于加护内容 + { + if(!this.JudgZzyFBFHaveFieldBless())//判断角色是否拥有加护能力 + { + Zzy.FBF.PlaySE(1); + return; + } + } + } + } + Zzy.FBF.Window_MenuStatus_processOk.call(this); +}; + + +Window_MenuStatus.prototype.JudgZzyFBFHaveFieldBless = function() +{ + var index = this.index(); + var actorId = $gameParty._actors[index]; + return $gameSystem.IsZzyFBFActorHaveFieldBless(actorId); +} + + +//================================================================= +//Scene_ZzyFBF +//================================================================= +//Scene_ZzyFBF场景,用于承载加护相关的窗口 +function Scene_ZzyFBF() +{ + this.initialize.apply(this, arguments); +} + +Scene_ZzyFBF.prototype = Object.create(Scene_MenuBase.prototype); +Scene_ZzyFBF.prototype.constructor = Scene_ZzyFBF; + +Scene_ZzyFBF.prototype.initialize = function() +{ + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_ZzyFBF.prototype.create = function() //创造窗口 +{ + Scene_MenuBase.prototype.create.call(this); + this.createHelpWindow(); + this.CreateFieldWindow(); + this.CreateFieldItemWindow(); + + this._fieldWindow.setFieldItemWindow(this._fieldItemWindow); + this._fieldItemWindow.setFieldWindow(this._fieldWindow); + +}; + +Scene_ZzyFBF.prototype.createHelpWindow = function() +{ + this._helpWindow = new Window_ZzyFBFHelp(2); + this._helpWindow.setText(''); + this.addWindow(this._helpWindow); + +}; + + +Scene_ZzyFBF.prototype.CreateFieldWindow = function() +{ + this._fieldWindow = new Window_ZzyFBFField(); + this._fieldWindow.setHelpWindow(this._helpWindow); + this._fieldWindow.InitPosition(); + + this._fieldWindow.deactivate(); + this._fieldWindow.deselect(); + + this._fieldWindow.setHandler('cancel',this.ZzyFBFPopField.bind(this)); + this._fieldWindow.setHandler('ok',this.OnZzyFBFSelectFieldBless.bind(this)); + this.addWindow(this._fieldWindow); +} + + +Scene_ZzyFBF.prototype.CreateFieldItemWindow = function() +{ + this._fieldItemWindow = new Window_ZzyFBFItemField(); + this._fieldItemWindow.setHelpWindow(this._helpWindow); + + this._fieldItemWindow.InitPosition(); + this._fieldItemWindow.activate(); + this._fieldItemWindow.select(0); + + this._fieldItemWindow.setHandler('cancel', this.popScene.bind(this)); + this._fieldItemWindow.setHandler('ok',this.OnZzyFBFAddFieldBless.bind(this)); + this.addWindow(this._fieldItemWindow); + +} + + +Scene_ZzyFBF.prototype.ZzyFBFPopField = function() +{ + this._fieldWindow.deactivate(); + this._fieldWindow.deselect(); + this._fieldItemWindow.activate(); +} + + +Scene_ZzyFBF.prototype.OnZzyFBFAddFieldBless = function() +{ + var pointer = this._fieldItemWindow; + + + + if(pointer.active)//保持活跃 + {pointer.OnSelectField();}//触发选择 + + + + this._fieldItemWindow.activate();//保持活跃 + this._fieldWindow.deactivate();//失去活跃 +} + +Scene_ZzyFBF.prototype.OnZzyFBFSelectFieldBless = function() +{ + var pointer = this._fieldWindow; + + + if(pointer.active)//保持活跃 + {pointer.OnSelectField();}//触发选择 + + + + this._fieldWindow.activate();//保持活跃 + this._fieldItemWindow.deactivate();//失去活跃 +} + + + +//================================================================= +//Window_ZzyFBFField +//================================================================= + +function Window_ZzyFBFField() { + this.initialize.apply(this, arguments); +} + +Window_ZzyFBFField.prototype = Object.create(Window_Selectable.prototype); +Window_ZzyFBFField.prototype.constructor = Window_ZzyFBFField; + +Window_ZzyFBFField.prototype.initialize = function() +{ + Window_Selectable.prototype.initialize.call(this, 0, 0); + this._list = [];//列表 + this._fieldItemWindow = undefined; + + +}; + +Window_ZzyFBFField.prototype.InitPosition = function() +{ + this.x = eval(Zzy.Param.FBFFieldWindowX); + this.y = eval(Zzy.Param.FBFFieldWindowY); + this.width = eval(Zzy.Param.FBFFieldWindowW) + this.height = eval(Zzy.Param.FBFFieldWindowH); + + this.RefreshActorField();//刷新角色加护 + + this.refresh(); +} + + +Window_ZzyFBFField.prototype.maxCols = function() { + return 1; +}; + + +Window_ZzyFBFField.prototype.drawItem = function(index) +{ + var item = this._list[index]; + var rect = this.itemRect(index); + + this.drawDeepFillRect(rect,2); + + var srcInfo = {}; + this.SaveZzyFBFContents(srcInfo); + + if (item)//存在道具 + { + rect.width -= this.textPadding(); + + if($gameSystem.GetZzyFBFFieldBlessNoInstall(item))//未安装 + { + this.changeTextColor(Zzy.Param.FBFNoUnInstallColor); + } + else + { + if(item.zzyFBF) + { + if(item.zzyFBF.textColor)//存在设置的文字 + {this.changeTextColor(item.zzyFBF.textColor);} + + if(item.zzyFBF.borderColor) + {this.contents.outlineColor = item.zzyFBF.borderColor;} + + if(item.zzyFBF.borderWidth) + {this.contents.outlineWidth = item.zzyFBF.borderWidth;} + + if(item.zzyFBF.textSize)//字体大小 + {this.contents.fontSize = item.zzyFBF.textSize;} + } + } + + this.drawItemName(item, rect.x, rect.y, rect.width); + } + else if(item === null)//不存在 + { + this.changeTextColor(Zzy.Param.FBFUnlockTextColor); + this.drawText(Zzy.Param.FBFUnlockText,rect.x,rect.y,rect.width,'center'); + } + else if(item === false) + { + this.changeTextColor(Zzy.Param.FBFMemoryTextColor); + this.drawText(Zzy.Param.FBFMemoryText,rect.x,rect.y,rect.width,'center'); + } + + + this.LoadZzyFBFContents(srcInfo); + +}; + +Window_ZzyFBFField.prototype.SaveZzyFBFContents = function(srcInfo) +{ + srcInfo.textColor = this.contents.textColor; + srcInfo.outlineColor = this.contents.outlineColor; + srcInfo.outlineWidth = this.contents.outlineWidth; + srcInfo.fontSize = this.contents.fontSize; +} + +Window_ZzyFBFField.prototype.LoadZzyFBFContents = function(srcInfo) +{ + this.contents.textColor = srcInfo.textColor; + this.contents.outlineColor = srcInfo.outlineColor; + this.contents.outlineWidth = srcInfo.outlineWidth; + this.contents.fontSize = srcInfo.fontSize; +} + +Window_ZzyFBFField.prototype.drawItemName = function(item, x, y, width) +{ + width = width || 312; + if (item) { + var iconBoxWidth = Window_Base._iconWidth + 4; + //this.resetTextColor(); + this.drawIcon(item.iconIndex, x + 2, y + 2); + this.drawText(item.name, x + iconBoxWidth, y, width - iconBoxWidth); + } +}; + + + +Window_ZzyFBFField.prototype.drawDeepFillRect = function(rect,dis) +{ + this.contents.fillRect(rect.x+dis, rect.y+dis, rect.width-dis*2, rect.height-dis*2, this.deepColor()); +} + +Window_ZzyFBFField.prototype.deepColor = function() +{ + return Zzy.Param.FBFFieldRectColor; +} + +Window_ZzyFBFField.prototype.processTouch = function() +{ + if(!this.active && this.checkActive()) + { + this.activate();//设置为活跃 + this._fieldItemWindow.deactivate(); + return; + } + + Window_Selectable.prototype.processTouch.call(this); + +}; + + +Window_ZzyFBFField.prototype.checkActive = function() +{ + if(TouchInput.isTriggered() && this.isTouchedInsideFrame()) + { + return true; + } + return false; +} + + +Window_ZzyFBFField.prototype.setFieldItemWindow = function(pointer) +{ + this._fieldItemWindow = pointer; +} + + +Window_ZzyFBFField.prototype.refresh = function() +{ + this.createContents(); + this.drawAllItems(); +}; + + +Window_ZzyFBFField.prototype.drawAllItems = function() +{ + var topIndex = this.topIndex(); + for (var i = 0; i < this.maxPageItems(); i++) + { + var index = topIndex + i; + if (index < this.maxItems()) + { + this.drawItem(index); + } + } +}; + + + + +Window_ZzyFBFField.prototype.item = function() +{ + var index = this.index(); + return this._list && index >= 0 ? this._list[index] : false; +}; + +Window_ZzyFBFField.prototype.updateHelp = function() +{ + this.setHelpWindowItem(this.item()); +}; + +Window_ZzyFBFField.prototype.maxItems = function() +{ + return this._list ? this._list.length : 0; +}; + + +Window_ZzyFBFField.prototype.RefreshActorField = function()//刷新槽 +{ + //判断角色领域是否为无限 + var actorId = $gameSystem.GetZzyFBFSelectActorIndex(); + $gameSystem.UpdateZzyFBFActorUseArr(actorId);//更新角色的加护 + var tMax = $gameSystem.GetZzyFBFActorFinalMaxCount(actorId);//最大格子数 + var currentCount = $gameSystem.GetZzyFBFActorFinalCurrentCount(actorId); + + if(tMax !== -1) + { + currentCount = currentCount > tMax ? tMax : currentCount; + } + for(var i=0;i currentCount ? currentCount : arrLen; + for(var i=0;i max)return false; + if(this._list[index] === false || this._list[index] === null){return false;} + if($gameSystem.GetZzyFBFFieldBlessNoInstall(this._list[index])){return false;} + + var count = $gameSystem.GetZzyFBFFieldBlessMemory(this._list[index]);//检测容量是否超标 + var iCount = $gameSystem.GetZzyFBFFieldBlessMemory(installItem); + + if(this._list[index]) + { + if(iCount > count) + { + for(var i=count;i max)return true; + if(this._list[index] === false || this._list[index] === null){return true;} + if($gameSystem.GetZzyFBFFieldBlessNoInstall(this._list[index])){return true;}//不可卸载 + + var count = $gameSystem.GetZzyFBFFieldBlessMemory(this._list[index]);//检测容量是否超标 + var iCount = $gameSystem.GetZzyFBFFieldBlessMemory(installItem); + + if(this._list[index]) + { + if(iCount > count) + { + for(var i=count;i max)return false; + if(this._list[index] === false || this._list[index] === null || this._list[index] === undefined){return false;} + if($gameSystem.GetZzyFBFFieldBlessNoInstall(this._list[index])){return false;} + if(this._list[index]){return true;} + return false; +} + +Window_ZzyFBFField.prototype.ExecuteInstallItem = function(index,item) +{ + //首先拆卸原来 + + var memory = $gameSystem.GetZzyFBFFieldBlessMemory(item); + + + if(this._list[index])//存在内容 + { + var oldItem = this._list[index];//卸载旧的 + var oldMemory = $gameSystem.GetZzyFBFFieldBlessMemory(oldItem); + for(var i=0;i= 0 ? this._list[index] : null; +}; + +Window_ZzyFBFItemField.prototype.updateHelp = function() +{ + this.setHelpWindowItem(this.item()); +}; + + + +Window_ZzyFBFItemField.prototype.setFieldWindow = function(pointer) +{ + this._fieldWindow = pointer; +} + +Window_ZzyFBFItemField.prototype.processTouch = function() +{ + if(!this.active && this.checkActive()) + { + this.activate();//设置为活跃 + this._fieldWindow.deactivate(); + return; + } + + Window_Selectable.prototype.processTouch.call(this); + +}; + +Window_ZzyFBFItemField.prototype.checkActive = function() +{ + if(TouchInput.isTriggered() && this.isTouchedInsideFrame()) + { + return true; + } + return false; +} + + +Window_ZzyFBFItemField.prototype.processOk = function() +{ + if (this.isCurrentItemEnabled()) + { + //this.playOkSound(); + this.updateInputData(); + //this.deactivate(); + this.callOkHandler(); + } + else + { + this.playBuzzerSound(); + } +}; + +Window_ZzyFBFItemField.prototype.OnSelectField = function() +{ + //激活 + var index = this.index(); + var isValid = this.IsEnableOfIndex(index); + if(isValid) + { + this.ExecuteInstallField(); + } + else + { + Zzy.FBF.PlaySE(3); + } +} + + +Window_ZzyFBFItemField.prototype.ExecuteInstallField = function()//执行安装加护 +{ + + var installItem = this.item(); + var index = this._fieldWindow.index(); + var tList = this._fieldWindow._list; + if(index >= 0)//防止-1 + { + if(this._fieldWindow.IsCanUnInstall(index,installItem)) + { + Zzy.FBF.PlaySE(3); + return false; + } + } + else//遍历 + { + var len = tList.length; + var isCan = false; + for(var i=0;i/i))//增添卡槽 + { + var count = String(RegExp.$1); + obj.zzyFBF['eCount'] = count; + } + else if(lineStr.match(//i))//增添最大卡槽 + { + var count = String(RegExp.$1); + obj.zzyFBF['emCount'] = count; + } + } + } +} + + + +DataManager.ZzyFBFLoadNoteCase2 = function(objArr)//加载标签 +{ + + for (var i = 1; i < objArr.length; i++) + { + var obj = objArr[i]; + var noteData = obj.note.split(/[\r\n]+/); + + obj.zzyFBF = obj.zzyFBF || {}; + + for(var j=0;j/i))//作为卡片 + { + var enable = eval(String(RegExp.$1)); + obj.zzyFBF['enable'] = enable; + } + else if(lineStr.match(//i)) + { + var count = String(RegExp.$1); + obj.zzyFBF['maxCount'] = count; + } + else if(lineStr.match(//i)) + { + var count = String(RegExp.$1); + obj.zzyFBF['currentCount'] = count; + } + + } + } +} + + +DataManager.ZzyFBFLoadNoteCase1 = function(objArr)//加载标签 +{ + for (var i = 1; i < objArr.length; i++) + { + var obj = objArr[i]; + var noteData = obj.note.split(/[\r\n]+/); + + obj.zzyFBF = obj.zzyFBF || {}; + //基本参数 + obj.zzyFBF['param'] = []; + obj.zzyFBF['paramPer'] = []; + //额外参数 + obj.zzyFBF['exParam'] = []; + obj.zzyFBF['exParamPer'] = []; + //特殊参数 + obj.zzyFBF['spParam'] = []; + obj.zzyFBF['spParamPer'] = []; + //元素参数 + obj.zzyFBF['elParam'] = []; + obj.zzyFBF['elParamPer'] = []; + + //0生命 1魔法 2攻击 3防御 4魔攻 5魔抗 6速度 7幸运 + + //0命中 1闪避 2暴击 3暴击回避 4魔法回避 5魔法反射 + //6反击 7HP自动回复 8MP自动回复 9TP自动恢复 + + //1受击几率 2防御效果 3恢复效果 4药理知识 5MP消耗率 6TP消耗率 + //7物理伤害 8魔法伤害 9地形伤害 10经验值 11金币概率 12伤害减免 + //13逃跑概率 14先发制人概率 15被偷袭概率 16遇敌步数 + + + for(var j=0;j/i))//作为卡片 + { + obj.zzyFBF['enable'] = true; + } + else if(lineStr.match(//i)) + { + obj.zzyFBF['textColor'] = String(RegExp.$1); + } + else if(lineStr.match(//i)) + { + obj.zzyFBF['borderWidth'] = parseInt(RegExp.$1); + } + else if(lineStr.match(//i)) + { + obj.zzyFBF['borderColor'] = String(RegExp.$1); + } + else if(lineStr.match(//i)) + { + obj.zzyFBF['textSize'] = parseInt(RegExp.$1); + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['param'][0] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['paramPer'][0] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['param'][1] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['paramPer'][1] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['param'][2] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['paramPer'][2] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['param'][3] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['paramPer'][3] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['param'][4] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['paramPer'][4] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['param'][5] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['paramPer'][5] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['param'][6] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['paramPer'][6] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['param'][7] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['paramPer'][7] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][0] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][0] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][1] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][1] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][2] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][2] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][3] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][3] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][4] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][4] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][5] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][5] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][6] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][6] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][7] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][7] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][8] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][8] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParam'][9] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['exParamPer'][9] = value; + } + else if(lineStr.match(//i)) + { + var memory = parseInt(RegExp.$1); + obj.zzyFBF['memory'] = memory; + } + else if(lineStr.match(//i)) + { + obj.zzyFBF['noInstall'] = true; + } + else if(lineStr.match(//i)) + { + var str = String(RegExp.$1); + var intArr = Zzy.FBF.StringToIntArr(str); + obj.zzyFBF['canUseC'] = intArr; + } + else if(lineStr.match(//i)) + { + var str = String(RegExp.$1); + var intArr = Zzy.FBF.StringToIntArr(str); + obj.zzyFBF['canUseA'] = intArr; + } + else if(lineStr.match(//i)) + { + var str = String(RegExp.$1); + var intArr = Zzy.FBF.StringToIntArr(str); + obj.zzyFBF['noCanUseC'] = intArr; + } + else if(lineStr.match(//i)) + { + var str = String(RegExp.$1); + var intArr = Zzy.FBF.StringToIntArr(str); + obj.zzyFBF['noCanUseA'] = intArr; + } + else if(lineStr.match(//i)) + { + var evalStr = String(RegExp.$1); + obj.zzyFBF['canUseEval'] = evalStr; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][1] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][1] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][2] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][2] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][3] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][3] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][4] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][4] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][5] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][5] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][6] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][6] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][7] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][7] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][8] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][8] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][9] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][9] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][10] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][10] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][11] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][11] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][12] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][12] = value; + } + else if(lineStr.match(//i)) + { + var elId = parseInt(RegExp.$1); + var value = String(RegExp.$2); + obj.zzyFBF['elParam'][elId] = value; + } + else if(lineStr.match(//i)) + { + var elId = parseInt(RegExp.$1); + var value = String(RegExp.$2); + obj.zzyFBF['elParamPer'][elId] = value; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['spParam'][13] = per; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['spParam'][14] = per; + } + else if(lineStr.match(//i)) + { + var per = String(RegExp.$1); + obj.zzyFBF['spParam'][15] = per; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParam'][16] = value; + } + else if(lineStr.match(//i)) + { + var value = String(RegExp.$1); + obj.zzyFBF['spParamPer'][16] = value; + } + + + } + } +} + + +//============================================================================= +//Game_Actor +//============================================================================= + + +Zzy.FBF.Game_Actor_paramPlus = Game_Actor.prototype.paramPlus; +Game_Actor.prototype.paramPlus = function(paramId) +{ + var value = Zzy.FBF.Game_Actor_paramPlus.call(this,paramId); + var useArr = $gameSystem.GetZzyFBFActorFieldUseArr(this.actorId()); + value += this.ZzyFBFCalculationValue(useArr,paramId);//计算增益数值 + + return Math.floor(value); +}; + +Game_Actor.prototype.ZzyFBFCalculationValue = function(itemArr,paramId)//增益 +{ + + var formula = undefined; + + var value = 0; + var valuePer = 0; + var srcValue = this.paramBase(paramId); + + for(var i=0;i 0) + { + this.performMapDamage(); + } +}; + + + +//=========================================================================== +//Game_Action +//=========================================================================== +Zzy.FBF.Game_Action_calcElementRate = Game_Action.prototype.calcElementRate; +Game_Action.prototype.calcElementRate = function(target)//元素概率 +{ + var srcRate = Zzy.FBF.Game_Action_calcElementRate.call(this,target); + var exRate = 0; + if(target.isEnemy()) + { + var actor = this.subject(); + if(actor && actor.isActor()) + { + var elementId = this.item().damage.elementId; + exRate = BattleManager.ZzyFBFElParamPerValueOfActor(elementId,actor,target); + } + } + return srcRate+exRate; +}; + + +Zzy.FBF.Game_Action_itemHit = Game_Action.prototype.itemHit; +Game_Action.prototype.itemHit = function(target) +{ + var value = Zzy.FBF.Game_Action_itemHit.call(this,target); + + var exValue = 0; + if(this.isPhysical() && this.subject() && this.subject().isActor())//物理命中 + { + exValue = BattleManager.ZzyFBFSetExParamValueOfActor(0,this.subject(),value,target); + } + return value+exValue; +}; + + +Zzy.FBF.Game_Action_itemEva = Game_Action.prototype.itemEva; +Game_Action.prototype.itemEva = function(target) +{ + var value = Zzy.FBF.Game_Action_itemEva.call(this,target); + var exValue = 0; + + if(target && target.isActor()) + { + if (this.isPhysical())//物理闪避 + { + exValue = BattleManager.ZzyFBFSetExParamValueOfActor(1,target,value,this.subject()); + } + else if(this.isMagical())//魔法闪避 + { + exValue = BattleManager.ZzyFBFSetExParamValueOfActor(4,target,value,this.subject()); + } + } + + + return value+exValue; +}; + + +Zzy.FBF.Game_Action_itemCri = Game_Action.prototype.itemCri; +Game_Action.prototype.itemCri = function(target) +{ + var value = Zzy.FBF.Game_Action_itemCri.call(this,target); + var exValue = 0; + if(this.item().damage.critical)//存在暴击 + { + if(this.subject() && this.subject().isActor())//攻击者 + { + exValue = BattleManager.ZzyFBFSetExParamValueOfActor(2,this.subject(),value,target); + return value+exValue; + + } + else if(target && target.isActor())//防御者 + { + exValue = BattleManager.ZzyFBFSetExParamValueOfActor(3,target,value,target); + return Math.max(0,value-exValue); + } + } + else + { + return value; + } + return value; +}; + + +Zzy.FBF.Game_Action_itemMrf = Game_Action.prototype.itemMrf; +Game_Action.prototype.itemMrf = function(target) +{ + var value = Zzy.FBF.Game_Action_itemMrf.call(this,target); + var exValue = 0; + + if(this.isMagical() && target && target.isActor()) + { + exValue = BattleManager.ZzyFBFSetExParamValueOfActor(5,target,value,this.subject()); + } + return value+exValue; +}; + +Zzy.FBF.Game_Action_itemCnt = Game_Action.prototype.itemCnt; +Game_Action.prototype.itemCnt = function(target) +{ + var value = Zzy.FBF.Game_Action_itemCnt.call(this,target); + var exValue = 0; + + if(this.isPhysical() && target.canMove() && target && target.isActor()) + { + exValue = BattleManager.ZzyFBFSetExParamValueOfActor(6,target,value,this.subject()); + } + return value+exValue; +}; + + + +//恢复效果 物理伤害 魔法伤害 + +Zzy.FBF.Game_Action_makeDamageValue = Game_Action.prototype.makeDamageValue; +Game_Action.prototype.makeDamageValue = function(target, critical) +{ + var value = Zzy.FBF.Game_Action_makeDamageValue.call(this,target,critical); + var item = this.item(); + var isRecover = false; + if(target.isActor()) + { + var baseValue = this.evalDamageFormula(target); + if (this.isPhysical()) + { + var exValue1 = Zzy.FBF.SpParamValueOfActor(target,7,this.subject()); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(target,7,value,this.subject()); + value += (exValue1+exValue2); + + } + if (this.isMagical()) + { + var exValue1 = Zzy.FBF.SpParamValueOfActor(target,8,this.subject()); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(target,8,value,this.subject()); + value += (exValue1+exValue2); + } + if (baseValue < 0) + { + isRecover = true; + var exValue1 = Zzy.FBF.SpParamValueOfActor(target,3,this.subject()); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(target,3,value,this.subject()); + value -= (exValue1+exValue2); + } + + + if(!isRecover) + { + //计算伤害减免 + var exValue1 = Zzy.FBF.SpParamValueOfActor(target,12,this.subject()); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(target,12,value,this.subject()); + + value -= (exValue1+exValue2); + value = value > 0 ? value : 0; + } + + //value = this.applyVariance(value, item.damage.variance); + //value = this.applyGuard(value, target); + + + } + else if(target.isEnemy()) + { + var actor = this.subject(); + if(actor && actor.isActor()) + { + //插入元素直接伤害 + var baseValue = this.evalDamageFormula(actor); + + var elementId = this.item().damage.elementId; + var exValue = BattleManager.ZzyFBFElParamValueOfActor(elementId,actor); + if (baseValue < 0) + { + value -= exValue; + value = value < 0 ? value : 0; + } + else + { + value += exValue; + value = value > 0 ? value : 0; + } + } + + } + + + value = Math.round(value); + + + return value; +}; + +//TP补充率 +Zzy.FBF.Game_Action_applyItemUserEffect = Game_Action.prototype.applyItemUserEffect; +Game_Action.prototype.applyItemUserEffect = function(target) +{ + Zzy.FBF.Game_Action_applyItemUserEffect.call(this,target); + if(target.isActor()) + { + var value = Math.floor(this.item().tpGain * this.subject().tcr); + var exValue1 = Zzy.FBF.SpParamValueOfActor(target,6,this.subject()); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(target,6,value,this.subject()); + this.subject().gainSilentTp(exValue1+exValue2); + } + +}; + + +Zzy.FBF.Game_Action_itemEffectRecoverHp = Game_Action.prototype.itemEffectRecoverHp; +Game_Action.prototype.itemEffectRecoverHp = function(target, effect) +{ + Zzy.FBF.Game_Action_itemEffectRecoverHp.call(this,target,effect); + + if(target.isActor() && this.isItem()) + { + var value = (target.mhp * effect.value1 + effect.value2) * target.rec; + var exValue1 = Zzy.FBF.SpParamValueOfActor(target,4,this.subject()); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(target,4,value,this.subject()); + value += (exValue1+exValue2); + } + value = Math.floor(value); + if (value !== 0) + { + target.gainHp(value); + this.makeSuccess(target); + } +}; + + +Zzy.FBF.Game_Action_itemEffectRecoverMp = Game_Action.prototype.itemEffectRecoverMp; +Game_Action.prototype.itemEffectRecoverMp = function(target, effect) +{ + Zzy.FBF.Game_Action_itemEffectRecoverMp.call(this,target,effect); + + if(target.isActor() && this.isItem()) + { + var value = (target.mmp * effect.value1 + effect.value2) * target.rec; + var exValue1 = Zzy.FBF.SpParamValueOfActor(target,4,this.subject()); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(target,4,value,this.subject()); + value += (exValue1+exValue2); + } + value = Math.floor(value); + if (value !== 0) + { + target.gainMp(value); + this.makeSuccess(target); + } +}; + +Zzy.FBF.Game_Action_applyGuard = Game_Action.prototype.applyGuard; +Game_Action.prototype.applyGuard = function(damage, target) +{ + if(target.isActor()) + { + + var exValue1 = Zzy.FBF.SpParamValueOfActor(target,2,this.subject()); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(target,2,target.grd,this.subject()); + var result = exValue1 + exValue2 + target.grd; + return damage / (damage > 0 && target.isGuard() ? 2 * result : 1); + + } + return Zzy.FBF.Game_Action_applyGuard.call(this,damage,target); +}; + + + + +//============================================================================= +//Game_Unit +//============================================================================= + +Game_Unit.prototype.tgrSum = function() +{ + + return this.aliveMembers().reduce(function(r, member) + { + var exValue1 = Zzy.FBF.SpParamValueOfActor(member,1); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(member,1,member.tgr); + return r + member.tgr + exValue1 + exValue2; + }, 0); +}; + + +Game_Unit.prototype.randomTarget = function() +{ + + var tgrRand = Math.random() * this.tgrSum(); + var target = null; + this.aliveMembers().forEach(function(member) + { + var exValue1 = Zzy.FBF.SpParamValueOfActor(member,1); + var exValue2 = Zzy.FBF.SpParamPerValueOfActor(member,1,member.tgr); + + tgrRand -= (member.tgr + exValue1 + exValue2); + if (tgrRand <= 0 && !target) { + target = member; + } + }); + return target; +}; + + + +//============================================================================= +//Game_Player +//============================================================================= +Zzy.FBF.Game_Player_makeEncounterCount = Game_Player.prototype.makeEncounterCount; +Game_Player.prototype.makeEncounterCount = function()//遇敌人步数 +{ + Zzy.FBF.Game_Player_makeEncounterCount.call(this); + + var totalV1 = 0; + var totalV2 = 0; + for(var i=0;i<$gameParty._actors.length;i++) + { + var actorId = $gameParty._actors[i]; + var actor = $gameActors.actor(actorId); + + totalV1 += Zzy.FBF.SpParamValueOfActor(actor,16); + totalV2 += Zzy.FBF.SpParamPerValueOfActor(actor,16,this._encounterCount); + } + + this._encounterCount += totalV1; + this._encounterCount += totalV2; +}; + + + +//============================================================================= +//BattleManager +//============================================================================= + +BattleManager.ZzyFBFElParamPerValueOfActor = function(elementId,target,enemy) +{ + + var actor = target; + //遍历所有领域 + var formula = undefined; + var useArr = $gameSystem.GetZzyFBFActorFieldUseArr(actor.actorId()); + var exPer = 0; + + for(var i=0;i= cArr.length) + { + $gameSystem._ZzySFFCommonIndex = 0; + $gameSystem._ZzySFFCommonArr = []; + } + } +} + +//======================================================================= +//Sprite_ZzySFFFlash +//======================================================================= +function Sprite_ZzySFFFlash() { + this.initialize.apply(this, arguments); +} + +Sprite_ZzySFFFlash.prototype = Object.create(Sprite_Base.prototype); +Sprite_ZzySFFFlash.prototype.constructor = Sprite_ZzySFFFlash; + +Sprite_ZzySFFFlash.prototype.initialize = function(pointer) +{ + Sprite_Base.prototype.initialize.call(this); + this.anchor.x = 0.5; + this.anchor.y = 0.5; + this.pointer = pointer; + this.info = undefined; +}; + +Sprite_ZzySFFFlash.prototype.ResetInfo = function(info) +{ + this.info = info; + this.bitmap = ImageManager.loadPicture(this.info.name); + this.x = info.x; + this.y = info.y; +} + +Sprite_ZzySFFFlash.prototype.update = function() +{ + + Sprite_Base.prototype.update.call(this); + if(!this.visible)return; + + this.updateBeing();//更新存在 + +} + +Sprite_ZzySFFFlash.prototype.updateBeing = function() +{ + if(this.info.cFrame < this.info.frame) + { + this.info.cFrame++; + } + else + { + this.info.cFrame = 0; + this.info.isCom = true; + this.visible = false; + this.pointer.removeChild(this);//移除 + } +} + + + + +//---------------------------------------Zzy.SFF.Script--------------------------------------------- + +//设置角色的生命值 +Zzy.SFF.SetActorHP = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + actor.setHp(value); +} +Zzy.SFF.SetActorHPV = function(actorId,variableId) +{Zzy.SFF.SetActorHP(actorId,$gameVariables.value(variableId));} + +var 设置角色血量值 = function(actorId,value) +{Zzy.SFF.SetActorHP(actorId,value);} +var 变量设置角色血量值 = function(actorId,variableId) +{Zzy.SFF.SetActorHPV(actorId,variableId);} + + +//设置角色的魔法值 +Zzy.SFF.SetActorMP = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + actor.setMp(value); +} + +Zzy.SFF.SetActorMPV = function(actorId,variableId) +{Zzy.SFF.SetActorMP(actorId,$gameVariables.value(variableId));} + +var 设置角色蓝量值 = function(actorId,value) +{Zzy.SFF.SetActorMP(actorId,value);} +var 变量设置角色蓝量值 = function(actorId,variableId) +{Zzy.SFF.SetActorMPV(actorId,variableId);} + + + +//设置角色最大血量值 +Zzy.SFF.SetActorMaxHP = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + var srcValue = actor.paramBase(0); + actor._paramPlus[0] = value-srcValue; +} + +Zzy.SFF.SetActorMaxHpV = function(actorId,variableId) +{Zzy.SFF.SetActorMaxHP(actorId,$gameVariables.value(variableId));} + +var 设置角色最大血量值 = function(actorId,value) +{Zzy.SFF.SetActorMaxHP(actorId,value);} +var 变量设置角色最大血量值 = function(actorId,variableId) +{Zzy.SFF.SetActorMaxHpV(actorId,variableId);} + + + +//设置角色最大蓝量值 +Zzy.SFF.SetActorMaxMP = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + var srcValue = actor.paramBase(1); + actor._paramPlus[1] = value-srcValue; +} + +Zzy.SFF.SetActorMaxMpV = function(actorId,variableId) +{Zzy.SFF.SetActorMaxMP(actorId,$gameVariables.value(variableId));} + +var 设置角色最大蓝量值 = function(actorId,value) +{Zzy.SFF.SetActorMaxMP(actorId,value);} +var 变量设置角色最大蓝量值 = function(actorId,variableId) +{Zzy.SFF.SetActorMaxMpV(actorId,variableId);} + + + + +//设置角色的攻击力 +Zzy.SFF.SetActorATK = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + var srcValue = actor.paramBase(2); + actor._paramPlus[2] = value-srcValue; +} + +Zzy.SFF.SetActorATKV = function(actorId,variableId) +{Zzy.SFF.SetActorATK(actorId,$gameVariables.value(variableId));} + +var 设置角色攻击值 = function(actorId,value) +{Zzy.SFF.SetActorATK(actorId,value);} +var 变量设置角色攻击值 = function(actorId,variableId) +{Zzy.SFF.SetActorATKV(actorId,variableId);} + + + + +//设置角色的防御 +Zzy.SFF.SetActorDEF = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + var srcValue = actor.paramBase(3); + actor._paramPlus[3] = value-srcValue; +} + +Zzy.SFF.SetActorDEFV = function(actorId,variableId) +{Zzy.SFF.SetActorDEF(actorId,$gameVariables.value(variableId));} + +var 设置角色防御值 = function(actorId,value) +{Zzy.SFF.SetActorDEF(actorId,value);} +var 变量设置角色防御值 = function(actorId,variableId) +{Zzy.SFF.SetActorDEFV(actorId,variableId);} + + + +//设置角色的魔攻 +Zzy.SFF.SetActorMAT = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + var srcValue = actor.paramBase(4); + actor._paramPlus[4] = value-srcValue; +} + +Zzy.SFF.SetActorMATV = function(actorId,variableId) +{Zzy.SFF.SetActorMAT(actorId,$gameVariables.value(variableId));} + +var 设置角色魔攻值 = function(actorId,value) +{Zzy.SFF.SetActorMAT(actorId,value);} +var 变量设置角色魔攻值 = function(actorId,variableId) +{Zzy.SFF.SetActorMATV(actorId,variableId);} + + + +//设置角色的魔抗 +Zzy.SFF.SetActorMDF = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + var srcValue = actor.paramBase(5); + actor._paramPlus[5] = value-srcValue; +} + +Zzy.SFF.SetActorMDFV = function(actorId,variableId) +{Zzy.SFF.SetActorMDF(actorId,$gameVariables.value(variableId));} + +var 设置角色魔防值 = function(actorId,value) +{Zzy.SFF.SetActorMDF(actorId,value);} +var 变量设置角色魔防值 = function(actorId,variableId) +{Zzy.SFF.SetActorMDFV(actorId,variableId);} + + +//设置角色的速度 +Zzy.SFF.SetActorAGI = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + var srcValue = actor.paramBase(6); + actor._paramPlus[6] = value-srcValue; +} + +Zzy.SFF.SetActorAGIV = function(actorId,variableId) +{Zzy.SFF.SetActorAGI(actorId,$gameVariables.value(variableId));} + +var 设置角色速度值 = function(actorId,value) +{Zzy.SFF.SetActorAGI(actorId,value);} +var 变量设置角色速度值 = function(actorId,variableId) +{Zzy.SFF.SetActorAGIV(actorId,variableId);} + + + +//设置角色的幸运 +Zzy.SFF.SetActorLUK = function(actorId,value) +{ + var actor = $gameActors.actor(actorId); + var srcValue = actor.paramBase(7); + actor._paramPlus[7] = value-srcValue; +} + +Zzy.SFF.SetActorLUKV = function(actorId,variableId) +{Zzy.SFF.SetActorLUK(actorId,$gameVariables.value(variableId));} + +var 设置角色幸运值 = function(actorId,value) +{Zzy.SFF.SetActorLUK(actorId,value);} +var 变量设置角色幸运值 = function(actorId,variableId) +{Zzy.SFF.SetActorLUKV(actorId,variableId);} + + + + +Zzy.SFF.AddActorHIT = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[0] === undefined){pArr[0] = 0;} + pArr[0] += value*0.01; +} + +var 增加角色命中率 = function(actorId,value) +{Zzy.SFF.AddActorHit(actorId,value);} + + +Zzy.SFF.SubActorHIT = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[0] === undefined){pArr[0] = 0;} + pArr[0] -= value*0.01; +} + +var 减少角色命中率 = function(actorId,value) +{Zzy.SFF.SubActorHIT(actorId,value);} + +Zzy.SFF.AddActorHITV = function(actorId,variableId) +{Zzy.SFF.AddActorHIT(actorId,$gameVariables.value(variableId));} + +var 变量增加角色命中率 = function(actorId,variableId) +{Zzy.SFF.AddActorHITV(actorId,variableId);} + +Zzy.SFF.SubActorHITV = function(actorId,variableId) +{Zzy.SFF.SubActorHIT(actorId,$gameVariables.value(variableId));} + +var 变量减少角色命中率 = function(actorId,variableId) +{Zzy.SFF.SubActorHITV(actorId,variableId);} + + + + + +Zzy.SFF.AddActorEVA = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[1] === undefined){pArr[1] = 0;} + pArr[1] += value*0.01; +} + +var 增加角色回避率 = function(actorId,value) +{Zzy.SFF.AddActorEVA(actorId,value);} + + +Zzy.SFF.SubActorEVA = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[1] === undefined){pArr[1] = 0;} + pArr[1] -= value*0.01; +} + +var 减少角色回避率 = function(actorId,value) +{Zzy.SFF.SubActorEVA(actorId,value);} + +Zzy.SFF.AddActorEVAV = function(actorId,variableId) +{Zzy.SFF.AddActorEVA(actorId,$gameVariables.value(variableId));} + +var 变量增加角色回避率 = function(actorId,variableId) +{Zzy.SFF.AddActorEVAV(actorId,variableId);} + +Zzy.SFF.SubActorEVAV = function(actorId,variableId) +{Zzy.SFF.SubActorEVA(actorId,$gameVariables.value(variableId));} + +var 变量减少角色回避率 = function(actorId,variableId) +{Zzy.SFF.SubActorEVAV(actorId,variableId);} + + + + + + + +Zzy.SFF.AddActorCRI = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[2] === undefined){pArr[2] = 0;} + pArr[2] += value*0.01; +} + +var 增加角色暴击率 = function(actorId,value) +{Zzy.SFF.AddActorCRI(actorId,value);} + +Zzy.SFF.SubActorCRI = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[2] === undefined){pArr[2] = 0;} + pArr[2] -= value*0.01; +} + +var 减少角色暴击率 = function(actorId,value) +{Zzy.SFF.SubActorCRI(actorId,value);} + +Zzy.SFF.AddActorCRIV = function(actorId,variableId) +{Zzy.SFF.AddActorCRI(actorId,$gameVariables.value(variableId));} + +var 变量增加角色暴击率 = function(actorId,variableId) +{Zzy.SFF.AddActorCRIV(actorId,variableId);} + +Zzy.SFF.SubActorCRIV = function(actorId,variableId) +{Zzy.SFF.SubActorCRI(actorId,$gameVariables.value(variableId));} + +var 变量减少角色暴击率 = function(actorId,variableId) +{Zzy.SFF.SubActorCRIV(actorId,variableId);} + + + + + +Zzy.SFF.AddActorCEV = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[3] === undefined){pArr[3] = 0;} + pArr[3] += value*0.01; +} + +var 增加角色暴击回避 = function(actorId,value) +{Zzy.SFF.AddActorCEV(actorId,value);} + +Zzy.SFF.SubActorCEV = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[3] === undefined){pArr[3] = 0;} + pArr[3] -= value*0.01; +} + +var 减少角色暴击回避 = function(actorId,value) +{Zzy.SFF.SubActorCEV(actorId,value);} + +Zzy.SFF.AddActorCEVV = function(actorId,variableId) +{Zzy.SFF.AddActorCEV(actorId,$gameVariables.value(variableId));} + +var 变量增加角色暴击回避 = function(actorId,variableId) +{Zzy.SFF.AddActorCEVV(actorId,variableId);} + +Zzy.SFF.SubActorCEVV = function(actorId,variableId) +{Zzy.SFF.SubActorCEV(actorId,$gameVariables.value(variableId));} + +var 变量减少角色暴击回避 = function(actorId,variableId) +{Zzy.SFF.SubActorCEVV(actorId,variableId);} + + + + + + + + +Zzy.SFF.AddActorMEV = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[4] === undefined){pArr[4] = 0;} + pArr[4] += value*0.01; +} + +var 增加角色魔法回避 = function(actorId,value) +{Zzy.SFF.AddActorMEV(actorId,value);} + +Zzy.SFF.SubActorMEV= function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[4] === undefined){pArr[4] = 0;} + pArr[4] -= value*0.01; +} + +var 减少角色魔法回避 = function(actorId,value) +{Zzy.SFF.SubActorMEV(actorId,value);} + +Zzy.SFF.AddActorMEVV = function(actorId,variableId) +{Zzy.SFF.AddActorMEV(actorId,$gameVariables.value(variableId));} + +var 变量增加角色魔法回避 = function(actorId,variableId) +{Zzy.SFF.AddActorMEVV(actorId,variableId);} + +Zzy.SFF.SubActorMEVV = function(actorId,variableId) +{Zzy.SFF.SubActorMEV(actorId,$gameVariables.value(variableId));} + +var 变量减少角色魔法回避 = function(actorId,variableId) +{Zzy.SFF.SubActorMEVV(actorId,variableId);} + + + + + + +Zzy.SFF.AddActorMRF = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[5] === undefined){pArr[5] = 0;} + pArr[5] += value*0.01; +} + +var 增加角色魔法反射 = function(actorId,value) +{Zzy.SFF.AddActorMRF(actorId,value);} + +Zzy.SFF.SubActorMRF = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[5] === undefined){pArr[5] = 0;} + pArr[5] -= value*0.01; +} + +var 减少角色魔法反射 = function(actorId,value) +{Zzy.SFF.SubActorMRF(actorId,value);} + +Zzy.SFF.AddActorMRFV = function(actorId,variableId) +{Zzy.SFF.AddActorMRF(actorId,$gameVariables.value(variableId));} + +var 变量增加角色魔法反射 = function(actorId,variableId) +{Zzy.SFF.AddActorMRFV(actorId,variableId);} + +Zzy.SFF.SubActorMRFV = function(actorId,variableId) +{Zzy.SFF.SubActorMRF(actorId,$gameVariables.value(variableId));} + +var 变量减少角色魔法反射 = function(actorId,variableId) +{Zzy.SFF.SubActorMRFV(actorId,variableId);} + + + + + +Zzy.SFF.AddActorCNT = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[6] === undefined){pArr[6] = 0;} + pArr[6] += value*0.01; +} + +var 增加角色反击 = function(actorId,value) +{Zzy.SFF.AddActorCNT(actorId,value);} + +Zzy.SFF.SubActorCNT = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[6] === undefined){pArr[6] = 0;} + pArr[6] -= value*0.01; +} + +var 减少角色反击 = function(actorId,value) +{Zzy.SFF.SubActorCNT(actorId,value);} + +Zzy.SFF.AddActorCNTV = function(actorId,variableId) +{Zzy.SFF.AddActorCNT(actorId,$gameVariables.value(variableId));} + +var 变量增加角色角色反击 = function(actorId,variableId) +{Zzy.SFF.AddActorCNTV(actorId,variableId);} + +Zzy.SFF.SubActorCNTV = function(actorId,variableId) +{Zzy.SFF.SubActorCNT(actorId,$gameVariables.value(variableId));} + +var 变量减少角色角色反击 = function(actorId,variableId) +{Zzy.SFF.SubActorCNTV(actorId,variableId);} + + + + + +Zzy.SFF.AddActorHRG = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[7] === undefined){pArr[7] = 0;} + pArr[7] += value*0.01; +} + +var 增加角色HP自动恢复 = function(actorId,value) +{Zzy.SFF.AddActorHRG(actorId,value);} + +Zzy.SFF.SubActorHRG = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[7] === undefined){pArr[7] = 0;} + pArr[7] -= value*0.01; +} + +var 减少角色HP自动恢复 = function(actorId,value) +{Zzy.SFF.SubActorHRG(actorId,value);} + +Zzy.SFF.AddActorHRGV = function(actorId,variableId) +{Zzy.SFF.AddActorHRG(actorId,$gameVariables.value(variableId));} + +var 变量增加角色HP自动恢复 = function(actorId,variableId) +{Zzy.SFF.AddActorHRGV(actorId,variableId);} + +Zzy.SFF.SubActorHRGV = function(actorId,variableId) +{Zzy.SFF.SubActorHRG(actorId,$gameVariables.value(variableId));} + +var 变量减少角色HP自动恢复 = function(actorId,variableId) +{Zzy.SFF.SubActorHRGV(actorId,variableId);} + + + + + +Zzy.SFF.AddActorMRG = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[8] === undefined){pArr[8] = 0;} + pArr[8] += value*0.01; +} + +var 增加角色MP自动恢复 = function(actorId,value) +{Zzy.SFF.AddActorMRG(actorId,value);} + +Zzy.SFF.SubActorMRG = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[8] === undefined){pArr[8] = 0;} + pArr[8] -= value*0.01; +} + +var 减少角色MP自动恢复 = function(actorId,value) +{Zzy.SFF.SubActorMRG(actorId,value);} + +Zzy.SFF.AddActorMRGV = function(actorId,variableId) +{Zzy.SFF.AddActorMRG(actorId,$gameVariables.value(variableId));} + +var 变量增加角色MP自动恢复 = function(actorId,variableId) +{Zzy.SFF.AddActorMRGV(actorId,variableId);} + +Zzy.SFF.SubActorMRGV = function(actorId,variableId) +{Zzy.SFF.SubActorMRG(actorId,$gameVariables.value(variableId));} + +var 变量减少角色MP自动恢复 = function(actorId,variableId) +{Zzy.SFF.SubActorMRGV(actorId,variableId);} + + + + + + + +Zzy.SFF.AddActorTRG = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[9] === undefined){pArr[9] = 0;} + pArr[9] += value*0.01; +} + +var 增加角色TP自动恢复 = function(actorId,value) +{Zzy.SFF.AddActorTRG(actorId,value);} + +Zzy.SFF.SubActorTRG = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[9] === undefined){pArr[9] = 0;} + pArr[9] -= value*0.01; +} + +var 减少角色TP自动恢复 = function(actorId,value) +{Zzy.SFF.SubActorTRG(actorId,value);} + +Zzy.SFF.AddActorTRGV = function(actorId,variableId) +{Zzy.SFF.AddActorTRG(actorId,$gameVariables.value(variableId));} + +var 变量增加角色TP自动恢复 = function(actorId,variableId) +{Zzy.SFF.AddActorTRGV(actorId,variableId);} + +Zzy.SFF.SubActorTRGV = function(actorId,variableId) +{Zzy.SFF.SubActorTRG(actorId,$gameVariables.value(variableId));} + +var 变量减少角色TP自动恢复 = function(actorId,variableId) +{Zzy.SFF.SubActorTRGV(actorId,variableId);} + + + + + + +Zzy.SFF.AddActorTGR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[0] === undefined){pArr[0] = 0;} + pArr[0] += value*0.01; +} + +var 增加角色受到攻击几率 = function(actorId,value) +{Zzy.SFF.AddActorTGR(actorId,value);} + +Zzy.SFF.SubActorTGR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[0] === undefined){pArr[0] = 0;} + pArr[0] -= value*0.01; +} + +var 减少角色受到攻击几率 = function(actorId,value) +{Zzy.SFF.SubActorTGR(actorId,value);} + +Zzy.SFF.AddActorTGRV = function(actorId,variableId) +{Zzy.SFF.AddActorTGR(actorId,$gameVariables.value(variableId));} + +var 变量增加角色受到攻击几率 = function(actorId,variableId) +{Zzy.SFF.AddActorTGRV(actorId,variableId);} + +Zzy.SFF.SubActorTGRV = function(actorId,variableId) +{Zzy.SFF.SubActorTGR(actorId,$gameVariables.value(variableId));} + +var 变量减少角色受到攻击几率 = function(actorId,variableId) +{Zzy.SFF.SubActorTGRV(actorId,variableId);} + + + + + + +Zzy.SFF.AddActorGRD = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[1] === undefined){pArr[1] = 0;} + pArr[1] += value*0.01; +} + +var 增加角色防御效果 = function(actorId,value) +{Zzy.SFF.AddActorGRD(actorId,value);} + +Zzy.SFF.SubActorGRD = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[1] === undefined){pArr[1] = 0;} + pArr[1] -= value*0.01; +} + +var 减少角色防御效果 = function(actorId,value) +{Zzy.SFF.SubActorGRD(actorId,value);} + +Zzy.SFF.AddActorGRDV = function(actorId,variableId) +{Zzy.SFF.AddActorGRD(actorId,$gameVariables.value(variableId));} + +var 变量增加角色防御效果 = function(actorId,variableId) +{Zzy.SFF.AddActorGRDV(actorId,variableId);} + +Zzy.SFF.SubActorGRDV = function(actorId,variableId) +{Zzy.SFF.SubActorGRD(actorId,$gameVariables.value(variableId));} + +var 变量减少角色防御效果 = function(actorId,variableId) +{Zzy.SFF.SubActorGRDV(actorId,variableId);} + + + + + + +Zzy.SFF.AddActorREC = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[2] === undefined){pArr[2] = 0;} + pArr[2] += value*0.01; +} + +var 增加角色恢复效果 = function(actorId,value) +{Zzy.SFF.AddActorREC(actorId,value);} + +Zzy.SFF.SubActorREC = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[2] === undefined){pArr[2] = 0;} + pArr[2] -= value*0.01; +} + +var 减少角色恢复效果 = function(actorId,value) +{Zzy.SFF.SubActorREC(actorId,value);} + +Zzy.SFF.AddActorRECV = function(actorId,variableId) +{Zzy.SFF.AddActorREC(actorId,$gameVariables.value(variableId));} + +var 变量增加角色恢复效果 = function(actorId,variableId) +{Zzy.SFF.AddActorRECV(actorId,variableId);} + +Zzy.SFF.SubActorRECV = function(actorId,variableId) +{Zzy.SFF.SubActorREC(actorId,$gameVariables.value(variableId));} + +var 变量减少角色恢复效果 = function(actorId,variableId) +{Zzy.SFF.SubActorRECV(actorId,variableId);} + + + + +Zzy.SFF.AddActorPHA = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[3] === undefined){pArr[3] = 0;} + pArr[3] += value*0.01; +} + +var 增加角色药理知识 = function(actorId,value) +{Zzy.SFF.AddActorPHA(actorId,value);} + +Zzy.SFF.SubActorPHA = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[3] === undefined){pArr[3] = 0;} + pArr[3] -= value*0.01; +} + +var 减少角色药理知识 = function(actorId,value) +{Zzy.SFF.SubActorPHA(actorId,value);} + +Zzy.SFF.AddActorPHAV = function(actorId,variableId) +{Zzy.SFF.AddActorPHA(actorId,$gameVariables.value(variableId));} + +var 变量增加角色药理知识 = function(actorId,variableId) +{Zzy.SFF.AddActorPHAV(actorId,variableId);} + +Zzy.SFF.SubActorPHAV = function(actorId,variableId) +{Zzy.SFF.SubActorPHA(actorId,$gameVariables.value(variableId));} + +var 变量减少角色药理知识 = function(actorId,variableId) +{Zzy.SFF.SubActorPHAV(actorId,variableId);} + + + + + + +Zzy.SFF.AddActorMCR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[4] === undefined){pArr[4] = 0;} + pArr[4] += value*0.01; +} + +var 增加角色MP消耗率 = function(actorId,value) +{Zzy.SFF.AddActorMCR(actorId,value);} + +Zzy.SFF.SubActorMCR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[4] === undefined){pArr[4] = 0;} + pArr[4] -= value*0.01; +} + +var 减少角色MP消耗率 = function(actorId,value) +{Zzy.SFF.SubActorMCR(actorId,value);} + +Zzy.SFF.AddActorMCRV = function(actorId,variableId) +{Zzy.SFF.AddActorMCR(actorId,$gameVariables.value(variableId));} + +var 变量增加角色MP消耗率 = function(actorId,variableId) +{Zzy.SFF.AddActorMCRV(actorId,variableId);} + +Zzy.SFF.SubActorMCRV = function(actorId,variableId) +{Zzy.SFF.SubActorMCR(actorId,$gameVariables.value(variableId));} + +var 变量减少角色MP消耗率 = function(actorId,variableId) +{Zzy.SFF.SubActorMCRV(actorId,variableId);} + + + + + + + + +Zzy.SFF.AddActorTCR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[5] === undefined){pArr[5] = 0;} + pArr[5] += value*0.01; +} + +var 增加角色TP消耗率 = function(actorId,value) +{Zzy.SFF.AddActorTCR(actorId,value);} + +Zzy.SFF.SubActorTCR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[5] === undefined){pArr[5] = 0;} + pArr[5] -= value*0.01; +} + +var 减少角色TP消耗率 = function(actorId,value) +{Zzy.SFF.SubActorTCR(actorId,value);} + +Zzy.SFF.AddActorTCRV = function(actorId,variableId) +{Zzy.SFF.AddActorTCR(actorId,$gameVariables.value(variableId));} + +var 变量增加角色TP消耗率 = function(actorId,variableId) +{Zzy.SFF.AddActorTCRV(actorId,variableId);} + +Zzy.SFF.SubActorTCRV = function(actorId,variableId) +{Zzy.SFF.SubActorTCR(actorId,$gameVariables.value(variableId));} + +var 变量减少角色TP消耗率 = function(actorId,variableId) +{Zzy.SFF.SubActorTCRV(actorId,variableId);} + + + + + +Zzy.SFF.AddActorPDR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[6] === undefined){pArr[6] = 0;} + pArr[6] += value*0.01; +} + +var 增加角色物理伤害率 = function(actorId,value) +{Zzy.SFF.AddActorPDR(actorId,value);} + +Zzy.SFF.SubActorPDR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[6] === undefined){pArr[6] = 0;} + pArr[6] -= value*0.01; +} + +var 减少角色物理伤害率 = function(actorId,value) +{Zzy.SFF.SubActorPDR(actorId,value);} + +Zzy.SFF.AddActorPDRV = function(actorId,variableId) +{Zzy.SFF.AddActorPDR(actorId,$gameVariables.value(variableId));} + +var 变量增加角色物理伤害率 = function(actorId,variableId) +{Zzy.SFF.AddActorPDRV(actorId,variableId);} + +Zzy.SFF.SubActorPDRV = function(actorId,variableId) +{Zzy.SFF.SubActorPDR(actorId,$gameVariables.value(variableId));} + +var 变量减少角色物理伤害率 = function(actorId,variableId) +{Zzy.SFF.SubActorPDRV(actorId,variableId);} + + + + + +Zzy.SFF.AddActorMDR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[7] === undefined){pArr[7] = 0;} + pArr[7] += value*0.01; +} + +var 增加角色魔法伤害率 = function(actorId,value) +{Zzy.SFF.AddActorMDR(actorId,value);} + +Zzy.SFF.SubActorMDR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[7] === undefined){pArr[7] = 0;} + pArr[7] -= value*0.01; +} + +var 减少角色魔法伤害率 = function(actorId,value) +{Zzy.SFF.SubActorMDR(actorId,value);} + +Zzy.SFF.AddActorMDRV = function(actorId,variableId) +{Zzy.SFF.AddActorMDR(actorId,$gameVariables.value(variableId));} + +var 变量增加角色魔法伤害率 = function(actorId,variableId) +{Zzy.SFF.AddActorMDRV(actorId,variableId);} + +Zzy.SFF.SubActorMDRV = function(actorId,variableId) +{Zzy.SFF.SubActorMDR(actorId,$gameVariables.value(variableId));} + +var 变量减少角色魔法伤害率 = function(actorId,variableId) +{Zzy.SFF.SubActorMDRV(actorId,variableId);} + + + + + +Zzy.SFF.AddActorFDR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[8] === undefined){pArr[8] = 0;} + pArr[8] += value*0.01; +} + +var 增加角色地板伤害率 = function(actorId,value) +{Zzy.SFF.AddActorFDR(actorId,value);} + +Zzy.SFF.SubActorFDR = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[8] === undefined){pArr[8] = 0;} + pArr[8] -= value*0.01; +} + +var 减少角色地板伤害率 = function(actorId,value) +{Zzy.SFF.SubActorFDR(actorId,value);} + +Zzy.SFF.AddActorFDRV = function(actorId,variableId) +{Zzy.SFF.AddActorFDR(actorId,$gameVariables.value(variableId));} + +var 变量增加角色地板伤害率 = function(actorId,variableId) +{Zzy.SFF.AddActorFDRV(actorId,variableId);} + +Zzy.SFF.SubActorFDRV = function(actorId,variableId) +{Zzy.SFF.SubActorFDR(actorId,$gameVariables.value(variableId));} + +var 变量减少角色地板伤害率 = function(actorId,variableId) +{Zzy.SFF.SubActorFDRV(actorId,variableId);} + + + + +Zzy.SFF.AddActorEXP = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[9] === undefined){pArr[9] = 0;} + pArr[9] += value*0.01; +} + +var 增加角色经验值率 = function(actorId,value) +{Zzy.SFF.AddActorEXP(actorId,value);} + +Zzy.SFF.SubActorEXP = function(actorId,value) +{ + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[9] === undefined){pArr[9] = 0;} + pArr[9] -= value*0.01; +} + +var 减少角色经验值率 = function(actorId,value) +{Zzy.SFF.SubActorEXP(actorId,value);} + +Zzy.SFF.AddActorEXPV = function(actorId,variableId) +{Zzy.SFF.AddActorMDR(actorId,$gameVariables.value(variableId));} + +var 变量增加角色经验值率 = function(actorId,variableId) +{Zzy.SFF.AddActorEXPV(actorId,variableId);} + +Zzy.SFF.SubActorEXPV = function(actorId,variableId) +{Zzy.SFF.SubActorMDR(actorId,$gameVariables.value(variableId));} + +var 变量减少角色经验值率 = function(actorId,variableId) +{Zzy.SFF.SubActorEXPV(actorId,variableId);} + + + + + + +//========================================================================= +//Game_Actor +//========================================================================= +Zzy.SFF.Game_Actor_xparam = Game_Actor.prototype.xparam; +Game_Actor.prototype.xparam = function(xparamId) +{ + var value = Zzy.SFF.Game_Actor_xparam.call(this,xparamId); + var actorId = this.actorId(); + var pArr = $gameSystem.GetZzySFFExParam(actorId); + if(pArr[xparamId]) + {value += pArr[xparamId];}//增加额外数值 + return value; +}; + + +Zzy.SFF.Game_Actor_sparam = Game_Actor.prototype.sparam; +Game_Actor.prototype.sparam = function(sparamId) +{ + var value = Zzy.SFF.Game_Actor_sparam.call(this,sparamId); + var actorId = this.actorId(); + var pArr = $gameSystem.GetZzySFFSpParam(actorId); + if(pArr[sparamId]) + {value += pArr[sparamId];} + return value; +} + + + +//记录角色的信息 +Zzy.SFF.SaveActor = function(actorId) +{ + var actor = $gameActors.actor(actorId); + if(!actor){console.log('不存在ID为:'+actorId+'值的这个角色');return;} + var info = {}; + info.hp = actor.hp; + info.mp = actor.mp; + info.atk = actor.atk; + info.def = actor.def; + info.mat = actor.mat; + info.mdf = actor.mdf; + info.agi = actor.agi; + info.luk = actor.luk; + $gameSystem._ZzySFFActorParam[actorId] = info; +} + +var 缓存角色基本属性 = function(actorId) +{Zzy.SFF.SaveActor(actorId);} + + + +Zzy.SFF.LoadActor = function(actorId) +{ + var actor = $gameActors.actor(actorId); + if(!actor){console.log('不存在ID为:'+actorId+'值的这个角色');return;} + + var info = $gameSystem._ZzySFFActorParam[actorId]; + if(!info){console.log('没有通过SaveActor对角色进行提前存储');return;} + + Zzy.SFF.SetActorHP(actorId,info.hp); + Zzy.SFF.SetActorMP(actorId,info.mp); + Zzy.SFF.SetActorATK(actorId,info.atk); + Zzy.SFF.SetActorDEF(actorId,info.def); + Zzy.SFF.SetActorMAT(actorId,info.mat); + Zzy.SFF.SetActorMDF(actorId,info.mdf); + Zzy.SFF.SetActorAGI(actorId,info.agi); + Zzy.SFF.SetActorLUK(actorId,info.luk); +} + +var 读取角色基本属性 = function(actorId) +{Zzy.SFF.LoadActor(actorId);} + + +Zzy.SFF.SaveParty = function() +{ + var info = {}; + info.gold = $gameParty.gold(); + info.items = {}; + info.weapons = {}; + info.armors = {}; + info.actors = []; + + var items = $gameParty._items;//道具 + var weapons = $gameParty._weapons;//武器 + var armors = $gameParty._armors;//护甲 + + info.items = Zzy.SFF.Copy(items); + info.weapons = Zzy.SFF.Copy(weapons); + info.armors = Zzy.SFF.Copy(armors); + info.actors = Zzy.SFF.CopyPartyActors(); + + $gameSystem._ZzySFFPartyInfo = info; +} + +var 缓存队伍物品 = function() +{Zzy.SFF.SaveParty();} + + + +Zzy.SFF.LoadParty = function() +{ + var info = $gameSystem._ZzySFFPartyInfo; + Zzy.SFF.SetGold(info.gold);//设置金币数值 + + $gameParty._items = Zzy.SFF.Copy(info.items); + $gameParty._weapons = Zzy.SFF.Copy(info.weapons); + $gameParty._armors = Zzy.SFF.Copy(info.armors); + + + for(var i=0;i 1) + { + var min = parseInt(tArr[0]); + var max = parseInt(tArr[1]); + for(var k=min;k<=max;k++) + { + IDArr.push(k); + } + } + else + { + var value = parseInt(tArr[0]); + IDArr.push(value); + } + } + return IDArr; +} + +Zzy.SFF.DirToValue = function(dir) +{ + if(dir) + { + switch(dir) + { + case '不变':return 0; + case '下':return 2; + case '左':return 4; + case '右':return 6; + case '上':return 8; + } + } + return 0; +} + +Zzy.SFF.TypeToValue = function(type) +{ + if(type) + { + switch(type) + { + case '黑屏':return 0; + case '白屏':return 1; + case '无':return 2; + } + } + return 0; +} + + +Zzy.SFF.CauModeValue = function(mode) +{ + if(mode) + { + switch(type) + { + case '四舍五入':return 0; + case '向上截取':return 1; + case '向下截取':return 2; + } + } + return 0; +} \ No newline at end of file