Example #1
0
File: Quest.cs Project: vpdh98/PEO
    public override bool CheckTarget(Object info)
    {
        Enemy enemy = null;

        if (info is Enemy)
        {
            enemy = (Enemy)info;
        }
        else
        {
            return(false);
        }
        if (MonsterNameList.Contains(enemy.Name))
        {
            try{
                MonsterCount[MonsterNameList.IndexOf(enemy.Name)]++;
            }catch (Exception e) {
                MonsterCount.Add(0);
                MonsterCount[MonsterNameList.IndexOf(enemy.Name)]++;
            }
            CheckComplete();
            return(true);
        }
        else
        {
            return(false);
        }
    }
Example #2
0
        /// <summary>
        /// Returns true if the specified unit has a Monster name.
        /// </summary>
        public static bool IsMonster(this Obj_AI_Base source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            return(MonsterNameList.Contains("source"));
        }