Example #1
0
        //怪兽,pendulum怪兽
        string getMonster(Card c, string img, bool isPendulum, CardPack cardpack = null, bool rarity = true)
        {
            StringBuilder sb = new StringBuilder();

            string[] types = GetTypes(c);
            string   race  = GetRace(c.race);

            sb.AppendLine(TAG_CARD + ":");
            sb.AppendLine(GetLine(TAG_CARDTYPE, types[0]));
            sb.AppendLine(GetLine(TAG_NAME, reItalic(c.name)));
            sb.AppendLine(GetLine(TAG_ATTRIBUTE, GetAttribute(c.attribute)));
            sb.AppendLine(GetLine(TAG_LEVEL, GetStar(c.level)));
            sb.AppendLine(GetLine(TAG_IMAGE, img));
            sb.AppendLine(GetLine(TAG_TYPE1, cn2tw(race)));
            sb.AppendLine(GetLine(TAG_TYPE2, cn2tw(types[1])));
            sb.AppendLine(GetLine(TAG_TYPE3, cn2tw(types[2])));
            sb.AppendLine(GetLine(TAG_TYPE4, cn2tw(types[3])));
            if (cardpack != null)
            {
                sb.AppendLine(GetLine(TAG_NUMBER, cardpack.pack_id));
                if (rarity)
                {
                    sb.AppendLine(GetLine(TAG_RARITY, cardpack.getMseRarity()));
                }
            }
            if (isPendulum)            //P怪兽
            {
                string text = GetDesc(c.desc, cfg.regx_monster);
                if (string.IsNullOrEmpty(text))
                {
                    text = c.desc;
                }
                sb.AppendLine("	" + TAG_TEXT + ":");
                //sb.AppendLine(cfg.regx_monster + ":" + cfg.regx_pendulum);
                sb.AppendLine("		"+ ReText(reItalic(text)));
                sb.AppendLine(GetLine(TAG_PENDULUM, "medium"));
                sb.AppendLine(GetLine(TAG_PSCALE1, ((c.level >> 0x18) & 0xff).ToString()));
                sb.AppendLine(GetLine(TAG_PSCALE2, ((c.level >> 0x10) & 0xff).ToString()));
                sb.AppendLine("	" + TAG_PEND_TEXT + ":");
                sb.AppendLine("		"+ ReText(reItalic(GetDesc(c.desc, cfg.regx_pendulum))));
            }
            else            //一般怪兽
            {
                sb.AppendLine("	" + TAG_TEXT + ":");
                sb.AppendLine("		"+ ReText(reItalic(c.desc)));
            }
            sb.AppendLine(GetLine(TAG_ATK, (c.atk < 0) ? UNKNOWN_ATKDEF : c.atk.ToString()));
            sb.AppendLine(GetLine(TAG_DEF, (c.def < 0) ? UNKNOWN_ATKDEF : c.def.ToString()));

            sb.AppendLine(GetLine(TAG_CODE, c.idString));
            return(sb.ToString());
        }
Example #2
0
        //魔法陷阱
        string getSpellTrap(Card c, string img, bool isSpell, CardPack cardpack = null, bool rarity = true)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(TAG_CARD + ":");
            sb.AppendLine(GetLine(TAG_CARDTYPE, isSpell ? "spell card" : "trap card"));
            sb.AppendLine(GetLine(TAG_NAME, reItalic(c.name)));
            sb.AppendLine(GetLine(TAG_ATTRIBUTE, isSpell ? "spell" : "trap"));
            sb.AppendLine(GetLine(TAG_LEVEL, GetSpellTrapSymbol(c, isSpell)));
            sb.AppendLine(GetLine(TAG_IMAGE, img));
            if (cardpack != null)
            {
                sb.AppendLine(GetLine(TAG_NUMBER, cardpack.pack_id));
                if (rarity)
                {
                    sb.AppendLine(GetLine(TAG_RARITY, cardpack.getMseRarity()));
                }
            }
            sb.AppendLine("	" + TAG_TEXT + ":");
            sb.AppendLine("		"+ ReText(reItalic(c.desc)));
            sb.AppendLine(GetLine(TAG_CODE, c.idString));
            return(sb.ToString());
        }
