Page 1 of 5

Forge version 1.2.16

PostPosted: 05 Oct 2012, 12:11
by Chris H.
Starting a next version thread.

Tentative release target date: Friday November 2nd.

Re: Forge version 1.2.16

PostPosted: 05 Oct 2012, 12:34
by Max mtg
A whole month of fun trying to implement hotseat or even multiplayer.

Re: Forge version 1.2.16

PostPosted: 05 Oct 2012, 20:51
by moomarc
If we get hotseat and/or multiplayer working for this next beta should we perhaps move over to Forge v1.3.0? With the next major iteration being for next-gen AI?

Re: Forge version 1.2.16

PostPosted: 05 Oct 2012, 22:59
by Chris H.
moomarc wrote:If we get hotseat and/or multiplayer working for this next beta should we perhaps move over to Forge v1.3.0? With the next major iteration being for next-gen AI?
 
Sounds like an idea for us to consider, but we do want to make sure to give Max all of the time that he needs. :)

Re: Forge version 1.2.16

PostPosted: 07 Oct 2012, 13:29
by Max mtg
The methods AllZone.getComputerPlayer and AllZone.getHumanPlayer are deprecated.
Each reference will generate a warning. There are some 850 of them at the moment.

Whenever possible, refactor your code and keep in mind that there may be a number of computer or human players in a game.

Actual routines are: AllZone.getPlayersInGame or Player's methods to check if it is a human or computer.


Player's method "getOpponent" is to be deprecated soon.
(because there will be many opponents)

Re: Forge version 1.2.16

PostPosted: 07 Oct 2012, 14:17
by Sloth
Max mtg wrote:The methods AllZone.getComputerPlayer and AllZone.getHumanPlayer are deprecated.
I think there is an error here:
getHumanPlayer() | Open
Code: Select all
    @Deprecated
    public static Player getHumanPlayer() {
        if (Singletons.getModel() == null)
            return null;

        return Aggregates.firstFieldEquals(Singletons.getModel().getGameState().getPlayers(), Player.Accessors.FN_GET_TYPE, PlayerType.COMPUTER);
    }
Shouldn't it be PlayerType.HUMAN?

Re: Forge version 1.2.16

PostPosted: 07 Oct 2012, 14:25
by moomarc
Chris H. wrote:
moomarc wrote:If we get hotseat and/or multiplayer working for this next beta should we perhaps move over to Forge v1.3.0? With the next major iteration being for next-gen AI?
 
Sounds like an idea for us to consider, but we do want to make sure to give Max all of the time that he needs. :)
Yea, definitely wasn't trying to rush max. My phrasing shouldn't have stated [ii]this beta[/i]. Merely meant to point out that I think its a major-enough feature to increment the main version, certainly bigger than an AI overhaul in terms of game functionality. I'm just impressed that its finally happening. Sooner than I expected. :mrgreen:

Re: Forge version 1.2.16

PostPosted: 07 Oct 2012, 14:34
by Max mtg
Sloth wrote:
Max mtg wrote:The methods AllZone.getComputerPlayer and AllZone.getHumanPlayer are deprecated.
I think there is an error here:
getHumanPlayer() | Open
Code: Select all
    @Deprecated
    public static Player getHumanPlayer() {
        if (Singletons.getModel() == null)
            return null;

        return Aggregates.firstFieldEquals(Singletons.getModel().getGameState().getPlayers(), Player.Accessors.FN_GET_TYPE, PlayerType.COMPUTER);
    }
Shouldn't it be PlayerType.HUMAN?
Thank you, Sloth.

Now I am working on AbilityFactories with lots of calls to get*player coming from static routines referred by canPlayAI() calls of different abilities. So when I see such a problem, I add Player aiPlayer parameter to static routine and use it instead of getComputerPlayer and expect that the activating player is set by the moment canPlayAI is checked. Multiple AIs might coexist in this way, I hope. As for acquiring an opponent to target with a spell, for now I can only replace getHumanPlayer by aiPlayer.getOpponent, though it may be inaccurate for multiplayer game.

See r17387 for example.

Re: Forge version 1.2.16

PostPosted: 07 Oct 2012, 15:18
by Chris H.
moomarc wrote:Yea, definitely wasn't trying to rush max. My phrasing shouldn't have stated [ii]this beta[/i]. Merely meant to point out that I think its a major-enough feature to increment the main version, certainly bigger than an AI overhaul in terms of game functionality. I'm just impressed that its finally happening. Sooner than I expected. :mrgreen:
 
Yeah, I think that we are all on the same page. :)

We might want to call the next beta v 1.3.0 for the new gauntlet mode that Doublestrike has recently added.

Max should be able to add in the code changes for the initial stage of his work but might not actually have enough time to implement a hot-seat/multiplayer game mode.

Once Max is far enough along with the hot-seat/multiplayer game mode we could then go to 1.4.0 to recognize his work.

A new and improved AI as has been discussed elsewhere of SlightlyMagic might warrant a v 2.0.0 number :)

Re: Forge version 1.2.16

PostPosted: 07 Oct 2012, 15:39
by moomarc
A lot of scripts are also going to need fixing up in this regard once multiple players are enabled. A lot of the count methods and targeting types rely on the fact that there is currently only one other player who is always an opponent. We're going to have to split all these into an opponent, any other player, each opponent, each other player. Several cards that use YouDontOwn or YouDontControl probably also need to be adjusted after multiplayer is added.

Thanks Max for the work you're doing. Forge is going to be awesome (moreso than before)!

Re: Forge version 1.2.16

PostPosted: 07 Oct 2012, 23:27
by Max mtg
Update:
cannot deprecate player.getOpponent - too many AI roitines rely on a single enemy convention.
The refactored ai should be able to play against another ai - I'll try it some day.

There still remain 160+ references to global getXXXplayer methods.

Re: Forge version 1.2.16

PostPosted: 09 Oct 2012, 00:14
by Doublestrike
@friarsol - almost done with the multiblocker dialog, but I've got some questions about damage assignment:

1) Must all blockers receive lethal damage before any can be assigned to an opponent?

2) If a creature has deathtouch, can all trample damage roll over to opponent?

Any other corner damage cases you can think of?

Re: Forge version 1.2.16

PostPosted: 09 Oct 2012, 00:55
by friarsol
Doublestrike wrote:@friarsol - almost done with the multiblocker dialog, but I've got some questions about damage assignment:

1) Must all blockers receive lethal damage before any can be assigned to an opponent?

2) If a creature has deathtouch, can all trample damage roll over to opponent?

Any other weird damage cases you can think of?
All blockers must receive lethal damage in order before the defending object (player or planeswalker) can be dealt damage. This means if the attacker has deathtouch, "lethal damage" is only 1 if that blocker has not yet received lethal damage already. (This case is important for creatures that can block multiple attackers or that are indestructible). Damage prevention/protection is not considered when assigning lethal damage to blockers.

And yes, if you have a trampling deathtoucher, in a simple scenario you can deal X damage to the opponent, where X is the assignable damage minus the amount of blockers.

Re: Forge version 1.2.16

PostPosted: 09 Oct 2012, 07:26
by Doublestrike
OK all finished. I think it's working properly but there are probably some corner cases I may have missed (hopefully not).

Re: Forge version 1.2.16

PostPosted: 09 Oct 2012, 07:50
by Doublestrike
@moomarc, mostly - would people mind if the specially styled button pictures were removed?

I'm talking about the ones like on the win/lose screen, the "continue", etc. They'll be replaced by a more button-y button, throughout the UI.

Is anyone strongly in favor of keeping that look?