예제 #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
        protected internal override void OnZap(int cell)
        {
            var ch = Actor.FindChar(cell);

            if (ch != null)
            {
                Buff.Affect <Slow>(ch, Slow.Duration(ch) / 3 + Level);
            }
            else
            {
                GLog.Information("nothing happened");
            }
        }