Пример #1
0
    // Use this for initialization
    public void Awake()
    {
        DontDestroyOnLoad(transform.gameObject);

        EquipmentFactory = new equipmentFactory();

        if (Application.loadedLevelName == "setup")
        {
            previousScene = "setup";
            Application.LoadLevel("OverworldBaseCamp");
        }

        InfernalSpawn = (GameObject)Resources.Load("Enemy Prefabs/InfernalEnemy", typeof(GameObject));

        #region ability initialization
        Abilities = new Dictionary<string, Ability>();

        // Attack type, damage type, range, angle, cooldown, damagemod, resource cost

        #region player abilities

        #region spammed abilities

        Abilities["fireball"] = new Fireball(AttackType.PROJECTILE, DamageType.FIRE, 10.0f, 0.0f, 0.0f, 10.0f, 0f, "fireball", "Fireball", FireballExplosion);
        Abilities["shadowbolt"] = new Shadowbolt(AttackType.HONINGPROJECTILE, DamageType.SHADOW, 10.0f, 0.0f, 0.0f, 1.0f, 0f, "shadowbolt", "Shadowbolt", ShadowboltExplosion);
        Abilities["improvedshadowbolt"] = new ImprovedShadowbolt(AttackType.HONINGPROJECTILE, DamageType.SHADOW, 10.0f, 0.0f, 0.0f, 1.0f, 0f, "improvedshadowbolt", "Improved Shadowbolt", ShadowboltExplosion);
        Abilities["poisonbolt"] = new Poisonbolt(AttackType.HONINGPROJECTILE, DamageType.POISON, 10.0f, 0.0f, 0.0f, 10.0f, 0f, "poisonbolt", "poisonbolt", FireballExplosion);
        Abilities["bloodbolt"] = new Bloodbolt(AttackType.HONINGPROJECTILE, DamageType.PHYSICAL, 10.0f, 0.0f, 0.0f, 10.0f, 0f, "bloodbolt", "bloodbolt", FireballExplosion);
        Abilities["chaosbolt"] = new Chaosbolt(AttackType.HONINGPROJECTILE, DamageType.FIRE, 10.0f, 0.0f, 0.0f, 10.0f, 0f, "chaosbolt", "chaosbolt", ChaosboltExplosion);
        Abilities["chaosbarragebolt"] = new ChaosBarrageBolt(AttackType.HONINGPROJECTILE, DamageType.FIRE, 10.0f, 0.0f, 0.0f, 10.0f, 0f, "chaosbarragebolt", "chaosbarragebolt", ChaosboltExplosion);
        Abilities["icebolt"] = new IceBolt(AttackType.PROJECTILE, DamageType.WATER, 8f, 0f, 0.0f, 10.0f, 0f, "icebolt", "Ice Bolt", IceBoltParticles);
        Abilities["cleave"] = new Cleave(AttackType.MELEE, DamageType.PHYSICAL, 3.0f, 45.0f, 0.0f, 5.0f, 0f, "cleave", "Cleave", CleaveParticles);
        Abilities["arrow"] = new Arrow(AttackType.PROJECTILE, DamageType.PHYSICAL, 8.0f, 0.0f, 0.0f, 5.0f, 0f, "arrow", "Arrow", ArrowParticles);

        #endregion

        #region buff abilities

        Abilities["chaosbarrage"] = new ChaosBarrageAbility(AttackType.STATUS, DamageType.NONE, 10.0f, 0.0f, 0.0f, 0.0f, 0, "chaosbarrage", "Chaos Barrage", ChaosBarrageParticles);
        Abilities["fireballbarrage"] = new FireballBarrageAbility(AttackType.STATUS, DamageType.NONE, 10.0f, 0.0f, 30.0f, 0.0f, 100f, "fireballbarrage", "Fireball Barrage", FireballBarrageParticles);
        Abilities["rootability"] = new RootAbility(AttackType.STATUS, DamageType.NONE, 10.0f, 360.0f, 15.0f, 0.0f, 0f, "rootability", "Root Ability", null);

        #endregion

        Abilities["groundslam"] = new Hadouken(AttackType.PBAOE, DamageType.AIR, 5.0f, 360.0f, 10.0f, 10.0f, 25.0f, "groundslam", "Ground Slam", HadoukenParticles);
        Abilities["deathgrip"] = new Deathgrip(AttackType.PBAOE, DamageType.SHADOW, 5.0f, 360.0f, 0.0f, 15.0f, 25.0f, "deathgrip", "AoE Deathgrip", DeathgripParticles);
        Abilities["fusrodah"] = new Fusrodah(AttackType.PBAOE, DamageType.AIR, 5.0f, 45.0f, 5.0f, 10.0f, 20.0f, "fusrodah", "Fus Roh Dah", FusRoDahParticles);
        Abilities["flamestrike"] = new Flamestrike(AttackType.PBAOE, DamageType.FIRE, 5.0f, 360.0f, 5.0f, 1000.0f, 25.0f, "flamestrike", "Flamestrike", FlamestrikeParticles);
        Abilities["bladewaltz"] = new BladeWaltz(AttackType.PBAOE, DamageType.PHYSICAL, 5.0f, 360.0f, 30.0f, 0f, 50.0f, "bladewaltz", "Blade Waltz", BladeWaltzParticles);
        Abilities["erenwaltz"] = new ErenWaltz(AttackType.PBAOE, DamageType.PHYSICAL, 5.0f, 360.0f, 0.0f, 5.0f, 0f, "erenwaltz", "Eren Waltz", BladeWaltzParticles);
        Abilities["firemine"] = new FireMine(AttackType.PROJECTILE, DamageType.FIRE, 5.0f, 360.0f, 4.0f, 200.0f, 10f, "firemine", "Fire Mine", FiremineParticles);
        Abilities["GETOVERHERE"] = new GETOVERHERE(AttackType.PROJECTILE, DamageType.SHADOW, 4.0f, 0.0f, 0.0f, 0.1f, 10f, "GETOVERHERE", "Shadow Pull", GETOVERHEREParticles);
        Abilities["normalmine"] = new NormalMine(AttackType.PROJECTILE, DamageType.PHYSICAL, 5.0f, 360.0f, 4.0f, 1.0f, 10f, "normalmine", "Mine", MineParticles);
        Abilities["blinkstrike"] = new BlinkStrike(AttackType.PROJECTILE, DamageType.SHADOW, 4.0f, 1.0f, 0.0f, 5.0f, 10f, "blinkstrike", "Blink Strike", BlinkStrikeExplosion);
        Abilities["blink"] = new Blink(AttackType.GROUNDTARGET, DamageType.NONE, 5.0f, 0.0f, 7.0f, 0.0f, 25f, "blink", "Blink", BlinkParticles);
        Abilities["shockmine"] = new ShockMine(AttackType.PROJECTILE, DamageType.PHYSICAL, 7.0f, 360.0f, 3.0f, 30.0f, 5f, "shockmine", "Shock Mine", ShockMineProjectile);
        Abilities["aoefreeze"] = new AOEfreeze(AttackType.PBAOE, DamageType.WATER, 5.0f, 360f, 15f, 1f, 30f, "aoefreeze", "Flashfreeze", AOEFreezeParticles);
        Abilities["onhitnormal"] = new OnHitNormal(AttackType.MELEE, DamageType.PHYSICAL, 0.0f, 0.0f, 0.0f, 0.0f, 0f, "onhitnormal", "On Hit Normal", OnHitNormalParticles);
        Abilities["onhitsworddrop"] = new OnHitSwordDrop(AttackType.MELEE, DamageType.PHYSICAL, 0f, 0f, 0f, 0f, 0f, "onhitsworddrop", "Sword Drop OnHit", OnHitSwordDropObject);
        Abilities["fireballturret"] = new FireballTurret(AttackType.PROJECTILE, DamageType.NONE, 10.0f, 360.0f, 2.0f, 0.0f, 40f, "fireballturret", "Fireball Turret", FireballTurretParticles);
        Abilities["fireballturretfireball"] = new FireballTurretFireball(AttackType.PROJECTILE, DamageType.FIRE, 10.0f, 0.0f, 0.0f, 5.0f, 0f, "fireballturretfireball", "Fireball Turret Fireball", FireballExplosion);
        Abilities["frozenorb"] = new FrozenOrb(AttackType.PROJECTILE, DamageType.NONE, 5.0f, 360.0f, 8.0f, 0.0f, 30f, "frozenorb", "Frozen Orb", FrozenOrbParticles);
        Abilities["frozenorbicebolt"] = new IceBolt(AttackType.PROJECTILE, DamageType.WATER, 8f, 0f, 0.0f, 0f, 0f, "frozenorbicebolt", "Frozen Orb Ice Bolt", IceBoltParticles);
        Abilities["boomerangblade"] = new BoomerangBlade(AttackType.PROJECTILE, DamageType.PHYSICAL, 5f, 0f, 4.0f, 0f, 20f, "boomerangblade", "Boomerang Blade", BoomerangBladeExplosion);
        Abilities["boomerangbladereturn"] = new BoomerangBladeReturn(AttackType.HONINGPROJECTILE, DamageType.PHYSICAL, 0.0f, 0.0f, 0.0f, 0.0f, 0f, "boomerangbladereturn", "Boomerang Blade(returning)", BoomerangBladeExplosion);
        Abilities["axethrow"] = new AxeThrow(AttackType.PROJECTILE, DamageType.PHYSICAL, 5.0f, 0.0f, 2.0f, 0.0f, 3f, "axethrow", "Axe Throw", AxeThrowExplosion);
        Abilities["frostnova"] = new FrostNova(AttackType.PBAOE, DamageType.WATER, 7f, 360f, 20f, 0f, 60f, "frostnova", "Frost Nova", IceBoltParticles);
        Abilities["shieldbreaker"] = new ShieldBreaker(AttackType.PBAOE, DamageType.PHYSICAL, 10f, 15f, 0.0f, 5f, 20f, "shieldbreaker", "Shieldbreaker", ShieldBreakerParticles);
        Abilities["dropdasteel"] = new DropDaSteel(AttackType.STATUS, DamageType.NONE, 0f, 0f, 32f, 0f, 0f, "dropdasteel", "Drop Da Steel", dropdasteelparticles);

        Abilities["dervishdeathgrip"] = new Deathgrip(AttackType.PBAOE, DamageType.NONE, 3f, 360f, 0f, 0f, 0f, "dervishdeathgrip", "Dervish Deathgrip", DeathgripParticles);
        Abilities["infernalfireball"] = new InfernalFireball(AttackType.HONINGPROJECTILE, DamageType.FIRE, 5.0f, 360.0f, 5.0f, 30.0f, 0f, "infernalfireball", "Infernal Fireball", InfernalFireballExplosion);

        Abilities["whirlwind"] = new Whirlwind(AttackType.GROUNDTARGET, DamageType.PHYSICAL, 3.0f, 360.0f, 0.0f, 10.0f, 0f, "whirlwind", "Whirlwind", OnHitNormalParticles);
        Abilities["dervish"] = new Dervish(AttackType.GROUNDTARGET, DamageType.PHYSICAL, 5f, 360f, 0.0f, 10f, 100f, "dervish", "Dervish", OnHitNormalParticles);

        Abilities["bossinfernalfireball"] = new BossInfernalFireball(AttackType.HONINGPROJECTILE, DamageType.FIRE, 5.0f, 360.0f, 5.0f, 30.0f, 0f, "bossinfernalfireball", "Boss Infernal Fireball", BossInfernalFireballExplosion);

        //Abilities["healorb"] = new HealOrb(AttackType.PROJECTILE, DamageType.NONE, 5.0f, 360.0f, 0.0f, 0.0f, "healorb", "Heal Orb", HealOrbExplosion);

        Abilities["deathanddecay"] = new DeathAndDecay(AttackType.GROUNDTARGET, DamageType.SHADOW, 5.0f, 360.0f, 0.0f, 1.0f, 0f, "deathanddecay", "Death and Decay", DeathAndDecaySpawn);
        Abilities["shadowfury"] = new Shadowfury(AttackType.GROUNDTARGET, DamageType.SHADOW, 3.0f, 360.0f, 0.0f, 1.0f, 0f, "shadowfury", "Shadowfury", ShadowfurySpawn);
        Abilities["shadowtrap"] = new Shadowtrap(AttackType.GROUNDTARGET, DamageType.SHADOW, 3.0f, 360.0f, 0.0f, 0.0f, 0f, "shadowtrap", "Shadowtrap", ShadowtrapSpawn);

        #endregion

        #region enemy abilities

        Abilities["enemyfireball"] = new Fireball(AttackType.PROJECTILE, DamageType.FIRE, 10.0f, 0.0f, 4f, 10.0f, 0f, "enemyfireball", "Enemy Fireball", FireballExplosion);
        Abilities["enemycleaveslow"] = new Cleave(AttackType.MELEE, DamageType.PHYSICAL, 3.0f, 45.0f, 3.0f, 5.0f, 0f, "cleave", "Cleave", CleaveParticles);
        Abilities["enemycleavenormal"] = new Cleave(AttackType.MELEE, DamageType.PHYSICAL, 3.0f, 45.0f, 2f, 2.5f, 0f, "cleave", "Cleave", CleaveParticles);
        Abilities["enemycleavefast"] = new Cleave(AttackType.MELEE, DamageType.PHYSICAL, 3.0f, 45.0f, 1.0f, 1.0f, 0f, "cleave", "Cleave", CleaveParticles);
        Abilities["enemydeathgrip"] = new Deathgrip(AttackType.PBAOE, DamageType.SHADOW, 10.0f, 360.0f, 10.0f, 0.0f, 0.0f, "enemydeathgrip", "Enemy Deathgrip", DeathgripParticles);

        Abilities["bossfireball"] = new BossFireball(AttackType.PROJECTILE, DamageType.FIRE, 10.0f, 0.0f, 5.0f, 10.0f, 0f, "bossfireball", "Boss Fireball", BossInfernalFireballExplosion);

        Abilities["bossflamestrike"] = new BossFlamestrike(AttackType.PBAOE, DamageType.FIRE, 10.0f, 360.0f, 10.0f, 10.0f, 0.0f, "bossflamestrike", "Boss Flamestrike", BossFlamestrikeParticles);
        Abilities["enemywhirlwind"] = new Whirlwind(AttackType.GROUNDTARGET, DamageType.PHYSICAL, 3.0f, 360.0f, 8.0f, 5.0f, 0f, "enemywhirlwind", "Enemy Whirlwind", OnHitNormalParticles);

        #endregion
        #endregion
    }
