[REJECTED]has_*_flag actions[REJECTED]

I see some missing actions in SAI. I’ll try to protect it for not be performed several times in the same event in one moment. And i I found a couple of Actions that needs.

SMART_ACTION_HAS_UNIT_FLAG

SMART_ACTION_HAS_NPC_FLAG

SMART_ACTION_HAS_DYNAMIC_FLAG

[CODE] case SMART_ACTION_HAS_UNIT_FLAG:

	{

    	ObjectList* targets = GetTargets(e, unit);

    	if (!targets)

        	return;


    	for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)

        	if (IsUnit(*itr))

        	{

            	if (!(*itr)->ToUnit()->HasFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag))

                	return;

        	}

    	break;

	}

	case SMART_ACTION_HAS_NPC_FLAG:

	{

    	ObjectList* targets = GetTargets(e, unit);

    	if (!targets)

        	return;


    	for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)

        	if (IsUnit(*itr))

        	{

            	if (!(*itr)->ToUnit()->HasFlag(UNIT_NPC_FLAGS, e.action.unitFlag.flag))

                	return;

        	}

    	break;

	}

	case SMART_ACTION_HAS_DYNAMIC_FLAG:

	{

    	ObjectList* targets = GetTargets(e, unit);

    	if (!targets)

        	return;


    	for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)

        	if (IsUnit(*itr))

        	{

            	if (!(*itr)->ToUnit()->HasFlag(UNIT_DYNAMIC_FLAGS, e.action.unitFlag.flag))

                	return;

        	}

    	break;

	}

[/CODE]

In what situation and how would you use these actions?

I’m not quite sure either. Would make a little bit more sense if it was an event but still…

I understand why you want this. I think we all want&need conditions in SAI