Esempio n. 1
0
        protected internal override void Evolve()
        {
            base.Evolve();

            for (var i = 0; i < Length; i++)
            {
                Character ch;
                if (Cur[i] > 0 && (ch = FindChar(i)) != null)
                {
                    Buff.Prolong <Vertigo>(ch, Vertigo.Duration(ch));
                }
            }
        }
Esempio n. 2
0
        protected internal override void OnZap(int cell)
        {
            var ch = Actor.FindChar(cell);

            if (ch != null)
            {
                if (ch == Dungeon.Hero)
                {
                    Buff.Affect <Vertigo>(ch, Vertigo.Duration(ch));
                }
                else
                {
                    Buff.Affect <Amok>(ch, 3f + Level);
                }
            }
            else
            {
                GLog.Information("nothing happened");
            }
        }
Esempio n. 3
0
        public override bool Proc(Weapon weapon, Character attacker, Character defender, int damage)
        {
            // lvl 0 - 20%
            // lvl 1 - 33%
            // lvl 2 - 43%
            var level = Math.Max(0, weapon.level);

            if (pdsharp.utils.Random.Int(level + 5) < 4)
            {
                return(false);
            }

            if (defender == Dungeon.Hero)
            {
                Buff.Affect <Vertigo>(defender, Vertigo.Duration(defender));
            }
            else
            {
                Buff.Affect <Terror>(defender, Terror.Duration).Source = attacker;
            }

            return(true);
        }