Page 4 of 4

Re: Hanmac's Refactoring Thread

PostPosted: 08 Jan 2017, 10:59
by Agetian
Wow, MTG sure has some complicated rules :/ At any rate, I believe you can get this right for sure, and I wish you the best of luck in your ongoing efforts! They are very highly appreciated!

- Agetian

Re: Hanmac's Refactoring Thread

PostPosted: 08 Jan 2017, 13:40
by friarsol
So it's a new damage effect each time the card name is used on the card. Maybe just add a new damage effect in the card script and key off that.

Re: Hanmac's Refactoring Thread

PostPosted: 08 Jan 2017, 13:45
by Hanmac
friarsol: ah okay yeah thats make sense ...

the problem are cards like Cone of Flame where we need Two or more DealDamage Effects because of different values to different targets ...

OR what do you think about using "| NumDmg$ 1:2:3" ? the DamageDeal Effect does need to be changed but it will understand that "1" is dealt to the first Target, "2" to the second and "3" to the third?

with that Cone of Flame could be done in one DamageEffect

Re: Hanmac's Refactoring Thread

PostPosted: 08 Jan 2017, 14:58
by friarsol
I think that might be too complex. Do we know how many cards deal damage on multiple effect lines? Maybe in these cards the script can have a new param like "BuildDamageMap" which holds onto the damage effect as is getting each of the recipients, then releases as a single batch.

Re: Hanmac's Refactoring Thread

PostPosted: 08 Jan 2017, 15:19
by Hanmac
a very short look got me this list:
Code: Select all
// spell with multiple targets dealing different damages
Arc Trail
Cone of Flame
Hail Storm
Serpentine Spike

Cunning Strike
Punish the Enemy

// currently a repeat, does need to be done different?
Incite Rebellion

// Effects which does deal damage to target and damage to you
Goblin Artillery
Orcish Artillery
Orcish Cannonade
Orcish Cannoneers

// Effects which does deal damage to target and itself
Psionic Entity
Psionic Sliver

// condition extra damage (for them BuildDamageMap might not work nicely)
Kamahl's Sledge

how they need to be changed i don't know yet ...

cards my parser did found but should not combined:
Code: Select all
Burn the Impure
Sarkhan's Rage
Ravaging Blaze
Draconic Roar
i am currently reworking CounterMove for Aetherborn Marauder and other cards.
(also adding entry points for the AI)

Re: Hanmac's Refactoring Thread

PostPosted: 22 Jan 2017, 15:42
by Hanmac
other Topics i want to do:

If Selfless Squire is hanging out while three creatures attacking you get lost in a Fog, does its ability trigger once or three times? Here, have a new rule to cover that—it triggers once.
means to get it right, i need to add a DamagePreventionMap variable to the damage dealt functions to map the prevented part too. (collect the data and trigger only once)

etbCounter and similar effects (and keywords) should only cause one replacement effect and trigger.

two Metallic Mimic, the second one didn't get the boost from he first (choosing the same Type) should only causes one trigger by Animation Module.

Example: with bloodthirst
702.53c If an object has multiple instances of bloodthirst, each applies separately.
there are Two + replacement effects, but Animation Module (and other?) should still only trigger once.

Re: Hanmac's Refactoring Thread

PostPosted: 23 Jan 2017, 07:28
by Marek14
Hm, are you sure that Animation Module should trigger only once? There ARE two separate effects that add the counters and Hardened Scales would apply to each separately.

Re: Hanmac's Refactoring Thread

PostPosted: 26 Jan 2017, 02:28
by Hanmac
@Marek14: magicjudge didn't published yet but she says that both only should trigger/replace once. Means i will need to find a way to rework ETB counter effects.

Re: Hanmac's Refactoring Thread

PostPosted: 02 Feb 2017, 06:11
by Hanmac
Did EtbCounter stuff.
Tested it with multiple Replacement Effects in combination with Hardened Scales.

Master Biomancer + Cytoplast Root-Kin + Hardened Scales = 2 + 4 + 1 = 7