Пример #2
0
        public Spell GetSpell(SpellId spellId)
        {
            Spell s = Spells[(int)spellId];

            if (s != null)
            {
                return(s);
            }
            //Spell s = null;
            //if (Spells.TryGetValue((int)spellId, out s)) return s;

            switch (spellId)
            {
            case SpellId.ArcaneBolt:
                s = new ArcaneBolt(this);
                break;

            case SpellId.LightningBolt:
                s = new LightningBolt(this);
                break;

            case SpellId.ArcaneMissiles:
                s = new ArcaneMissiles(this, false);
                break;

            case SpellId.ArcaneMissilesMB:
                s = new ArcaneMissiles(this, true);
                break;

            case SpellId.ArcaneMissilesCC:
                s = new ArcaneMissilesCC(this);
                break;

            case SpellId.ArcaneMissilesNoProc:
                s = new ArcaneMissiles(this, false, true, false, false);
                break;

            /*case SpellId.ArcaneMissilesFTF:
             *  s = new ArcaneMissiles(this);
             *  break;
             * case SpellId.ArcaneMissilesFTT:
             *  s = new ArcaneMissiles(this);
             *  break;*/
            case SpellId.Frostbolt:
                s = new Frostbolt(this);
                break;

            case SpellId.FrostboltNoCC:
                s = new Frostbolt(this, true, false, false);
                break;

            case SpellId.Fireball:
                s = new Fireball(this, false);
                break;

            case SpellId.FrostfireBolt:
                s = new FrostfireBolt(this, false);
                break;

            case SpellId.Pyroblast:
                s = new Pyroblast(this, false);
                break;

            case SpellId.FireBlast:
                s = new FireBlast(this);
                break;

            case SpellId.Scorch:
                s = new Scorch(this);
                break;

            case SpellId.ScorchNoCC:
                s = new Scorch(this, false);
                break;

            case SpellId.ArcaneBarrage:
                s = new ArcaneBarrage(this);
                break;

            case SpellId.ArcaneBlast33:
                s = new ArcaneBlast(this, 3, 3);
                break;

            case SpellId.ArcaneBlast33NoCC:
                s = new ArcaneBlast(this, 3, 3, true, false, false);
                break;

            case SpellId.ArcaneBlast00:
                s = new ArcaneBlast(this, 0, 0);
                break;

            case SpellId.ArcaneBlast00NoCC:
                s = new ArcaneBlast(this, 0, 0, true, false, false);
                break;

            case SpellId.ArcaneBlast10:
                s = new ArcaneBlast(this, 1, 0);
                break;

            case SpellId.ArcaneBlast01:
                s = new ArcaneBlast(this, 0, 1);
                break;

            case SpellId.ArcaneBlast11:
                s = new ArcaneBlast(this, 1, 1);
                break;

            case SpellId.ArcaneBlast11NoCC:
                s = new ArcaneBlast(this, 1, 1, true, false, false);
                break;

            case SpellId.ArcaneBlast22:
                s = new ArcaneBlast(this, 2, 2);
                break;

            case SpellId.ArcaneBlast22NoCC:
                s = new ArcaneBlast(this, 2, 2, true, false, false);
                break;

            case SpellId.ArcaneBlast12:
                s = new ArcaneBlast(this, 1, 2);
                break;

            case SpellId.ArcaneBlast23:
                s = new ArcaneBlast(this, 2, 3);
                break;

            case SpellId.ArcaneBlast30:
                s = new ArcaneBlast(this, 3, 0);
                break;

            case SpellId.ABAM:
                s = new ABAM(this);
                break;

            case SpellId.ABMBAM:
                s = new ABMBAM(this);
                break;

            case SpellId.ABABar:
                s = new ABABar(this);
                break;

            case SpellId.ABAMP:
                s = new ABAMP(this);
                break;

            case SpellId.AB3AMSc:
                s = new AB3AMSc(this);
                break;

            case SpellId.ABAM3Sc:
                s = new ABAM3Sc(this);
                break;

            case SpellId.ABAM3Sc2:
                s = new ABAM3Sc2(this);
                break;

            case SpellId.ABAM3FrB:
                s = new ABAM3FrB(this);
                break;

            case SpellId.ABAM3FrB2:
                s = new ABAM3FrB2(this);
                break;

            case SpellId.ABFrB:
                s = new ABFrB(this);
                break;

            case SpellId.AB3FrB:
                s = new AB3FrB(this);
                break;

            case SpellId.ABFrB3FrB:
                s = new ABFrB3FrB(this);
                break;

            case SpellId.ABFrB3FrB2:
                s = new ABFrB3FrB2(this);
                break;

            case SpellId.ABFrB3FrBSc:
                s = new ABFrB3FrBSc(this);
                break;

            case SpellId.ABFB3FBSc:
                s = new ABFB3FBSc(this);
                break;

            case SpellId.AB3Sc:
                s = new AB3Sc(this);
                break;

            case SpellId.FireballScorch:
                s = new FireballScorch(this);
                break;

            case SpellId.FireballFireBlast:
                s = new FireballFireBlast(this);
                break;

            case SpellId.ABAM3ScCCAM:
                s = new ABAM3ScCCAM(this);
                break;

            case SpellId.ABAM3Sc2CCAM:
                s = new ABAM3Sc2CCAM(this);
                break;

            case SpellId.ABAM3FrBCCAM:
                s = new ABAM3FrBCCAM(this);
                break;

            case SpellId.ABAM3FrBCCAMFail:
                s = new ABAM3FrBCCAMFail(this);
                break;

            case SpellId.ABAM3FrBScCCAM:
                s = new ABAM3FrBScCCAM(this);
                break;

            case SpellId.ABAMCCAM:
                s = new ABAMCCAM(this);
                break;

            case SpellId.ABAM3CCAM:
                s = new ABAM3CCAM(this);
                break;

            case SpellId.ArcaneExplosion:
                s = new ArcaneExplosion(this);
                break;

            case SpellId.FlamestrikeSpammed:
                s = new Flamestrike(this, true);
                break;

            case SpellId.FlamestrikeSingle:
                s = new Flamestrike(this, false);
                break;

            case SpellId.Blizzard:
                s = new Blizzard(this);
                break;

            case SpellId.BlastWave:
                s = new BlastWave(this);
                break;

            case SpellId.DragonsBreath:
                s = new DragonsBreath(this);
                break;

            case SpellId.ConeOfCold:
                s = new ConeOfCold(this);
                break;

            case SpellId.ArcaneBlast0POM:
                s = new ArcaneBlast(this, 0, 0, false, false, true);
                break;

            case SpellId.FireballPOM:
                s = new Fireball(this, true);
                break;

            case SpellId.FrostboltPOM:
                s = new Frostbolt(this, false, false, true);
                break;

            case SpellId.PyroblastPOM:
                s = new Pyroblast(this, true);
                break;

            case SpellId.CustomSpellMix:
                s = new SpellCustomMix(this);
                break;
            }
            if (s != null)
            {
                s.SpellId            = spellId;
                Spells[(int)spellId] = s;
            }

            return(s);
        }