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

Project1

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

[已经过期] 有没有手动升级

[复制链接]

Lv1.梦旅人

梦石
0
星屑
110
在线时间
85 小时
注册时间
2010-8-19
帖子
137
跳转到指定楼层
1
发表于 2017-6-18 10:07:16 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
求一个,当前经验超过升级所需经验的时候也不会升级,需要玩家手动选择以后才能升级的插件

Lv1.梦旅人

梦石
0
星屑
50
在线时间
370 小时
注册时间
2016-1-7
帖子
81
2
发表于 2017-6-21 22:14:17 | 只看该作者
本帖最后由 在野月光 于 2017-6-21 22:19 编辑

JAVASCRIPT 代码复制
  1. //------------------------------------------
  2. // 人工升级@MV1.3.5 for Win7-32
  3. //------------------------------------------
  4. var MLC = MLC || {};
  5.  
  6. //----------------------- 更改经验值(角色当前的经验值, 是否显示升级效果)
  7. Game_Actor.prototype.changeExp = function(exp, show) {
  8.     this._exp[this._classId] = Math.max(exp, 0);
  9.     var lastLevel = this._level;
  10.     var lastSkills = this.skills();
  11.         if($gameTemp._upGrade){                // <<<
  12.                 while (!this.isMaxLevel() && this.currentExp() >= this.nextLevelExp()) {
  13.                         this.levelUp();
  14.                 }
  15.                 while (this.currentExp() < this.currentLevelExp()) {
  16.                         this.levelDown();
  17.                 }
  18.                 if (show && this._level > lastLevel) {
  19.                         this.displayLevelUp(this.findNewSkills(lastSkills));
  20.                 }
  21.                 this.refresh();
  22.  
  23.         };                // <<<
  24. };
  25.  
  26. //----------------------- 刷新角色状态窗口
  27. MLC.windowStatus_refresh = Window_Status.prototype.refresh;
  28. Window_Status.prototype.refresh = function() {
  29.         MLC.windowStatus_refresh.call(this);
  30.         if (this._actor) {
  31.                 this.createButton();
  32.         };
  33. };
  34.  
  35. //----------------------- 创建按钮(图片文件名, 单元图像大小)
  36. Window_Status.prototype.createButton = function(filename, spec) {
  37.         var sz= spec || 48;        // 图片规格(宽×高):288×96,样式:6×2 ,预置单元大小:48×48
  38.         var name = filename || 'ButtonSet';
  39.         var levelUpButton = ImageManager.loadSystem(name);
  40.         this.buttonSprite  = new Sprite_Button();
  41.         this.buttonSprite.bitmap = levelUpButton;
  42.         this.addChild(this.buttonSprite);
  43.         this.buttonSprite.setColdFrame(sz*3, sz, sz, sz);
  44.         this.buttonSprite.setHotFrame(sz*3, 0, sz, sz);
  45.         this.buttonSprite.x = this.width / 2;       // 按钮水平坐标
  46.         this.buttonSprite.y = sz * 7 / 4;            // 按钮垂直坐标
  47.         this.buttonSprite.setClickHandler(this.onButtonOk.bind(this));
  48. };
  49.  
  50. //----------------------- 点击按钮
  51. Window_Status.prototype.onButtonOk = function() {
  52.         var exp = this._actor.currentExp();
  53.         $gameTemp._upGrade = true;
  54.         this._actor.changeExp(exp, false);        // 已屏蔽升级效果
  55.         SceneManager.goto(Scene_Status)
  56.         $gameTemp._upGrade = false;                                               
  57. };
  58.  
  59. //----------------------- 刷新画面
  60. MLC.windowStatus_drawExpInfo = Window_Status.prototype.drawExpInfo;
  61. Window_Status.prototype.drawExpInfo = function(x, y) {
  62.         MLC.windowStatus_drawExpInfo.call(this, x, y);
  63.         if(this._actor.nextRequiredExp() < 0){
  64.                 var h = this.lineHeight();
  65.                 this.contents.clearRect(x, y + h * 3, 270, h);
  66.                 this.drawText('0', x, y + h * 3, 270, 'right');
  67.         };
  68. };



回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
110
在线时间
85 小时
注册时间
2010-8-19
帖子
137
3
 楼主| 发表于 2017-6-21 22:21:32 | 只看该作者
在野月光 发表于 2017-6-21 22:14
//------------------------------------------
// 人工升级@MV1.3.5 for Win7-32
//------------------- ...

这个升级按钮在哪
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
370 小时
注册时间
2016-1-7
帖子
81
4
发表于 2017-6-21 22:27:25 | 只看该作者



回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-29 09:54

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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