reduced abilitymodify eff slightly increased base eff, added abilitygranted to activated.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user