Page 1 of 1

Regeneration of non-creature permanents

PostPosted: 16 Nov 2012, 20:43
by travolter
Regenerating non-creature permanents causes exception error.

Thats because CTargetRegenerationSpell::ResolveCard casts CCard to the CCreatureCard pointer.

Code:
CCreatureCard* pCreatureCard = (CCreatureCard*)pCard;
pCreatureCard->AddRegenerationShield();



Affected cards: Welding Jar, Reknit.


The solution can be moving the regeneration code from CCreatureCard to CCard.