//================================================================================================================== /*: * @plugindesc 不同职业对不同武器的熟练度 。 * * @author 多卡多卡 * * @help * ◆ 不同职业对不同武器的熟练度 * *如果要实现多个加成效果,就把第二个if里的复制一下改下参数就行了。 */ //================================================================================================================== var _Game_Action_executeDamage = Game_Action.prototype.executeDamage; Game_Action.prototype.executeDamage = function (target, value) { var list1 = [21,22];//职业Id var list2 = [1,2]; if(value > 0) { if(this.subject().isActor() && this.subject().actorId() == 1 && list1.contains(this.subject()._classId)){//角色的Id this.subject().equips().forEach(function (equip){ if (equip != null && equip.wtypeId != undefined && equip.wtypeId == 2/*假设镰刀的类型为5*/) value *= 2.2;/*伤害倍率*/ }); } if(this.subject().isActor() && this.subject().actorId() == 2 && list2.contains(this.subject()._classId)){//角色的Id this.subject().equips().forEach(function (equip){ if (equip != null && equip.wtypeId != undefined && equip.wtypeId == 3/*假设镰刀的类型为5*/) value *= 2.2;/*伤害倍率*/ { switch (equip.wtypeld){ case 2: value =Math.ceil(value * 1.2 ); break; case 3: value =Math.ceil(value * 2 ); break; } } }); } } _Game_Action_executeDamage.call(this, target, value); }
//==================================================================================================================
/*:
* @plugindesc 不同职业对不同武器的熟练度 。
*
* @author 多卡多卡
*
* @help
* ◆ 不同职业对不同武器的熟练度
*
*如果要实现多个加成效果,就把第二个if里的复制一下改下参数就行了。
*/
//==================================================================================================================
var _Game_Action_executeDamage = Game_Action.prototype.executeDamage;
Game_Action.prototype.executeDamage = function (target, value) {
var list1 = [21,22];//职业Id
var list2 = [1,2];
if(value > 0) {
if(this.subject().isActor() && this.subject().actorId() == 1 && list1.contains(this.subject()._classId)){//角色的Id
this.subject().equips().forEach(function (equip){
if (equip != null && equip.wtypeId != undefined && equip.wtypeId == 2/*假设镰刀的类型为5*/)
value *= 2.2;/*伤害倍率*/
});
}
if(this.subject().isActor() && this.subject().actorId() == 2 && list2.contains(this.subject()._classId)){//角色的Id
this.subject().equips().forEach(function (equip){
if (equip != null && equip.wtypeId != undefined && equip.wtypeId == 3/*假设镰刀的类型为5*/)
value *= 2.2;/*伤害倍率*/
{
switch (equip.wtypeld){
case 2: value =Math.ceil(value * 1.2 ); break;
case 3: value =Math.ceil(value * 2 ); break;
}
}
});
}
}
_Game_Action_executeDamage.call(this, target, value);
}
|