Forge version 1.5.7
Tentative target release date: Friday December 13.
High Quality Resources for Collectible Card Games
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=52&t=12730
@Override
public Mana chooseManaFromPool(List<Mana> manaChoices) {
return manaChoices.get(0); // no brains used
}
Right, the focus is on "auto" when it used to just always be on "cancel" (since Auto didn't exist, and there are generally no other choices here) which I think might be confusing. If we want Auto to have a key-shortcut, I don't think it should be tied to something that people are already accustomed to.drdev wrote:To clarify, Enter/Space simply activates the button with focus in the prompt. It has always worked like this. Enter/Space will only Cancel when Auto is disabled because you can't pay the cost, and therefore Cancel has focus, which is exactly how it worked before when paying mana costs. It's just that now, if Auto is enabled because the cost is payable, then that button will receive focus instead and Enter/Space will activate it. Does that make sense?
The Auto button is essentially the confirmation button that you want to pay the mana cost, much like how the "OK" button is used for other things. As such, I think it makes perfect sense that it use the Enter/Space shortcut. It's also much faster that way as you can basically just use Enter/Spacebar and a few clicks to easily cast a spell or two, attack, and end the turn, which is what most of your turns will look like. Having to switch between Enter/Spacebar and another key or shortcut would not be nearly as user friendly.friarsol wrote:--Moving this conversation here, because I didn't want to spam the features request thread.Right, the focus is on "auto" when it used to just always be on "cancel" (since Auto didn't exist, and there are generally no other choices here) which I think might be confusing. If we want Auto to have a key-shortcut, I don't think it should be tied to something that people are already accustomed to.drdev wrote:To clarify, Enter/Space simply activates the button with focus in the prompt. It has always worked like this. Enter/Space will only Cancel when Auto is disabled because you can't pay the cost, and therefore Cancel has focus, which is exactly how it worked before when paying mana costs. It's just that now, if Auto is enabled because the cost is payable, then that button will receive focus instead and Enter/Space will activate it. Does that make sense?
"Oh shit I clicked on my Oblivion Ring instead of my White Knight, let me cancel. <Space> Oh shit, it just auto-cast Oblivion Ring"
The point of runAsAi is to run a procedure for a player using a PlayerAiController, even if that player is human. For PlayerControllerAi, it just runs the procedure with no other changes needed. For PlayerControllerHuman, it temporarily sets its controller to a new PlayerControllerAi instance, runs the procedure, then restores the original controller.Max mtg wrote:What does that method runAsAi in PlayerController mean to do?
If you want any actions to be performed by AI on behalf of human, care to move these above the level of playercontroller. (even better to move these out of forge.game package)
Just another point: consider this PlayerController class to be an interface to remote player, connected to your game over network. So how are they supposed to execute any Runnable you are passing as parameters?
I'm not particularly convinced that "Auto" being focused for Mana Costs and "Cancel" being focused for Targets is more user friendly than the same button always being focused.drdev wrote:It's also much faster that way as you can basically just use Enter/Spacebar and a few clicks to easily cast a spell or two, attack, and end the turn, which is what most of your turns will look like. Having to switch between Enter/Spacebar and another key or shortcut would not be nearly as user friendly.
Maybe I could implement an Auto button for targeting too, then the two prompts would be more consistent. I could see that being useful for the many cards or cases where there's only one available target (or only one that makes sense for effects like "target player draws two cards" or "target player discards two cards"), where it could avoid you needing to move your mouse to click on a player or card. The Auto button being disabled would also add an indication that there are no available targets, much like how it being disabled for Auto mana payment indicates the cost can't be paid. I could even implement an optional second prompt to confirm the targets chosen by the AI logic, similar to what I proposed above for Auto mana payment.friarsol wrote:I'm not particularly convinced that "Auto" being focused for Mana Costs and "Cancel" being focused for Targets is more user friendly than the same button always being focused.drdev wrote:It's also much faster that way as you can basically just use Enter/Spacebar and a few clicks to easily cast a spell or two, attack, and end the turn, which is what most of your turns will look like. Having to switch between Enter/Spacebar and another key or shortcut would not be nearly as user friendly.
I agree that a setting wouldn't really be useful here, but having the Escape key Cancel things may alleviate it. (Since we could then remove the Focus from any "Cancel" button)
Could be useful, although I'm not sure where it fits in your large list of UI improvement priorities. Obviously the AI may not know how to Auto-target for all SAs, since that's part of what prevents the AI from being able to use it.drdev wrote:Maybe I could implement an Auto button for targeting too, then the two prompts would be more consistent. I could see that being useful for the many cards or cases where there's only one available target (or only one that makes sense for effects like "target player draws two cards" or "target player discards two cards"), where it could avoid you needing to move your mouse to click on a player or card. The Auto button being disabled would also add an indication that there are no available targets, much like how it being disabled for Auto mana payment indicates the cost can't be paid. I could even implement an optional second prompt to confirm the targets chosen by the AI logic, similar to what I proposed above for Auto mana payment.
Does that sound like a desirable feature? Either way, I plan to add Escape as a shortcut for Cancel.
: Gain 5 life. It different setting options give power users the ability to avoid this prompt completely, while protecting against mis-clicks for everyone else.That controller substitution is also somewhat... odd, but I din't figure out how to achieve the same effect in a different way.drdev wrote:and only temporarily change the controller if its current controlller isn't a instance of PlayerControllerAi? I'd be ok with that.