Project1

标题: 请问,如何做一个状态,附带时战斗结束经验金钱额外增加x% [打印本页]

作者: 忧郁答辩    时间: 2024-5-25 01:01
标题: 请问,如何做一个状态,附带时战斗结束经验金钱额外增加x%

如图,原版只有双倍,但我想要做一个状态,比如烤鱼,装备后战斗结束获得110%经验金币加成,大大烤鱼,结束获得150%加成.......
作者: 小秋橙    时间: 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());
    }, []);
};
作者: 忧郁答辩    时间: 2024-5-25 23:39
小秋橙 发表于 2024-5-25 21:25
Game_Party.prototype.partyAbility = function(abilityId) {
    return this.battleMembers().some(funct ...

好的!我回去试试!




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1