Giter Site home page Giter Site logo

hearthdb's Introduction

HearthDb

Build & Deploy

HearthDb is a .NET Hearthstone database.

Deckstrings

HearthDb.Deckstrings.DeckSerializer can serialize decks from and to Hearthstones deck string format, used for importing/exporting decks.

See here for example usage.

Full deck strings documentation can be found here: https://hearthsim.info/docs/deckstrings/

Cards

HearthDb.Cards contains all card information of the CardDefs.xml, imported from the hsdata HearthSim project.

See here for example usage.

CardIDs

HearthDb.CardIds contains properly named constant for all cardIds existing in Hearthstone.

The CardIds.cs file is generated by HearthDb.CardIdLibGenerator.

See here for example usage.

Enums

HearthDb.Enums contains all the relevant Hearthstone enums.

The Enums.cs file is generated by HearthDb.EnumsGenerator.

hearthdb's People

Contributors

azeier avatar beheh avatar edipo2s avatar igormcesar avatar jonysegal avatar riqq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hearthdb's Issues

Set default language on Cards level

Currently I did not have a chance to set the language through Cards

	static Cards()
		{
			var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HearthDb.CardDefs.xml");
			if(stream == null)
				return;
			using(TextReader tr = new StreamReader(stream))
			{
				var xml = new XmlSerializer(typeof(CardDefs.CardDefs));
				var cardDefs = (CardDefs.CardDefs)xml.Deserialize(tr);
				foreach(var entity in cardDefs.Entites)
				{
					var card = new Card(entity);
					All.Add(entity.CardId, card);
					if(card.Collectible && (card.Type != CardType.HERO || card.Set != CardSet.CORE && card.Set != CardSet.HERO_SKINS))
						Collectible.Add(entity.CardId, card);
				}
			}
		}

Publish this library to NuGet

Is it possible to publish this to NuGet?
I have build the latest version, and I got a file with size 19.8 MB.

I would like to reference this library in another solution. I have tried to search on NuGet and did not find it.

Enable support for .NET Standard

So currently, pretty much all of the HearthSim projects are being built for .NET Framework v4.5. At the core of these projects is HearthDb, which is itself a net45 project. However, there's really nothing platform dependent going on in the project, so it's possible to move it over to .NET Standard.

Doing this would enable others to easily consume HearthDb in a wider variety of application types - UWP, Xamarin, ASP.NET Core, etc.

Use language code en-US instead of enUS

Currently the language code can not be used directly

   [Test]
        public void TestChuck()
        {
            //CultureInfo cultureInfo=new CultureInfo("enUS"); //This line did not work
            CultureInfo cultureInfo2 = new CultureInfo("en-US");
            Console.WriteLine(cultureInfo2.DisplayName);
        }
<Entity CardID="AT_001" ID="2539" version="2">
		<MasterPower>7741f56d-95c5-424c-9586-266a51d27290</MasterPower>
		<Tag enumID="185" name="CARDNAME" type="LocString">
			<deDE>Flammenlanze</deDE>
			<enUS>Flame Lance</enUS>
			<esES>Lanza de llamas</esES>
			<esMX>Lanza flamígera</esMX>
			<frFR>Lance de flammes</frFR>
			<itIT>Lancia di Fuoco</itIT>
			<jaJP>フレイムランス</jaJP>
			<koKR>화염창</koKR>
			<plPL>Płomienna lanca</plPL>
			<ptBR>Lança de Fogo</ptBR>
			<ruRU>Огненное копье</ruRU>
			<thTH>หอกเพลิง</thTH>
			<zhCN>炎枪术</zhCN>
			<zhTW>火焰長矛</zhTW>
		</Tag>
		<Tag enumID="184" name="CARDTEXT" type="LocString">
			<deDE>Fügt einem Diener $8 Schaden zu.</deDE>
			<enUS>Deal $8 damage to a minion.</enUS>
			<esES>Inflige $8 p. de daño a un esbirro.</esES>
			<esMX>Inflige $8 de daño a un esbirro.</esMX>
			<frFR>Inflige $8 |4(point,points) de dégâts à un serviteur.</frFR>
			<itIT>Infligge $8 danni a un servitore.</itIT>
			<jaJP>[x]ミニオン1体に
