unattach animated equipment

another bug found is when the equipment becomes a creature, its ability
is granted to itself...
This commit is contained in:
Anthony Calosa
2017-01-26 02:12:02 +08:00
parent 60f6c683a3
commit de2d663968
3 changed files with 12 additions and 4 deletions

View File

@@ -773,7 +773,7 @@ void GameObserver::gameStateBasedEffects()
////////////////////////////////////////////////////
//Unattach Equipments that dont have valid targets//
////////////////////////////////////////////////////
if (!card->isCreature() && card->hasType(Subtypes::TYPE_EQUIPMENT))
if (card->hasType(Subtypes::TYPE_EQUIPMENT))
{
if(isInPlay(card))
{
@@ -785,7 +785,7 @@ void GameObserver::gameStateBasedEffects()
{
if(card->target)//unattach equipments from cards that has protection from quality ex. protection from artifacts
{
if((card->target)->protectedAgainst(card))
if((card->target)->protectedAgainst(card)||card->isCreature())
((AEquip*)a)->unequip();
}
if(card->controller())