public override void OnDamageTarget(SkillObj self, SkillObj target, Damage damage, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { var buffIds = self.GetBuffIntParams(buffConfig).Skip(Key_Int_SummonObjBuffId_BuffConfig + 1); foreach (var buffId in buffIds.Where(b => b > 0)) { BattleModule.AddBuff(target, self, buffId, BattleReason.Buff); } return; }
// private const int key_BuffId1_SkillConfig = 0; // private const int key_BuffId2_SkillConfig = 1; // private const int key_BuffId3_SkillConfig = 2; public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { var buffIds = self.GetSkillIntParams(skillConfig); foreach (var buffId in buffIds) { BattleModule.AddBuff(target, self, buffId, BattleReason.Skill); } return(true); }
// private const int key_BuffId1_SkillConfig = 0; // private const int key_BuffId2_SkillConfig = 1; // private const int key_BuffId3_SkillConfig = 2; public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { var buffIds = self.GetBuffIntParams(buffConfig); foreach (var buffId in buffIds) { BattleModule.AddBuff(tarObj, self, buffId, BattleReason.Skill); } return; }
public override void OnSummon(int id, SkillObj self, SkillObj summonObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { if (summonObj != null) { var summonId = self.GetBuffIntParam(buffConfig, Key_Int_AddBuffSummonObjId_BuffConfig); var buffId = self.GetBuffIntParam(buffConfig, Key_Int_SummonObjBuffId_BuffConfig); if (summonId == id) { BattleModule.AddBuff(summonObj, self, buffId, BattleReason.Buff); } } }
// private const int key_BuffId3_SkillConfig = 2; public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { var buffId1 = self.GetSkillIntParam(skillConfig, key_BuffId1_SkillConfig); var buffId2 = self.GetSkillIntParam(skillConfig, key_BuffId2_SkillConfig); var tarBuff = target.GetBuffList().Where(b => target.GetBuffID(b) == buffId1); if (tarBuff != null && tarBuff.FirstOrDefault() != null) { BattleModule.AddBuff(target, self, buffId2, BattleReason.Skill); BattleModule.RemoveBuff(target, self, buffId1, BattleReason.Skill); } else { BattleModule.AddBuff(target, self, buffId1, BattleReason.Skill); BattleModule.RemoveBuff(target, self, buffId2, BattleReason.Skill); } return(true); }
public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { int id = self.GetSkillIntParam(skillConfig, key_SummonId); var summonTar = BattleModule.Summon(id, self, target, skillInfo, skillConfig); if (summonTar != null) { var buffIds = self.GetSkillIntParams(skillConfig); foreach (var buffId in buffIds.Skip(key_SummonId + 1)) { BattleModule.AddBuff(summonTar, self, buffId, BattleReason.Skill); } } { //int iBuffId = self.GetSkillIntParam(skillConfig, key_BuffId); //if (iBuffId > 0) //{ // BattleModule.AddBuff(summonTar, self, iBuffId, BattleReason.Skill); //} } return(true); }
//private const int Key_Double_BuffBegin_SkillConfig = 0; public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { if (self.GetCamp() != target.GetCamp()) { int iDamamge = self.GetSkillIntParam(skillConfig, Key_Damege_SkillConfig); Damage damage = BattleModule.CreateDamage(iDamamge); BattleModule.DamageTarget(target, self, damage); var buffIds = self.GetSkillIntParams(skillConfig).Skip(Key_Damege_SkillConfig + 1); foreach (var buffId in buffIds) { BattleModule.AddBuff(target, self, buffId, BattleReason.Skill); } } else { var buffIds = self.GetSkillDoubleParams(skillConfig).Select(d => (int)d); foreach (var buffId in buffIds) { BattleModule.AddBuff(target, self, buffId, BattleReason.Skill); } } return(true); }