| 
 
| 赞 | 7 |  
| VIP | 0 |  
| 好人卡 | 1 |  
| 积分 | 8 |  
| 经验 | 1038 |  
| 最后登录 | 2023-9-28 |  
| 在线时间 | 55 小时 |  
 Lv2.观梦者 
	梦石0 星屑768 在线时间55 小时注册时间2017-8-8帖子34 | 
| 1.技能公式上做个判断 b.isStateAffected(状态ID)? 公式:0,这样会让这个技能打没有状态的0伤 
 复制代码Game_Action.prototype.apply = function(target) {
    var result = target.result();
    this.subject().clearResult();
    result.clear();
    result.used = this.testApply(target);
    result.missed = (result.used && Math.random() >= this.itemHit(target));
    result.evaded = (!result.missed && Math.random() < this.itemEva(target));
    result.physical = this.isPhysical();
    result.drain = this.isDrain();
    if (result.isHit() && this.isValid_EX(target)) {
        console.log(result)
        if (this.item().damage.type > 0) {
            result.critical = (Math.random() < this.itemCri(target));
            var value = this.makeDamageValue(target, result.critical);
            this.executeDamage(target, value);
        }
        this.item().effects.forEach(function(effect) {
            this.applyItemEffect(target, effect);
        }, this);
        this.applyItemUserEffect(target);
    }
};
//技能/道具标签 <目标有效状态:10>
Game_Action.prototype.isValid_EX = function(target) {
    var item = this.item();
    var validState = item.meta['目标有效状态'] || false;
    if(validState && !target.isStateAffected(Number(validState))){
        console.log(target,validState)
        return false;
    }
    return true;
};
技能/道具备注栏加个<目标有效状态:状态ID>这样使用的时候会判断有没有状态,有就生效没有不生效
 | 
 |