Пример #1
0
    static ActionDatabase()
    {
        //make the data when created
        movementPeace  = new ActionData(10);
        movementCombat = new ActionData(3);

        meleeAttack = new AttackTypeData(3, 1, 1);
        rangeAttack = new AttackTypeData(7, 3, 1);
    }
Пример #2
0
    public List <Tile> SetAttackTileRange(AttackType attType, Tile center)    //attack ignore collision and only check list not dictionary
    {
        AttackTypeData ad        = ActionDatabase.GetAttackData(attType);
        List <Tile>    rangeTile = new List <Tile>();

        int maxCost = ad.maxDist / 2;

        rangeTile = Pathfinding.DijkstraPathfinding(center, maxCost, CollisionCheckEnum.None).Keys.ToList();

        return(rangeTile);
    }
Пример #3
0
    public bool TryAttackInsideRange(Tile target)
    {
        if (CheckAttackInsideRange(target))
        {
            AttackTypeData skill    = ActionDatabase.GetAttackData(currentAttackType);
            float          totalDmg = thisUnit.baseDmg * skill.dmgMulti;

            DamageManager.instance.SpawnDamager(totalDmg, skill.areaDamageRange, target.TileToWorldCoord(), thisUnit.foeType);
            SkillEffectManager.instance.SpawnSkillEffect(currentAttackType, target.TileToWorldCoord());

            return(true);
        }
        else
        {
            return(false);
        }
    }
Пример #4
0
        /// <summary>
        /// Creates the data for the specified row.
        /// </summary>
        /// <param name="Row">The row.</param>
        internal Data Create(Row Row)
        {
            Data Data;

            switch (this.Index)
            {
            case 1:
            {
                Data = new LocaleData(Row, this);
                break;
            }

            case 2:
            {
                Data = new GlobalData(Row, this);
                break;
            }

            case 3:
            {
                Data = new BillingPackageData(Row, this);
                break;
            }

            case 4:
            {
                Data = new AchievementData(Row, this);
                break;
            }

            case 5:
            {
                Data = new Data(Row, this);
                break;
            }

            case 6:
            {
                Data = new SoundData(Row, this);
                break;
            }

            case 7:
            {
                Data = new EffectData(Row, this);
                break;
            }

            case 8:
            {
                Data = new ParticleEmitterData(Row, this);
                break;
            }

            case 9:
            {
                Data = new ResourceData(Row, this);
                break;
            }

            case 10:
            {
                Data = new PuzzleData(Row, this);
                break;
            }

            case 11:
            {
                Data = new BlockData(Row, this);
                break;
            }

            case 12:
            {
                Data = new MonsterData(Row, this);
                break;
            }

            case 14:
            {
                Data = new LevelData(Row, this);
                break;
            }

            case 15:
            {
                Data = new TutorialData(Row, this);
                break;
            }

            case 16:
            {
                Data = new HeroData(Row, this);
                break;
            }

            case 17:
            {
                Data = new BoostData(Row, this);
                break;
            }

            case 18:
            {
                Data = new AttackTypeData(Row, this);
                break;
            }

            case 19:
            {
                Data = new SpecialMoveData(Row, this);
                break;
            }

            case 20:
            {
                Data = new PlaylistData(Row, this);
                break;
            }

            case 21:
            {
                Data = new ProjectileData(Row, this);
                break;
            }

            case 22:
            {
                Data = new MatchPatternData(Row, this);
                break;
            }

            case 23:
            {
                Data = new FacebookErrorData(Row, this);
                break;
            }

            case 24:
            {
                Data = new GateData(Row, this);
                break;
            }

            default:
            {
                Data = new Data(Row, this);
                break;
            }
            }

            return(Data);
        }