Example #3
0
        //怪兽,pendulum怪兽
        string getMonster(Card c, string img, CardPack cardpack = null, bool rarity = true)
        {
            StringBuilder sb = new StringBuilder();

            string[] types = GetTypes(c);
            string   race  = GetRace(c.race);

            sb.AppendLine(TAG_CARD + ":");
            sb.AppendLine(GetLine(TAG_CARDTYPE, types[0]));
            sb.AppendLine(GetLine(TAG_NAME, reItalic(c.name)));
            sb.AppendLine(GetLine(TAG_ATTRIBUTE, GetAttribute(c.attribute)));
            sb.AppendLine(GetLine(TAG_LEVEL, GetStar(c.level)));
            sb.AppendLine(GetLine(TAG_IMAGE, img));
            sb.AppendLine(GetLine(TAG_TYPE1, cn2tw(race)));
            sb.AppendLine(GetLine(TAG_TYPE2, cn2tw(types[1])));
            sb.AppendLine(GetLine(TAG_TYPE3, cn2tw(types[2])));
            sb.AppendLine(GetLine(TAG_TYPE4, cn2tw(types[3])));
            sb.AppendLine(GetLine(TAG_TYPE5, cn2tw(types[4])));
            if (cardpack != null)
            {
                sb.AppendLine(GetLine(TAG_NUMBER, cardpack.pack_id));
                if (rarity)
                {
                    sb.AppendLine(GetLine(TAG_RARITY, cardpack.getMseRarity()));
                }
            }
            if (c.IsType(CardType.TYPE_LINK))
            {
                if (CardLink.isLink(c.def, CardLink.DownLeft))
                {
                    sb.AppendLine(GetLine(TAG_Link_Marker_DL, "yes"));
                }
                if (CardLink.isLink(c.def, CardLink.Down))
                {
                    sb.AppendLine(GetLine(TAG_Link_Marker_Down, "yes"));
                }
                if (CardLink.isLink(c.def, CardLink.DownRight))
                {
                    sb.AppendLine(GetLine(TAG_Link_Marker_DR, "yes"));
                }
                if (CardLink.isLink(c.def, CardLink.UpLeft))
                {
                    sb.AppendLine(GetLine(TAG_Link_Marker_UL, "yes"));
                }
                if (CardLink.isLink(c.def, CardLink.Up))
                {
                    sb.AppendLine(GetLine(TAG_Link_Marker_Up, "yes"));
                }
                if (CardLink.isLink(c.def, CardLink.UpRight))
                {
                    sb.AppendLine(GetLine(TAG_Link_Marker_UR, "yes"));
                }
                if (CardLink.isLink(c.def, CardLink.Left))
                {
                    sb.AppendLine(GetLine(TAG_Link_Marker_Left, "yes"));
                }
                if (CardLink.isLink(c.def, CardLink.Right))
                {
                    sb.AppendLine(GetLine(TAG_Link_Marker_Right, "yes"));
                }
                sb.AppendLine(GetLine(TAG_Link_Number, "" + getLinkNumber(c.def)));
                sb.AppendLine("	" + TAG_TEXT + ":");
                sb.AppendLine("		"+ ReText(reItalic(c.desc)));
            }
            else
            {
                if (c.IsType(CardType.TYPE_PENDULUM))                //P怪兽
                {
                    string text = GetDesc(c.desc, cfg.regx_monster);
                    if (string.IsNullOrEmpty(text))
                    {
                        text = c.desc;
                    }
                    sb.AppendLine("	" + TAG_TEXT + ":");
                    //sb.AppendLine(cfg.regx_monster + ":" + cfg.regx_pendulum);
                    sb.AppendLine("		"+ ReText(reItalic(text)));
                    sb.AppendLine(GetLine(TAG_PENDULUM, "medium"));
                    sb.AppendLine(GetLine(TAG_PSCALE1, ((c.level >> 0x18) & 0xff).ToString()));
                    sb.AppendLine(GetLine(TAG_PSCALE2, ((c.level >> 0x10) & 0xff).ToString()));
                    sb.AppendLine("	" + TAG_PEND_TEXT + ":");
                    sb.AppendLine("		"+ ReText(reItalic(GetDesc(c.desc, cfg.regx_pendulum))));
                }
                else                 //一般怪兽
                {
                    sb.AppendLine("	" + TAG_TEXT + ":");
                    sb.AppendLine("		"+ ReText(reItalic(c.desc)));
                }
                sb.AppendLine(GetLine(TAG_DEF, (c.def < 0) ? UNKNOWN_ATKDEF : c.def.ToString()));
            }
            sb.AppendLine(GetLine(TAG_ATK, (c.atk < 0) ? UNKNOWN_ATKDEF : c.atk.ToString()));

            sb.AppendLine(GetLine(TAG_CODE, c.idString));
            return(sb.ToString());
        }
