Exemple #1
0
        public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);

            if (ret == LogicStateTickRet.TimeFinish)
            {
                return(ret);
            }
            double effectTickTime = self.GetBuffStateDoubleParam(buffConfig, key_EffectTickTime, self.GetBuffStateIndex(buffInfo));

            if (effectTickTime < 0)
            {
                self.LogInfo("TickBuffState:buffObj[{0}] buff:[{1}] Tick Effect effectTickTime< 0".F(self.GetID(), self.GetBuffID(buffInfo)));
                return(LogicStateTickRet.TimeFinish);
            }
            self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) - self.GetDeltaTime());
            var leftTickTime = self.GetBuffStateDoubleParam(buffInfo, key_ticlLeftTime_BuffInfo);

            if (leftTickTime - self.GetBuffStateTime(buffInfo) >= effectTickTime)
            {
                self.SetBuffStateDoubleParam(buffInfo, key_ticlLeftTime_BuffInfo, leftTickTime - effectTickTime);
                self.LogInfo("TickBuffState:buffObj[{0}] buff:[{1}] Tick Effect".F(self.GetID(), self.GetBuffID(buffInfo)));
                ret = LogicStateTickRet.OnEffect;
            }
            else if (self.GetBuffStateTime(buffInfo) <= 0)
            {
                ret = LogicStateTickRet.NextState;
                self.LogInfo("TickBuffState:buffObj[{0}] buff:[{1}] Tick Finish".F(self.GetID(), self.GetBuffID(buffInfo)));
            }
            else
            {
                ret = LogicStateTickRet.None;
            }
            return(ret);
        }
        public override void InitState(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig, double fixTime)
        {
            int index = self.GetBuffStateIndex(buffInfo);
            var time  = self.GetBuffStateTime(buffConfig, index);

            self.SetBuffStateTime(buffInfo, time + fixTime);
        }
Exemple #3
0
        public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);

            if (ret == LogicStateTickRet.TimeFinish)
            {
                return(ret);
            }
            self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) - self.GetDeltaTime());
            //help harm 判断是否停留
            int  harmHelpType  = self.GetBuffStateIntParam(buffConfig, Key_Int__BuffConfig, self.GetBuffStateIndex(buffInfo));
            bool needNextState = false;

            switch (harmHelpType)
            {
            case 1:
                //这个是友好,没错
                needNextState = self.GetCamp() != self.GetSrcCamp(buffInfo);
                break;

            case 2:
                //这个是友好,没错敌对
                needNextState = self.GetCamp() == self.GetSrcCamp(buffInfo);
                break;
            }
            if (self.GetBuffStateTime(buffInfo) <= 0 || needNextState)
            {
                ret = LogicStateTickRet.NextState;
                self.LogInfo("ChargeState:buffObj[{0}] buff:[{1}] ShowEffectState Finish".F(self.GetID(), self.GetBuffID(buffInfo)));
            }
            return(ret);
        }
 public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);
     if (ret == LogicStateTickRet.TimeFinish)
     {
         return ret;
     }
     self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) - self.GetDeltaTime());
     //help harm 判断是否停留
     int harmHelpType = self.GetBuffStateIntParam(buffConfig, Key_Int__BuffConfig, self.GetBuffStateIndex(buffInfo));
     bool needNextState = false;
     switch(harmHelpType)
     {
         case 1:
             //这个是友好,没错
             needNextState = self.GetCamp() != self.GetSrcCamp(buffInfo);
             break;
         case 2:
             //这个是友好,没错敌对
             needNextState = self.GetCamp() == self.GetSrcCamp(buffInfo);
             break;
     }
     if (self.GetBuffStateTime(buffInfo) <= 0 || needNextState)
     {
         ret = LogicStateTickRet.NextState;
         self.LogInfo("ChargeState:buffObj[{0}] buff:[{1}] ShowEffectState Finish".F(self.GetID(), self.GetBuffID(buffInfo)));
     }
     return ret;
 }
		public override void OnDie(SkillObj self, SkillObj attacker, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
		{
			return;
			if (self.GetBuffIntParam(buffInfo, Key_Int_Bombed_BuffInfo) != Key_Int_Bombed_Value)
			{
				var targetSelectName = self.GetTargetSelect(buffConfig);
				var targetSelect = BattleModule.GetTargetSelect(targetSelectName);
				if (targetSelect == null)
				{
					self.LogInfo("targetSelect == null buffId:[{0}] targetSelectName:[{1}]".F(self.GetBuffID(buffInfo), targetSelectName));
					return;
				}
				var targetTypeName = self.GetTargetType(buffConfig);
				var targetType = BattleModule.GetTargetType(targetTypeName);
				if (targetType == null)
				{
					self.LogInfo("targetSelect == null buffId:[{0}] targetType:[{1}]".F(self.GetBuffID(buffInfo), targetTypeName));
					return;
				}
				var targets = BattleModule.GetTargets(self, targetSelect, targetType, buffInfo, buffConfig);
				foreach (var tar in targets.Where(t => !t.IsDead()))
				{
					OnEffect(self, tar, buffInfo, buffConfig);
				}
			}
		}
        public override void Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            Dictionary <int, int> keyValues = new Dictionary <int, int>();

            foreach (var buff in self.GetBuffIntParams(buffConfig).Skip(Key_Int_SummonId_BuffConfig + 1))
            {
                keyValues.Add(buff, buff);
            }
            bool bAddTime = false;

            foreach (var buff in self.GetBuffList(true))
            {
                int buffId = self.GetBuffID(buff);
                if (keyValues.ContainsKey(buffId))
                {
                    bAddTime = true;
                    break;
                }
            }
            if (bAddTime)
            {
                self.SetBuffTime(buffInfo, self.GetBuffTime(buffInfo) + self.GetDeltaTime());
                self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) + self.GetDeltaTime());
                self.NotifyBuffInfo(buffInfo, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
            }
            base.Tick(self, buffInfo, buffConfig);
        }
