- some dangerous casts Player/MTGCardInstance fixed

- removed typeAsTarget function and replaced with dynamic casting
- The test suite passes, but it is possible that I busted some of AI's features :(
This commit is contained in:
wagic.the.homebrew
2011-11-19 14:07:57 +00:00
parent e9139bedab
commit 851e1f20f1
16 changed files with 237 additions and 317 deletions
+3 -1
View File
@@ -14,6 +14,8 @@ using std::vector;
class TargetsList
{
private:
size_t iterateTarget(Targetable * previous);
public:
TargetsList();
TargetsList(Targetable * _targets[], int nbtargets);
@@ -28,7 +30,7 @@ public:
Interruptible * getNextInterruptible(Interruptible * previous, int type);
Spell * getNextSpellTarget(Spell * previous = 0);
Damage * getNextDamageTarget(Damage * previous = 0);
Targetable * getNextTarget(Targetable * previous = 0, int type = -1);
Targetable * getNextTarget(Targetable * previous = 0);
void initTargets()
{
targets.clear();