Created
September 15, 2017 07:28
-
-
Save keda-studio/52e4f701e706a99f9a4c7adc0301bf7d to your computer and use it in GitHub Desktop.
自動戦闘時の行動を完全にランダムにする ref: http://qiita.com/keda_studio/items/198ccb4c7ae27a68eac2
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_Action.prototype.evaluate = function() { | |
return Math.random(); | |
}; |
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 _Game_Action_evaluate = Game_Action.prototype.evaluate; | |
Game_Action.prototype.evaluate = function() { | |
// 72番のアクターのみランダム | |
if(this._subjectActorId == 72) { | |
return Math.random(); | |
} | |
return _Game_Action_evaluate.call(this); | |
}; |
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_Action.prototype.evaluate = function() { | |
var val = Math.random(); | |
// Skill68番を優先 | |
if(this.isSkill() && this._item._itemId == 68) { | |
val *= 2; | |
} | |
return val; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment