0.3.1 Enemy Card UI refactor


Mornin', 

Major Changes:

This update comes with a lot of changes behind the scenes that won't be noticable right away on the front end, but opens a lot of possiblity up in the future. I've completely overhauled how the enemy intent system works and replaced it with a similar system to the players' card system. 

I've been putting off this change for a few months now because I was worried it would break the entire project. It turned out to be relatively easy to copy over the card system once I had mapped out exactly how each system interacted with each other, but unfortunately this opened a huge can of worms (and bugs). I spent two days implementing the system and another 10 or so bug fixing until it was back to the quality of the previous system, then improved it to the state it's in now. It took me about two weeks in total, so hopefully it'll be worth it in the long run. 

This change lets the enemies play more than one action per turn, whereas they could only do one before, and allows some fun interactions later down the line for the player & enemy to use each other's cards! 


Most of my cards, some relics, and the turn order system relied on the original enemy intent system so there may be a few remaining bugs after such a huge change, so please let me know if you find any! 

Bugfixes

Fixed enemy tooltip displaying incorrect Defence stats; updated base_defence on apply_effects for accurate info each turn. Adjusted card's tooltip to reflect modified_def instead of default 10 Def.
Fixed enemy block resets; now occurs post-status application instead of after each card. Reset moved to start_turn for consistent functionality.
- Duplicate enemy starting deck to new enemy.draw_pile at battle start, preventing original resource alterations and fixing card duplication.
- Set card.resource_local_to_scene = true for enemy and player played cards, enabling unique variations for card copies.
Added black goat cards; fixed bug causing enemy script duplication.
Fixed player cards issue: changed preloading to loading card_ui. Preload had a bug; loading works. Will research similar experiences.
Cards repositioned in front, higher up to prevent blocking boss view.
- Added old enemy intents as cards.
- enemy_handler checks conditionals for correct enemy actions, no longer adding extras.
- Power cards use boolean to determine removal post-play.
Refactored enemy_card_ui: 
- Added shuffle function for empty discard into card_pile. 
- Implemented draw filter: powers first, then conditionals if feasible, followed by non-power/conditional cards. 
- Adjusted enemy_played_cards' position, rotation, and height. 
- Instant cards wait for animations to complete before passing turn and updating hand position. 
- Power cards not added to discard. 
- Created base defend and charge cards for enemies.
Enemy card system update:
- Removed player animations when enemy cards are played.
- Fixed issue where Defend & Charge cards incorrectly applied DEF to players.
- Introduced new conditions for targeting enemy cards.
- Implemented instant effect application in card.gd for visibility of all enemy cards played.
Enemy scene updated with card storage and player targeting. Turn order plays cards until each enemy's cards are used. Enemy_card_ui manages card stats and ownership. Introduced card pile for enemies; new cards can be assigned. Turn functions cycle through cards, apply statuses, and manage actions. Card filtering and animation functions set for enemy/player distinction. Discarding now goes to enemy pile; ensured tooltips display correctly. Adjustments made for card scaling, attack values, and animation interactions.
Refactored enemy_card_ui:
- Updated fixed values to refresh after draw.
- Disabled tooltip pop-up on card addition, retaining updated card values.
- Resolved issue of discarded cards not showing in pile; corrected display to use discard_pile.cards.
Merge enemy card UI refactor into main branch.
Fixed ATK/DEF on card_UI update after hover; add atk=base_damage & def=base_defense to get_default_tooltip in enemy cards.

BW Dan

Files

hunters-hand-windows.zip 1.2 GB
Version 11 39 days ago

Get Hunter's Hand - Demo

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.