예제 #1
0
        private void RefreshByMonster()
        {
            TreeNode node = tankmeter.SelectedNode;

            if (node.Parent == null)
            { // Parent node selected, show a summary. The summary is provided by TankMeterByMonster
                Series cur = tankchart.Series[0];
                cur.Points.Clear();

                foreach (var p in tmb.Summary)
                {
                    cur.Points.Add(ChartHelper.CreateNamedPoint(p.Key, p.Value.Points));
                }
                AddTotal();
            }
            else if (node.Name == "byability")
            { // By ability has been selected, display damage by attacks done by the monster.
                Series cur = tankchart.Series[0];
                cur.Points.Clear();

                if (!tmb.DamageValues.ContainsKey(node.Parent.Text))
                { // Error
                    return;
                }

                MonsterDamage dmg = tmb.DamageValues[node.Parent.Text];
                foreach (var p in dmg)
                {
                    cur.Points.Add(ChartHelper.CreateNamedPoint(p.Key, p.Value.Points));
                }
                AddTotal();
            }
            else if (node.Name == "blockratio")
            { // The taken/blocked ratio for that monster
                Series cur = tankchart.Series[0];
                cur.Points.Clear();

                if (!tmb.Summary.ContainsKey(node.Parent.Text))
                {
                    return;
                }

                var summary = tmb.Summary[node.Parent.Text];
                cur.Points.Add(ChartHelper.CreateNamedPoint("Damage taken", summary.Points));
                cur.Points.Add(ChartHelper.CreateNamedPoint("Damage blocked", summary.Blocked));
                NoTotal();
            }
        }
예제 #2
0
 public override float GetDamage(Obj_AI_Base source, Obj_AI_Base target)
 {
     if (target is Obj_AI_Minion)
     {
         if (Condition != null && !Condition(target))
         {
             return(0);
         }
         var maxMonsterDamage = MonsterMaxDamage > -1 ? MonsterMaxDamage : MonsterMaxDamages != null ? MonsterMaxDamages[source.Spellbook.GetSpell(Slot).Level - 1] : -1;
         if (MonsterDamage != null)
         {
             return(maxMonsterDamage > -1 ? Math.Min(maxMonsterDamage, MonsterDamage.GetDamage(source, target)) : MonsterDamage.GetDamage(source, target));
         }
         if (maxMonsterDamage > -1)
         {
             return(Math.Min(maxMonsterDamage, base.GetDamage(source, target)));
         }
     }
     return(base.GetDamage(source, target));
 }
예제 #3
0
파일: Tank.cs 프로젝트: nictrak/VIA1.0
    private void SummonAttackArea()
    {
        MonsterDamage spawned = Instantiate <MonsterDamage>(attackArea);

        spawned.Setup(summonAttackAreaPosition, attackDamage);
    }