Page 1 of 1

Combat.java - wrong implementation

PostPosted: 03 Aug 2013, 20:18
by Max mtg
Code: Select all
private List<Card> combatantDealtFirstStrikeDamage = Lists.newArrayList();
Should not be in Combat class. It refers to card damage history if a card was dealt first-strike damage.

Re: Combat.java - wrong implementation

PostPosted: 04 Aug 2013, 03:36
by friarsol
Max mtg wrote:
Code: Select all
private List<Card> combatantDealtFirstStrikeDamage = Lists.newArrayList();
Should not be in Combat class. It refers to card damage history if a card was dealt first-strike damage.
No, it doesn't. It refers to whether a Card assigned damage during the first strike damage, not whether it received damage. It's needed in the Combat class to determine if a creature will deal damage in the non-first strike damage, since before this we were incorrectly just checking if creatures had first strike, which is not correct since if a creature gains or loses first strike it wouldn't correctly assign damage the second time.

Re: Combat.java - wrong implementation

PostPosted: 04 Aug 2013, 07:50
by Max mtg
You are right then.

I have slightly renamed the field and added a comment to prevent other people from making wrong conclusions about this code.