コード例 #1
0
        // Function from file: shadowling.dm
        public override void spec_life(Mob_Living H = null)
        {
            double     light_amount = 0;
            Ent_Static T            = null;


            if (!H.weakeyes)
            {
                H.weakeyes = true;
            }
            light_amount = 0;
            H.nutrition  = 450;

            if (H.loc is Tile)
            {
                T            = H.loc;
                light_amount = ((Tile)T).get_lumcount();

                if (light_amount > 4 && !(H.incorporeal_move != 0))
                {
                    H.take_overall_damage(0, 3.5);
                }
                else if (light_amount < 2)
                {
                    H.heal_overall_damage(2, 2);
                    H.adjustToxLoss(-5);
                    H.adjustBrainLoss(-25);
                    H.adjustCloneLoss(-1);
                }
            }
            return;
        }
コード例 #2
0
ファイル: Species_Shadow_Ling.cs プロジェクト: Somnium13/SS13
        // Function from file: shadowling.dm
        public override void spec_life(Mob_Living H = null)
        {
            double     light_amount = 0;
            Ent_Static T            = null;


            if (!H.weakeyes)
            {
                H.weakeyes = true;
            }
            light_amount = 0;
            H.nutrition  = 450;

            if (H.loc is Tile)
            {
                T            = H.loc;
                light_amount = ((Tile)T).get_lumcount();

                if (light_amount > 4 && !(H.incorporeal_move != 0))
                {
                    H.take_overall_damage(0, 7);

                    if (H.stat != 2)
                    {
                        H.WriteMsg("<span class='userdanger'>The light burns you!</span>");
                        H.WriteMsg("sound/weapons/sear.ogg");
                    }
                }
                else if (light_amount < 2)
                {
                    H.heal_overall_damage(5, 5);
                    H.adjustToxLoss(-5);
                    H.adjustBrainLoss(-25);
                    H.adjustCloneLoss(-1);
                    H.SetWeakened(0);
                    H.SetStunned(0);
                }
            }
            return;
        }