Exemple #7
0
 public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);
     if (ret == LogicStateTickRet.TimeFinish)
     {
         return ret;
     }
     double effectTickTime = self.GetBuffStateDoubleParam(buffConfig, key_EffectTickTime, self.GetBuffStateIndex(buffInfo));
     if(effectTickTime < 0)
     {
         self.LogInfo("TickBuffState:buffObj[{0}] buff:[{1}] Tick Effect effectTickTime< 0".F(self.GetID(), self.GetBuffID(buffInfo)));
         return LogicStateTickRet.TimeFinish;
     }
     self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) - self.GetDeltaTime());
     var leftTickTime = self.GetBuffDoubleParam(buffInfo, key_ticlLeftTime_BuffInfo);
     if (leftTickTime - self.GetBuffStateTime(buffInfo) >= effectTickTime)
     {
         self.SetBuffDoubleParam(buffInfo, leftTickTime - effectTickTime, key_ticlLeftTime_BuffInfo);
         self.LogInfo("TickBuffState:buffObj[{0}] buff:[{1}] Tick Effect".F(self.GetID(), self.GetBuffID(buffInfo)));
         ret = LogicStateTickRet.OnEffect;
     }
     else if (self.GetBuffStateTime(buffInfo) <= 0)
     {
         ret = LogicStateTickRet.NextState;
         self.LogInfo("TickBuffState:buffObj[{0}] buff:[{1}] Tick Finish".F(self.GetID(), self.GetBuffID(buffInfo)));
     }
     else
     {
         ret = LogicStateTickRet.None;
     }
     return ret;
 }
Exemple #8
0
 public override void InitState(SkillObj self, BuffInfo_New biffInfo, BuffConfig_New buffConfig, double fixTime)
 {
     int index = self.GetBuffStateIndex(biffInfo);
     var time = self.GetBuffStateTime(buffConfig, index) + fixTime;
     self.SetBuffStateTime(biffInfo, time);
     self.SetBuffDoubleParam(biffInfo, time, key_ticlLeftTime_BuffInfo);
 }
		public override void Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
		{
			Dictionary<int, int> keyValues = new Dictionary<int, int>();
			foreach(var buff in self.GetBuffIntParams(buffConfig).Skip(Key_Int_SummonId_BuffConfig+1))
			{
				keyValues.Add(buff, buff);
			}
			bool bAddTime = false;
			foreach (var buff in self.GetBuffList(true))
			{
				int buffId = self.GetBuffID(buff);
				if(keyValues.ContainsKey(buffId))
				{
					bAddTime = true;
					break;
				}
			}
			if (bAddTime)
			{
				self.SetBuffTime(buffInfo, self.GetBuffTime(buffInfo) + self.GetDeltaTime());
				self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) + self.GetDeltaTime());
				self.NotifyBuffInfo(buffInfo, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
			}
			base.Tick(self, buffInfo, buffConfig);

		}
Exemple #10
0
        public static SkillObj Summon(int id, SkillObj srcObj, SkillObj tarObj, SkillInfo_New skillInfo, SkillConfig_New skillConfig)
        {
            SkillObj summonObj = null;

            if (srcObj != null)
            {
                summonObj = srcObj.Summon(id, tarObj, skillInfo, skillConfig);
                var srcBuffList = srcObj.GetBuffList();
                //Source buff fix
                if (srcBuffList != null)
                {
                    foreach (var buffInfo in srcBuffList)
                    {
                        BuffLogic buffLogic = GetBuffLogic(buffInfo, srcObj);
                        int       buffId    = srcObj.GetBuffID(buffInfo);
                        if (buffLogic != null)
                        {
                            BuffConfig_New buffConfig = srcObj.GetBuffConfig(buffId);
                            buffLogic.OnSummon(id, srcObj, summonObj, buffInfo, buffConfig);
                        }
                        else
                        {
                            srcObj.LogInfo("something error in BattleModule.Summon src buff:[{0}]".F(buffId));
                        }
                    }
                }
            }
            return(summonObj);
        }
Exemple #11
0
 public virtual void BuffOnEnd(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     if (self.GetBuffTime(buffInfo) > 0)
     {
         self.SetBuffTime(buffInfo, 0);
     }
     self.NotifyBuffInfo(buffInfo, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
 }
Exemple #12
0
        public override void InitState(SkillObj self, BuffInfo_New biffInfo, BuffConfig_New buffConfig, double fixTime)
        {
            int index = self.GetBuffStateIndex(biffInfo);
            var time  = self.GetBuffStateTime(buffConfig, index) + fixTime;

            self.SetBuffStateTime(biffInfo, time);
            self.SetBuffStateDoubleParam(biffInfo, key_ticlLeftTime_BuffInfo, time);
        }
 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 ;
 }
Exemple #14
0
 // 		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 ;
 }
Exemple #15
0
 public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     int healValue = self.GetBuffIntParam(buffConfig, HealValueKey);
     if (healValue > 0)
     {
         Damage heal = BattleModule.CreateDamage(-healValue);
         BattleModule.DamageTarget(tarObj, self, heal);
     }
 }
		public override void OnDamageTarget(SkillObj self, SkillObj target, Damage damage, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
		{
			if(damage.value > 0 && self != target)
			{
				double addTime = self.GetBuffDoubleParam(buffConfig, Key_Double_AddTime_BuffConfig);
				self.SetBuffTime(buffInfo, self.GetBuffTime(buffInfo) + addTime);
				self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) + addTime);
				self.NotifyBuffInfo(buffInfo, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
			}
		}
 public override bool InitBuffInfo(SkillObj self, SkillObj srcObj, BattleReason reason, BuffInfo_New buffInfo, BuffConfig_New buffConfig, bool RefreshGUID = true)
 {
     base.InitBuffInfo(self, srcObj, reason, buffInfo, buffConfig, RefreshGUID);
     int absorbDamage = self.GetBuffIntParam(buffConfig, AbsorbDamageKey);
     if(absorbDamage > 0)
     {
         self.SetBuffIntParam(buffInfo, AbsorbDamageKey, absorbDamage);
     }
     return true;
 }
Exemple #18
0
        /// <summary>
        /// 单人技能的tick,这个需要手动调用
        /// </summary>
        /// <param name="self"></param>
        public static void Tick_Battle(SkillObj self)
        {
            if (self.IsDead())
            {
                return;
            }
            var skillList = self.GetSkillList(true);
            var buffList  = self.GetBuffList(true);
            var CDKeyList = self.GetCDKeyList();

            //buff
            if (buffList != null)
            {
                foreach (var buffInfo in buffList)
                {
                    BuffLogic buffLogic = GetBuffLogic(buffInfo, self);
                    if (buffLogic != null)
                    {
                        int            buffId     = self.GetBuffID(buffInfo);
                        BuffConfig_New buffConfig = self.GetBuffConfig(buffId);
                        buffLogic.Tick(self, buffInfo, buffConfig);
                    }
                    else
                    {
                        self.LogInfo("something error {0}".F(self.GetBuffID(buffInfo)));
                    }
                }
            }
            //技能
            if (skillList != null)
            {
                foreach (var skillInfo in skillList)
                {
                    SkillLogic skillLogic = GetSkillLogic(skillInfo, self);
                    if (skillLogic != null)
                    {
                        int             skillId     = self.GetSkillID(skillInfo);
                        SkillConfig_New skillConfig = self.GetSkillConfig(skillId);
                        skillLogic.Tick(self, skillInfo, skillConfig);
                    }
                    else
                    {
                        self.LogInfo("something error2 {0}".F(self.GetSkillID(skillInfo)));
                    }
                }
            }
            //CD
            if (CDKeyList != null)
            {
                foreach (var key in CDKeyList)
                {
                    self.SetCD(key, self.GetCD(key) - self.GetDeltaTime());
                }
            }
        }
Exemple #19
0
 public virtual bool CommonCheck(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     if (!self.CommonCheck() || self.IsDead())
     {
         return(false);
     }
     if (IsEnd(self, buffInfo, buffConfig))
     {
         return(false);
     }
     return(true);
 }
 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);
         }
     }
 }
Exemple #21
0
        public static bool IsActionLimited(SkillObj self, ActionLimitType limit)
        {
            var skillList = self.GetSkillList();
            var buffList  = self.GetBuffList();

            //buff
            if (buffList != null)
            {
                foreach (var buffInfo in buffList)
                {
                    BuffLogic buffLogic = GetBuffLogic(buffInfo, self);
                    if (buffLogic != null)
                    {
                        int            buffId     = self.GetBuffID(buffInfo);
                        BuffConfig_New buffConfig = self.GetBuffConfig(buffId);
                        if (buffLogic.IsActionLimited(self, limit, buffInfo, buffConfig))
                        {
                            return(true);
                        }
                    }
                    else
                    {
                        self.LogInfo("something error {0}".F(self.GetBuffID(buffInfo)));
                    }
                }
            }
            //技能
            if (skillList != null)
            {
                foreach (var skillInfo in skillList)
                {
                    SkillLogic skillLogic = GetSkillLogic(skillInfo, self);
                    if (skillLogic != null)
                    {
                        int             skillId     = self.GetSkillID(skillInfo);
                        SkillConfig_New skillConfig = self.GetSkillConfig(skillId);
                        if (skillLogic.IsActionLimited(self, limit, skillInfo, skillConfig))
                        {
                            return(true);
                        }
                    }
                    else
                    {
                        self.LogInfo("something error2 {0}".F(self.GetSkillID(skillInfo)));
                    }
                }
            }
            return(false);
        }
 public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);
     if (ret == LogicStateTickRet.TimeFinish)
     {
         return ret;
     }
     self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) - self.GetDeltaTime());
     if (self.GetBuffStateTime(buffInfo) <= 0)
     {
         ret = LogicStateTickRet.NextState;
         self.LogInfo("ChargeState:buffObj[{0}] buff:[{1}] ShowEffectState Finish".F(self.GetID(), self.GetBuffID(buffInfo)));
     }
     return ret;
 }
 public override Damage BeHurtDamageFix(SkillObj self, SkillObj source, Damage damage, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     int shield = self.GetBuffIntParam(buffInfo, AbsorbDamageKey);
     if(shield > damage.value)
     {
         shield -= damage.value;
         damage.value = 0;
     }
     else
     {
         damage.value -= shield;
         shield = 0;
         BuffOnEnd(self, buffInfo, buffConfig);
     }
     return damage;
 }
        public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);

            if (ret == LogicStateTickRet.TimeFinish)
            {
                return(ret);
            }
            self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) - self.GetDeltaTime());
            if (self.GetBuffStateTime(buffInfo) <= 0)
            {
                ret = LogicStateTickRet.NextState;
                self.LogInfo("ChargeState:buffObj[{0}] buff:[{1}] ShowEffectState Finish".F(self.GetID(), self.GetBuffID(buffInfo)));
            }
            return(ret);
        }
 public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);
     if (ret == LogicStateTickRet.TimeFinish)
     {
         return ret;
     }
     if (self.GetBuffStateIntParam(buffInfo, key) == NotEffect)
     {
         self.SetBuffStateIntParam(buffInfo, key, Effected);
         return LogicStateTickRet.OnEffect;
     }
     else
     {
         return LogicStateTickRet.NextState;
     }
     return ret;
 }
		public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
		{
			int damageValue = 999999999;
			int damageByMyHP = self.GetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo);
			int damageTarPerByMyHP = self.GetBuffIntParam(buffConfig, Key_Int_DamageTarPerByMyHP_BuffConfig); 
			if (self == tarObj)
			{
				if (damageByMyHP <= 0)
				{
					damageByMyHP = self.GetHP()* damageTarPerByMyHP /10000;
					self.SetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo, damageByMyHP);
				}
				if (damageValue > 0)
				{
					Damage damage = BattleModule.CreateDamage(damageValue, bNeedCalc : false);
					BattleModule.DamageTarget(tarObj, self, damage);
				}

				int summonId = self.GetBuffIntParam(buffConfig, Key_Int_SummonId_BuffConfig);
				if(summonId > 0)
				{
					var summonTar = BattleModule.Summon(summonId, self, self, null, null);
				}
			}
			else
			{
				if (damageByMyHP <= 0)
				{
					damageByMyHP = self.GetHP() * damageTarPerByMyHP / 10000;
					self.SetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo, damageByMyHP);
					if(damageByMyHP < 0 )
					{
						damageByMyHP = 0;
					}
				}
				damageValue = self.GetBuffIntParam(buffConfig, Key_Int_DamageTarPer_BuffConfig) * tarObj.GetMaxHP()/10000 + damageByMyHP;
				if (damageValue > 0)
				{
					Damage damage = BattleModule.CreateDamage(damageValue, bNeedCalc: false);
					BattleModule.DamageTarget(tarObj, self, damage);
				}
			}
			self.SetBuffIntParam(buffInfo, Key_Int_Bombed_BuffInfo, Key_Int_Bombed_Value);
		}
        public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);

            if (ret == LogicStateTickRet.TimeFinish)
            {
                return(ret);
            }
            if (self.GetBuffStateIntParam(buffInfo, key) == NotEffect)
            {
                self.SetBuffStateIntParam(buffInfo, key, Effected);
                return(LogicStateTickRet.OnEffect);
            }
            else
            {
                return(LogicStateTickRet.NextState);
            }
            return(ret);
        }
 public override BuffSuperpositionRet OnBuffSuperposition(SkillObj tarObj, SkillObj srcObj, BattleReason reason, BuffConfig_New buffConfig)
 {
     BuffSuperpositionRet ret;
     ret.bType = BuffSuperpositionType.None;
     ret.buff = null;
     var tarBuff = tarObj.GetBuffList().Where(b => tarObj.GetBuffID(b) == tarObj.GetBuffID(buffConfig));
     if (tarBuff != null && tarBuff.FirstOrDefault() != null)
     {
         ret.bType = BuffSuperpositionType.Refresh;
         var buff = tarBuff.First();
         ret.buff = buff;
     }
     else
     {
         ret.bType = BuffSuperpositionType.Add;
         ret.buff = new BuffInfo_New();
     }
     return ret;
 }
        public override BuffSuperpositionRet OnBuffSuperposition(SkillObj tarObj, SkillObj srcObj, BattleReason reason, BuffConfig_New buffConfig)
        {
            BuffSuperpositionRet ret;
            ret.bType = BuffSuperpositionType.None;
            ret.buff = null;
            var buffKey = tarObj.GetBuffKey(buffConfig);
            foreach (var tarBuff in tarObj.GetBuffList())
            {
                var tarBuffConfig = tarObj.GetBuffConfig(tarObj.GetBuffID(tarBuff));
                if(tarBuffConfig != null && tarObj.GetBuffKey(tarBuffConfig).Equals(buffKey))
                {
                    BattleModule.RemoveBuff(tarObj, srcObj, tarObj.GetBuffID(tarBuff), BattleReason.Replace);
                    //BattleModule.DetachBuff(tarObj, srcObj, tarBuff, tarBuffConfig);
                }
            }

            ret.bType = BuffSuperpositionType.Add;
            ret.buff = new BuffInfo_New();
            return ret;
        }
Exemple #30
0
        //public override double OnDataFix(SkillObj self, PropertyType pType, double pValue, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        public override void OnAttach(SkillObj self, SkillObj srcObj, BuffInfo_New buff, BuffConfig_New buffConfig)
        {
            if (self is Object.Tank)
            {
                Object.Tank tank = self as Object.Tank;
                //double pValue = tank.Spd2011;
                int GChangeType = self.GetBuffIntParam(buffConfig, Key_Int_GChangeType_BuffConfig);
                int FChangeType = self.GetBuffIntParam(buffConfig, Key_Int_FChangeType_BuffConfig);
                int bGFChanged = self.GetBuffIntParam(buff, Key_Int_GFChanged_BuffInfo);
                if (bGFChanged == 0)
                {
                    self.SetBuffIntParam(buff, Key_Int_GFChanged_BuffInfo, 1);
                    switch (GChangeType)
                    {
                        case 1:
                            tank.AttAdd1004 += (float)self.GetBuffDoubleParam(buffConfig, Key_Double_GChange_BuffConfig);
                            break;
                        case 2:
                            if (1 + (float)self.GetBuffDoubleParam(buffConfig, Key_Double_GChange_BuffConfig) != 0)
                            {
                                tank.AttMult1003 += (float)self.GetBuffDoubleParam(buffConfig, Key_Double_GChange_BuffConfig);
                            }
                            break;
                    }
                    switch (FChangeType)
                    {
                        case 1:
                            tank.DefAdd1009 += (float)self.GetBuffDoubleParam(buffConfig, Key_Double_FChange_BuffConfig);
                            break;
                        case 2:
                            if (1 + (float)self.GetBuffDoubleParam(buffConfig, Key_Double_FChange_BuffConfig) != 0)
                            {
                                tank.DefMult1008 += (float)self.GetBuffDoubleParam(buffConfig, Key_Double_FChange_BuffConfig);
                            }
                            break;
                    }
                }

            }
            return ;
        }
Exemple #31
0
        private static BuffLogic GetBuffLogic(BuffInfo_New buffInfo, SkillObj logObj)
        {
            int            buffId     = logObj.GetBuffID(buffInfo);
            BuffConfig_New buffConfig = logObj.GetBuffConfig(buffId);

            if (buffConfig == null)
            {
                logObj.LogInfo("BuffConfig not found buffId[{0}]".F(buffId));
                return(null);
            }
            string buffLogicId = logObj.GetBuffLogicId(buffConfig);

            if (!BuffLogics.ContainsKey(buffLogicId))
            {
                logObj.LogInfo("BuffLogic not found buffId[{0}] buffLogicId[{1}]".F(buffId, buffLogicId));
                return(null);
            }
            BuffLogic buffLogic = BuffLogics[buffLogicId];

            return(buffLogic);
        }
 public override BuffSuperpositionRet OnBuffSuperposition(SkillObj tarObj, SkillObj srcObj, BattleReason reason, BuffConfig_New buffConfig)
 {
     BuffSuperpositionRet ret;
     ret.bType = BuffSuperpositionType.None;
     ret.buff = null;
     var tarBuff = tarObj.GetBuffList().Where(b => tarObj.GetBuffID(b) == tarObj.GetBuffID(buffConfig));
     if (tarBuff != null && tarBuff.FirstOrDefault() != null)
     {
         ret.bType = BuffSuperpositionType.AddStateTime;
         var buff = tarBuff.First();
         double addTime = tarObj.GetBuffSuperpositionDoubleParam(buffConfig, Key_AddTime_SkillConfig);
         tarObj.SetBuffTime(buff, tarObj.GetBuffTime(buff) + addTime);
         tarObj.SetBuffStateTime(buff, tarObj.GetBuffStateTime(buff) + addTime);
         tarObj.NotifyBuffInfo(buff, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
     }
     else
     {
         ret.bType = BuffSuperpositionType.Add;
         ret.buff = new BuffInfo_New();
     }
     return ret;
 }
Exemple #33
0
 public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     int key = Key_Double_AddTime1_BuffConfig;
     if (self.GetSrcID(buffInfo) == tarObj.GetID() || self.GetSrcParentID(buffInfo) == tarObj.GetID())
     {
         key = Key_Double_AddTime1_BuffConfig;
     }
     else
     {
         key = Key_Double_AddTime2_BuffConfig;
     }
     foreach (var buff in self.GetBuffList(true))
     {
         int buffId = self.GetBuffID(buff);
         if (buffId > 0 && buffId == self.GetBuffIntParam(buffConfig, Key_Int_BuffId_BuffConfig))
         {
             double addTime = self.GetBuffDoubleParam(buffConfig, key);
             self.SetBuffTime(buff, self.GetBuffTime(buff) + addTime);
             self.SetBuffStateTime(buff, self.GetBuffStateTime(buff) + addTime);
             self.NotifyBuffInfo(buff, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
         }
     }
 }
Exemple #34
0
 public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     int damageType = self.GetBuffIntParam(buffConfig, Key_Int_DamageType_SkillConfig);
     double damageValue = self.GetBuffDoubleParam(buffConfig, Key_Double_DamageValue_SkillConfig);
     switch (damageType)
     {
         case 1:
             if (damageValue > 0)
             {
                 Damage damage = BattleModule.CreateDamage((int)damageValue, self.GetSrcID(buffInfo), eReason: BattleReason.Buff);
                 BattleModule.DamageTarget(tarObj, self, damage);
             }
             break;
         case 2:
             if (damageValue > 0)
             {
                 Damage damage = BattleModule.CreateDamage((int)damageValue * tarObj.GetMaxHP() / 10000, self.GetSrcID(buffInfo), eReason: BattleReason.Buff);
                 BattleModule.DamageTarget(tarObj, self, damage);
             }
             break;
     }
     // 			Damage damage = BattleModule.CreateDamage((int)damageType, self.GetSrcID(buffInfo), eReason: BattleReason.Buff);
     // 			BattleModule.DamageTarget(tarObj, self, damage);
 }
 public override bool IsActionLimited(SkillObj self, ActionLimitType limit, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     int iLimit = -1;
     switch (limit)
     {
         case ActionLimitType.Attack:
             iLimit = self.GetBuffStateIntParam(buffConfig, key_AttackLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
             break;
         case ActionLimitType.Move:
             iLimit = self.GetBuffStateIntParam(buffConfig, key_MoveLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
             break;
         case ActionLimitType.UseSkill:
             iLimit = self.GetBuffStateIntParam(buffConfig, key_UseSkillLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
             break;
         default:
             Debug.Assert(false, "limit == default IsActionLimited:[{0}]".F(limit));
             break;
     }
     if (iLimit == 1)
     {
         return true;
     }
     return false;
 }
        override public BuffSuperpositionRet OnBuffSuperposition(SkillObj tarObj, SkillObj srcObj, BattleReason reason, BuffConfig_New buffConfig)
        {
            BuffSuperpositionRet ret;

            ret.bType = BuffSuperpositionType.None;
            ret.buff  = null;
            var buffKey = tarObj.GetBuffKey(buffConfig);

            foreach (var tarBuff in tarObj.GetBuffList())
            {
                var tarBuffConfig = tarObj.GetBuffConfig(tarObj.GetBuffID(tarBuff));
                if (tarBuffConfig != null && tarObj.GetBuffKey(tarBuffConfig).Equals(buffKey))
                {
                    BattleModule.RemoveBuff(tarObj, srcObj, tarObj.GetBuffID(tarBuff), BattleReason.Replace);
                    //BattleModule.DetachBuff(tarObj, srcObj, tarBuff, tarBuffConfig);
                }
            }

            ret.bType = BuffSuperpositionType.Add;
            ret.buff  = new BuffInfo_New();
            return(ret);
        }
Exemple #37
0
        public override Damage BeHurtDamageFix(SkillObj self, SkillObj source, Damage damage, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            int shield = self.GetBuffIntParam(buffInfo, AbsorbDamageKey);

            if (shield > damage.value)
            {
                shield      -= damage.value;
                damage.value = 0;
            }
            else
            {
                damage.value -= shield;
                shield        = 0;
                BuffOnEnd(self, buffInfo, buffConfig);
            }
            return(damage);
        }
Exemple #38
0
 public static IEnumerable<SkillObj> GetTargets(SkillObj skillObj, TargetSelect select, TargetType tType, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     if (select == null || tType == null)
     {
         return null;
     }
     var ret = select.GetTargets(skillObj, buffInfo, buffConfig).Where(t => tType.IsTarget(skillObj, t));
     return ret;
 }
 public override void InitState(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig, double fixTime)
 {
     self.SetBuffStateIntParam(buffInfo, key, NotEffect);
 }
Exemple #40
0
        public override bool IsActionLimited(SkillObj self, ActionLimitType limit, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            int iLimit = -1;

            switch (limit)
            {
            case ActionLimitType.Attack:
                iLimit = self.GetBuffStateIntParam(buffConfig, key_AttackLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
                break;

            case ActionLimitType.Move:
                iLimit = self.GetBuffStateIntParam(buffConfig, key_MoveLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
                break;

            case ActionLimitType.UseSkill:
                iLimit = self.GetBuffStateIntParam(buffConfig, key_UseSkillLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
                break;

            default:
                Debug.Assert(false, "limit == default IsActionLimited:[{0}]".F(limit));
                break;
            }
            if (iLimit == 1)
            {
                return(true);
            }
            return(false);
        }
Exemple #41
0
        public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            int key = Key_Double_AddTime1_BuffConfig;

            if (self.GetSrcID(buffInfo) == tarObj.GetID() || self.GetSrcParentID(buffInfo) == tarObj.GetID())
            {
                key = Key_Double_AddTime1_BuffConfig;
            }
            else
            {
                key = Key_Double_AddTime2_BuffConfig;
            }
            foreach (var buff in self.GetBuffList(true))
            {
                int buffId = self.GetBuffID(buff);
                if (buffId > 0 && buffId == self.GetBuffIntParam(buffConfig, Key_Int_BuffId_BuffConfig))
                {
                    double addTime = self.GetBuffDoubleParam(buffConfig, key);
                    self.SetBuffTime(buff, self.GetBuffTime(buff) + addTime);
                    self.SetBuffStateTime(buff, self.GetBuffStateTime(buff) + addTime);
                    self.NotifyBuffInfo(buff, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
                }
            }
        }
Exemple #42
0
        public override IEnumerable <SkillObj> GetTargets(SkillObj skillObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            double width  = skillObj.GetTargetSelectDoubleParam(buffConfig, key_Width);
            double height = skillObj.GetTargetSelectDoubleParam(buffConfig, key_Height);

            return(GetTargets(skillObj, width, height));
        }
Exemple #43
0
        override public BuffSuperpositionRet OnBuffSuperposition(SkillObj tarObj, SkillObj srcObj, BattleReason reason, BuffConfig_New buffConfig)
        {
            BuffSuperpositionRet ret;

            ret.bType = BuffSuperpositionType.None;
            ret.buff  = null;
            var tarBuff = tarObj.GetBuffList().Where(b => tarObj.GetBuffID(b) == tarObj.GetBuffID(buffConfig));

            if (tarBuff != null && tarBuff.FirstOrDefault() != null)
            {
                ret.bType = BuffSuperpositionType.AddStateTime;
                var buff = tarBuff.First();
                ret.buff = buff;
                double addTime = tarObj.GetBuffSuperpositionDoubleParam(buffConfig, Key_AddTime_SkillConfig);
                tarObj.SetBuffTime(buff, tarObj.GetBuffTime(buff) + addTime);
                tarObj.SetBuffStateTime(buff, tarObj.GetBuffStateTime(buff) + addTime);
                tarObj.NotifyBuffInfo(buff, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
            }
            else
            {
                ret.bType = BuffSuperpositionType.Add;
                ret.buff  = new BuffInfo_New();
            }
            return(ret);
        }
 public override void OnDamageTarget(SkillObj self, SkillObj target, Damage damage, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     if (damage.value > 0 && self != target)
     {
         double addTime = self.GetBuffDoubleParam(buffConfig, Key_Double_AddTime_BuffConfig);
         self.SetBuffTime(buffInfo, self.GetBuffTime(buffInfo) + addTime);
         self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) + addTime);
         self.NotifyBuffInfo(buffInfo, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
     }
 }
Exemple #45
0
        public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            int healValue = self.GetBuffIntParam(buffConfig, HealValueKey);

            if (healValue > 0)
            {
                Damage heal = BattleModule.CreateDamage(-healValue);
                BattleModule.DamageTarget(tarObj, self, heal);
            }
        }
Exemple #46
0
 public virtual IEnumerable<SkillObj> GetTargets(SkillObj skillObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     return null;
 }
        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;
        }
Exemple #48
0
 public override IEnumerable<SkillObj> GetTargets(SkillObj skillObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     double range = skillObj.GetTargetSelectDoubleParam(buffConfig, key_Range);
     return GetTargets(skillObj, range);
 }
 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);
         }
     }
 }
