APNAP
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
APNAP
by ShawnieBoy » 15 Jul 2014, 10:02
Active Player, Non-Active Player.
For effects which affect all players at the 'same time', we're generally using a for loop for all players:
Would creating a MagicFor/MagicLoop be feasible? Some of the loops can get quite deep, and themselves hold loops of their own.
Although actually - maybe just changing the game.getPlayers() to order the fetched players in APNAP order. (Always miss the obvious, lol)
For effects which affect all players at the 'same time', we're generally using a for loop for all players:
- Code: Select all
for (final MagicPlayer player : game.getPlayers())
Would creating a MagicFor/MagicLoop be feasible? Some of the loops can get quite deep, and themselves hold loops of their own.
Although actually - maybe just changing the game.getPlayers() to order the fetched players in APNAP order. (Always miss the obvious, lol)
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: APNAP
by melvin » 15 Jul 2014, 13:14
Modifying an existing method may break existing code that expects the order to be player then AI. A new method, say game.getAPNAP(), will be clearer.
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: APNAP
by ShawnieBoy » 15 Jul 2014, 13:26
Yes, very good point. I'll have a look at an APNAP method. (I also just like saying APNAP )
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: APNAP
by ShawnieBoy » 15 Jul 2014, 14:39
Have something added, but now confusing myself with the application of multiple choices across players...
Pox for example
Each player in APNAP order performs all actions
or
Each player performs each action in APNAP order?
Haven't found anything concrete, but is it "Each player loses a third of his or her life, then [each player] discards a third..." etc or Player 1 does everything, then Player 2?
As we don't have simultaneous discard/sacrifice etc, and that APNAP applies to choices. I'd say the former, even though it's not really how it works in the real world.
Pox for example
Each player in APNAP order performs all actions
or
Each player performs each action in APNAP order?
Haven't found anything concrete, but is it "Each player loses a third of his or her life, then [each player] discards a third..." etc or Player 1 does everything, then Player 2?
As we don't have simultaneous discard/sacrifice etc, and that APNAP applies to choices. I'd say the former, even though it's not really how it works in the real world.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: APNAP
by jerichopumpkin » 15 Jul 2014, 17:08
I think that "Each player loses a third of his or her life, then [each player] discards a third..." would be the right answer, but I'm not totally sure. In any case, I don't think choosing either way would impact the game, since nothing can happen (except for triggers, but they would be resolved only once Pox is resolved) during the resolution of the effect... So just go for the easiest to implementShawnieBoy wrote:Have something added, but now confusing myself with the application of multiple choices across players...
Pox for example
Each player in APNAP order performs all actions
or
Each player performs each action in APNAP order?
Haven't found anything concrete, but is it "Each player loses a third of his or her life, then [each player] discards a third..." etc or Player 1 does everything, then Player 2?
As we don't have simultaneous discard/sacrifice etc, and that APNAP applies to choices. I'd say the former, even though it's not really how it works in the real world.
- jerichopumpkin
- Posts: 212
- Joined: 12 Sep 2013, 11:21
- Has thanked: 19 times
- Been thanked: 13 times
Re: APNAP
by ShawnieBoy » 15 Jul 2014, 17:22
Well, the only thing that can happen between them, is the possible choice of what to sacrifice.jerichopumpkin wrote:I think that "Each player loses a third of his or her life, then [each player] discards a third..." would be the right answer, but I'm not totally sure. In any case, I don't think choosing either way would impact the game, since nothing can happen (except for triggers, but they would be resolved only once Pox is resolved) during the resolution of the effect... So just go for the easiest to implement
If it's the first option, the active player chooses which creatures to sacrifice first, then the opponent chooses. The same for lands. So the inactive player has the advantage of knowing what the active player is going to sacrifice.
This information can also give the active player an advantage when multiple choice actions are involved.
Take an example where the active player has made his or her creature sacrifice choices, then the opponent does. The opponent has chosen not to sacrifice a creature with a landwalk ability. The active player can then use that information to choose to sacrifice lands of that type to nullify the landwalk ability. This is before anything leaves the battlefield.
This isn't possible if the active player makes all choices first, then the opponent. But I don't know which is correct
edited for clarity
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: APNAP
by ShawnieBoy » 15 Jul 2014, 20:06
Sorted - each event occurs separately during resolution. So the process for Pox would be:
AP = Active player
NAP = Non-Active player
AP + NAP: Lose 1/3 life.
AP: Chooses a 1/3 of hand to discard (Hidden information if hand is hidden).
NAP: Chooses a 1/3 of hand to discard (Hidden information if hand is hidden).
AP + NAP: Discards chosen cards.
AP: Chooses a 1/3 of creatures to sacrifice (Public information as creatures are visible)
NAP: Chooses a 1/3 of creatures to sacrifice (Public information as creatures are visible)
AP + NAP: Sacrifice chosen creatures.
AP: Chooses a 1/3 of lands to sacrifice (Public information as lands are visible)
NAP: Chooses a 1/3 of lands to sacrifice (Public information as lands are visible)
AP + NAP: Sacrifice chosen lands.
Triggered abilities would be added to the stack in APNAP order when they trigger, but won't resolve until all the actions have completed.
AP = Active player
NAP = Non-Active player
AP + NAP: Lose 1/3 life.
AP: Chooses a 1/3 of hand to discard (Hidden information if hand is hidden).
NAP: Chooses a 1/3 of hand to discard (Hidden information if hand is hidden).
AP + NAP: Discards chosen cards.
AP: Chooses a 1/3 of creatures to sacrifice (Public information as creatures are visible)
NAP: Chooses a 1/3 of creatures to sacrifice (Public information as creatures are visible)
AP + NAP: Sacrifice chosen creatures.
AP: Chooses a 1/3 of lands to sacrifice (Public information as lands are visible)
NAP: Chooses a 1/3 of lands to sacrifice (Public information as lands are visible)
AP + NAP: Sacrifice chosen lands.
Triggered abilities would be added to the stack in APNAP order when they trigger, but won't resolve until all the actions have completed.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests