You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.6 KiB
47 lines
1.6 KiB
using ProtoCSStruct;
|
|
using Sog;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Battle
|
|
{
|
|
public static class Effect08
|
|
{
|
|
public static int DoEffect(BuffParam param)
|
|
{
|
|
if (param.parma == null || !param.parma.ContainsKey("dmg"))
|
|
{
|
|
// TraceLog.Trace("Effect08 no dmg param,{0}, {1}", param.buff.buffid, param.effectDesc.trigger);
|
|
return 1;
|
|
}
|
|
|
|
//long dmg = param.parma["dmg"];
|
|
//long hp = param.target.GetHpMax() * param.effectDesc.Param1[param.buff.level - 1] / 10_000;
|
|
//if(dmg >= hp)
|
|
//{
|
|
// int rand = param.battle.Random.Next(10_000);
|
|
// if(rand <= param.effectDesc.Param2[param.buff.level - 1])
|
|
// {
|
|
// if(!param.caster.param.TryGetValue("Effect08_Count", out var c))
|
|
// {
|
|
// c = 0;
|
|
// }
|
|
// if(c >= param.effectDesc.Param3[param.buff.level - 1])
|
|
// {
|
|
// param.battle.Trace("Effect08 dmg limit c={0}, max={1}", c, param.effectDesc.Param3[param.buff.level - 1]);
|
|
// return 1;
|
|
// }
|
|
// c++;
|
|
// param.caster.param["Effect08_Count"] = c;
|
|
// param.parma["dmg"] = hp;
|
|
// param.battle.Trace("Effect08 dmg from {0} to {1} ,c={2}", dmg, hp, c);
|
|
// return 0;
|
|
// }
|
|
//}
|
|
return 1;
|
|
}
|
|
}
|
|
}
|
|
|