Exemple #50
0
 public virtual void Init(SkillObj skillObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     return;
 }
Exemple #51
0
 public override IEnumerable<SkillObj> GetTargets(SkillObj skillObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     double width = skillObj.GetTargetSelectDoubleParam(buffConfig, key_Width);
     double height = skillObj.GetTargetSelectDoubleParam(buffConfig, key_Height);
     return GetTargets(skillObj, width, height);
 }
 public override void InitState(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig, double fixTime)
 {
     int index = self.GetBuffStateIndex(buffInfo);
     var time = self.GetBuffStateTime(buffConfig, index);
     self.SetBuffStateTime(buffInfo, time + fixTime);
 }
Exemple #53
0
        public static void DetachBuff(SkillObj tarObj, SkillObj srcObj, BuffInfo_New buff, BuffConfig_New buffConfig)
        {
            var buffLogicId = tarObj.GetBuffLogicId(buffConfig);
            if (!BuffLogics.ContainsKey(buffLogicId))
            {
                return ;
            }
            BuffLogic buffLogic = BuffLogics[buffLogicId];

            //先从src方进行修正
            if (srcObj != null)
            {
                var srcSkillList = srcObj.GetSkillList();
                var srcBuffList = srcObj.GetBuffList();
                if (srcSkillList != null)
                {
                    foreach (var skillInfo in srcSkillList)
                    {
                        int skillId = srcObj.GetSkillID(skillInfo);
                        SkillConfig_New skillConfig = srcObj.GetSkillConfig(skillId);
                        var logic = GetSkillLogic(skillInfo, srcObj);
                        logic.OnClearBuff(tarObj, srcObj, buff, skillInfo, skillConfig);
                    }
                }
                if (srcBuffList != null)
                {
                    foreach (var buffInfo in srcBuffList)
                    {
                        int buffId = srcObj.GetBuffID(buffInfo);
                        BuffConfig_New srcBuffConfig = srcObj.GetBuffConfig(buffId);
                        var logic = GetBuffLogic(buffInfo, srcObj);
                        logic.OnClearBuff(tarObj, srcObj, buff, buffInfo, srcBuffConfig);
                    }
                }
            }
            {
                var tarSkillList = tarObj.GetSkillList();
                var tarBuffList = tarObj.GetBuffList();
                if (tarSkillList != null)
                {
                    foreach (var skillInfo in tarSkillList)
                    {
                        int skillId = tarObj.GetSkillID(skillInfo);
                        SkillConfig_New skillConfig = tarObj.GetSkillConfig(skillId);
                        var logic = GetSkillLogic(skillInfo, tarObj);
                        logic.OnDetachBuff(tarObj, srcObj, buff, skillInfo, skillConfig);
                    }
                }
                if (tarBuffList != null)
                {
                    foreach (var buffInfo in tarBuffList.Where(b=>b.buff!=buff.buff))
                    {
                        int buffId = tarObj.GetBuffID(buffInfo);
                        BuffConfig_New tarBuffConfig = tarObj.GetBuffConfig(buffId);
                        var logic = GetBuffLogic(buffInfo, tarObj);
                        logic.OnDetachBuff(tarObj, srcObj, buff, buffInfo, tarBuffConfig);
                    }
                }
            }
            buffLogic.BuffOnEnd(tarObj, buff, buffConfig);
            buffLogic.OnDetach(tarObj, srcObj, buff, buffConfig);
        }
 public override void InitState(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig, double fixTime)
 {
     self.SetBuffStateIntParam(buffInfo, key, NotEffect);
 }
