Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Game_BattlerBase.prototype.paySkillCost = function (skill) {
- var bloodMagicItems = [];
- if (this.isActor()) {
- bloodMagicItems = this.equips().filter(function (equip) {
- if (!equip) { return; }
- return equip.note.indexOf('<BloodMagic>') !== -1
- });
- }
- if (bloodMagicItems.length || skill.note.indexOf('<BloodMagic>') !== -1) {
- this._hp -= this.skillMpCost(skill);
- } else {
- this._mp -= this.skillMpCost(skill);
- }
- this._tp -= this.skillTpCost(skill);
- };
- Game_BattlerBase.prototype.canPaySkillCost = function (skill) {
- var bloodMagicItems = [];
- if (this.isActor()) {
- bloodMagicItems = this.equips().filter(function (equip) {
- if (!equip) { return; }
- return equip.note.indexOf('<BloodMagic>') !== -1
- });
- }
- if (bloodMagicItems.length || skill.note.indexOf('<BloodMagic>') !== -1) {
- return this._hp >= this.skillMpCost(skill);
- } else {
- return this._tp >= this.skillTpCost(skill) && this._mp >= this.skillMpCost(skill);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement