示例#1
0
        public override void Execute(Hero hero, string action)
        {
            base.Execute(hero, action);

            if (!action.Equals(AcEat))
            {
                return;
            }

            switch (pdsharp.utils.Random.Int(5))
            {
            case 0:
                GLog.Warning("Oh it's hot!");
                Buff.Affect <Burning>(hero).Reignite(hero);
                break;

            case 1:
                GLog.Warning("You can't feel your legs!");
                Buff.Prolong <Roots>(hero, Paralysis.Duration(hero));
                break;

            case 2:
                GLog.Warning("You are not feeling well.");
                Buff.Affect <Poison>(hero).Set(Poison.DurationFactor(hero) * hero.HT / 5);
                break;

            case 3:
                GLog.Warning("You are stuffed.");
                Buff.Prolong <Slow>(hero, Slow.Duration(hero));
                break;
            }
        }
示例#2
0
        // 0xBB66EE
        public static void Trigger(int pos, Character ch)
        {
            if (ch != null)
            {
                Buff.Affect <Poison>(ch).Set(Poison.DurationFactor(ch) * (4 + Dungeon.Depth / 2));
            }

            CellEmitter.Center(pos).Burst(PoisonParticle.Splash, 3);
        }
示例#3
0
        public override int AttackProc(Character enemy, int damage)
        {
            if (Random.Int(2) != 0)
            {
                return(damage);
            }

            buffs.Buff.Affect <Poison>(enemy).Set(Random.Int(7, 9) * Poison.DurationFactor(enemy));
            State = FLEEING;

            return(damage);
        }
示例#4
0
        protected internal override void OnZap(int cell)
        {
            var ch = Actor.FindChar(cell);

            if (ch != null)
            {
                Buff.Affect <Poison>(ch).Set(Poison.DurationFactor(ch) * (5 + Level));
            }
            else
            {
                GLog.Information("nothing happened");
            }
        }
示例#5
0
        public override void Activate(Character ch)
        {
            base.Activate(ch);

            if (ch != null)
            {
                Buff.Affect <Poison>(ch).Set(Poison.DurationFactor(ch) * (4 + Dungeon.Depth / 2));
            }

            if (Dungeon.Visible[Pos])
            {
                CellEmitter.Center(Pos).Burst(PoisonParticle.Splash, 3);
            }
        }