Example #4
0
 //魔法陷阱
 string getSpellTrap(Card c, string img, bool isSpell,CardPack cardpack=null,bool rarity=true)
 {
     StringBuilder sb = new StringBuilder();
     sb.AppendLine(TAG_CARD + ":");
     sb.AppendLine(GetLine(TAG_CARDTYPE, isSpell ? "spell card" : "trap card"));
     sb.AppendLine(GetLine(TAG_NAME, reItalic(c.name)));
     sb.AppendLine(GetLine(TAG_ATTRIBUTE, isSpell ? "spell" : "trap"));
     sb.AppendLine(GetLine(TAG_LEVEL, GetSpellTrapSymbol(c, isSpell)));
     sb.AppendLine(GetLine(TAG_IMAGE, img));
     if(cardpack!=null){
         sb.AppendLine(GetLine(TAG_NUMBER, cardpack.pack_id));
         if(rarity){
             sb.AppendLine(GetLine(TAG_RARITY, cardpack.getMseRarity()));
         }
     }
     sb.AppendLine("	" + TAG_TEXT + ":");
     sb.AppendLine("		" + ReText(reItalic(c.desc)));
     sb.AppendLine(GetLine(TAG_CODE, c.idString));
     return sb.ToString();
 }
Example #5
0
        //怪兽,pendulum怪兽
        string getMonster(Card c, string img, bool isPendulum,CardPack cardpack=null,bool rarity=true)
        {
            StringBuilder sb = new StringBuilder();
            string[] types = GetTypes(c);
            string race = GetRace(c.race);
            sb.AppendLine(TAG_CARD + ":");
            sb.AppendLine(GetLine(TAG_CARDTYPE, types[0]));
            sb.AppendLine(GetLine(TAG_NAME, reItalic(c.name)));
            sb.AppendLine(GetLine(TAG_ATTRIBUTE, GetAttribute(c.attribute)));
            sb.AppendLine(GetLine(TAG_LEVEL, GetStar(c.level)));
            sb.AppendLine(GetLine(TAG_IMAGE, img));
            sb.AppendLine(GetLine(TAG_TYPE1, cn2tw(race)));
            sb.AppendLine(GetLine(TAG_TYPE2, cn2tw(types[1])));
            sb.AppendLine(GetLine(TAG_TYPE3, cn2tw(types[2])));
            sb.AppendLine(GetLine(TAG_TYPE4, cn2tw(types[3])));
            if(cardpack!=null){
                sb.AppendLine(GetLine(TAG_NUMBER, cardpack.pack_id));
                if(rarity){
                    sb.AppendLine(GetLine(TAG_RARITY, cardpack.getMseRarity()));
                }
            }
            if (isPendulum)//P怪兽
            {
                string text = GetDesc(c.desc, cfg.regx_monster);
                if (string.IsNullOrEmpty(text))
                    text = c.desc;
                sb.AppendLine("	" + TAG_TEXT + ":");
                //sb.AppendLine(cfg.regx_monster + ":" + cfg.regx_pendulum);
                sb.AppendLine("		" + ReText(reItalic(text)));
                sb.AppendLine(GetLine(TAG_PENDULUM, "medium"));
                sb.AppendLine(GetLine(TAG_PSCALE1, ((c.level >> 0x18) & 0xff).ToString()));
                sb.AppendLine(GetLine(TAG_PSCALE2, ((c.level >> 0x10) & 0xff).ToString()));
                sb.AppendLine("	" + TAG_PEND_TEXT + ":");
                sb.AppendLine("		" + ReText(reItalic(GetDesc(c.desc, cfg.regx_pendulum))));
            }
            else//一般怪兽
            {
                sb.AppendLine("	" + TAG_TEXT + ":");
                sb.AppendLine("		" + ReText(reItalic(c.desc)));
            }
            sb.AppendLine(GetLine(TAG_ATK, (c.atk < 0) ? UNKNOWN_ATKDEF : c.atk.ToString()));
            sb.AppendLine(GetLine(TAG_DEF, (c.def < 0) ? UNKNOWN_ATKDEF : c.def.ToString()));

            sb.AppendLine(GetLine(TAG_CODE, c.idString));
            return sb.ToString();
        }