查看: 4194|回复: 4

[原创发布] 【原创】口袋妖怪式 能力升降

[复制链接]
梦石
0
星屑
196
在线时间
1037 小时
注册时间
2021-3-24
回帖
548

MZ评测员

发表于 2021-5-31 17:38:17 | 显示全部楼层 |阅读模式

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

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

×
  重新定义Buff,现在能力提升为战斗内永续,编辑器内的回合数变为等级提升量。
  HP MP提升无效。其他属性正负6级  (Base_Capa)
  基数为Base_Upg (负数从2/2-2/8 正数从2/2-8/2)


  1.     /**基础buff加成算法*/
  2.     /**
  3.      * 仿造口袋妖怪
  4.      * 大于0 为  (2+x)/2   1级 *1.5   2级*2  6级 *4
  5.      * 小于0 为 2/(x+2)    1级 *0.66    2级*0.5   6级*0.25
  6.      * */
  7.     Game_BattlerBase.prototype.paramBuffRate = function(paramId) {
  8.         return this._buffs[paramId] > 0 ? (Base_Upg + this._buffs[paramId]) / Base_Upg :Base_Upg  /  (Base_Upg+ Math.abs(this._buffs[paramId]))};
复制代码




  1.     /**能力提升上下限改变*/
  2.     /**
  3.      *原生只能提高/降低2级  这两个方法return 改变即可
  4.      **/
  5.     Game_BattlerBase.prototype.isMaxBuffAffected = function(paramId) {return this._buffs[paramId] >= Base_Capa;};
  6.     Game_BattlerBase.prototype.isMaxDebuffAffected = function(paramId) {return this._buffs[paramId] <= -1*Base_Capa;};
复制代码



  1.     /**添加正面效果*/
  2.     /**
  3.      * 原来第二个参数是truns 回合数
  4.      * 我将其作用变为等级提升,回合默认为1  ,配合下面的清空
  5.      * 做到能力提升在战斗能永续
  6.      * */
  7.     Game_Battler.prototype.addBuff = function(paramId, lvl) {
  8.         if (this.isAlive()) {
  9.             if(paramId>1) {this.increaseBuff(paramId,lvl);this._result.pushAddedBuff(paramId);}
  10.             else this._buffs[paramId] += lvl
  11.             this.overwriteBuffTurns(paramId, 1);
  12.             this.refresh();
  13.         }
  14.     };
  15.     Game_BattlerBase.prototype.increaseBuff = function(paramId,lvl) {if (!this.isMaxBuffAffected(paramId)) {this._buffs[paramId]+=lvl;if(this._buffs[paramId]>Base_Capa) this._buffs[paramId]=Base_Capa}};

  16.     /**添加减益效果*/
  17.     Game_Battler.prototype.addDebuff = function(paramId, lvl) {
  18.         if (this.isAlive()) {
  19.             if(paramId>1) {this.decreaseBuff(paramId,lvl);this._result.pushAddedDebuff(paramId);}
  20.             else {this._buffs[paramId] -= lvl; if (this._buffs[paramId]<0) this._buffs[paramId] =0}
  21.             this.overwriteBuffTurns(paramId, 1);
  22.             this.refresh();
  23.         }
  24.     };
  25.     Game_BattlerBase.prototype.decreaseBuff = function(paramId,lvl) {if (!this.isMaxDebuffAffected(paramId)) {this._buffs[paramId]-=lvl;if(this._buffs[paramId]<-1*Base_Capa) this._buffs[paramId]=-1*Base_Capa}};
复制代码


  1.    /**基础能力提升变为永续*/
  2.     /**
  3.      *将此方法清空
  4.      **/
  5.     Game_BattlerBase.prototype.updateBuffTurns = function() {};


  6.     /**修改状态图标*/
  7.     /**原生MV只有2级图标  这里我处理了一下 让高于2的显示2级*/
  8.     Game_BattlerBase.prototype.buffIconIndex = function(buffLevel, paramId) {
  9.         if (buffLevel > 0) return Game_BattlerBase.ICON_BUFF_START + (buffLevel>(paramId>1?Base_Upg/2:300)?1:0) * 8 + paramId;
  10.         else if (buffLevel < 0) return Game_BattlerBase.ICON_DEBUFF_START + (-1*buffLevel>Base_Upg/2?1:0) * 8 + paramId;
  11.     };
复制代码

Limpid_PeculiarRate.zip

1.52 KB, 下载次数: 41

全家活光光~
梦石
0
星屑
1532
在线时间
86 小时
注册时间
2014-6-13
回帖
96
发表于 2021-6-1 20:28:42 | 显示全部楼层
支持支持!!!
回复

使用道具 举报

梦石
0
星屑
191
在线时间
23 小时
注册时间
2021-8-17
回帖
17
发表于 2021-8-18 16:30:00 | 显示全部楼层
多谢分享,收藏一下。
回复

使用道具 举报

梦石
0
星屑
193
在线时间
59 小时
注册时间
2021-9-2
回帖
70
发表于 2021-9-3 22:35:16 | 显示全部楼层
正在做这个类型的   支持
回复

使用道具 举报

梦石
0
星屑
93
在线时间
17 小时
注册时间
2025-6-23
回帖
31
发表于 2025-6-25 14:05:29 | 显示全部楼层
66666666666
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部