Every day I'm shuffling

Had an issue with the shuffling mechanic.  More specifically when I went to grab the cards from the discard deck and then put them into the main deck for shuffling there were none even though I saw them go in.  The issue was my class for the CombatScreen was not passing the values back and forth reliably.  Rather than waste brain sweat on it, I just globaled them.  I would rather than done a programming pattern but I want to see if I can actually finish this rather than have it be a bunch of bits languishing on my computer.

I will say that the game is pretty playable at this point. There are some gotchas but for the most part if you kill a monster you can move onto killing other ones.  As long as you got the cards you can clear the level.  However there are a couple bugs like always.  One being that you can't put a card on the monster and have it discard.  It crashes currently.  Plus I want to have the ability to discard cards if you want to draw more.  I.e. you only draw 2 cards if your hand is lower than 3 so if you have 4 you won't get new cards.  The mechanic to fix this is just allow the player to discard up to their hand.  This is going to get tricky with magic items since they will stay out on the board and not get discarded.  That permanence is going to be an interesting coding challenge.

In discussion with a friend today we talked about having specific side dungeons based on monster type like a Goblin warren or a dragon lair.  Obviously not this iteration.  But something to consider.

So I got through a bunch of ToDos yesterday and today.  My next big thing for tomorrow and Thursday is going to be "Pick New Card Screen"  

This will be a way for the player to add new cards to his deck after he has defeated a monster.  They need to be able to pick one card from a choice of 2 or just ignore the new cards to keep their deck lean.  There are 10 monsters on the first level.  If they defeated all of them the end result would be an 18 card deck which makes it harder to cycle through and will weight their deck towards some element.  This could be something they want to do depending on strategies.  Last time I talked about what some of the monster special abilities were.  Here are some of the card special abilities:

fire = level damage or multiple damage
air = draw and/or discard
earth = stun or armor
water = heal or copy a card

So depending on the type of deck maybe you go fire air and work to cycle a bunch of damage cards.  Or Earth / water to heal and armor up so they can't hurt you.

Yeah Fire says multiple damage.  My goal is to have Pack creatures which have multiple creatures attack you and the ultimate plan is that when you hit end turn the rest of the monsters in the dungeon get a move which could have them join the battle.

[x] Move deck hand and discard to global variables
[x] figure out why the discard pile doesn't grow each time. passing variables back and forth isn't working.
[x] reset turn button
[x] do damage to player
[x] handle screen disappearance better - center on player

[x] comment out drakes
[x] work on killing hounds
[x] end turn computes damage etc.
[x] Discard Cards

Keep on Decking

So the hope was this weekend I could figure out how to do damage to the monsters via card dragging and dropping.

I got the drag and drop figured out Friday but the damage track got a little tricky to code.  I had several false starts and there are a few bugs that I still need to work through.

Most Elemental hounds are element as the first requirement and then any card as the second.  I think there is a bug if we did 2 as a damage level.  Still need to test that out.

Plus if there are double elements I need to test that out as well.  However as you can see in the picture I got it down for water and any card to kill this Hound.

Now End turn needs to do a final check to confirm that monster is dead and then determine if they can give out cards or not.  In this case I would get a water card of level 1.  I need to kill a Drake to get access to level 2 cards.  Of course drakes have their own set of difficulties.  They come with a double element requirement for first damage level.  Also when they attack they do an extra effect.

fire - Burn damage - if no armor more damage is done
air - discard # - discard a number of cards
earth - stun - can only draw 1 card 
water - heal themselves

These are the basic effects per element but there will be more as the monsters get tougher deeper into the dungeon you go.


Back to coding

Latest game concept is from DragonFire the game.  Basically a spiritual successor to the ShadowRun: Crossfire card game.  Cards are used to defeat monsters but for the most part you need at least 2 and perferrably 4 players to play the game correctly.

So I thought why not make a roguelike that uses cards to defeat monsters.  Similar to Slay the Spire but with movement and a continuous hand drawn.  Magic items were part of your deck like Dragonfire and would stay if stated otherwise you would have to draw them to use them.

Working on getting the basics to work.  The screenshot below shows where we are at.  Basically I am just extending the RogueSharp Tutorial for Monogame to include different combat mechanics and different monsters.  Below is showing debug options where you can see the monsters anywhere.  The Hand shown is so you can judge who you can take on with your current hand.

Later on I added more monster types.  Clearly I need art work but this works for now in terms of testing.

First image of my combat screen, the mouse is over the first card giving it a bump up:

ToDos for the weekend are:

[] once dropped card overlays bottom half of monster and marks off damage virtually
Wound track

The goal here is to temporarily tag the enemy with cards you drop on it to determine damage. 

[] Show Reset Button on CombatScreen

I want to reset combat screen so you can rethink your turn.  The cards don't go into effect until you hit end turn.  The end goal on end turn is that the rest of the world will have a turn as well.  Potentially adding more monsters for you to fight if you don't kill this one quickly.


ToDos I completed yesterday were:

[x] Drag and drop card onto monster - needs tweaking but working
[x] Reset Turn Button - sprite