小秋橙 发表于 2024-5-25 21:25 好的!我回去试试! |
Game_Party.prototype.partyAbility = function(abilityId) { return this.battleMembers().some(function(actor) { return actor.partyAbility(abilityId); }); }; Game_Party.prototype.hasEncounterHalf = function() { return this.partyAbility(Game_Party.ABILITY_ENCOUNTER_HALF); }; Game_Party.prototype.hasEncounterNone = function() { return this.partyAbility(Game_Party.ABILITY_ENCOUNTER_NONE); }; Game_Party.prototype.hasCancelSurprise = function() { return this.partyAbility(Game_Party.ABILITY_CANCEL_SURPRISE); }; Game_Party.prototype.hasRaisePreemptive = function() { return this.partyAbility(Game_Party.ABILITY_RAISE_PREEMPTIVE); }; Game_Party.prototype.hasGoldDouble = function() { return this.partyAbility(Game_Party.ABILITY_GOLD_DOUBLE); }; Game_Party.prototype.hasDropItemDouble = function() { return this.partyAbility(Game_Party.ABILITY_DROP_ITEM_DOUBLE); }; Game_Troop.prototype.expTotal = function() { return this.deadMembers().reduce(function(r, enemy) { return r + enemy.exp(); }, 0); }; Game_Troop.prototype.goldTotal = function() { return this.deadMembers().reduce(function(r, enemy) { return r + enemy.gold(); }, 0) * this.goldRate(); }; Game_Troop.prototype.goldRate = function() { return $gameParty.hasGoldDouble() ? 2 : 1; // 我建议改这个函数,返回某个变量的值即可,本函数位于 rpg_objects.js 第 5388 行。 }; Game_Troop.prototype.makeDropItems = function() { return this.deadMembers().reduce(function(r, enemy) { return r.concat(enemy.makeDropItems()); }, []); }; |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-16 07:46
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.