Exemple #55
0
        //      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;
        }
Exemple #56
0
        public override bool InitBuffInfo(SkillObj self, SkillObj srcObj, BattleReason reason, BuffInfo_New buffInfo, BuffConfig_New buffConfig, bool RefreshGUID = true)
        {
            base.InitBuffInfo(self, srcObj, reason, buffInfo, buffConfig, RefreshGUID);
            int absorbDamage = self.GetBuffIntParam(buffConfig, AbsorbDamageKey);

            if (absorbDamage > 0)
            {
                self.SetBuffIntParam(buffInfo, AbsorbDamageKey, absorbDamage);
            }
            return(true);
        }
        public override void OnDie(SkillObj self, SkillObj attacker, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            return;

            if (self.GetBuffIntParam(buffInfo, Key_Int_Bombed_BuffInfo) != Key_Int_Bombed_Value)
            {
                var targetSelectName = self.GetTargetSelect(buffConfig);
                var targetSelect     = BattleModule.GetTargetSelect(targetSelectName);
                if (targetSelect == null)
                {
                    self.LogInfo("targetSelect == null buffId:[{0}] targetSelectName:[{1}]".F(self.GetBuffID(buffInfo), targetSelectName));
                    return;
                }
                var targetTypeName = self.GetTargetType(buffConfig);
                var targetType     = BattleModule.GetTargetType(targetTypeName);
                if (targetType == null)
                {
                    self.LogInfo("targetSelect == null buffId:[{0}] targetType:[{1}]".F(self.GetBuffID(buffInfo), targetTypeName));
                    return;
                }
                var targets = BattleModule.GetTargets(self, targetSelect, targetType, buffInfo, buffConfig);
                foreach (var tar in targets.Where(t => !t.IsDead()))
                {
                    OnEffect(self, tar, buffInfo, buffConfig);
                }
            }
        }
Exemple #58
0
        public override IEnumerable <SkillObj> GetTargets(SkillObj skillObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            double range = skillObj.GetTargetSelectDoubleParam(buffConfig, key_Range);

            return(GetTargets(skillObj, range));
        }
Exemple #59
0
        public override IEnumerable <SkillObj> GetTargets(SkillObj skillObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            List <SkillObj> tarList = new List <SkillObj>();

            tarList.Add(skillObj);
            return(tarList);
        }
        public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            int damageValue        = 999999999;
            int damageByMyHP       = self.GetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo);
            int damageTarPerByMyHP = self.GetBuffIntParam(buffConfig, Key_Int_DamageTarPerByMyHP_BuffConfig);

            if (self == tarObj)
            {
                if (damageByMyHP <= 0)
                {
                    damageByMyHP = self.GetHP() * damageTarPerByMyHP / 10000;
                    self.SetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo, damageByMyHP);
                }
                if (damageValue > 0)
                {
                    Damage damage = BattleModule.CreateDamage(damageValue, bNeedCalc: false);
                    BattleModule.DamageTarget(tarObj, self, damage);
                }

                int summonId = self.GetBuffIntParam(buffConfig, Key_Int_SummonId_BuffConfig);
                if (summonId > 0)
                {
                    var summonTar = BattleModule.Summon(summonId, self, self, null, null);
                }
            }
            else
            {
                if (damageByMyHP <= 0)
                {
                    damageByMyHP = self.GetHP() * damageTarPerByMyHP / 10000;
                    self.SetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo, damageByMyHP);
                    if (damageByMyHP < 0)
                    {
                        damageByMyHP = 0;
                    }
                }
                damageValue = self.GetBuffIntParam(buffConfig, Key_Int_DamageTarPer_BuffConfig) * tarObj.GetMaxHP() / 10000 + damageByMyHP;
                if (damageValue > 0)
                {
                    Damage damage = BattleModule.CreateDamage(damageValue, bNeedCalc: false);
                    BattleModule.DamageTarget(tarObj, self, damage);
                }
            }
            self.SetBuffIntParam(buffInfo, Key_Int_Bombed_BuffInfo, Key_Int_Bombed_Value);
        }