Пример #1
0
    //计算单位受到的最终伤害
    public FinnalDamage CorrectDamage(OriginDamage originDamage)
    {
        float Damage = 0;

        for (int i = 0; i < StaticManager.BattlePropertyCount; i++)
        {
            Damage += originDamage.DamageRateList[i] * BattlePropertys[i].FixedValue * weapon.WeaponCorrects[i];
        }
        Damage += originDamage.DamageStatic;
        return(new FinnalDamage(originDamage.damageType, Damage, GetPenetrate(originDamage.damageType)));
    }
Пример #2
0
    static SkillStore()
    {
        //初始化字典
        SkillDic = new Dictionary <int, SkillBase>();
        //添加0号技能挥击
        OriginDamage tempOD = new OriginDamage(DamageType.Cut, new List <float>()
        {
            0.25f, 0.75f, 0, 0
        }, 0);
        List <BattleActionBase> tempBAB = new List <BattleActionBase>();

        tempBAB.Add(new DealDamageAction(tempOD, TargetType.EnemyFront));
        tempOD = new OriginDamage(DamageType.Kinect, new List <float>()
        {
            0.75f, 0.25f, 0, 0
        }, 0);
        tempBAB.Add(new DealDamageAction(tempOD, TargetType.EnemyFront));
        BattleActionGroup     tempBAG = new BattleActionGroup(tempBAB);
        Dictionary <int, int> tempCD  = new Dictionary <int, int>();

        tempCD.Add(1, 10);
        Cost      tempC  = new Cost(tempCD);
        SkillBase tempSB = new SkillBase(0, "挥击", 1, tempBAG, tempC);
    }
Пример #3
0
 public DealDamageAction(OriginDamage originDamage, TargetType Targets) : base(BattleActionType.DealDamage, Targets)
 {
     this.originDamage = originDamage;
 }