What major part needs to be updated?
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
11 posts
• Page 1 of 1
What major part needs to be updated?
by mtgrares » 04 Nov 2009, 21:16
You guys, dennis and rob and others have worked very extensively with MTG Forge's source code and what do you think is the most important part that needs to be updated? Should MTG Forge use the new combat system or have all of the phases and phase stops? Or should I find a way to automatically test and verify cards? I don't mind doing some major work on MTG Forge if I knew which area needed it the most.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: What major part needs to be updated?
by Rob Cashwalker » 04 Nov 2009, 21:49
Phase stops AND De-hack Dennis' AI for counterspell....
Essentially, allow the AI to use the standard SpellAbility.canPlayAI method during any phase stop. So counterspells would have a canPlayAI that checks if there's a spell on the stack, and if so, then go ahead. Or Pump effects can be revised so that canPlayAI would prefer to be played during combat.
Essentially, allow the AI to use the standard SpellAbility.canPlayAI method during any phase stop. So counterspells would have a canPlayAI that checks if there's a spell on the stack, and if so, then go ahead. Or Pump effects can be revised so that canPlayAI would prefer to be played during combat.
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: What major part needs to be updated?
by mtgrares » 06 Nov 2009, 17:53
That's probably as good as the AI Counterspell can get. I don't see another way of doing it.
AI combat tricks like instants and activated abilities really interests me but I know that it is a big task because it is hard to really put your finger on how things should work.
Having all phases and phase stops in MTG Forge sounds good. If I'm brave I'll work on it.
AI combat tricks like instants and activated abilities really interests me but I know that it is a big task because it is hard to really put your finger on how things should work.
Having all phases and phase stops in MTG Forge sounds good. If I'm brave I'll work on it.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: What major part needs to be updated?
by Rob Cashwalker » 06 Nov 2009, 22:34
Keep in mind, that you asked for a really major part. This one part encompasses a number of features and changes. But I'm fairly sure the architecture can handle it.
I don't see why it couldn't work something like what I'm describing.
On the other hand, this would require changing current canPlayAI methods, because most if not all of them assume to be played as sorceries on the computer's turn. Therefore, they need to check more than just "Am I a useful spell?" They need to make sure the timing is right. This could be partly mitigated by only checking the canPlayAI for instants and permanent abilities. (filtering out sorceries and planeswalkers)
Dennis has already begun some work towards supporting multiple comes-into-play abilities, allowing for either cards with two CIP abilities, or other effects granting or replacing CIP abilities to other cards. Similar approaches could be modeled to allow for many other triggered abilities or replacement actions. Once implemented, an event would be triggered when just about anything occurs, and therefore could be used to provide the AI a chance to respond to just about anything.
Along with the spDamageTgt code, I included DamagePlayer and LoseLife methods in GameAction, to provide a placeholder for any future support for prevention and redirection; similar in theory to the DamageCreature method implementation for Wither. Another major part you could brainstorm would be prevention and redirection effects. (seems like mostly input routines)
I don't see why it couldn't work something like what I'm describing.
On the other hand, this would require changing current canPlayAI methods, because most if not all of them assume to be played as sorceries on the computer's turn. Therefore, they need to check more than just "Am I a useful spell?" They need to make sure the timing is right. This could be partly mitigated by only checking the canPlayAI for instants and permanent abilities. (filtering out sorceries and planeswalkers)
Dennis has already begun some work towards supporting multiple comes-into-play abilities, allowing for either cards with two CIP abilities, or other effects granting or replacing CIP abilities to other cards. Similar approaches could be modeled to allow for many other triggered abilities or replacement actions. Once implemented, an event would be triggered when just about anything occurs, and therefore could be used to provide the AI a chance to respond to just about anything.
Along with the spDamageTgt code, I included DamagePlayer and LoseLife methods in GameAction, to provide a placeholder for any future support for prevention and redirection; similar in theory to the DamageCreature method implementation for Wither. Another major part you could brainstorm would be prevention and redirection effects. (seems like mostly input routines)
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: What major part needs to be updated?
by silly freak » 06 Nov 2009, 22:51
i think we should extrack a canPlay method out of canPlayAI to check things like timing that are common to both players
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: What major part needs to be updated?
by DennisBergkamp » 07 Nov 2009, 00:35
Currently the ManaPool needs fixing, I'd say...
-

DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: What major part needs to be updated?
by Resonantg » 07 Nov 2009, 20:42
Only thing I can think of that really would be a big difference is Upkeep both normal and cumulative.
- Resonantg
- Posts: 172
- Joined: 11 Oct 2009, 16:20
- Has thanked: 0 time
- Been thanked: 0 time
Re: What major part needs to be updated?
by zerker2000 » 07 Nov 2009, 22:01
Concerning that, I would say that field pumpers(Soldiers, Slivers, Lords...) should also be keyworded in some way, possibly using a StaticEffect class that does so(e.g. CardListFilter affects, void(Card) affect).
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: What major part needs to be updated?
by mtgrares » 09 Nov 2009, 20:53
On a smaller level, I should be able to add a "phase stop" for "After the Computer Declares Attackers." Basically I'll just cut and paste the End of Turn code in InputControl. Maybe I can also make the OK button wait a second or two so that people don't click too fast. And I should be able to make the right mouse button automatically click the OK button, that might save a few miles. (I think that was a feature of the short-lived online version.)
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: What major part needs to be updated?
by DennisBergkamp » 09 Nov 2009, 21:56
This is actually already in the latest Beta, except it's not optional (like the EoT one), but it will occur only whenever the computer attacked with creatures.On a smaller level, I should be able to add a "phase stop" for "After the Computer Declares Attackers." Basically I'll just cut and paste the End of Turn code in InputControl. Maybe I can also make the OK button wait a second or two so that people don't click too fast. And I should be able to make the right mouse button automatically click the OK button, that might save a few miles. (I think that was a feature of the short-lived online version.)
-

DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: What major part needs to be updated?
by mtgrares » 12 Nov 2009, 21:35
OK, thanks for telling me. I think I remember reading it but then people were having problems installing it, so I never installed it.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
11 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests