private void CreateCurrentCardTargetConditionsList()
 {
     currentCardTargetConditionsList = EditorUtils.SetupReorderableList("Target card conditions", currentCardTarget.conditions, ref currentCardTargetCondition, (rect, x) =>
     {
         EditorGUI.LabelField(new Rect(rect.x, rect.y, 200, EditorGUIUtility.singleLineHeight), x.GetReadableString(gameConfig));
     },
                                                                        (x) =>
     {
         currentCardTargetCondition = x;
     },
                                                                        () =>
     {
         var menu           = new GenericMenu();
         var conditionTypes = AppDomain.CurrentDomain.GetAllDerivedTypes(typeof(CardCondition));
         foreach (var type in conditionTypes)
         {
             menu.AddItem(new GUIContent(StringUtils.DisplayCamelCaseString(type.Name)), false, CreateCardTargetConditionCallback, type);
         }
         menu.ShowAsContext();
     },
                                                                        (x) =>
     {
         currentCardTargetCondition = null;
     });
 }
 private void CreateCurrentCardAbilitiesList()
 {
     currentCardAbilitiesList = EditorUtils.SetupReorderableList("Abilities", currentCard.abilities, ref currentCardAbility, (rect, x) =>
     {
         EditorGUI.LabelField(new Rect(rect.x, rect.y, 200, EditorGUIUtility.singleLineHeight), x.name);
     },
                                                                 (x) =>
     {
         currentCardAbility = x;
         currentPlayerTargetConditionsList = null;
         currentPlayerTarget             = null;
         currentPlayerTargetCondition    = null;
         currentCardTargetConditionsList = null;
         currentCardTarget          = null;
         currentCardTargetCondition = null;
         if (currentCardAbility is ActivatedAbility)
         {
             CreateCurrentEffectCostsList();
         }
     },
                                                                 () =>
     {
         var menu = new GenericMenu();
         menu.AddItem(new GUIContent("Triggered ability"), false, CreateCardAbilityCallback, 0);
         menu.AddItem(new GUIContent("Activated ability"), false, CreateCardAbilityCallback, 1);
         menu.ShowAsContext();
     },
                                                                 (x) =>
     {
         currentCardAbility = null;
         currentPlayerTargetConditionsList = null;
         currentPlayerTarget             = null;
         currentPlayerTargetCondition    = null;
         currentCardTargetConditionsList = null;
         currentCardTarget          = null;
         currentCardTargetCondition = null;
     });
 }