$8ダメージを
与える。</jaJP>
			<koKR>하수인에게 피해를 $8 줍니다.</koKR>
			<plPL>Zadaj $8 pkt. obrażeń stronnikowi.</plPL>
			<ptBR>Cause $8 de dano a um lacaio.</ptBR>
			<ruRU>Наносит $8 ед. урона выбранному существу.</ruRU>
			<thTH>สร้างความเสียหาย_$8_แต้ม[b]ให้มินเนี่ยนหนึ่งตัว</thTH>
			<zhCN>对一个随从造成$8点伤害。</zhCN>
			<zhTW>對一個手下造成$8點傷害</zhTW>
		</Tag>
		<Tag enumID="351" name="FLAVORTEXT" type="LocString">
			<deDE>Die Sommerversion der Eislanze. Gut gegen chronisch kalte Hände.</deDE>
			<enUS>It's on the rack next to ice lance, acid lance, and English muffin lance.</enUS>
			<esES>A juego con Lanza de hielo, Lanza de ácido y Lanza de churros con chocolate.</esES>
			<esMX>Está en el mismo estante que Lanza de hielo, Lanza de ácido y Lanza de jengibre.</esMX>
			<frFR>Elle est sur le râtelier près de la lance de glace, la lance d’acide et la lance à incendie.</frFR>
			<itIT>È sulla rastrelliera, accanto alla Lancia di Ghiaccio, dopo la Lancia Ypsilon.</itIT>
			<jaJP>これと同じ棚には、アイスランス、アシッドランス、イングリッシュマフィンランスが並んでいる。</jaJP>
			<koKR>창에도 여러 종류가 있습니다. 얼음창, 화염창, 산성창, 그리고 와장창.</koKR>
			<plPL>Nic nadzwyczajnego, ot gigantyczna zapałka.</plPL>
			<ptBR>Fica junto da lança de gelo, da lança ácida e da lança de bolinhos.</ptBR>
			<ruRU>У рыцарей турнира богатый выбор: ледяное копье, огненное копье, кислотное копье и даже пряничное копье!</ruRU>
			<thTH>วางอยู่บนชั้นวางอาวุธ ถัดจากหอกน้ำแข็ง หอกพิษ และหอกขนมปัง</thTH>
			<zhCN>炎枪术,冰枪术,酸枪术……招招克敌,枪枪致命。</zhCN>
			<zhTW>火焰長矛?還是冰霜長矛?今晚你要用哪一根?</zhTW>
		</Tag>
		<Tag enumID="342" name="ARTISTNAME" type="String">Nutthapon Petchthai</Tag>
		<Tag enumID="48" name="COST" type="Int" value="5"/>
		<Tag enumID="183" name="CARD_SET" type="Int" value="15"/>
		<Tag enumID="199" name="CLASS" type="Int" value="4"/>
		<Tag enumID="202" name="CARDTYPE" type="Int" value="5"/>
		<Tag enumID="203" name="RARITY" type="Int" value="1"/>
		<Tag enumID="321" name="COLLECTIBLE" type="Int" value="1"/>
		<Power definition="7741f56d-95c5-424c-9586-266a51d27290">
			<PlayRequirement param="" reqID="11"/>
			<PlayRequirement param="" reqID="1"/>
		</Power>
	</Entity>

The PlayRequirement section lost since version 16.0.0.37060

I have checked the history of https://github.com/HearthSim/hsdata, and I found the following section of card GIL_530 was lost.

<Power definition="00000012-3781-4b7f-bb1d-fd54f645afe9">
			<PlayRequirement param="" reqID="75"/>
		</Power>

patch 15.6.2.36393 still has the PlayRequirement section, when it comes to patch 16.0.0.37060, the section lost.

I would like to file a new issue in hsdata project, but that project hid the issues tab, so I file a new issue here .

Is there something I'm missing? This doesn't build.

Do I need something else to make this build? I cloned the repo and brought it into VS 2013, and it doesn't build. It's reporting many syntax errors, including missing semicolons, bad keywords, missing parentheses, and more.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.