reduced abilitymodify eff slightly increased base eff, added abilitygranted to activated.

This commit is contained in:
omegablast2002@yahoo.com
2010-11-27 18:28:38 +00:00
parent e23e3d0728
commit 6467ab5aa8
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -1375,6 +1375,7 @@ public:
target = _target; target = _target;
ability = NEW AInstantBasicAbilityModifierUntilEOT(_id, _source, _target, _ability, _value); ability = NEW AInstantBasicAbilityModifierUntilEOT(_id, _source, _target, _ability, _value);
aType = MTGAbility::STANDARDABILITYGRANT; aType = MTGAbility::STANDARDABILITYGRANT;
abilitygranted = _ability;
} }
int isReactingToClick(MTGCardInstance * card, ManaCost * cost = NULL) int isReactingToClick(MTGCardInstance * card, ManaCost * cost = NULL)
+4 -3
View File
@@ -426,13 +426,14 @@ int AIAction::getEfficiency()
} }
case MTGAbility::STANDARDABILITYGRANT: case MTGAbility::STANDARDABILITYGRANT:
{ {
efficiency = 0; efficiency = 10;
MTGCardInstance * _target = (MTGCardInstance *) (a->target); MTGCardInstance * _target = (MTGCardInstance *) (a->target);
//ensuring that Ai grants abilities to creatures during first main, so it can actually use them in combat. //ensuring that Ai grants abilities to creatures during first main, so it can actually use them in combat.
if (_target && !_target->has(a->abilitygranted) && g->getCurrentGamePhase() == Constants::MTG_PHASE_FIRSTMAIN) if (_target && !_target->has(a->abilitygranted) && g->getCurrentGamePhase() == Constants::MTG_PHASE_FIRSTMAIN)
{ {
//trying to avoid Ai giving ie:flying creatures ie:flying twice. //trying to avoid Ai giving ie:flying creatures ie:flying twice.
efficiency = (20 * _target->DangerRanking()); efficiency += (15 * _target->DangerRanking());
} }
if (target) if (target)
{ {
@@ -447,7 +448,7 @@ int AIAction::getEfficiency()
} }
if (suggestion == BAKA_EFFECT_BAD && p != target->controller() && target->has(a->abilitygranted)) if (suggestion == BAKA_EFFECT_BAD && p != target->controller() && target->has(a->abilitygranted))
{ {
efficiency = (20 * _target->DangerRanking()); efficiency += (15 * _target->DangerRanking());
} }
} }
break; break;