private void propertyKill() { _battleStatus = CMsgHeader.STATUS_PROPERTY_KILL; float[] proMul = BT_WarUtils.propertyVs(_curAtter._property, _curDefer._property); if (proMul[0] > 1) { //无视属性克制 if (_curDefer.shouldCastIgnorePropertyKill()) { return; } } if (proMul[1] > 1) { //无视属性克制 if (_curAtter.shouldCastIgnorePropertyKill()) { return; } } _curAtter.curAttEnhance(proMul[0]); if (_isWorldBoss == 0)//不是世界boss { _curDefer.curAttEnhance(proMul[1]); } CMsgPropertyEnchance msg = new CMsgPropertyEnchance(proMul[0], proMul[1], _curAtter.curAtt, _curDefer.curAtt); addMsgToRecorder(msg); }
// TODO: 变更当前攻击力技能 // 增加 自己/对手 当前战斗力X% type:0---百分比 1---固定值 private void castChangeAttackSkill(bool beOwner, float addRate, int type = 0, int angryCost = 0) { BT_Logical war = owner._war; BT_Monster enemy = war.enemy(owner); BT_Monster target = beOwner ? owner : enemy; if (target.alive) { if (angryCost > 0) // 扣怒气... { BT_MonsterTeam selfTeam = owner.ownerTeam; selfTeam.costAngry(angryCost); } CMsgSkillChangeAttack msg = new CMsgSkillChangeAttack(this, target.pveId); int beforeAtt = target.curAtt; if (0 == type) { if (beOwner) { target.curAttEnhance(1 + addRate * 0.01f); } else { int hp = target.curAtt; float damage = hp * addRate * 0.01f; damage = returnDamage(owner, enemy, damage); if (false == target.canSufferSkillDamage()) { damage = 0; } target.curAttAdd(-damage); // target.curAttEnhance ( 1 - addRate / 100 ); } } else { target.curAttAdd(addRate); } int afterAtt = target.curAtt; msg.curAtt = afterAtt; msg.addAtt = afterAtt - beforeAtt; war.addMsgToRecorder(msg); } }