Example #1
0
        public static Alignment Invert(this Alignment instance)
        {
            byte ge = instance.GetGE();
            byte ce = instance.GetLC();

            if (ge != am_Mask_Good)
            {
                if (ge != am_Mask_GENeutral)
                {
                    if (ge == am_Mask_Evil)
                    {
                        ge = am_Mask_Good;
                    }
                }
                else
                {
                }
            }
            else
            {
                ge = am_Mask_Evil;
            }

            return(GenAlignment(ce, ge));
        }
Example #2
0
        public static Alignment GetOppositeAlignment(Alignment alignment, bool total)
        {
            byte ge = alignment.GetGE();
            byte lc = alignment.GetLC();

            byte oge = am_Mask_GENeutral;

            if (ge != am_Mask_Good)
            {
                if (ge != am_Mask_GENeutral)
                {
                    if (ge == am_Mask_Evil)
                    {
                        oge = am_Mask_Good;
                    }
                }
                else
                {
                    oge = ge;
                }
            }
            else
            {
                oge = am_Mask_Evil;
            }

            byte olc = am_Mask_GENeutral;

            if (!total)
            {
                olc = lc;
            }
            else
            {
                if (lc != am_Mask_Good)
                {
                    if (lc != am_Mask_GENeutral)
                    {
                        if (lc == am_Mask_Evil)
                        {
                            olc = am_Mask_Good;
                        }
                    }
                    else
                    {
                        olc = lc;
                    }
                }
                else
                {
                    olc = am_Mask_Evil;
                }
            }

            return(GenAlignment(olc, oge));
        }