| 赞 | 14  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 27 | 
 
| 经验 | 1070 | 
 
| 最后登录 | 2025-6-20 | 
 
| 在线时间 | 214 小时 | 
 
 
 
 
 
Lv3.寻梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 2747 
 
        - 在线时间
 - 214 小时
 
        - 注册时间
 - 2017-9-28
 
        - 帖子
 - 283
 
 
 
 | 
	
估计你要的东东跟下面的源程序有关 
Game_Action.prototype.itemEffectAddState = function(target, effect) { 
    if (effect.dataId === 0) { 
        this.itemEffectAddAttackState(target, effect); 
    } else { 
        this.itemEffectAddNormalState(target, effect); 
    } 
}; 
 
Game_Action.prototype.itemEffectAddAttackState = function(target, effect) { 
    this.subject().attackStates().forEach(function(stateId) { 
        var chance = effect.value1; 
        chance *= target.stateRate(stateId); 
        chance *= this.subject().attackStatesRate(stateId); 
        chance *= this.lukEffectRate(target); 
        if (Math.random() < chance) { 
            target.addState(stateId); 
            this.makeSuccess(target); 
        } 
    }.bind(this), target); 
}; 
 
Game_Action.prototype.itemEffectAddNormalState = function(target, effect) { 
    var chance = effect.value1; 
    if (!this.isCertainHit()) { 
        chance *= target.stateRate(effect.dataId); 
        chance *= this.lukEffectRate(target); 
    } 
    if (Math.random() < chance) { 
        target.addState(effect.dataId); 
        this.makeSuccess(target); 
    } 
}; 
stateRate(stateId)估计就是状态有效度吧,这里面还有幸运值修正 |   
 
 
 
 |