示例#1
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                if (character.waittime <= 160)
                {
                    this.animePoint = this.Animation(character.waittime);
                }
                switch (character.waittime)
                {
                case 0:
                    battle.effects.Add(new Bomber(this.sound, battle, character.position.X, character.position.Y, Bomber.BOMBERTYPE.poison, 2));
                    character.animationpoint.X = -1;
                    this.sound.PlaySE(SoundEffect.bomb);
                    break;

                case 30:
                    this.sound.PlaySE(SoundEffect.eriasteal1);
                    for (int index1 = 0; index1 < battle.panel.GetLength(0); ++index1)
                    {
                        for (int index2 = 0; index2 < battle.panel.GetLength(1); ++index2)
                        {
                            if (battle.panel[index1, index2].color == character.union && battle.panel[index1, index2].state == Panel.PANEL._poison)
                            {
                                battle.panel[index1, index2].State = Panel.PANEL._nomal;
                                this.power += this.subpower;
                            }
                        }
                    }
                    this.ballrend = true;
                    break;

                case 70:
                    this.ballrend = false;
                    this.sound.PlaySE(SoundEffect.sword);
                    Point position = character.position;
                    position.X += 3 * this.UnionRebirth(character.union);
                    PoisonBall poisonBall = new PoisonBall(this.sound, battle, position.X, position.Y, new Vector2((float)(character.position.X * 40.0 + 22.0) + 4 * this.UnionRebirth(character.union), (float)(character.position.Y * 24.0 + 58.0 - 48.0)), character.union, this.Power(character), 2, 20, this.element);
                    poisonBall.badstatus[5]     = true;
                    poisonBall.badstatustime[5] = 300;
                    battle.attacks.Add(this.Paralyze(poisonBall));
                    this.ballrend = false;
                    break;

                case 160:
                    this.animePoint.X = -1;
                    battle.effects.Add(new MoveEnemy(this.sound, battle, character.position.X, character.position.Y));
                    break;
                }
            }
            if (character.waittime < 175 || !this.BlackOutEnd(character, battle))
            {
                return;
            }
            base.Action(character, battle);
        }
示例#2
0
    public override void Fire()
    {
        if (target == null ||
            !target.gameObject.activeInHierarchy ||
            target.GetComponent <Creep>().isPoisoned ||
            Vector3.Distance(transform.position, target.position) > range)
        {
            return;
        }
        // shoot an arrow and give it a target to fly towards.
        GameObject poisonProjectile = Instantiate(projectile, firePos.position, firePos.rotation) as GameObject;
        PoisonBall poisonBall       = poisonProjectile.GetComponent <PoisonBall>();

        poisonBall.damage       = damage;
        poisonBall.target       = target;
        poisonBall.poisonDamage = damage;
        poisonBall.poisonTicks  = poisonTicks;
        poisonBall.damageType   = damageType;
        // shotCD = Time.time + reloadSpeed;
    }