Page 1 of 1

Upgrading Multiple Blockers Rules

PostPosted: 03 Sep 2012, 17:53
by friarsol
One of the remaining "old rules" that has just been around for ever is assigning combat damage ad-lib during damage resolution. I think I'm going to look into upgrading this to the current rules.

This is multiple steps, and will probably take at least a few weeks to complete, but since I haven't looked into the Combat code much if anyone familiar with the area would like to give some pointers that would be much appreciated. (Especially with where the AI is doing most of the decision making, since the Human stuff is all in the Phase area that I am familiar with.)

So the rules I'm looking to upgrade are:

1. After blockers are finished being declared, order multiple blockers for damage assignment. (Human can use new DualListBox, AI would just order in a similar manner they do now in Combat Damage). Refresh the combat panel, so the top most blocker will be dealt damage first.
2. During combat damage, assign damage in order based upon what was shown. AI will assign damage very similarly to what it does now.
3. Create/Upgrade Multiblockers UI Element to allow for: Only assigning damage one Blocker at a time. Assigning 1 damage, Lethal Damage, Remaining Damage to a Blocker/Defender.

Any requests in this whole thing? I will try to keep Banding in mind while I'm writing it, but definitely won't be writing it in during these upgrades.

Has anyone else checked out the DualListBox, any requests for that?

Re: Upgrading Multiple Blockers Rules

PostPosted: 03 Sep 2012, 18:14
by Sloth
friarsol wrote:This is multiple steps, and will probably take at least a few weeks to complete, but since I haven't looked into the Combat code much if anyone familiar with the area would like to give some pointers that would be much appreciated. (Especially with where the AI is doing most of the decision making, since the Human stuff is all in the Phase area that I am familiar with.)
The AI function that takes care of this is distributeAIDamage in the combat class. I've meddled with this function last week for the first time. It's still very basic.

friarsol wrote:Any requests in this whole thing? I will try to keep Banding in mind while I'm writing it, but definitely won't be writing it in during these upgrades.
Blocking multiple attackers (like Avatar of Hope) should be considered.

friarsol wrote:Has anyone else checked out the DualListBox, any requests for that?
It's already a great improvement. If i could make a wish, it would be showing the cards related cards in some way (picture or details).

Re: Upgrading Multiple Blockers Rules

PostPosted: 03 Sep 2012, 18:29
by friarsol
Sloth wrote:
friarsol wrote:Any requests in this whole thing? I will try to keep Banding in mind while I'm writing it, but definitely won't be writing it in during these upgrades.
Blocking multiple attackers (like Avatar of Hope) should be considered.

friarsol wrote:Has anyone else checked out the DualListBox, any requests for that?
It's already a great improvement. If i could make a wish, it would be showing the cards related cards in some way (picture or details).
Ah yes, single creature blocking multiple creatures. I have to look up how damage assignment works if these type of creatures block in multiple groups, I believe it gets complex fast.

As far as the DLB, which related cards? The one that is spawning the box? I think the ones that are in the select box should now show up in the card panel.

Re: Upgrading Multiple Blockers Rules

PostPosted: 03 Sep 2012, 19:07
by Sloth
friarsol wrote:As far as the DLB, which related cards? The one that is spawning the box? I think the ones that are in the select box should now show up in the card panel.
Ah, didn't notice that. Very cool, very cool.

Re: Upgrading Multiple Blockers Rules

PostPosted: 07 Sep 2012, 23:47
by friarsol
I may already be done with the first step of this, but probably won't have a chance to commit till later this weekend due to real life. Either way, I want to wait till after the fixed Release is out. The main thing that isn't working right now (which already wasn't working) is I have no idea why the CardPanels aren't displaying the relevant cards.

I haven't looked too much into Wall of Glare and related cards, but I simplified some Combat functions to more easily be used in these cases. Once this first step is all checked in, I'll convert any reference of a single Attacker being blocked, to a CardList of Attackers.

How do we want this Keyword to be implemented? I think two different Keywords would probably be best. One for Wall of Glare effects. And one for BlockAdditional effects.

I think in general, stacking BlockAdditional keywords works except for maybe.. Kemba's Legion. Not sure how the best way to handle that is.

Re: Upgrading Multiple Blockers Rules

PostPosted: 08 Sep 2012, 13:53
by Sloth
friarsol wrote:I think in general, stacking BlockAdditional keywords works except for maybe.. Kemba's Legion. Not sure how the best way to handle that is.
Kemba's Legion could just have "Can block X additional creatures". Yare would give "Can block 2 additional creatures" and the others "Can block 1 additional creatures".

A modified version of getKeywordMagnitude can calculate the final number.

Re: Upgrading Multiple Blockers Rules

PostPosted: 10 Sep 2012, 00:46
by friarsol
Ok, the first step of Blocking Multiple Creatures is in 16775. The AI won't try to do it yet, but the functions should already be in place for when it does (specifically ordering damage assignment). I only added Wall of Glare and Foriysian Brigade for now, since it definitely needs more eyes before we start adding all of the others that have the same keyword. And however we want to iron out the keyword management.

Re: Upgrading Multiple Blockers Rules

PostPosted: 10 Sep 2012, 07:24
by Sloth
Thanks a lot Sol. I will take a look at the AI part.

Re: Upgrading Multiple Blockers Rules

PostPosted: 18 Sep 2012, 03:03
by Jaedayr
Is there a way that an attacking 2/4 creature with deathtouch which is blocked by a 1/3 and a 3/4 creature can deal 1 damage to each of them to kill them both? Or is all damage allocated to one creature at a time?

Re: Upgrading Multiple Blockers Rules

PostPosted: 18 Sep 2012, 03:59
by friarsol
Jaedayr wrote:Is there a way that an attacking 2/4 creature with deathtouch which is blocked by a 1/3 and a 3/4 creature can deal 1 damage to each of them to kill them both? Or is all damage allocated to one creature at a time?
I thought I handled this already, but maybe the logic is slightly faulty. I'll take a look when I have some time.

Edit: Oh, just forgot to compare to the current damage. Should be good now.