-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instant-cast cards #21
Comments
Will also need to change the queue/unqueue cards to take this new step in account. Apart from that, everything is clear for me ! i'm not really sure it's dependent on #14 though. |
Well my thought is that |
the effect is just that, an effect. It does not say how it can be applied. For example, you could have poison on one target or poison all targets. it would make more sense to keep that on the |
Hm that's true. How should we handle a card like "Heal 1 health, deal 3 damage to all enemies"? That's both a single-target friendly effect, as well as a multi-target enemy effect. I guess we will have to have some structure on the CardBase than handles that. class CardTargetData
var cast_type: CastType
var effect: CardEffect Instead of having an array of |
yes that's exactly what i was thinking, when you build a card you would specify three things:
And if you have multiple effects, then you just do that multiple times. So for your card example it would look like this (random format, just to visualize):
|
I think I will still implement #14 as it was described ? as this will come later |
Yeah that sounds good, we can implement this structure along with this PR I suppose |
When you mean "this structure" you mean the one discussed in this issue, and by "this PR" you mean the PR that will come with this issue ? |
Yep that's what I meant |
In the end, I will implement this part now because it makes more sense, along #14 |
Should the application type discussed here #27 (comment) be implemented along this issue, or should it go with another issue ? |
I think we can implement it here. |
Alright so just a recap here to be sure we agree on what's to do. We have 3 types of cast: To know if a card can be instant cast or not, we check all the types of cast of the effects on the card. Let's say we have a damage effect with target, a poison all and a heal self. Since there is a TARGET in the effects, the card can't be instant cast. Actually, the card is instant-cast unless it has at least one effect with a target cast. Later on, I will make a custom targeting class, which will give options for the enemies we put in the list of targets. But for now, the way we do it is:
|
That sounds good! I think we could go ahead and add an ALL_FRIENDLY type too because it wouldn’t be too much extra work. That would allow us to have enemy attacks like “buff entire party” |
Indeed from the point of view of enemies, they could target their party this way. But I was thinking it would be better to not change the tag depending from the point of view. Even from the point of view of the enemies, their parties members are tagged as enemies. That would prevent errors like being confused on whose turn it is. But we can have |
Feature Description
Cards should have the ability to instantly play their effects, instead of always having to select a target. To better facilitate this, we can change card input from click-only to drag-and-drop.
Motivation
Currently, all cards require you to select a target. If it's a healing card, you have to click the player. If it's an attack card, you have to click an enemy. However, this doesn't make much sense for cards where there isn't a specific target. Some examples:
Because of this, it makes sense to allow those cards to be cast instantly without needing to select a specific target.
A drag-and-drop system makes more sense if we implement instant-cast cards. If we implement instant cast cards with the current input system, then the player could easily click a card in their hand on accident and play it by mistake. It's a lot more difficult to make a mistake with a drag-and-drop system. A drag-and-drop system also feels more intuitive, in my opinion.
Acceptance Criteria
Proposed Solution
To play a card, you first have to grab it and drop it into the "play area", which is the portion of the screen outside of your hand. Upon doing so, one of two things happens:
This will require modification of the CardContainer. When a card is clicked, instead of becoming the
queued_card
it becomes thedragging_card
. If thedragging_card
is a certain distance away from its starting position on the y-axis, it can be played by clicking again. A new state will be added toCardMovementComponent
(see #12) calledFOLLOWING_MOUSE
.CardEffects will contain a new
CastType
enum:CastType
SINGLE_TARGET
- affects a single target. If a card with this effect is played by a player, they have to select an enemy to cast the card on.ALL_TARGETS
- affects all targets. If the card only contains this CastType, then the card is instantly cast. The player will not have to select a target.Implementation Steps (Optional)
CastType
enumAdditional Context
Depends on #14 and #12
The text was updated successfully, but these errors were encountered: