This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
/** | |
* callOriginalFunction | |
* オリジナルの関数です。イベントコマンドの「スクリプト」から「this.callOriginalFunction()」で呼べます。 | |
*/ | |
Game_Interpreter.prototype.callOriginalFunction = function() { | |
// do something | |
this.wait(60); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test() { | |
this.initialize.apply(this, arguments); | |
} | |
Test.prototype.initialize = function() { | |
this.aaa = 1; | |
}; | |
var t = new Test(); | |
console.log(t.aaa); // -> 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
var _Game_Actor_initSkills = Game_Actor.prototype.initSkills; | |
Game_Actor.prototype.initSkills = function() { | |
this._initSkillsComplete = false; | |
_Game_Actor_initSkills.apply(this, arguments); | |
this._initSkillsComplete = true; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var eventId = 10; | |
var character = this.character(eventId); | |
var pattern = 0; | |
character._originalPattern = pattern; | |
character._pattern = pattern; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var originalId = 1; | |
var copyId = 2; | |
var newPicure = JsonEx.makeDeepCopy($gameScreen.picture(originalId)); | |
$gameScreen._pictures[copyId] = newPicure; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Game_Actor.prototype.die = function() { | |
// this._equipsはアクターオブジェクトにしか存在しない。 | |
// よってGame_Actorにdieメソッドを定義して親であるGame_Battlerのdieメソッドを呼び出す。 | |
Game_Battler.prototype.die.apply(this, arguments); | |
if (this._equips) { | |
this._equips[5].setObject(null); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// バトルログに任意の文章を追加 | |
BattleManager._logWindow.addText('aaa'); | |
// 追加した文字をクリア | |
BattleManager._logWindow.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gameParty.members().reduce(function(sum, actor) {return sum + actor.mp;}, 0); |