added ability to have triggered abilities target based on the event that triggered, bramblewood paragon, graft, etc.

use "trigger" inside target code of triggered ability.
does not work with @each and @next.
@damaged can use trigger[to] and trigger[from] to specify the target or source of the damage, respectively.

Adds cards:
Aether Flash
Bramblewood Paragon
In the Web of War
Juniper Order Ranger
Mortuary
Primal Forcemage
Fungus Sliver
Simic Initiate

as well as a test file for feral hydra, missing from my last commit.
and daily build.
This commit is contained in:
salmelo16
2010-04-03 23:50:39 +00:00
parent b9d82a55c7
commit 9cf4c7587b
17 changed files with 376 additions and 42 deletions

View File

@@ -30,6 +30,30 @@ WEventEmptyManaPool::WEventEmptyManaPool(ManaPool * source) : WEvent(), source(s
WEventCombatStepChange::WEventCombatStepChange(CombatStep step) : WEvent(), step(step) {};
Targetable * WEventDamage::getTarget(int target) {
switch (target) {
case TARGET_TO :
return damage->target;
case TARGET_FROM :
return damage->source;
}
return NULL;
}
int WEventDamage::getValue() {
return damage->damage;
}
Targetable * WEventZoneChange::getTarget(int target) {
if (target) return card;
return NULL;
}
Targetable * WEventCardTap::getTarget(int target){
if (target) return card;
return NULL;
}
std::ostream& WEvent::toString(std::ostream& out) const
{
return out << "EVENT";