Legends of Code & Magic - Puzzle discussion

Feel free to send your feedback or ask some help here! :game_die:

1 Like

The forum link on the sidebar of the IDE links to https://www.codingame.com/forum/t//t/legends-of-code-magic-puzzle-discussion/54294
Thatā€™s wrong and leads to nowhere.

1 Like

Fixed :slight_smile:

For anyone trying to reuse contest code:

  • First two input lines have an extra int on the end (card draw)
  • Third line has an extra int on the end (number of opponent actions)
  • Then there are is a line for each opponentaction - these are slightly awkward to parse if you arenā€™t reading entire lines in as they can have 3 or 4 fields.Iā€™m just reading the entire line as a string and ignoring for now.
  • After that all inputs are the same as the contest (number of cards, then lines of card details).
10 Likes

According to my preliminary local self-play testing, and hoping I have no bugs related to changes, my winrate as P1 between contest and multi decreased from 67.5 to 57.8%. So it seems the balance has gotten significantly better as a result of the mana change, though not entirely fixed. Itā€™s also possible the gap can be further closed by adjusting the P2 AI and etc. to the new rule.

5 Likes

The inputs changed but the statement is pretty messy. For example the english statement says First 2 lines: for each player, playerHealth, playerMana, playerDeck and playerRune, but we now have a additional int (playerDraw).

1 Like

I noticed the the list of cards available for the draft is displayed in the viewer at the very beginning of games.

It doesnā€™t seem to be available in the game inputs though. Am I missing something?

2 Likes

What did you change at your strategy after the extra Mana update?

I didnā€™t change anything yetā€¦

I notice someting strange in attack resolution :
[Warning] Action is not legal: ATTACK 5 16 : 5 is a Flying Corpse Guzzler(6/6), and 16 is a Giant Louse(2/7).
This action is not performed on itā€™s summoning turn.
I donā€™t understand. Does this mean that Creatures with Charge can only attack on summoning turn ?
Or does this mean that Breakthrough creatures must attack opponents with lower defense?

Found it ! We must kill Guard creatures BEFORE attacking others .
This should be written in wood league documentation.

Can someone explain me the scoring system? Iā€™m in bronze league. The BattleMage have a score of 21,95. Is this score reset with league change ? If no, there is something stange, because, 21.95 correspond to mid gold league. There is also another strange.thing : BattleMage score always raise. As I approach this score, it raises, so I canā€™t defeat it. How this score is computed ? Currently bronze league scores goes from 5,72 to 20,95, silver league goes from 13,77 to 20,48 and gold goes from 14,82 to 30,11, so I think 21,95 for Bronze boss is pretty high according to me.

Donā€™t compare scores in-between leagues, theyā€™re unrelated and not comparable.
About boss being high, yes thatā€™s an issue, the only solution is to wreck him. When youā€™re in bronze, itā€™s definitely doable.

3 Likes

Scores are based on the trueskill algorithm - you get points for winning and lose for losing based on how likely you were to win, so scores are relative to people in your league. The actual value of the score doesnā€™t really mean anything, itā€™s only useful for comparing two people in the same league.

3 Likes

That input update post was a super helpful! Thanks, @RoboStac! :sunglasses:

Does anyone have any good tips for pushing to silver league?

1 Like

here: https://www.codingame.com/forum/t/legends-of-code-magic-cc05-feedback-strategies/50996

Thanks dude. I spend an hour trying to find where my timeout came from before reading thisā€¦

Hi, Iā€™m incredibly lost. What do I target to view my hand? I know the ā€˜locationā€™ will equal 0 but I canā€™t for the life of me figure out where/what Iā€™m supposed to search.

Do I make an array while drafting? If so, how do I grab those cards?

It seems like the only things I have access to are integers and 1 string (abilities). Iā€™m sorry if this is a dumb question this is only my second game on here.

Hey !
You will receive the visible cards list each turn (board + your hand) in the form of integers and strings. It belong to you to sort and store them in the form you prefer.

1 Like

Iā€™m coding in Javascript.

Iā€™m having a hard time with understanding the inputs for this puzzle. Beginning from the default-start code, if I add console.error(cardNumber), it isnā€™t defined. Presumably, this is because itā€™s the property of given card that I need to ā€œtargetā€ somehow to get information about it.

If I add instead console.error(inputs), Iā€™m only seeing information on the right-most card in the draft, and then, during the Battle Phase, the right-most card in my hand.

How am I to get information on the whole board?